Class GLFWWindowManager
GLFW Implementation Of Window. This Implementation supports shared contexts.
Inheritance
java.lang.Object
GLFWWindowManager
Syntax
public class GLFWWindowManager implements Expendable
Constructors
GLFWWindowManager(CoreEngine core)
Declaration
public GLFWWindowManager(CoreEngine core)
Parameters
Methods
dispose()
Declaration
Overrides
disposeAllWindows()
Destroys all active contexts. This is executed before the engine terminates. Throws Exception.
Declaration
public void disposeAllWindows()
disposeAllWindows(GLFWWindowContext context)
Destroys all windows in a active context. Throws Exception.
Declaration
public void disposeAllWindows(GLFWWindowContext context)
Parameters
findContext(long context)
Declaration
public GLFWWindowContext findContext(long context)
Parameters
Type |
Name |
Description |
long |
context |
|
Returns
findContext(String name)
Returns a GLContext, if no GLContext is found null is returned.
Declaration
public GLFWWindowContext findContext(String name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
getContext(String name)
Finds the specific context in the shared contexts bucket list.
Declaration
public Map.Entry<GLFWWindowContext, CopyOnWriteArrayList<GLFWWindow>> getContext(String name)
Parameters
Type |
Name |
Description |
String |
name |
Name of the context to search for.
|
Returns
getCoreEngine()
Declaration
public CoreEngine getCoreEngine()
Returns
getGLFWWindow(String name)
Gets the window specified.
Declaration
public GLFWWindow getGLFWWindow(String name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
init(CoreEngine coreEngine)
Declaration
public void init(CoreEngine coreEngine)
Parameters
Declaration
public void input(float delta)
Parameters
Type |
Name |
Description |
float |
delta |
|
isStopRequested()
Declaration
public static boolean isStopRequested()
Returns
openWindow(GLFWWindow wnd)
Opens the window using the create() method in GLFWWindow and adds it to the bucket list. Without Shared GLContext. And creates a entry in the shared context bucket list using the name of the window as context name and handle as context handle, and if in the future you wish to add a window to this context use the window's name as the sharedContextName.
Declaration
public void openWindow(GLFWWindow wnd)
Parameters
openWindow(GLFWWindow wnd, long sharedContext)
Declaration
public void openWindow(GLFWWindow wnd, long sharedContext)
Parameters
Type |
Name |
Description |
GLFWWindow |
wnd |
|
long |
sharedContext |
|
openWindow(GLFWWindow wnd, String sharedContextName)
Opens the window using the create() method in GLFWWindow and adds it to the bucket list. With Shared GLContext. Using the name, if the context with that name exists already then it adds the window to that shared context, if not then creates a new context with that name and sets the context handle to the window handle.
Declaration
public void openWindow(GLFWWindow wnd, String sharedContextName)
Parameters
Type |
Name |
Description |
GLFWWindow |
wnd |
|
String |
sharedContextName |
|
Exceptions
printWindows()
Declaration
public void printWindows()
raiseStopFlag()
Declaration
public static void raiseStopFlag()
render()
Renders all windows stored in the bucket list, and the windows which inherit their context.
Declaration
update(float delta)
Declaration
public void update(float delta)
Parameters
Type |
Name |
Description |
float |
delta |
|