Skip to content
Mistress_Meeple edited this page Aug 24, 2020 · 1 revision

Client

The client class is the quickstarter for the OpenGL, GLFW and Nuklear contexts providing a neat wrapper for all of them.

Class name [variable name]

  1. GLContext [glContext]
  2. NkContextSingleton [nkContext]
  3. FrameTimeManager [frameTimeManager]
  4. FrameTimings [currentFrameDelta]
  5. MirroredWindowCallbacks [callbacks]
  6. UserInput [userInput]
  7. ClientOptions [clientOptions]
  8. ExecutorService [service]

Getting started

Create a new class that extends Client (or an anonymous Client class) You will need to override both the render and setupGL methods. The render method is called per tick in the render loop, and is provided with the frame-delta parameter even if it is available from the class as a variable. The setupGL method is called after all the context's have been set up, this is only called once and allows you to setup shader-programs, meshes and textures with the context's. And any other setup for your program can also be done, and async tasks can be submitted to the ExecutorService.

Clone this wiki locally