VISU - PHP Game Framework

WindowHints
in package

Table of Contents

Properties

$autoIconify  : bool|null
GLFW_AUTO_ICONIFY
$centerCursor  : bool|null
GLFW_CENTER_CURSOR
$clientAPI  : int|null
GLFW_CLIENT_API
$cocoaframeName  : string|null
GLFW_COCOA_FRAME_NAME
$cocoaGraphicsSwitching  : bool|null
GLFW_COCOA_GRAPHICS_SWITCHING
$cocoaRetinaFramebuffer  : bool|null
GLFW_COCOA_RETINA_FRAMEBUFFER
$contextCreationAPI  : int|null
GLFW_CONTEXT_CREATION_API
$contextVersionMajor  : int|null
GLFW_CONTEXT_VERSION_MAJOR
$contextVersionMinor  : int|null
GLFW_CONTEXT_VERSION_MINOR
$debugContext  : bool|null
GLFW_OPENGL_DEBUG_CONTEXT
$decorated  : bool|null
GLFW_DECORATED
$doubleBuffer  : bool|null
GLFW_DOUBLEBUFFER
$floating  : bool|null
GLFW_FLOATING
$focused  : bool|null
GLFW_FOCUSED
$focusOnShow  : bool|null
GLFW_FOCUS_ON_SHOW
$forwardCompatible  : bool|null
GLFW_OPENGL_FORWARD_COMPAT
$maximized  : bool|null
GLFW_MAXIMIZED
$noError  : bool|null
GLFW_CONTEXT_NO_ERROR
$profile  : int|null
GLFW_OPENGL_PROFILE
$refreshRate  : int|null
GLFW_REFRESH_RATE
$releaseBehavior  : int|null
GLFW_CONTEXT_RELEASE_BEHAVIOR
$resizable  : bool|null
GLFW_RESIZABLE
$robustness  : int|null
GLFW_CONTEXT_ROBUSTNESS
$samples  : int|null
GLFW_SAMPLES
$scaleToMonitor  : bool|null
GLFW_SCALE_TO_MONITOR
$sRGBCapable  : bool|null
GLFW_SRGB_CAPABLE
$stereoscopic  : bool|null
GLFW_STEREO
$transparentFramebuffer  : bool|null
GLFW_TRANSPARENT_FRAMEBUFFER
$visible  : bool|null
GLFW_VISIBLE

Methods

apply()  : void
Applies the hints to the window.
getHintConstantMap()  : array<int, mixed>
Returns an array of all available window hints.
setAutoIconify()  : void
Sets the autoIconify hint. (GLFW_AUTO_ICONIFY)
setCenterCursor()  : void
Sets the centerCursor hint. (GLFW_CENTER_CURSOR)
setClientAPI()  : void
Sets the clientAPI hint. (GLFW_CLIENT_API)
setCocoaFrameName()  : void
Sets the cocoaFrameName hint. (GLFW_COCOA_FRAME_NAME)
setCocoaGraphicsSwitching()  : void
Sets the cocoaGraphicsSwitching hint. (GLFW_COCOA_GRAPHICS_SWITCHING)
setCocoaRetinaFramebuffer()  : void
Sets the cocoaRetinaFramebuffer hint. (GLFW_COCOA_RETINA_FRAMEBUFFER)
setContextCreationAPI()  : void
Sets the contextCreationAPI hint. (GLFW_CONTEXT_CREATION_API)
setContextVersionMajor()  : void
Sets the contextVersionMajor hint. (GLFW_CONTEXT_VERSION_MAJOR)
setContextVersionMinor()  : void
Sets the contextVersionMinor hint. (GLFW_CONTEXT_VERSION_MINOR)
setDebugContext()  : void
Sets the debugContext hint. (GLFW_OPENGL_DEBUG_CONTEXT)
setDecorated()  : void
Sets the decorated hint. (GLFW_DECORATED)
setDoubleBuffer()  : void
Sets the doubleBuffer hint. (GLFW_DOUBLEBUFFER)
setFloating()  : void
Sets the floating hint. (GLFW_FLOATING)
setFocused()  : void
Sets the focused hint. (GLFW_FOCUSED)
setFocusOnShow()  : void
Sets the focusOnShow hint. (GLFW_FOCUS_ON_SHOW)
setForwardCompatible()  : void
Sets the forwardCompatible hint. (GLFW_OPENGL_FORWARD_COMPAT)
setMaximized()  : void
Sets the maximized hint. (GLFW_MAXIMIZED)
setNoError()  : void
Sets the noError hint. (GLFW_CONTEXT_NO_ERROR)
setProfile()  : void
Sets the profile hint. (GLFW_OPENGL_PROFILE)
setRefreshRate()  : void
Sets the refreshRate hint. (GLFW_REFRESH_RATE)
setReleaseBehavior()  : void
Sets the releaseBehavior hint. (GLFW_CONTEXT_RELEASE_BEHAVIOR)
setResizable()  : void
Sets the resizable hint. (GLFW_RESIZABLE)
setRobustness()  : void
Sets the robustness hint. (GLFW_CONTEXT_ROBUSTNESS)
setSamples()  : void
Sets the samples hint. (GLFW_SAMPLES)
setScaleToMonitor()  : void
Sets the scaleToMonitor hint. (GLFW_SCALE_TO_MONITOR)
setSRGBCapable()  : void
Sets the sRGBCapable hint. (GLFW_SRGB_CAPABLE)
setStereoscopic()  : void
Sets the stereoscopic hint. (GLFW_STEREO)
setTransparentFramebuffer()  : void
Sets the transparentFramebuffer hint. (GLFW_TRANSPARENT_FRAMEBUFFER)
setVisible()  : void
Sets the visible hint. (GLFW_VISIBLE)

Properties

$autoIconify

GLFW_AUTO_ICONIFY

public bool|null $autoIconify = null

Should the window be iconified when it loses focus? If null, the glfw default value is used

$centerCursor

GLFW_CENTER_CURSOR

public bool|null $centerCursor = null

Should the cursor be centered over the window when created? If null, the glfw default value is used

$clientAPI

GLFW_CLIENT_API

public int|null $clientAPI = null

The client API to use. Possible values are GLFW_OPENGL_API, GLFW_OPENGL_ES_API and GLFW_NO_API. If null, the glfw default value is used. This is a hard constraint.

$cocoaframeName

GLFW_COCOA_FRAME_NAME

public string|null $cocoaframeName = null

The name of the window frame. If null, the glfw default value is used.

$cocoaGraphicsSwitching

GLFW_COCOA_GRAPHICS_SWITCHING

public bool|null $cocoaGraphicsSwitching = null

This allows the context to be used by multiple GPUs simultaneously. This is useful for laptops with both an integrated and a discrete GPU. If null, the glfw default value is used.

$cocoaRetinaFramebuffer

GLFW_COCOA_RETINA_FRAMEBUFFER

public bool|null $cocoaRetinaFramebuffer = null

Should the framebuffer be in Retina mode? This means the framebuffer will have the same resolution as the screen. If null, the glfw default value is used.

$contextCreationAPI

GLFW_CONTEXT_CREATION_API

public int|null $contextCreationAPI = null

The context creation api that should be used. Possible values are GLFW_NATIVE_CONTEXT_API, GLFW_EGL_CONTEXT_API, GLFW_OSMESA_CONTEXT_API. If null, the glfw default value is used. This is a hard constraint.

$contextVersionMajor

GLFW_CONTEXT_VERSION_MAJOR

public int|null $contextVersionMajor = 4

The major version of the client API context to create. In PHP-GLFW this is by default 4. If null, the glfw default value is used. This is a hard constraint.

$contextVersionMinor

GLFW_CONTEXT_VERSION_MINOR

public int|null $contextVersionMinor = 1

The minor version of the client API context to create. In PHP-GLFW this is by default 1. If null, the glfw default value is used. This is a hard constraint.

$debugContext

GLFW_OPENGL_DEBUG_CONTEXT

public bool|null $debugContext = null

Should the OpenGL context be a debug context? If null, the glfw default value is used.

$decorated

GLFW_DECORATED

public bool|null $decorated = null

Should the window have a menu bar (border, close button etc.)? If null, the glfw default value is used

$doubleBuffer

GLFW_DOUBLEBUFFER

public bool|null $doubleBuffer = null

Should the framebuffer be double buffered? You almost always want this enabled, which is the default. If null, the glfw default value is used.

$floating

GLFW_FLOATING

public bool|null $floating = null

Should the window be floating above other windows? This is also called topmost or always-on-top. If null, the glfw default value is used

$focused

GLFW_FOCUSED

public bool|null $focused = null

Should the window be focused? If null, the glfw default value is used

$focusOnShow

GLFW_FOCUS_ON_SHOW

public bool|null $focusOnShow = null

Should the window be focused when it is shown? If null, the glfw default value is used

$forwardCompatible

GLFW_OPENGL_FORWARD_COMPAT

public bool|null $forwardCompatible = true

Should the OpenGL context be forward compatible? In PHP-GLFW this is by default true. If null, the glfw default value is used.

$maximized

GLFW_MAXIMIZED

public bool|null $maximized = null

Should the window be maximized when created? If null, the glfw default value is used

$noError

GLFW_CONTEXT_NO_ERROR

public bool|null $noError = null

Should the context be created without error reporting? If null, the glfw default value is used.

$profile

GLFW_OPENGL_PROFILE

public int|null $profile = GLFW_OPENGL_CORE_PROFILE

The OpenGL profile to create the context for. Possible values are GLFW_OPENGL_ANY_PROFILE, GLFW_OPENGL_CORE_PROFILE and GLFW_OPENGL_COMPAT_PROFILE. If null, the glfw default value is used. In PHP-GLFW this is by default GLFW_OPENGL_CORE_PROFILE.

$refreshRate

GLFW_REFRESH_RATE

public int|null $refreshRate = null

The desired refresh rate for the fullscreen window, in Hz. This hint is ignored for windowed mode windows. If GLFW_DONT_CARE is specified, the highest available refresh rate will be used. If null, the glfw default value is used.

$releaseBehavior

GLFW_CONTEXT_RELEASE_BEHAVIOR

public int|null $releaseBehavior = null

The release behavior to be used by the context. Possible values are GLFW_ANY_RELEASE_BEHAVIOR, GLFW_RELEASE_BEHAVIOR_FLUSH and GLFW_RELEASE_BEHAVIOR_NONE. If null, the glfw default value is used.

$resizable

GLFW_RESIZABLE

public bool|null $resizable = null

Should the user be able to resize the window? If null, the glfw default value is used

$robustness

GLFW_CONTEXT_ROBUSTNESS

public int|null $robustness = null

The robustness strategy to be used by the context. Possible values are GLFW_NO_ROBUSTNESS, GLFW_NO_RESET_NOTIFICATION and GLFW_LOSE_CONTEXT_ON_RESET. If null, the glfw default value is used.

$samples

GLFW_SAMPLES

public int|null $samples = null

The number of samples to use for multisampling. Zero disables multisampling. If null, the glfw default value is used.

$scaleToMonitor

GLFW_SCALE_TO_MONITOR

public bool|null $scaleToMonitor = null

Should the window content scale be changed when the window is moved to a different monitor? If null, the glfw default value is used

$sRGBCapable

GLFW_SRGB_CAPABLE

public bool|null $sRGBCapable = null

Should the framebuffer be sRGB capable? If null, the glfw default value is used.

$stereoscopic

GLFW_STEREO

public bool|null $stereoscopic = null

Should the framebuffer be stereoscopic? If null, the glfw default value is used. This is a hard constraint.

$transparentFramebuffer

GLFW_TRANSPARENT_FRAMEBUFFER

public bool|null $transparentFramebuffer = null

Should the framebuffer be transparent? If null, the glfw default value is used

$visible

GLFW_VISIBLE

public bool|null $visible = null

Should the window be visible? If null, the glfw default value is used

Methods

apply()

Applies the hints to the window.

public apply() : void

This will execute the glfwWindowHint function for each hint that is not null.

getHintConstantMap()

Returns an array of all available window hints.

public getHintConstantMap() : array<int, mixed>
Return values
array<int, mixed>

setAutoIconify()

Sets the autoIconify hint. (GLFW_AUTO_ICONIFY)

public setAutoIconify(bool|null $autoIconify) : void

Should the window be iconified when it loses focus? If null, the glfw default value is used

Parameters
$autoIconify : bool|null

setCenterCursor()

Sets the centerCursor hint. (GLFW_CENTER_CURSOR)

public setCenterCursor(bool|null $centerCursor) : void

Should the cursor be centered over the window when created? If null, the glfw default value is used

Parameters
$centerCursor : bool|null

setClientAPI()

Sets the clientAPI hint. (GLFW_CLIENT_API)

public setClientAPI(int|null $clientAPI) : void

The client API to use. Possible values are GLFW_OPENGL_API, GLFW_OPENGL_ES_API and GLFW_NO_API. If null, the glfw default value is used. This is a hard constraint.

Parameters
$clientAPI : int|null

setCocoaFrameName()

Sets the cocoaFrameName hint. (GLFW_COCOA_FRAME_NAME)

public setCocoaFrameName(string|null $cocoaFrameName) : void

The name of the window frame. If null, the glfw default value is used.

Parameters
$cocoaFrameName : string|null

setCocoaGraphicsSwitching()

Sets the cocoaGraphicsSwitching hint. (GLFW_COCOA_GRAPHICS_SWITCHING)

public setCocoaGraphicsSwitching(bool|null $cocoaGraphicsSwitching) : void

This allows the context to be used by multiple GPUs simultaneously. This is useful for laptops with both an integrated and a discrete GPU. If null, the glfw default value is used.

Parameters
$cocoaGraphicsSwitching : bool|null

setCocoaRetinaFramebuffer()

Sets the cocoaRetinaFramebuffer hint. (GLFW_COCOA_RETINA_FRAMEBUFFER)

public setCocoaRetinaFramebuffer(bool|null $cocoaRetinaFramebuffer) : void

Should the framebuffer be in Retina mode? This means the framebuffer will have the same resolution as the screen. If null, the glfw default value is used.

Parameters
$cocoaRetinaFramebuffer : bool|null

setContextCreationAPI()

Sets the contextCreationAPI hint. (GLFW_CONTEXT_CREATION_API)

public setContextCreationAPI(int|null $contextCreationAPI) : void

The context creation api that should be used. Possible values are GLFW_NATIVE_CONTEXT_API, GLFW_EGL_CONTEXT_API, GLFW_OSMESA_CONTEXT_API. If null, the glfw default value is used. This is a hard constraint.

Parameters
$contextCreationAPI : int|null

setContextVersionMajor()

Sets the contextVersionMajor hint. (GLFW_CONTEXT_VERSION_MAJOR)

public setContextVersionMajor(int|null $contextVersionMajor) : void

The major version of the client API context to create. In PHP-GLFW this is by default 4. If null, the glfw default value is used. This is a hard constraint.

Parameters
$contextVersionMajor : int|null

setContextVersionMinor()

Sets the contextVersionMinor hint. (GLFW_CONTEXT_VERSION_MINOR)

public setContextVersionMinor(int|null $contextVersionMinor) : void

The minor version of the client API context to create. In PHP-GLFW this is by default 6. If null, the glfw default value is used. This is a hard constraint.

Parameters
$contextVersionMinor : int|null

setDebugContext()

Sets the debugContext hint. (GLFW_OPENGL_DEBUG_CONTEXT)

public setDebugContext(bool|null $debugContext) : void

Should the OpenGL context be a debug context? If null, the glfw default value is used.

Parameters
$debugContext : bool|null

setDecorated()

Sets the decorated hint. (GLFW_DECORATED)

public setDecorated(bool|null $decorated) : void

Should the window have a menu bar (border, close button etc.)? If null, the glfw default value is used

Parameters
$decorated : bool|null

setDoubleBuffer()

Sets the doubleBuffer hint. (GLFW_DOUBLEBUFFER)

public setDoubleBuffer(bool|null $doubleBuffer) : void

Should the framebuffer be double buffered? You almost always want this enabled. If null, the glfw default value is used

Parameters
$doubleBuffer : bool|null

setFloating()

Sets the floating hint. (GLFW_FLOATING)

public setFloating(bool|null $floating) : void

Should the window be floating above other windows? This is also called topmost or always-on-top. If null, the glfw default value is used

Parameters
$floating : bool|null

setFocused()

Sets the focused hint. (GLFW_FOCUSED)

public setFocused(bool|null $focused) : void

Should the window be focused? If null, the glfw default value is used

Parameters
$focused : bool|null

setFocusOnShow()

Sets the focusOnShow hint. (GLFW_FOCUS_ON_SHOW)

public setFocusOnShow(bool|null $focusOnShow) : void

Should the window be focused when it is shown? If null, the glfw default value is used

Parameters
$focusOnShow : bool|null

setForwardCompatible()

Sets the forwardCompatible hint. (GLFW_OPENGL_FORWARD_COMPAT)

public setForwardCompatible(bool|null $forwardCompatible) : void

Should the OpenGL context be forward compatible? In PHP-GLFW this is by default true. If null, the glfw default value is used.

Parameters
$forwardCompatible : bool|null

setMaximized()

Sets the maximized hint. (GLFW_MAXIMIZED)

public setMaximized(bool|null $maximized) : void

Should the window be maximized when created? If null, the glfw default value is used

Parameters
$maximized : bool|null

setNoError()

Sets the noError hint. (GLFW_CONTEXT_NO_ERROR)

public setNoError(bool|null $noError) : void

Should the context be created without error reporting? If null, the glfw default value is used.

Parameters
$noError : bool|null

setProfile()

Sets the profile hint. (GLFW_OPENGL_PROFILE)

public setProfile(int|null $profile) : void

The OpenGL profile to create the context for. Possible values are GLFW_OPENGL_ANY_PROFILE, GLFW_OPENGL_CORE_PROFILE and GLFW_OPENGL_COMPAT_PROFILE. If null, the glfw default value is used. In PHP-GLFW this is by default GLFW_OPENGL_CORE_PROFILE.

Parameters
$profile : int|null

setRefreshRate()

Sets the refreshRate hint. (GLFW_REFRESH_RATE)

public setRefreshRate(int|null $refreshRate) : void

The desired refresh rate for the fullscreen window, in Hz. This hint is ignored for windowed mode windows. If GLFW_DONT_CARE is specified, the highest available refresh rate will be used. If null, the glfw default value is used.

Parameters
$refreshRate : int|null

setReleaseBehavior()

Sets the releaseBehavior hint. (GLFW_CONTEXT_RELEASE_BEHAVIOR)

public setReleaseBehavior(int|null $releaseBehavior) : void

The release behavior to be used by the context. Possible values are GLFW_ANY_RELEASE_BEHAVIOR, GLFW_RELEASE_BEHAVIOR_FLUSH and GLFW_RELEASE_BEHAVIOR_NONE. If null, the glfw default value is used.

Parameters
$releaseBehavior : int|null

setResizable()

Sets the resizable hint. (GLFW_RESIZABLE)

public setResizable(bool $resizable) : void

Should the user be able to resize the window? If null, the glfw default value is used

Parameters
$resizable : bool

setRobustness()

Sets the robustness hint. (GLFW_CONTEXT_ROBUSTNESS)

public setRobustness(int|null $robustness) : void

The robustness strategy to be used by the context. Possible values are GLFW_NO_ROBUSTNESS, GLFW_NO_RESET_NOTIFICATION and GLFW_LOSE_CONTEXT_ON_RESET. If null, the glfw default value is used.

Parameters
$robustness : int|null

setSamples()

Sets the samples hint. (GLFW_SAMPLES)

public setSamples(int|null $samples) : void

The number of samples to use for multisampling. Zero disables multisampling. If null, the glfw default value is used

Parameters
$samples : int|null

setScaleToMonitor()

Sets the scaleToMonitor hint. (GLFW_SCALE_TO_MONITOR)

public setScaleToMonitor(bool|null $scaleToMonitor) : void

Should the window content scale be changed when the window is moved to a different monitor? If null, the glfw default value is used

Parameters
$scaleToMonitor : bool|null

setSRGBCapable()

Sets the sRGBCapable hint. (GLFW_SRGB_CAPABLE)

public setSRGBCapable(bool|null $sRGBCapable) : void

Should the framebuffer be sRGB capable? If null, the glfw default value is used

Parameters
$sRGBCapable : bool|null

setStereoscopic()

Sets the stereoscopic hint. (GLFW_STEREO)

public setStereoscopic(bool|null $stereoscopic) : void

Should the framebuffer be stereoscopic? If null, the glfw default value is used

Parameters
$stereoscopic : bool|null

setTransparentFramebuffer()

Sets the transparentFramebuffer hint. (GLFW_TRANSPARENT_FRAMEBUFFER)

public setTransparentFramebuffer(bool|null $transparentFramebuffer) : void

Should the framebuffer be transparent? If null, the glfw default value is used

Parameters
$transparentFramebuffer : bool|null

setVisible()

Sets the visible hint. (GLFW_VISIBLE)

public setVisible(bool|null $visible) : void

Should the window be visible? If null, the glfw default value is used

Parameters
$visible : bool|null

        
On this page

Search results