Direct3D9 render system. This renderer supports Direct3D 9.0c. More...
#include <spDirect3D9RenderSystem.hpp>
Public Member Functions | |
Direct3D9RenderSystem () | |
~Direct3D9RenderSystem () | |
void | setupConfiguration () |
io::stringc | getRenderer () const |
Returns the renderer hardware (e.g. "NVIDIA GeForce 8800 GTX"). | |
io::stringc | getVersion () const |
Returns the renderer API version (e.g. "OpenGL 3.2" or "Direct3D9.0c"). | |
io::stringc | getVendor () const |
Returns the graphics hardware vendor (e.g. "NVIDIA Corporation" or "ATI Technologies Inc."). | |
io::stringc | getShaderVersion () const |
Returns the shader version (e.g. "1.50 NVIDIA via Cg compiler" or "HLSL Shader Model 2"). | |
s32 | getMultitexCount () const |
Returns the count of maximal texture layers for the fixed-function-pipeline. | |
s32 | getMaxAnisotropicFilter () const |
Returns the count of maximal anisotropic texture filter sampling. | |
s32 | getMaxLightCount () const |
Returns the count of maximal light sources for the fixed-function-pipeline. | |
bool | queryVideoSupport (const EVideoFeatureQueries Query) const |
Returns true if the specified feature is supported by the renderer. | |
void | clearBuffers (const s32 ClearFlags=BUFFER_COLOR|BUFFER_DEPTH) |
void | setShadeMode (const EShadeModeTypes ShadeMode) |
Sets the shading mode for primitives (where primitives are points, lines and triangles). | |
void | setClearColor (const color &Color) |
void | setColorMask (bool isRed, bool isGreen, bool isBlue, bool isAlpha=true) |
Enables or disables the color components which are to be written for rendering operations. | |
void | setDepthMask (bool isDepth) |
Enables or disables the depth component which is to be written for rendering operations. | |
void | setAntiAlias (bool isAntiAlias) |
Enables or disables anti-aliasing or multi-sampling. | |
void | setDepthRange (f32 Near, f32 Far) |
void | setDepthClip (bool Enable) |
Enables or disables depth clipping. By default enabled. | |
void | setStencilMask (u32 BitMask) |
Sets the bit-mask for the stencil buffer. This enables or disables individual bits in the stencil buffer to be written. | |
void | setStencilMethod (const ESizeComparisionTypes Method, s32 Reference=0, u32 BitMask=~0) |
void | setStencilOperation (const EStencilOperations FailOp, const EStencilOperations ZFailOp, const EStencilOperations ZPassOp) |
void | setClearStencil (s32 Stencil) |
Sets the stencil clear value. The default value is zero. | |
bool | setupMaterialStates (const MaterialStates *Material, bool Forced=false) |
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. | |
void | updateLight (u32 LightID, const scene::ELightModels LightType, bool isVolumetric, const dim::vector3df &Direction, f32 SpotInnerConeAngle, f32 SpotOuterConeAngle, f32 AttenuationConstant, f32 AttenuationLinear, f32 AttenuationQuadratic) |
void | createVertexBuffer (void *&BufferID) |
Creates a new hardware vertex buffer. | |
void | createIndexBuffer (void *&BufferID) |
Creates a new hardware index buffer. | |
void | deleteVertexBuffer (void *&BufferID) |
Deletes the specified hardware vertex buffer. | |
void | deleteIndexBuffer (void *&BufferID) |
Deletes the specified hardware index buffer. | |
void | updateVertexBuffer (void *BufferID, const dim::UniversalBuffer &BufferData, const VertexFormat *Format, const EHWBufferUsage Usage) |
Updates the specified hardware vertex buffer by uploading the specified buffer data into VRAM. | |
void | updateIndexBuffer (void *BufferID, const dim::UniversalBuffer &BufferData, const IndexFormat *Format, const EHWBufferUsage Usage) |
Updates the specified hardware index buffer by uploading the specified buffer data into VRAM. | |
void | updateVertexBufferElement (void *BufferID, const dim::UniversalBuffer &BufferData, u32 Index) |
Updates the specified hardware vertex buffer only for the specified element. | |
void | updateIndexBufferElement (void *BufferID, const dim::UniversalBuffer &BufferData, u32 Index) |
Updates the specified hardware index buffer only for the specified element. | |
void | drawMeshBuffer (const MeshBuffer *MeshBuffer) |
Renders the given hardware mesh buffer. | |
void | setRenderState (const video::ERenderStates Type, s32 State) |
s32 | getRenderState (const video::ERenderStates Type) const |
Returns the current render state. | |
void | addDynamicLightSource (u32 LightID, scene::ELightModels Type, video::color &Diffuse, video::color &Ambient, video::color &Specular, f32 AttenuationConstant, f32 AttenuationLinear, f32 AttenuationQuadratic) |
void | setLightStatus (u32 LightID, bool Enable, bool UseAllRCs=false) |
void | setLightColor (u32 LightID, const video::color &Diffuse, const video::color &Ambient, const video::color &Specular, bool UseAllRCs=false) |
void | setFog (const EFogTypes Type) |
void | setFogColor (const video::color &Color) |
Sets the fog color. | |
void | setFogRange (f32 Range, f32 NearPlane=1.0f, f32 FarPlane=1000.0f, const EFogModes Mode=FOG_PALE) |
void | setClipPlane (u32 Index, const dim::plane3df &Plane, bool Enable) |
ShaderClass * | createShaderClass (VertexFormat *VertexInputLayout=0) |
Shader * | createShader (ShaderClass *ShaderClassObj, const EShaderTypes Type, const EShaderVersions Version, const std::list< io::stringc > &ShaderBuffer, const io::stringc &EntryPoint="") |
Shader * | createCgShader (ShaderClass *ShaderClassObj, const EShaderTypes Type, const EShaderVersions Version, const std::list< io::stringc > &ShaderBuffer, const io::stringc &EntryPoint="", const c8 **CompilerOptions=0) |
void | unbindShaders () |
Unbinds (or rather disables) all shader types. | |
void | endSceneRendering () |
Ends with scene rendering. Always call this after rendering mesh buffers. | |
void | beginDrawing2D () |
void | setBlending (const EBlendingTypes SourceBlend, const EBlendingTypes DestBlend) |
void | setClipping (bool Enable, const dim::point2di &Position, const dim::size2di &Dimension) |
void | setViewport (const dim::point2di &Position, const dim::size2di &Dimension) |
bool | setRenderTarget (Texture *Target) |
void | setLineSize (s32 Size=1) |
Sets the size for each line which is to be rendered. By default 1. This is not available when using Direct3D. | |
void | setPointSize (s32 Size=1) |
Sets the size for each point which is to be rendered. By default 1. | |
void | draw2DImage (const Texture *Tex, const dim::point2di &Position, const color &Color=color(255)) |
void | draw2DImage (const Texture *Tex, const dim::rect2di &Position, const dim::rect2df &Clipping=dim::rect2df(0.0f, 0.0f, 1.0f, 1.0f), const color &Color=color(255)) |
void | draw2DImage (const Texture *Tex, const dim::point2di &Position, f32 Rotation, f32 Radius, const color &Color=color(255)) |
void | draw2DImage (const Texture *Tex, const dim::point2di &lefttopPosition, const dim::point2di &righttopPosition, const dim::point2di &rightbottomPosition, const dim::point2di &leftbottomPosition, const dim::point2df &lefttopClipping=dim::point2df(0.0f, 0.0f), const dim::point2df &righttopClipping=dim::point2df(1.0f, 0.0f), const dim::point2df &rightbottomClipping=dim::point2df(1.0f, 1.0f), const dim::point2df &leftbottomClipping=dim::point2df(0.0f, 1.0f), const color &lefttopColor=color(255), const color &righttopColor=color(255), const color &rightbottomColor=color(255), const color &leftbottomColor=color(255)) |
Draws an individual positionable 2D image. | |
color | getPixelColor (const dim::point2di &Position) const |
f32 | getPixelDepth (const dim::point2di &Position) const |
void | draw2DPoint (const dim::point2di &Position, const color &Color=255) |
Draws a 2D point at the specified position in screen space. | |
void | draw2DLine (const dim::point2di &PositionA, const dim::point2di &PositionB, const color &Color=255) |
Draws a 2D line at the specified position (PositionA to PositionB). | |
void | draw2DLine (const dim::point2di &PositionA, const dim::point2di &PositionB, const color &ColorA, const color &ColorB) |
Draws a 2D line with a color change-over (ColorA to ColorB). | |
void | draw2DLine (const dim::point2di &PositionA, const dim::point2di &PositionB, const color &Color, s32 DotLength) |
void | draw2DRectangle (const dim::rect2di &Rect, const color &Color=255, bool isSolid=true) |
void | draw2DRectangle (const dim::rect2di &Rect, const color &lefttopColor, const color &righttopColor, const color &rightbottomColor, const color &leftbottomColor, bool isSolid=true) |
Draws a 2D rectangle or quad with color change-overs. | |
void | draw2DPolygon (const ERenderPrimitives Type, const scene::SPrimitiveVertex2D *VerticesList, u32 Count) |
void | draw2DPolygonImage (const ERenderPrimitives Type, Texture *Tex, const scene::SPrimitiveVertex2D *VerticesList, u32 Count) |
void | draw3DPoint (const dim::vector3df &Position, const color &Color=255) |
void | draw3DLine (const dim::vector3df &PositionA, const dim::vector3df &PositionB, const color &Color=255) |
void | draw3DLine (const dim::vector3df &PositionA, const dim::vector3df &PositionB, const color &ColorA, const color &ColorB) |
void | draw3DEllipse (const dim::vector3df &Position, const dim::vector3df &Rotation=0.0f, const dim::size2df &Radius=0.5f, const color &Color=255) |
void | draw3DTriangle (Texture *hTexture, const dim::triangle3df &Triangle, const color &Color=255) |
Texture * | createTexture (const STextureCreationFlags &CreationFlags) |
Creates a new texture with the specified creation flags. | |
Texture * | createScreenShot (const dim::point2di &Position=0, dim::size2di Size=0) |
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. | |
Font * | createBitmapFont (const io::stringc &FontName="", s32 FontSize=0, s32 Flags=0) |
void | updateModelviewMatrix () |
void | setProjectionMatrix (const dim::matrix4f &Matrix) |
void | setViewMatrix (const dim::matrix4f &Matrix) |
void | setWorldMatrix (const dim::matrix4f &Matrix) |
void | setTextureMatrix (const dim::matrix4f &Matrix, u8 TextureLayer=0) |
void | setColorMatrix (const dim::matrix4f &Matrix) |
IDirect3DDevice9 * | getDirect3DDevice () const |
Friends | |
class | Direct3D9Texture |
class | Direct3D9RenderContext |
Direct3D9 render system. This renderer supports Direct3D 9.0c.
sp::video::Direct3D9RenderSystem::Direct3D9RenderSystem | ( | ) |
sp::video::Direct3D9RenderSystem::~Direct3D9RenderSystem | ( | ) |
void sp::video::Direct3D9RenderSystem::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.
void sp::video::Direct3D9RenderSystem::beginDrawing2D | ( | ) | [virtual] |
Configures the renderer to draw further in 2D.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::clearBuffers | ( | const s32 | ClearFlags = BUFFER_COLOR|BUFFER_DEPTH |
) | [virtual] |
Clears the specified buffers.
ClearFlags,: | Specifies which buffers are to be cleared. This can be a combination of the following types: BUFFER_COLOR (Color or pixel buffer), BUFFER_DEPTH (Depth or Z buffer), BUFFER_STENCIL (Stencil or mask buffer). If your 3D scene has a skybox or the background is not visible because of any other reason you can clear only the depth buffer to speed up your application (This is particular reasonable when using the software renderer). |
Implements sp::video::RenderSystem.
Font* sp::video::Direct3D9RenderSystem::createBitmapFont | ( | const io::stringc & | FontName = "" , |
|
s32 | FontSize = 0 , |
|||
s32 | Flags = 0 | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
Shader* sp::video::Direct3D9RenderSystem::createCgShader | ( | ShaderClass * | ShaderClassObj, | |
const EShaderTypes | Type, | |||
const EShaderVersions | Version, | |||
const std::list< io::stringc > & | ShaderBuffer, | |||
const io::stringc & | EntryPoint = "" , |
|||
const c8 ** | CompilerOptions = 0 | |||
) | [virtual] |
Creates a Cg shader.
CompilerOptions,: | Specifies the compiler options. Invalid options may occur a runtime crash! So be careful with this option. Look at the Cg documentation to see the full list of supported compiler options. The last options in the array must be a null. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::createIndexBuffer | ( | void *& | BufferID | ) | [virtual] |
Creates a new hardware index buffer.
Implements sp::video::RenderSystem.
Texture* sp::video::Direct3D9RenderSystem::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.
void sp::video::Direct3D9RenderSystem::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.
Shader* sp::video::Direct3D9RenderSystem::createShader | ( | ShaderClass * | ShaderClassObj, | |
const EShaderTypes | Type, | |||
const EShaderVersions | Version, | |||
const std::list< io::stringc > & | ShaderBuffer, | |||
const io::stringc & | EntryPoint = "" | |||
) | [virtual] |
Creates a shader with the specified buffer strings.
ShaderBuffer,: | List of strings which specify the shader program lines. |
Reimplemented from sp::video::RenderSystem.
ShaderClass* sp::video::Direct3D9RenderSystem::createShaderClass | ( | VertexFormat * | VertexInputLayout = 0 |
) | [virtual] |
Creates a new shader class.
VertexInputLayout,: | Specifies the vertex format which is used for the objects which will use this shader class. This needs only to be set for Direct3D11 but it's a good programming style to set it always. |
Reimplemented from sp::video::RenderSystem.
Texture* sp::video::Direct3D9RenderSystem::createTexture | ( | const STextureCreationFlags & | CreationFlags | ) | [virtual] |
Creates a new texture with the specified creation flags.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::createVertexBuffer | ( | void *& | BufferID | ) | [virtual] |
Creates a new hardware vertex buffer.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::deleteIndexBuffer | ( | void *& | BufferID | ) | [virtual] |
Deletes the specified hardware index buffer.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::deleteVertexBuffer | ( | void *& | BufferID | ) | [virtual] |
Deletes the specified hardware vertex buffer.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DImage | ( | const Texture * | Tex, | |
const dim::point2di & | Position, | |||
const color & | Color = color(255) | |||
) | [virtual] |
Draws a normal 2D image using the specified texture.
Tex,: | Texture which is to be used. No settings are needed to be done to draw 2 dimensional with normal Texture objects. | |
Position,: | 2D position in screen space where the image is to be drawn. | |
Color,: | Color which the image shall get. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DImage | ( | const Texture * | Tex, | |
const dim::rect2di & | Position, | |||
const dim::rect2df & | Clipping = dim::rect2df(0.0f, 0.0f, 1.0f, 1.0f) , |
|||
const color & | Color = color(255) | |||
) | [virtual] |
Draws a strechted and mapped 2D image.
Position,: | 2D area in screen space. In this case the two parameters of rect2di ("Right" and "Bottom") specifie the size (width and height). | |
Clipping,: | 2D mapping or clipping area. This specifies the texture coordinates for the quad. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DImage | ( | const Texture * | Tex, | |
const dim::point2di & | Position, | |||
f32 | Rotation, | |||
f32 | Radius, | |||
const color & | Color = color(255) | |||
) | [virtual] |
Draws a rotatable 2D image.
Rotation,: | Angle (in degrees) for the centered image rotation. | |
Radius,: | Radius for the square image. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DImage | ( | const Texture * | Tex, | |
const dim::point2di & | lefttopPosition, | |||
const dim::point2di & | righttopPosition, | |||
const dim::point2di & | rightbottomPosition, | |||
const dim::point2di & | leftbottomPosition, | |||
const dim::point2df & | lefttopClipping = dim::point2df(0.0f, 0.0f) , |
|||
const dim::point2df & | righttopClipping = dim::point2df(1.0f, 0.0f) , |
|||
const dim::point2df & | rightbottomClipping = dim::point2df(1.0f, 1.0f) , |
|||
const dim::point2df & | leftbottomClipping = dim::point2df(0.0f, 1.0f) , |
|||
const color & | lefttopColor = color(255) , |
|||
const color & | righttopColor = color(255) , |
|||
const color & | rightbottomColor = color(255) , |
|||
const color & | leftbottomColor = color(255) | |||
) | [virtual] |
Draws an individual positionable 2D image.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DLine | ( | const dim::point2di & | PositionA, | |
const dim::point2di & | PositionB, | |||
const color & | Color, | |||
s32 | DotLength | |||
) |
void sp::video::Direct3D9RenderSystem::draw2DLine | ( | const dim::point2di & | PositionA, | |
const dim::point2di & | PositionB, | |||
const color & | Color = 255 | |||
) | [virtual] |
Draws a 2D line at the specified position (PositionA to PositionB).
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DLine | ( | const dim::point2di & | PositionA, | |
const dim::point2di & | PositionB, | |||
const color & | ColorA, | |||
const color & | ColorB | |||
) | [virtual] |
Draws a 2D line with a color change-over (ColorA to ColorB).
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DPoint | ( | const dim::point2di & | Position, | |
const color & | Color = 255 | |||
) | [virtual] |
Draws a 2D point at the specified position in screen space.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DPolygon | ( | const ERenderPrimitives | Type, | |
const scene::SPrimitiveVertex2D * | VerticesList, | |||
u32 | Count | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DPolygonImage | ( | const ERenderPrimitives | Type, | |
Texture * | Tex, | |||
const scene::SPrimitiveVertex2D * | VerticesList, | |||
u32 | Count | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DRectangle | ( | const dim::rect2di & | Rect, | |
const color & | Color = 255 , |
|||
bool | isSolid = true | |||
) | [virtual] |
Draws a 2D rectangle or quad.
Rect,: | 2D area in screen space. | |
Color,: | Color which is to be used for the rectangle. | |
isSolid,: | If true the rectangle is filled. Otherwise four lines will be drawn. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw2DRectangle | ( | const dim::rect2di & | Rect, | |
const color & | lefttopColor, | |||
const color & | righttopColor, | |||
const color & | rightbottomColor, | |||
const color & | leftbottomColor, | |||
bool | isSolid = true | |||
) | [virtual] |
Draws a 2D rectangle or quad with color change-overs.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw3DEllipse | ( | const dim::vector3df & | Position, | |
const dim::vector3df & | Rotation = 0.0f , |
|||
const dim::size2df & | Radius = 0.5f , |
|||
const color & | Color = 255 | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw3DLine | ( | const dim::vector3df & | PositionA, | |
const dim::vector3df & | PositionB, | |||
const color & | Color = 255 | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw3DLine | ( | const dim::vector3df & | PositionA, | |
const dim::vector3df & | PositionB, | |||
const color & | ColorA, | |||
const color & | ColorB | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw3DPoint | ( | const dim::vector3df & | Position, | |
const color & | Color = 255 | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::draw3DTriangle | ( | Texture * | hTexture, | |
const dim::triangle3df & | Triangle, | |||
const color & | Color = 255 | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::drawMeshBuffer | ( | const MeshBuffer * | MeshBuffer | ) | [virtual] |
Renders the given hardware mesh buffer.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::endSceneRendering | ( | ) | [virtual] |
Ends with scene rendering. Always call this after rendering mesh buffers.
Reimplemented from sp::video::RenderSystem.
IDirect3DDevice9* sp::video::Direct3D9RenderSystem::getDirect3DDevice | ( | ) | const [inline] |
s32 sp::video::Direct3D9RenderSystem::getMaxAnisotropicFilter | ( | ) | const [virtual] |
Returns the count of maximal anisotropic texture filter sampling.
Implements sp::video::RenderSystem.
s32 sp::video::Direct3D9RenderSystem::getMaxLightCount | ( | ) | const [virtual] |
Returns the count of maximal light sources for the fixed-function-pipeline.
Implements sp::video::RenderSystem.
s32 sp::video::Direct3D9RenderSystem::getMultitexCount | ( | ) | const [virtual] |
Returns the count of maximal texture layers for the fixed-function-pipeline.
Implements sp::video::RenderSystem.
color sp::video::Direct3D9RenderSystem::getPixelColor | ( | const dim::point2di & | Position | ) | const [virtual] |
Reimplemented from sp::video::RenderSystem.
f32 sp::video::Direct3D9RenderSystem::getPixelDepth | ( | const dim::point2di & | Position | ) | const [virtual] |
Reimplemented from sp::video::RenderSystem.
io::stringc sp::video::Direct3D9RenderSystem::getRenderer | ( | ) | const [virtual] |
Returns the renderer hardware (e.g. "NVIDIA GeForce 8800 GTX").
Implements sp::video::RenderSystem.
s32 sp::video::Direct3D9RenderSystem::getRenderState | ( | const video::ERenderStates | Type | ) | const [virtual] |
Returns the current render state.
Implements sp::video::RenderSystem.
io::stringc sp::video::Direct3D9RenderSystem::getShaderVersion | ( | ) | const [virtual] |
Returns the shader version (e.g. "1.50 NVIDIA via Cg compiler" or "HLSL Shader Model 2").
Implements sp::video::RenderSystem.
io::stringc sp::video::Direct3D9RenderSystem::getVendor | ( | ) | const [virtual] |
Returns the graphics hardware vendor (e.g. "NVIDIA Corporation" or "ATI Technologies Inc.").
Implements sp::video::RenderSystem.
io::stringc sp::video::Direct3D9RenderSystem::getVersion | ( | ) | const [virtual] |
Returns the renderer API version (e.g. "OpenGL 3.2" or "Direct3D9.0c").
Implements sp::video::RenderSystem.
bool sp::video::Direct3D9RenderSystem::queryVideoSupport | ( | const EVideoFeatureQueries | Query | ) | const [virtual] |
Returns true if the specified feature is supported by the renderer.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setAntiAlias | ( | bool | isAntiAlias | ) | [virtual] |
Enables or disables anti-aliasing or multi-sampling.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setBlending | ( | const EBlendingTypes | SourceBlend, | |
const EBlendingTypes | DestBlend | |||
) | [virtual] |
Sets the blending mode. Before you have to enable blending by calling "setRenderState(RENDER_BLEND, true)."
SourceBlend,: | Specifies the source pixel blending mode. | |
TargetBlend,: | Specifies the target (or rather destination) pixel blending mode. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setClearColor | ( | const color & | Color | ) | [virtual] |
Sets the color with which the color-buffer is to be cleared.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setClearStencil | ( | s32 | Stencil | ) | [virtual] |
Sets the stencil clear value. The default value is zero.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setClipping | ( | bool | Enable, | |
const dim::point2di & | Position, | |||
const dim::size2di & | Size | |||
) | [virtual] |
Sets the clipping mode (or rather scissors).
Enable,: | Specifies whether clipping is to be enabled or disabled. | |
Position,: | Specifies the position (in screen space). | |
Size,: | Specifies the size (in screen space). |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::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.
void sp::video::Direct3D9RenderSystem::setColorMask | ( | bool | isRed, | |
bool | isGreen, | |||
bool | isBlue, | |||
bool | isAlpha = true | |||
) | [virtual] |
Enables or disables the color components which are to be written for rendering operations.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setColorMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setDepthClip | ( | bool | Enable | ) | [virtual] |
Enables or disables depth clipping. By default enabled.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setDepthMask | ( | bool | Enable | ) | [virtual] |
Enables or disables the depth component which is to be written for rendering operations.
Reimplemented from sp::video::RenderSystem.
Sets the depth range.
Near,: | Specifies the near clipping plane. This must be in the range [0.0 .. 1.0]. By default 0.0. | |
Far,: | Specifies the far clipping plane. This must be in the range [0.0 .. 1.0]. By default 1.0. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::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.
void sp::video::Direct3D9RenderSystem::setFogColor | ( | const video::color & | Color | ) | [virtual] |
Sets the fog color.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setFogRange | ( | f32 | Range, | |
f32 | NearPlane = 1.0f , |
|||
f32 | FarPlane = 1000.0f , |
|||
const EFogModes | Mode = FOG_PALE | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::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.
void sp::video::Direct3D9RenderSystem::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.
void sp::video::Direct3D9RenderSystem::setLineSize | ( | s32 | Size = 1 |
) | [virtual] |
Sets the size for each line which is to be rendered. By default 1. This is not available when using Direct3D.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setPointSize | ( | s32 | Size = 1 |
) | [virtual] |
Sets the size for each point which is to be rendered. By default 1.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setProjectionMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::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.
bool sp::video::Direct3D9RenderSystem::setRenderTarget | ( | Texture * | Target | ) | [virtual] |
Sets the render target.
Target,: | Texture which is to be used as the new render target. If the render target shall be reset to the actual pixel-buffer set the render target to 0. When using a render target texture the texture needs be created to a render target (use "makeRenderTarget" from the Texture class). |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setShadeMode | ( | const EShadeModeTypes | ShadeMode | ) | [virtual] |
Sets the shading mode for primitives (where primitives are points, lines and triangles).
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setStencilMask | ( | u32 | BitMask | ) | [virtual] |
Sets the bit-mask for the stencil buffer. This enables or disables individual bits in the stencil buffer to be written.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setStencilMethod | ( | const ESizeComparisionTypes | Method, | |
s32 | Reference = 0 , |
|||
u32 | BitMask = ~0 | |||
) | [virtual] |
Sets the stencil buffer method.
[in] | Method | Specifies the size comparision type. This is similiar to the "setDepthMethod" function in the "MaterialStates" class. |
[in] | Reference | Specifies the stencil reference value which will be used for the "STENCIL_REPLACE" stencil operation. By default zero. |
[in] | BitMask | Specifies the stencil buffer bit mask. By default 0xFFFFFFFF. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setStencilOperation | ( | const EStencilOperations | FailOp, | |
const EStencilOperations | ZFailOp, | |||
const EStencilOperations | ZPassOp | |||
) | [virtual] |
Sets the stencil buffer operations.
[in] | FailOp | Specifies the operation which is to be executed when the stencil test fails. The default value is STENCIL_KEEP. |
[in] | ZFailOp | Specifies the operation which is to be executed when the stencil test succeeds but the z-buffer test fails. The default value is STENCIL_KEEP. |
[in] | ZPassOp | Specifies the operation which is to be executed when the stencil test and the z-buffer test succeed. The default value is STENCIL_KEEP. |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setTextureMatrix | ( | const dim::matrix4f & | Matrix, | |
u8 | TextureLayer = 0 | |||
) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setupConfiguration | ( | ) | [virtual] |
Implements sp::video::RenderSystem.
bool sp::video::Direct3D9RenderSystem::setupMaterialStates | ( | const MaterialStates * | Material, | |
bool | Forced = false | |||
) | [virtual] |
Configures the renderer with the specified material states.
[in] | Material | Pointer to the MaterialStates object. |
[in] | Forced | Specifies whether the setup is to be forced or not. If true the material states will be updated guaranteed. Otherwise the render system checks if the material states are different to the previously set states. |
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::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::Direct3D9RenderSystem::setViewMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setViewport | ( | const dim::point2di & | Position, | |
const dim::size2di & | Size | |||
) | [virtual] |
Sets the viewport. This is actually only used for 3D drawing. For 2D drawing you can use the "setClipping" function.
Position,: | Specifies the position (in screen space). | |
Size,: | Specifies the size (in screen space). |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::setWorldMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::unbindShaders | ( | ) | [virtual] |
Unbinds (or rather disables) all shader types.
Reimplemented from sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::updateIndexBuffer | ( | void * | BufferID, | |
const dim::UniversalBuffer & | BufferData, | |||
const IndexFormat * | Format, | |||
const EHWBufferUsage | Usage | |||
) | [virtual] |
Updates the specified hardware index buffer by uploading the specified buffer data into VRAM.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::updateIndexBufferElement | ( | void * | BufferID, | |
const dim::UniversalBuffer & | BufferData, | |||
u32 | Index | |||
) | [virtual] |
Updates the specified hardware index buffer only for the specified element.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::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.
void sp::video::Direct3D9RenderSystem::updateModelviewMatrix | ( | ) | [virtual] |
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::updateVertexBuffer | ( | void * | BufferID, | |
const dim::UniversalBuffer & | BufferData, | |||
const VertexFormat * | Format, | |||
const EHWBufferUsage | Usage | |||
) | [virtual] |
Updates the specified hardware vertex buffer by uploading the specified buffer data into VRAM.
Implements sp::video::RenderSystem.
void sp::video::Direct3D9RenderSystem::updateVertexBufferElement | ( | void * | BufferID, | |
const dim::UniversalBuffer & | BufferData, | |||
u32 | Index | |||
) | [virtual] |
Updates the specified hardware vertex buffer only for the specified element.
Implements sp::video::RenderSystem.
friend class Direct3D9RenderContext [friend] |
friend class Direct3D9Texture [friend] |