public abstract class Window
extends java.lang.Object
Application
, but this class could be extended directly as well.
When extended, life-cycle methods should be called manually.Modifier and Type | Field and Description |
---|---|
protected Color |
colorBg
Background color of the window.
|
protected long |
handle
Pointer to the native GLFW window.
|
Constructor and Description |
---|
Window() |
Modifier and Type | Method and Description |
---|---|
protected void |
dispose()
Method to dispose all used application resources and destroy its window.
|
protected void |
disposeImGui()
Method to destroy Dear ImGui context.
|
protected void |
disposeWindow()
Method to destroy GLFW window.
|
protected void |
endFrame()
Method called in the end of the main cycle.
|
Color |
getColorBg() |
long |
getHandle() |
protected void |
init(Configuration config)
Method to initialize application.
|
protected void |
initImGui(Configuration config)
Method to initialize Dear ImGui context.
|
protected void |
initWindow(Configuration config)
Method to create and initialize GLFW window.
|
protected void |
postProcess()
Method called every frame, after calling
process() method. |
protected void |
preProcess()
Method called every frame, before calling
process() method. |
abstract void |
process()
Method to be overridden by user to provide main application logic.
|
protected void |
run()
Main application loop.
|
protected void |
runFrame()
Method used to run the next frame.
|
protected void |
startFrame()
Method called at the beginning of the main cycle.
|
protected long handle
protected final Color colorBg
protected void init(Configuration config)
config
- configuration object with basic window informationprotected void dispose()
protected void initWindow(Configuration config)
config
- configuration object with basic window informationprotected void initImGui(Configuration config)
config
- configuration object with basic window informationprotected void preProcess()
process()
method.protected void postProcess()
process()
method.protected void run()
protected void runFrame()
public abstract void process()
protected void startFrame()
protected void endFrame()
protected void disposeImGui()
protected void disposeWindow()
public final long getHandle()