OpenGL fixed function render system. This is the parent class of all OpenGL and OpenGL|ES renderers. More...
#include <spOpenGLPipelineFixed.hpp>
Classes | |
struct | SClipPlane |
Public Member Functions | |
virtual | ~GLFixedFunctionPipeline () |
virtual s32 | getMultitexCount () const |
Returns the count of maximal texture layers for the fixed-function-pipeline. | |
virtual s32 | getMaxLightCount () const |
Returns the count of maximal light sources for the fixed-function-pipeline. | |
virtual void | setShadeMode (const EShadeModeTypes ShadeMode) |
Sets the shading mode for primitives (where primitives are points, lines and triangles). | |
virtual void | updateLight (u32 LightID, const scene::ELightModels LightType, bool isVolumetric, const dim::vector3df &Direction, f32 SpotInnerConeAngle, f32 SpotOuterConeAngle, f32 AttenuationConstant, f32 AttenuationLinear, f32 AttenuationQuadratic) |
virtual void | setupTextureLayer (u8 LayerIndex, const dim::matrix4f &TexMatrix, const ETextureEnvTypes EnvType, const EMappingGenTypes GenType, s32 MappingCoordsFlags) |
Configures the renderer with the specified texture layer states. | |
virtual void | setRenderState (const video::ERenderStates Type, s32 State) |
virtual s32 | getRenderState (const video::ERenderStates Type) const |
Returns the current render state. | |
virtual void | addDynamicLightSource (u32 LightID, scene::ELightModels Type, video::color &Diffuse, video::color &Ambient, video::color &Specular, f32 AttenuationConstant, f32 AttenuationLinear, f32 AttenuationQuadratic) |
virtual void | setLightStatus (u32 LightID, bool Enable, bool UseAllRCs=false) |
virtual void | setLightColor (u32 LightID, const video::color &Diffuse, const video::color &Ambient, const video::color &Specular, bool UseAllRCs=false) |
virtual void | setFog (const EFogTypes Type) |
virtual void | setFogColor (const video::color &Color) |
Sets the fog color. | |
virtual void | setFogRange (f32 Range, f32 NearPlane=1.0f, f32 FarPlane=1000.0f, const EFogModes Mode=FOG_PALE) |
virtual void | setClipPlane (u32 Index, const dim::plane3df &Plane, bool Enable) |
virtual void | beginDrawing2D () |
virtual void | endDrawing2D () |
virtual void | beginDrawing3D () |
virtual void | setPointSize (s32 Size=1) |
Sets the size for each point which is to be rendered. By default 1. | |
virtual color | getPixelColor (const dim::point2di &Position) const |
virtual void | draw2DPolygonImage (const ERenderPrimitives Type, Texture *Tex, const scene::SPrimitiveVertex2D *VerticesList, u32 Count) |
virtual Texture * | createScreenShot (const dim::point2di &Position=0, dim::size2di Size=0) |
virtual void | createScreenShot (Texture *Tex, const dim::point2di &Position=0) |
Takes a screenshot of the current frame and stores the data in the specified Texture object. | |
virtual void | updateModelviewMatrix () |
virtual void | setProjectionMatrix (const dim::matrix4f &Matrix) |
virtual void | setViewMatrix (const dim::matrix4f &Matrix) |
virtual void | setTextureMatrix (const dim::matrix4f &Matrix, u8 TextureLayer=0) |
Protected Member Functions | |
GLFixedFunctionPipeline () | |
void | drawTexturedFont (const Font *FontObj, const dim::point2di &Position, const io::stringc &Text, const color &Color) |
void | setupTextureLayerCoordinate (GLenum RenderState, GLenum Coordinate, bool Enable, s32 GenType) |
Protected Attributes | |
std::vector< SClipPlane > | ClippingPlanes_ |
scene::SPrimitiveVertex2D | Vertices2D_ [4] |
GLboolean | isCullFace_ |
f32 | TempColor_ [4] |
Static Protected Attributes | |
static dim::matrix4f | ExtTmpMat_ |
Friends | |
class | OpenGLTexture |
class | OpenGLES1Texture |
class | OpenGLES2Texture |
OpenGL fixed function render system. This is the parent class of all OpenGL and OpenGL|ES renderers.
virtual sp::video::GLFixedFunctionPipeline::~GLFixedFunctionPipeline | ( | ) | [virtual] |
sp::video::GLFixedFunctionPipeline::GLFixedFunctionPipeline | ( | ) | [protected] |
virtual void sp::video::GLFixedFunctionPipeline::addDynamicLightSource | ( | u32 | LightID, | |
scene::ELightModels | Type, | |||
video::color & | Diffuse, | |||
video::color & | Ambient, | |||
video::color & | Specular, | |||
f32 | AttenuationConstant, | |||
f32 | AttenuationLinear, | |||
f32 | AttenuationQuadratic | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::beginDrawing2D | ( | ) | [virtual] |
Configures the renderer to draw further in 2D.
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::beginDrawing3D | ( | ) | [virtual] |
Configures the renderer to draw further in 3D. This only needs to be called before drawing in 3D (draw3DLine etc.) but not to render 3D geometry using "SceneGraph::renderScene.
Reimplemented from sp::video::RenderSystem.
virtual Texture* sp::video::GLFixedFunctionPipeline::createScreenShot | ( | const dim::point2di & | Position = 0 , |
|
dim::size2di | Size = 0 | |||
) | [virtual] |
Takes a screenshot of the current frame.
Position,: | Specifies the 2D position (in screen space) of the screenshot. | |
Size,: | Specifies the size (in screen space) of the screenshot. |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::createScreenShot | ( | Texture * | Tex, | |
const dim::point2di & | Position = 0 | |||
) | [virtual] |
Takes a screenshot of the current frame and stores the data in the specified Texture object.
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::draw2DPolygonImage | ( | const ERenderPrimitives | Type, | |
Texture * | Tex, | |||
const scene::SPrimitiveVertex2D * | VerticesList, | |||
u32 | Count | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::GLFixedFunctionPipeline::drawTexturedFont | ( | const Font * | FontObj, | |
const dim::point2di & | Position, | |||
const io::stringc & | Text, | |||
const color & | Color | |||
) | [protected, virtual] |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::endDrawing2D | ( | ) | [virtual] |
Reimplemented from sp::video::RenderSystem.
virtual s32 sp::video::GLFixedFunctionPipeline::getMaxLightCount | ( | ) | const [virtual] |
Returns the count of maximal light sources for the fixed-function-pipeline.
Implements sp::video::RenderSystem.
virtual s32 sp::video::GLFixedFunctionPipeline::getMultitexCount | ( | ) | const [virtual] |
Returns the count of maximal texture layers for the fixed-function-pipeline.
Implements sp::video::RenderSystem.
virtual color sp::video::GLFixedFunctionPipeline::getPixelColor | ( | const dim::point2di & | Position | ) | const [virtual] |
Reimplemented from sp::video::RenderSystem.
virtual s32 sp::video::GLFixedFunctionPipeline::getRenderState | ( | const video::ERenderStates | Type | ) | const [virtual] |
Returns the current render state.
Implements sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setClipPlane | ( | u32 | Index, | |
const dim::plane3df & | Plane, | |||
bool | Enable | |||
) | [virtual] |
Sets and enables or disables a clipping plane. These clipping-planes are additional clipping planes to the normal 6 view-frustum-clipping-planes. Normally 8 of those planes should be available.
Index,: | Index number of the clipping plane. | |
Plane,: | Plane which holds the plane equation. | |
Enable,: | Specifies if the plane is shall be enabled or disabled. If false "Plane" can just be "dim::plane3df()". |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setFog | ( | const EFogTypes | Type | ) | [virtual] |
Sets the fog's type if used.
Type,: | Type of the fog. If fog shall be disabled use (video::FOG_NONE). |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setFogColor | ( | const video::color & | Color | ) | [virtual] |
Sets the fog color.
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setFogRange | ( | f32 | Range, | |
f32 | NearPlane = 1.0f , |
|||
f32 | FarPlane = 1000.0f , |
|||
const EFogModes | Mode = FOG_PALE | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setLightColor | ( | u32 | LightID, | |
const video::color & | Diffuse, | |||
const video::color & | Ambient, | |||
const video::color & | Specular, | |||
bool | UseAllRCs = false | |||
) | [virtual] |
Sets the light color for the specified fixed-function light source.
[in] | LightID | Specifies the light's ID number (beginning with 0). |
[in] | Diffuse | Specifies the diffuse light color. By default (200, 200, 200, 255). |
[in] | Ambient | Specifies the ambient light color. By default (255, 255, 255, 255). |
[in] | Specular | Specifies the specular light color. By default (0, 0, 0, 255). |
[in] | UseAllRCs | Specifies whether all render-contexts are to be used or only the active one. By default only the active render context is affected. |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setLightStatus | ( | u32 | LightID, | |
bool | Enable, | |||
bool | UseAllRCs = false | |||
) | [virtual] |
Enabled or disables the specified fixed-function light source.
[in] | LightID | Specifies the light's ID number (beginning with 0). |
[in] | Enable | Specifies whether the light source is to be enabled or disabled. |
[in] | UseAllRCs | Specifies whether all render-contexts are to be used or only the active one. By default only the active render context is affected. |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setPointSize | ( | s32 | Size = 1 |
) | [virtual] |
Sets the size for each point which is to be rendered. By default 1.
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setProjectionMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setRenderState | ( | const video::ERenderStates | Type, | |
s32 | State | |||
) | [virtual] |
Sets the render state manual. Can be used do enabled or disable effects directly.
[in] | Type | Specifies the render state which is to be changed (lighting, blending, fog effect etc.). |
[in] | State | Specifies the new state (commonly TRUE/ FALSE or rather 1/ 0). |
// Provide the next render mode spRenderer->setRenderMode(video::RENDERMODE_DRAWING_2D); // Store the previous render state const s32 PrevRenderState = spRenderer->getRenderState(video::RENDER_BLEND); // Set an individual render state spRenderer->setRenderState(video::RENDERSTATE_BLEND, false); // Draw the primitive spRenderer->draw2DImage(Img, 0); // Reset the render state spRenderer->setRenderState(video::RENDER_BLEND, PrevRenderState);
Implements sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setShadeMode | ( | const EShadeModeTypes | ShadeMode | ) | [virtual] |
Sets the shading mode for primitives (where primitives are points, lines and triangles).
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setTextureMatrix | ( | const dim::matrix4f & | Matrix, | |
u8 | TextureLayer = 0 | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::setupTextureLayer | ( | u8 | LayerIndex, | |
const dim::matrix4f & | TexMatrix, | |||
const ETextureEnvTypes | EnvType, | |||
const EMappingGenTypes | GenType, | |||
s32 | MappingCoordsFlags | |||
) | [virtual] |
Configures the renderer with the specified texture layer states.
Reimplemented from sp::video::RenderSystem.
void sp::video::GLFixedFunctionPipeline::setupTextureLayerCoordinate | ( | GLenum | RenderState, | |
GLenum | Coordinate, | |||
bool | Enable, | |||
s32 | GenType | |||
) | [inline, protected] |
virtual void sp::video::GLFixedFunctionPipeline::setViewMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::updateLight | ( | u32 | LightID, | |
const scene::ELightModels | LightType, | |||
bool | isVolumetric, | |||
const dim::vector3df & | Direction, | |||
f32 | SpotInnerConeAngle, | |||
f32 | SpotOuterConeAngle, | |||
f32 | AttenuationConstant, | |||
f32 | AttenuationLinear, | |||
f32 | AttenuationQuadratic | |||
) | [virtual] |
Updates the light for the renderer
Reimplemented from sp::video::RenderSystem.
virtual void sp::video::GLFixedFunctionPipeline::updateModelviewMatrix | ( | ) | [virtual] |
Implements sp::video::RenderSystem.
friend class OpenGLES1Texture [friend] |
Reimplemented from sp::video::GLBasePipeline.
friend class OpenGLES2Texture [friend] |
Reimplemented from sp::video::GLBasePipeline.
friend class OpenGLTexture [friend] |
Reimplemented from sp::video::RenderSystem.
std::vector<SClipPlane> sp::video::GLFixedFunctionPipeline::ClippingPlanes_ [protected] |
dim::matrix4f sp::video::GLFixedFunctionPipeline::ExtTmpMat_ [static, protected] |
GLboolean sp::video::GLFixedFunctionPipeline::isCullFace_ [protected] |
f32 sp::video::GLFixedFunctionPipeline::TempColor_[4] [protected] |