• Articles
  • Api Documentation
Show / Hide Table of Contents
  • net.abi.abisEngine.components
    • Camera
    • DirectionalLight
    • FreeLook
    • FreeMove
    • Light
    • LockView
    • MeshRenderer
    • PointLight
    • SceneComponent
    • SpotLight
  • net.abi.abisEngine.core
    • CoreEngine
    • Main
    • Time
  • net.abi.abisEngine.entities
    • Entity
    • EntityI
  • net.abi.abisEngine.handlers.file
    • FileHandler
    • PathHandle
    • PathResolveI
    • PathType
  • net.abi.abisEngine.handlers.logging
    • Logger
    • LogLevel
    • LogManager
  • net.abi.abisEngine.input
    • GLFWInput
    • GLFWMouseAndKeyboardInput
  • net.abi.abisEngine.math
    • Math
    • Matrix
    • Matrix4f
    • Quaternion
    • Transform
    • Vector2f
    • Vector2i
    • Vector3f
    • Vector3i
    • Vector4f
    • Vector4fI
  • net.abi.abisEngine.rendering.asset
    • AssetClassifier
    • AssetContainer
    • AssetI
    • AssetLoaderParameters
    • AssetLoaderParameters.LoadedCallback
    • AssetLoadTask
    • AssetManager
    • AssetStore
    • TaskCompleteHandler
  • net.abi.abisEngine.rendering.asset.loaders
    • AssetLoader
    • AsyncAssetLoader
    • ModelSceneLoader
    • ModelSceneLoader.Parameter
    • SyncAssetLoader
  • net.abi.abisEngine.rendering.image
    • AEImage
    • ImageMetaData
    • PixelMap
  • net.abi.abisEngine.rendering.material
    • Material
  • net.abi.abisEngine.rendering.mesh
    • AIMeshLoader
    • Mesh
    • MeshResource
    • Model
    • ModelScene
    • Vertex
  • net.abi.abisEngine.rendering.pipeline
    • RenderingEngine
  • net.abi.abisEngine.rendering.scene
    • Scene
    • SceneManager
  • net.abi.abisEngine.rendering.scene.scenes
    • EngineSplashScreen
  • net.abi.abisEngine.rendering.shader
    • AEShader
    • AEShader.AEShaderType
    • AEShaderResource
    • ForwardAmbientShader
    • ForwardDirectionalShader
    • ForwardPointShader
    • ForwardSpotShader
    • GLSLLayoutQualifier
    • GLSLUniform
    • GLSLUniformBlockObject
    • GLSLUniformBlockObjectData
    • Shader
    • Shader.ShaderSource
    • Shader.ShaderType
    • ShaderResource
    • WireFrameShader
  • net.abi.abisEngine.rendering.shader.compiler
    • AEGLInfo
    • AEShaderCompiler
    • AEShaderCompiler.GLSLStruct
    • AEShaderCompiler.ShaderData
    • AEShaderCompiler.ShaderSource
    • Tokens
    • Tokens.Keywords
    • Tokens.Operators
    • Tokens.Qualifiers
  • net.abi.abisEngine.rendering.shader.loader
    • AEShaderLoader
  • net.abi.abisEngine.rendering.shader.parser
    • AEShaderParserYAML
  • net.abi.abisEngine.rendering.shader.parser.fileTypes.yaml
    • AEDemoProperty
    • AEPrepProperty
    • AEShaderFileYAML
    • AEShaderGLSLProgram
    • AEShaderPass
  • net.abi.abisEngine.rendering.texture
    • Texture
    • Texture.TextureData
    • TextureResource
  • net.abi.abisEngine.rendering.window
    • GLFWWindow
    • GLFWWindow.AnimatedCursor
    • GLFWWindow.CursorI
    • GLFWWindow.GLFWWindowProperties
    • GLFWWindow.StaticCursor
    • GLFWWindow.StaticCursorResource
    • GLFWWindowManager
    • GLFWWindowManager.GLFWWindowContext
  • net.abi.abisEngine.rendering.window.models
    • EngineLoader
  • net.abi.abisEngine.util
    • Attenuation
    • Color
    • Expendable
    • IOUtil
    • MappedValues
    • ThreadUtils
    • Util
  • net.abi.abisEngine.util.async
    • Async
    • AsyncResult
    • AsyncTask
    • AsyncThreadDispatcher
  • net.abi.abisEngine.util.cacheing
    • GenericCache
    • GenericCacheI
    • TwoFactorGenericCache
    • TwoFactorGenericCacheI
  • net.abi.abisEngine.util.exceptions
    • AECursorInitializationException
    • AEException
    • AEGLFWWindowInitializationException
    • AEImageManipulationException
    • AEIOException
    • AERuntimeException
    • AEShaderCompilerRuntimeException
  • tests.renderTest
    • Start
  • tests.renderTest.entitys
    • FlatPlane
    • MonkeyHead
  • tests.renderTest.materials
    • BricksOne
    • BricksTwo
  • tests.renderTest.scenes
    • MainMenu
    • TestGame
  • tests.renderTest.windows
    • MainGame

Class GLFWWindow

Inheritance
java.lang.Object
Expendable
GLFWWindow
Syntax
public class GLFWWindow implements Expendable

Constructors

GLFWWindow()

Declaration
public GLFWWindow()

GLFWWindow(GLFWWindowProperties props)

Declaration
public GLFWWindow(GLFWWindowProperties props)
Parameters
Type Name Description
GLFWWindowProperties props

GLFWWindow(int sc_width, int sc_height, String name, String title, boolean fullscreen, int vSync)

Declaration
public GLFWWindow(int sc_width, int sc_height, String name, String title, boolean fullscreen, int vSync)
Parameters
Type Name Description
int sc_width
int sc_height
String name
String title
boolean fullscreen
int vSync

GLFWWindow(int sc_width, int sc_height, String name, String title, boolean fullscreen, int vSync, long preferedMonitor)

Initializes the window instance but dose not create the window.

Declaration
public GLFWWindow(int sc_width, int sc_height, String name, String title, boolean fullscreen, int vSync, long preferedMonitor)
Parameters
Type Name Description
int sc_width

Width of the window.

int sc_height

Height of the window.

String name
String title
boolean fullscreen
int vSync
long preferedMonitor

Fields

GLFW_CLIENT_API

Declaration
public static final int GLFW_CLIENT_API= 0x22001
Field Value
Type Description
final int

GLFW_FOCUSED

Declaration
public static final int GLFW_FOCUSED= 0x20001
Field Value
Type Description
final int

GLFW_RED_BITS

PixelFormat hints.

Declaration
public static final int GLFW_RED_BITS= 0x21001
Field Value
Type Description
final int

GLFW_TRUE

Boolean values.

Declaration
public static final int GLFW_TRUE= 1
Field Value
Type Description
final int

id

Unique id given to the window, this is used if there are multiple windows with the same names.

Declaration
public UUID id
Field Value
Type Description
UUID

NULL

Declaration
public static final long NULL= 0L
Field Value
Type Description
final long

properties

Properties and preferences

Declaration
protected GLFWWindowProperties properties
Field Value
Type Description
GLFWWindowProperties

videoMode

Declaration
public GLFWVidMode videoMode
Field Value
Type Description
GLFWVidMode

Methods

addGLFWWindowHint(int hint, int value)

Declaration
public void addGLFWWindowHint(int hint, int value)
Parameters
Type Name Description
int hint
int value

addScene(Scene scene)

Declaration
public void addScene(Scene scene)
Parameters
Type Name Description
Scene scene

addScenes()

Scenes should only be added here, since it is systematically called during the window making process.

Declaration
protected abstract void addScenes()
Returns
Type Description
abstract void

centerWindow()

Centers the window on the monitor it was created on.

Declaration
public void centerWindow()

close()

Called before the window is destroyed with the context, here the user can call last minute methods which require window handles. But Dont call the engine to stop becasue the window is already destroyed after and is removed from GLFW context.

Declaration
protected abstract void close()
Returns
Type Description
abstract void

closeWindow()

Declaration
public void closeWindow()

create()

Creates a new window on the primary monitor with a new context. It is not recommended that you create a window with this method unless you have a way of keeping track of this window and updating rendering etc. Otherwise use GLWFWWindowManager's openWindow function. But this instance if created explicitly through user code and not the engine's window manager this window will not be updated automatically through the core engine.

Declaration
public GLFWWindow create()
Returns
Type Description
GLFWWindow
Exceptions
Type Condition
AEGLFWWindowInitializationException

create(long monitor, long share, RenderingEngine rndEng)

Creates the window. Must be called from main thread.

Declaration
public GLFWWindow create(long monitor, long share, RenderingEngine rndEng)
Parameters
Type Name Description
long monitor

The monitor to create the window on. NULL will create it on main monitor.

long share

The handle of the window the new window will share. NULL will make a new GLContext.

RenderingEngine rndEng
Returns
Type Description
GLFWWindow
Exceptions
Type Condition
AEGLFWWindowInitializationException

create(long monitor, RenderingEngine rndEng)

This monitor will be considered the preferred monitor.

Declaration
public GLFWWindow create(long monitor, RenderingEngine rndEng)
Parameters
Type Name Description
long monitor
RenderingEngine rndEng
Returns
Type Description
GLFWWindow
Exceptions
Type Condition
AEGLFWWindowInitializationException

create(long share)

Creates a window on the shared context on the preferred monitor.

Declaration
public GLFWWindow create(long share)
Parameters
Type Name Description
long share
Returns
Type Description
GLFWWindow
Exceptions
Type Condition
AEGLFWWindowInitializationException

create(RenderingEngine rndEng)

Declaration
public GLFWWindow create(RenderingEngine rndEng)
Parameters
Type Name Description
RenderingEngine rndEng
Returns
Type Description
GLFWWindow

dispose()

Frees callbacks and destroys the window. Also before termination calls the abstract function close to let specified actions be performed before terminating.

Declaration
public void dispose()
Overrides
Expendable.dispose()

focusWindow()

Declaration
public void focusWindow()

genUniqueID()

Do not call this method it is only called by GLFWWindowManager if there is a conflict of duplicate id's. NOTE: - This will produce a null pointer exception if called externally after creation of the window.

Declaration
public void genUniqueID()

getAssetManager()

Declaration
public AssetManager getAssetManager()
Returns
Type Description
AssetManager

getAttribute(int attrib)

Returns a boolean for the attribute given to query.

Declaration
public boolean getAttribute(int attrib)
Parameters
Type Name Description
int attrib
Returns
Type Description
boolean

getCapabilities()

Declaration
public GLCapabilities getCapabilities()
Returns
Type Description
GLCapabilities

getCenter()

Declaration
public Vector2f getCenter()
Returns
Type Description
Vector2f

getGlfw_Handle()

Declaration
public long getGlfw_Handle()
Returns
Type Description
long

getID()

Declaration
public UUID getID()
Returns
Type Description
UUID

getInput()

Declaration
public <T> T getInput()
Returns
Type Description
<T> T

getMonitor()

Declaration
public long getMonitor()
Returns
Type Description
long

getPHeight()

Declaration
public int getPHeight()
Returns
Type Description
int

getProperties()

Declaration
public GLFWWindowProperties getProperties()
Returns
Type Description
GLFWWindowProperties

getPWidth()

Returns width in pixels

Declaration
public int getPWidth()
Returns
Type Description
int

getRenderEngine()

Declaration
public RenderingEngine getRenderEngine()
Returns
Type Description
RenderingEngine

getSceneManager()

Declaration
public SceneManager getSceneManager()
Returns
Type Description
SceneManager

getTitle()

Declaration
public String getTitle()
Returns
Type Description
String

getWindowName()

Declaration
public String getWindowName()
Returns
Type Description
String

getWindowOpacity()

Declaration
public float getWindowOpacity()
Returns
Type Description
float

hideWindow()

Declaration
public void hideWindow()

input(float delta)

Declaration
public void input(float delta)
Parameters
Type Name Description
float delta

isCloseRequested()

Declaration
public boolean isCloseRequested()
Returns
Type Description
boolean

isFocused()

Declaration
public boolean isFocused()
Returns
Type Description
boolean

isFullscreen()

Declaration
public boolean isFullscreen()
Returns
Type Description
boolean

isMinimized()

Declaration
public boolean isMinimized()
Returns
Type Description
boolean

isvSync()

Declaration
public int isvSync()
Returns
Type Description
int

minimizeWindow()

Declaration
public void minimizeWindow()

post_init()

Same as pre_init except its called after window creation and only attributes should be set here. This method is called after creating and before showing the window.

Declaration
protected abstract void post_init()
Returns
Type Description
abstract void

pre_init()

This is method where window hints can be set. This method is called before the creation of the window and should be the only place to set hints and set other constraints. This method should not be called externally since it can alter the state of the next window that is created.

Declaration
protected abstract void pre_init()
Returns
Type Description
abstract void

render()

Declaration
public void render()

requestFocus()

Declaration
public void requestFocus()

resetToDefaults()

Declaration
public void resetToDefaults()

restoreWindow()

Declaration
public void restoreWindow()

setAssetStore(AssetStore store)

Declaration
public void setAssetStore(AssetStore store)
Parameters
Type Name Description
AssetStore store

setAttribute(int attrib, int value)

Sets the attribute and the value given to the current window.

Declaration
public void setAttribute(int attrib, int value)
Parameters
Type Name Description
int attrib
int value

setCursor(CursorI cursor)

Declaration
public void setCursor(CursorI cursor)
Parameters
Type Name Description
GLFWWindow.CursorI cursor

setCursorType()

Declaration
public void setCursorType()

setFullscreen(boolean fullscreen)

Changes the video mode to full screen or vice versa

Declaration
public void setFullscreen(boolean fullscreen)
Parameters
Type Name Description
boolean fullscreen

setMonitor()

Moves the window to the monitor described in the preferredMonitor variable or in the setPreferredMonitor() function.

Declaration
public void setMonitor()

setPreferredMonitor(long prfdMntr)

Sets the preferred monitor for this window. meaning what monitor this window is supposed to be on, is going to be on, or the default for it. it can also be used to set the target location for the setMonitor() function.

Declaration
public void setPreferredMonitor(long prfdMntr)
Parameters
Type Name Description
long prfdMntr

setProperties(GLFWWindowProperties properties)

Declaration
public void setProperties(GLFWWindowProperties properties)
Parameters
Type Name Description
GLFWWindowProperties properties

setRenderEngine(RenderingEngine rndEng)

Declaration
public void setRenderEngine(RenderingEngine rndEng)
Parameters
Type Name Description
RenderingEngine rndEng

setSceneManager(SceneManager sceneManager)

Declaration
public void setSceneManager(SceneManager sceneManager)
Parameters
Type Name Description
SceneManager sceneManager

setSizeLimit(int minwidth, int minheight, int maxwidth, int maxheight)

Sets the size limits of the current created window to ones provided.

Declaration
public void setSizeLimit(int minwidth, int minheight, int maxwidth, int maxheight)
Parameters
Type Name Description
int minwidth
int minheight
int maxwidth
int maxheight

setTitle(String title)

Declaration
public void setTitle(String title)
Parameters
Type Name Description
String title

setvSync(int vSync)

Declaration
public void setvSync(int vSync)
Parameters
Type Name Description
int vSync

setWindowIcon(AEImage... icons)

Icons can be set to null by setting the first element of the array to null to reset to default platform window icon.

Declaration
public void setWindowIcon(AEImage... icons)
Parameters
Type Name Description
AEImage... icons

setWindowMonitor()

Sets the window onto the preferred monitor as defined in properties and also carries all other setting over so to change the window on the other monitor change the properties before moving.

Declaration
public void setWindowMonitor()

setWindowOpacity(float opacity)

Declaration
public void setWindowOpacity(float opacity)
Parameters
Type Name Description
float opacity

setWindowPosition(int xpos, int ypos)

Sets the windows position on the preferred monitor.

Declaration
public void setWindowPosition(int xpos, int ypos)
Parameters
Type Name Description
int xpos
int ypos

setWindowPosition(Vector2i newPos)

Declaration
public void setWindowPosition(Vector2i newPos)
Parameters
Type Name Description
Vector2i newPos

setWindowTitle(String title)

Declaration
public void setWindowTitle(String title)
Parameters
Type Name Description
String title

showWindow()

Declaration
public void showWindow()

swapBuffers()

Declaration
public void swapBuffers()

toggleFullScreen()

Declaration
public void toggleFullScreen()

toggleVSync()

Declaration
public void toggleVSync()

toString()

Declaration
public String toString()
Returns
Type Description
String

update(float delta)

Declaration
public void update(float delta)
Parameters
Type Name Description
float delta
Back to top Generated by DocFX