Skip to content

Getting Started

Fynn Flügge edited this page Nov 27, 2018 · 23 revisions

Run an Example Demo

There are some OpenGL and Vulkan Demos available in examples-opengl and examples-vulkan. In order to run the demos just execute GLOreonworlds or VkOreonworlds as a Java application. Feel free to play around with the config files in the resources folders example-opengl-resources and examples-vulkan-resources and see how it affects the 3D world.

Create your first App

The first step in order to build an app is to create the appropriate Context (OpenGL/Vulkan).
Hence, initially call the method

GLContext.create();

and/or

VkContext.create();

Next, the RenderEngine which should be used must be created and initialized.

GLRenderEngine renderEngine = new GLRenderEngine();
renderEngine.init();

Optional GUIs must be created and added to the RenderEngine object before init() call

renderEngine.setGui(...);
renderEngine.init();

Once a RenderEngine is created and initialized, arbitrary objects can be added to the scene graph:

renderEngine.getScenegraph().addObject(...);	
renderEngine.getScenegraph().setWater(...);
renderEngine.getScenegraph().setTerrain(...);
...
Clone this wiki locally