-
Notifications
You must be signed in to change notification settings - Fork 4
Using the DrawSkybox function
theproadam edited this page May 3, 2020
·
4 revisions
As renderXF is pixel fill rate limited. Drawing objects that consume the entire screen (such as a skybox) is very costly - in terms of performance. Because of this, renderXF has a built in skybox drawing function that uses parallelized pixel filling, no depth testing, and fixed data interpolation.
Before drawing a skybox, renderXF needs a Cubemap to draw.
GLCubemap mySkybox = new GLCubemap("skybox_data");
The folder that contains the skybox images needs to have the individual images named like this:
FRONT.jpg
BACK.jpg
TOP.jpg
BOTTOM.jpg
LEFT.jpg
RIGHT.jpg
To draw a skybox, renderXF just needs the GLCubemap instance to draw from.
GL.DrawSkybox(mySkybox);
- Initializing the renderer
- Setting the transform data
- Blitting and clearing the viewport
- Initializing a vertex buffer
- Creating a shader
- Drawing an object
- Screen space shaders
- Blitting bitmaps
- Loading a texture
- Creating a framebuffer
- Displaying a texture