SkyboxShaderMappingOpenGL
Package: Libraries.Game.Graphics.Shaders.OpenGL.Mapping · Inherits from: Libraries.Game.Graphics.Shaders.ShaderMapping, Libraries.Language.Object
SkyboxShaderMappingOpenGL gives the OpenGL sky shaders what they need: the camera's directions, the sky's rotation and inverter, and its cube map on texture unit 0. Begin also sets the depth test so the sky only fills pixels nothing else was drawn on. Give it the skybox with SetSkybox first.
Example Code
use Libraries.Game.Graphics.Shaders.OpenGL.Mapping.SkyboxShaderMappingOpenGL
SkyboxShaderMappingOpenGL mapping
Actions
Begin(Libraries.Game.Graphics.Shaders.Programs.ShaderProgram program, Libraries.Game.Graphics.Camera camera)
This action sets the shader inputs and the graphics state for the sky.
Parameters
programLibraries.Game.Graphics.Shaders.Programs.ShaderProgram: The skybox program, already begun.cameraLibraries.Game.Graphics.Camera: The camera the sky is seen from.
End(Libraries.Game.Graphics.Shaders.Programs.ShaderProgram program)
This action puts back the depth writes the sky turned off.
Parameters
programLibraries.Game.Graphics.Shaders.Programs.ShaderProgram: The skybox program.
SetSkybox(Libraries.Game.Graphics.Skybox skybox)
This action sets the skybox the next Begin draws.
Parameters
skyboxLibraries.Game.Graphics.Skybox: The skybox.
Inherited Actions
10 actions from Libraries.Game.Graphics.Shaders.ShaderMapping
- BeginBatch(Libraries.Game.Graphics.Shaders.Programs.ShaderProgram program)
- CanIncludeInBatch(Libraries.Game.Graphics.Shaders.Programs.ShaderProgram program, Libraries.Game.Graphics.Drawable drawable)
- GetBatchingMesh()
- GetVertexSize()
- IsBatching()
- MapInputs(Libraries.Game.Graphics.Shaders.Programs.ShaderProgram program, Libraries.Game.Graphics.Renderable renderable)
- MapInputs(Libraries.Game.Graphics.Shaders.Programs.ShaderProgram program, Libraries.Game.Graphics.Drawable drawable)
- RenderBatch(Libraries.Game.Graphics.Shaders.Programs.ShaderProgram program, Libraries.Game.Graphics.Camera camera)
- SetVertexData(Libraries.Game.Graphics.Shaders.Programs.ShaderProgram program, Libraries.Game.Graphics.Drawable drawable, Libraries.Game.Graphics.DrawableShape shape)
- SupportsBatching()