#include <spRenderSystem.hpp>
Classes | |
struct | SDepthRange |
struct | SFogStates |
Public Member Functions | |
virtual | ~RenderSystem () |
virtual void | setupConfiguration ()=0 |
virtual io::stringc | getRenderer () const =0 |
Returns the renderer hardware (e.g. "NVIDIA GeForce 8800 GTX"). | |
virtual io::stringc | getVersion () const =0 |
Returns the renderer API version (e.g. "OpenGL 3.2" or "Direct3D9.0c"). | |
virtual io::stringc | getVendor () const =0 |
Returns the graphics hardware vendor (e.g. "NVIDIA Corporation" or "ATI Technologies Inc."). | |
virtual io::stringc | getShaderVersion () const =0 |
Returns the shader version (e.g. "1.50 NVIDIA via Cg compiler" or "HLSL Shader Model 2"). | |
virtual bool | queryVideoSupport (const EVideoFeatureQueries Query) const =0 |
Returns true if the specified feature is supported by the renderer. | |
virtual bool | queryExtensionSupport (const io::stringc &TargetExtension) const |
virtual s32 | getMultitexCount () const =0 |
Returns the count of maximal texture layers for the fixed-function-pipeline. | |
virtual s32 | getMaxAnisotropicFilter () const =0 |
Returns the count of maximal anisotropic texture filter sampling. | |
virtual s32 | getMaxLightCount () const =0 |
Returns the count of maximal light sources for the fixed-function-pipeline. | |
virtual dim::EMatrixCoordinateSystmes | getProjectionMatrixType () const |
virtual void | printWarning () |
virtual void | clearBuffers (const s32 ClearFlags=BUFFER_COLOR|BUFFER_DEPTH)=0 |
virtual void | setShadeMode (const EShadeModeTypes ShadeMode) |
Sets the shading mode for primitives (where primitives are points, lines and triangles). | |
virtual void | setFrontFace (bool isFrontFace) |
Sets triangle rendering to CW (clock-wise -> false) or CCW (counter-clock-wise -> true). | |
virtual void | setClearColor (const color &Color) |
virtual 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. | |
virtual void | setDepthMask (bool Enable) |
Enables or disables the depth component which is to be written for rendering operations. | |
virtual void | setAntiAlias (bool isAntiAlias) |
Enables or disables anti-aliasing or multi-sampling. | |
virtual void | setDepthRange (f32 Near, f32 Far) |
virtual void | getDepthRange (f32 &Near, f32 &Far) const |
virtual void | setDepthClip (bool Enable) |
Enables or disables depth clipping. By default enabled. | |
virtual 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. | |
virtual void | setStencilMethod (const ESizeComparisionTypes Method, s32 Reference=0, u32 BitMask=~0) |
virtual void | setStencilOperation (const EStencilOperations FailOp, const EStencilOperations ZFailOp, const EStencilOperations ZPassOp) |
virtual void | setClearStencil (s32 Stencil) |
Sets the stencil clear value. The default value is zero. | |
virtual bool | setupMaterialStates (const MaterialStates *Material, bool Forced=false)=0 |
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 | bindTextureLayers (const TextureLayerListType &TexLayers) |
Binds all given texture layers. | |
virtual void | unbindTextureLayers (const TextureLayerListType &TexLayers) |
Unbinds all given texture layers. | |
virtual void | setupShaderClass (const scene::MaterialNode *Object, ShaderClass *ShaderObject) |
Configures the renderer with the specified shader class. | |
virtual void | updateMaterialStates (MaterialStates *Material, bool isClear=false) |
Updates the material states' references. | |
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 | createVertexBuffer (void *&BufferID)=0 |
Creates a new hardware vertex buffer. | |
virtual void | createIndexBuffer (void *&BufferID)=0 |
Creates a new hardware index buffer. | |
virtual void | deleteVertexBuffer (void *&BufferID)=0 |
Deletes the specified hardware vertex buffer. | |
virtual void | deleteIndexBuffer (void *&BufferID)=0 |
Deletes the specified hardware index buffer. | |
virtual void | updateVertexBuffer (void *BufferID, const dim::UniversalBuffer &BufferData, const VertexFormat *Format, const EHWBufferUsage Usage)=0 |
Updates the specified hardware vertex buffer by uploading the specified buffer data into VRAM. | |
virtual void | updateIndexBuffer (void *BufferID, const dim::UniversalBuffer &BufferData, const IndexFormat *Format, const EHWBufferUsage Usage)=0 |
Updates the specified hardware index buffer by uploading the specified buffer data into VRAM. | |
virtual void | updateVertexBufferElement (void *BufferID, const dim::UniversalBuffer &BufferData, u32 Index)=0 |
Updates the specified hardware vertex buffer only for the specified element. | |
virtual void | updateIndexBufferElement (void *BufferID, const dim::UniversalBuffer &BufferData, u32 Index)=0 |
Updates the specified hardware index buffer only for the specified element. | |
virtual void | drawMeshBuffer (const MeshBuffer *MeshBuffer)=0 |
Renders the given hardware mesh buffer. | |
virtual void | drawMeshBufferPlain (const MeshBuffer *MeshBuffer, bool useFirstTextureLayer=false) |
virtual void | setRenderMode (const ERenderModes Mode) |
virtual void | setRenderState (const ERenderStates Type, s32 State)=0 |
virtual s32 | getRenderState (const ERenderStates Type) const =0 |
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 EFogTypes | getFog () const |
virtual void | setFogColor (const video::color &Color) |
Sets the fog color. | |
virtual video::color | getFogColor () const |
virtual void | setFogRange (f32 Range, f32 NearPlane=1.0f, f32 FarPlane=1000.0f, const EFogModes Mode=FOG_PALE) |
virtual void | getFogRange (f32 &Range, f32 &NearPlane, f32 &FarPlane, EFogModes &Mode) |
virtual void | setClipPlane (u32 Index, const dim::plane3df &Plane, bool Enable) |
virtual ShaderClass * | createShaderClass (VertexFormat *VertexInputLayout=0) |
virtual void | deleteShaderClass (ShaderClass *ShaderClassObj, bool DeleteAppendantShaders=false) |
virtual Shader * | loadShader (ShaderClass *ShaderClassObj, const EShaderTypes Type, const EShaderVersions Version, const io::stringc &Filename, const io::stringc &EntryPoint="", s32 Flags=0, const std::list< io::stringc > &PreShaderCode=std::list< io::stringc >()) |
virtual Shader * | createShader (ShaderClass *ShaderClassObj, const EShaderTypes Type, const EShaderVersions Version, const std::list< io::stringc > &ShaderBuffer, const io::stringc &EntryPoint="") |
virtual ShaderClass * | loadShaderClass (const io::stringc &FilenameVertex, const io::stringc &FilenamePixel, const EShaderVersions VersionVertex, const EShaderVersions VersionPixel, const io::stringc &EntryPointVertex="", const io::stringc &EntryPointPixel="") |
Loads a vertex- and pixel shader, creates a shader class and links the program. | |
virtual ShaderClass * | createCgShaderClass (VertexFormat *VertexInputLayout=0) |
Creates a new Cg shader class. If the engine was compiled without the Cg toolkit this function returns null. | |
virtual Shader * | createCgShader (ShaderClass *ShaderClassObj, const EShaderTypes Type, const EShaderVersions Version, const std::list< io::stringc > &ShaderBuffer, const io::stringc &EntryPoint="", const c8 **CompilerOptions=0) |
virtual void | deleteShader (Shader *ShaderObj) |
Deletes the specified shader object. | |
virtual void | unbindShaders () |
Unbinds (or rather disables) all shader types. | |
virtual bool | runComputeShader (Shader *ShaderObj, ComputeShaderIO *IOInterface, const dim::vector3di &GroupSize) |
virtual ComputeShaderIO * | createComputeShaderIO () |
virtual void | deleteComputeShaderIO (ComputeShaderIO *&IOInterface) |
virtual void | beginSceneRendering () |
Begins with scene rendering. Always call this before rendering mesh buffers. | |
virtual void | endSceneRendering () |
Ends with scene rendering. Always call this after rendering mesh buffers. | |
virtual void | beginDrawing2D () |
virtual void | endDrawing2D () |
virtual void | beginDrawing3D () |
virtual void | endDrawing3D () |
virtual void | setBlending (const EBlendingTypes SourceBlend, const EBlendingTypes DestBlend) |
virtual void | setClipping (bool Enable, const dim::point2di &Position, const dim::size2di &Size) |
virtual void | setViewport (const dim::point2di &Position, const dim::size2di &Size) |
virtual bool | setRenderTarget (Texture *Target) |
virtual Texture * | getRenderTarget () const |
virtual 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. | |
virtual void | setPointSize (s32 Size=1) |
Sets the size for each point which is to be rendered. By default 1. | |
virtual void | draw2DImage (const Texture *Tex, const dim::point2di &Position, const color &Color=color(255)) |
virtual 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)) |
virtual void | draw2DImage (const Texture *Tex, const dim::point2di &Position, f32 Rotation, f32 Radius, const color &Color=color(255)) |
virtual void | draw2DImage (const Texture *Tex, dim::rect2di Position, const dim::rect2df &Clipping, f32 Rotation, const dim::point2df &RotationPoint=dim::point2df(0.5f, 0.5f), const color &lefttopColor=color(255), const color &righttopColor=color(255), const color &rightbottomColor=color(255), const color &leftbottomColor=color(255)) |
virtual 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. | |
virtual color | getPixelColor (const dim::point2di &Position) const |
virtual f32 | getPixelDepth (const dim::point2di &Position) const |
virtual void | draw2DPoint (const dim::point2di &Position, const color &Color=color(255)) |
Draws a 2D point at the specified position in screen space. | |
virtual void | draw2DLine (const dim::point2di &PositionA, const dim::point2di &PositionB, const color &Color=color(255)) |
Draws a 2D line at the specified position (PositionA to PositionB). | |
virtual 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). | |
virtual void | draw2DRectangle (const dim::rect2di &Rect, const color &Color=255, bool isSolid=true) |
virtual 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. | |
virtual void | draw2DBox (const dim::point2di &Position, const dim::size2di &Size, const color &Color=255, bool isSolid=true) |
virtual void | draw2DCircle (const dim::point2di &Position, s32 Radius, const color &Color=255) |
virtual void | draw2DEllipse (const dim::point2di &Position, const dim::size2di &Radius, const color &Color=255) |
Draws a 2D ellipse (time consuming drawing operation). | |
virtual void | draw2DPolygon (const ERenderPrimitives Type, const scene::SPrimitiveVertex2D *VerticesList, u32 Count) |
virtual void | draw2DPolygonImage (const ERenderPrimitives Type, Texture *Tex, const scene::SPrimitiveVertex2D *VerticesList, u32 Count) |
virtual void | draw3DPoint (const dim::vector3df &Position, const color &Color=255) |
virtual void | draw3DLine (const dim::vector3df &PositionA, const dim::vector3df &PositionB, const color &Color=255) |
virtual void | draw3DLine (const dim::vector3df &PositionA, const dim::vector3df &PositionB, const color &ColorA, const color &ColorB) |
virtual void | draw3DEllipse (const dim::vector3df &Position, const dim::vector3df &Rotation=0.0f, const dim::size2df &Radius=0.5f, const color &Color=255) |
virtual void | draw3DTriangle (Texture *Tex, const dim::triangle3df &Triangle, const color &Color=255) |
virtual void | draw3DBox (const dim::aabbox3df &BoundBox, const dim::matrix4f &Transformation, const color &Color=color(255)) |
virtual void | draw3DBox (const dim::obbox3df &BoundBox, const color &Color=color(255)) |
Draws a 3D oriented bounding-box. | |
void | setTextureGenFlags (const ETextureGenFlags Flag, const s32 Value) |
EImageFileFormats | getImageFileFormat (io::File *TexFile) const |
Returns the image format of the specified file. | |
EImageFileFormats | getImageFileFormat (const io::stringc &Filename) const |
Returns the image format of the specified file given by the filename. | |
virtual Texture * | loadTexture (const io::stringc &Filename) |
virtual Texture * | loadTexture (ImageLoader *Loader) |
Loads a texture using the specified image loader. | |
virtual Texture * | getTexture (const io::stringc &Filename) |
virtual std::list< Texture * > | loadTextureList (const io::stringc &Filename) |
bool | saveTexture (const Texture *Tex, io::stringc Filename, const EImageFileFormats FileFormat=IMAGEFORMAT_BMP) |
void | deleteTexture (Texture *&Tex) |
Deletes the specifed Texture object. | |
virtual bool | isTexture (const Texture *Tex) const |
Returns true if the specifies texture is a valid hardware texture. | |
virtual Texture * | copyTexture (const Texture *Tex) |
Copies the specified texture and returns the new instance. | |
virtual Texture * | createTexture (const dim::size2di &Size, const EPixelFormats Format=PIXELFORMAT_RGB, const u8 *ImageBuffer=0) |
virtual Texture * | createTexture (const dim::size2di &Size, const EPixelFormats Format, const f32 *ImageBuffer) |
Creates a new float texture. | |
virtual Texture * | createTexture (const STextureCreationFlags &CreationFlags)=0 |
Creates a new texture with the specified creation flags. | |
virtual Texture * | createCubeMap (const dim::size2di &Size, bool isRenderTarget=true) |
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 | setFillColor (const video::color &Color) |
Sets the standard texture creation fill color. | |
virtual void | clearTextureList () |
virtual void | reloadTextureList () |
Texture * | createTextureFromDeviceBitmap (void *BitmapDC, void *Bitmap) |
void | deleteVertexFormat (VertexFormat *Format) |
Deletes the specified VertexFormat object. | |
Movie * | loadMovie (const io::stringc &Filename, s32 Resolution=256) |
void | deleteMovie (Movie *&MovieObject) |
virtual Font * | createFont (const io::stringc &FontName="", s32 FontSize=0, s32 Flags=0) |
virtual Font * | createTexturedFont (const io::stringc &FontName="", s32 FontSize=0, s32 Flags=0) |
virtual Font * | createBitmapFont (const io::stringc &FontName="", s32 FontSize=0, s32 Flags=0) |
virtual Font * | createFont (video::Texture *FontTexture) |
virtual Font * | createFont (video::Texture *FontTexture, const io::stringc &FontXMLFile) |
virtual Font * | createFont (video::Texture *FontTexture, const std::vector< SFontGlyph > &GlyphList, s32 FontHeight) |
virtual Texture * | createFontTexture (std::vector< SFontGlyph > &GlyphList, const io::stringc &FontName="", s32 FontSize=0, s32 Flags=0) |
virtual void | deleteFont (Font *FontObj) |
Deletes the specified font. | |
virtual void | draw2DText (const Font *FontObject, const dim::point2di &Position, const io::stringc &Text, const color &Color=color(255), s32 Flags=0) |
virtual void | draw3DText (const Font *FontObject, const dim::matrix4f &Transformation, const io::stringc &Text, const color &Color=color(255)) |
virtual void | updateModelviewMatrix ()=0 |
virtual void | matrixWorldViewReset () |
virtual void | setProjectionMatrix (const dim::matrix4f &Matrix) |
virtual void | setViewMatrix (const dim::matrix4f &Matrix) |
virtual void | setWorldMatrix (const dim::matrix4f &Matrix) |
virtual void | setTextureMatrix (const dim::matrix4f &Matrix, u8 TextureLayer=0) |
virtual void | setColorMatrix (const dim::matrix4f &Matrix) |
virtual dim::matrix4f | getProjectionMatrix () const |
virtual dim::matrix4f | getViewMatrix () const |
virtual dim::matrix4f | getWorldMatrix () const |
virtual dim::matrix4f | getTextureMatrix (u8 TextureLayer=0) const |
virtual dim::matrix4f | getColorMatrix () const |
ERenderSystems | getRendererType () const |
HDC | getDeviceContext () const |
bool | getDepthClip () const |
Returns whether depth clipping is enabled or disabled. | |
const std::list< Shader * > & | getShaderList () const |
Returns the global shader list. | |
const std::list< ShaderClass * > & | getShaderClassList () const |
Returns the global shader-class list. | |
const std::list < ComputeShaderIO * > & | getComputeShaderIOList () const |
Returns the global compute-shader IO list. | |
void | setSurfaceCallback (const ShaderSurfaceCallback &CallbackProc) |
void | setGlobalShaderClass (ShaderClass *GlobalShaderClass) |
Sets the global shader class which will be used instead of each object's individual shader class. | |
ShaderClass * | getGlobalShaderClass () const |
void | setTextureGenFlags (const STextureCreationFlags &Flags) |
Sets the new texture generation flags. You can also set each flag individual by calling the other "setTextureGenFlags" function. | |
STextureCreationFlags | getTextureGenFlags () const |
Returns the texture generation flags structure. | |
std::list< Texture * > | getTextureList () const |
Returns the whole texture list. | |
void | setFontTransformation (const dim::matrix4f &Transform) |
dim::matrix4f | getFontTransformation () const |
Returns the font transformation for 2D text drawing. | |
void | setTexLayerVisibleMask (s32 VisibleMask) |
s32 | getTexLayerVisibleMask () const |
Returns the texture-layer visibility bit mask. By default 0xFFFFFFFF. | |
void | setClipping (bool Enable) |
void | setupDefaultBlending () |
ERenderModes | getRenderMode () const |
template<class T > | |
T * | createVertexFormat () |
VertexFormatDefault * | getVertexFormatDefault () const |
Returns the pre-defined "default" vertex format. | |
VertexFormatReduced * | getVertexFormatReduced () const |
Returns the pre-defined "reduced" vertex format. | |
VertexFormatExtended * | getVertexFormatExtended () const |
Returns the pre-defined "extended" vertex format. | |
VertexFormatFull * | getVertexFormatFull () const |
Returns the pre-defined "full" vertex format. | |
const MaterialStates * | getMaterialDrawing2D () const |
Returns a constant pointer to the 2D drawing material. | |
const MaterialStates * | getMaterialDrawing3D () const |
Returns a constant pointer to the 3D drawing material. | |
const std::list< VertexFormat * > & | getVertexFormatList () const |
Returns the vertex format list. | |
const video::Texture * | getDefaultTexture (const EDefaultTextures Type) |
Static Public Member Functions | |
static io::stringc | getVendorNameByID (const u32 VendorID) |
static u32 | queryDrawCalls () |
static u32 | queryMeshBufferBindings () |
static u32 | queryTextureLayerBindings () |
static u32 | queryMaterialUpdates () |
Protected Types | |
enum | ERenderQueries { RENDERQUERY_SHADER = 0, RENDERQUERY_GEOMETRY_SHADER, RENDERQUERY_TESSELLATION_SHADER, RENDERQUERY_CONSTANT_BUFFER, RENDERQUERY_RENDERTARGET, RENDERQUERY_MULTISAMPLE_RENDERTARGET, RENDERQUERY_MULTI_TEXTURE, RENDERQUERY_CUBEMAP_ARRAY, RENDERQUERY_HARDWARE_MESHBUFFER, RENDERQUERY_HARDWARE_INSTANCING, RENDERQUERY_FOG_COORD, RENDERQUERY_COUNT } |
Protected Member Functions | |
RenderSystem (const ERenderSystems Type) | |
virtual void | setup2DDrawing () |
virtual void | setup3DDrawing () |
virtual Shader * | createEmptyShaderWithError (const io::stringc &Message, ShaderClass *ShaderClassObj, const EShaderTypes Type, const EShaderVersions Version) |
virtual void | createDeviceFont (void *FontObject, const io::stringc &FontName, const dim::size2di &FontSize, s32 Flags=0, s32 CharSet=0) const |
virtual std::vector< SFontGlyph > | getCharWidths (void *FontObject) const |
virtual void | updateVertexInputLayout (VertexFormat *Format, bool isCreate) |
virtual void | createDefaultResources () |
virtual void | deleteDefaultResources () |
virtual void | releaseFontObject (Font *FontObj) |
virtual void | drawTexturedFont (const Font *FontObj, const dim::point2di &Position, const io::stringc &Text, const color &Color) |
virtual void | drawBitmapFont (const Font *FontObj, const dim::point2di &Position, const io::stringc &Text, const color &Color) |
void | unbindPrevTextureLayers () |
void | noticeTextureLayerChanged (const TextureLayer *TexLayer) |
Static Protected Member Functions | |
static void | resetQueryCounters () |
Protected Attributes | |
ERenderSystems | RendererType_ |
HDC | DeviceContext_ |
UINT | PixelFormat_ |
Display * | Display_ |
Window * | Window_ |
std::list< Texture * > | TextureList_ |
std::list< Shader * > | ShaderList_ |
std::list< ShaderClass * > | ShaderClassList_ |
std::list< ComputeShaderIO * > | ComputeShaderIOList_ |
std::list< Font * > | FontList_ |
std::list< Movie * > | MovieList_ |
std::map< std::string, Texture * > | TextureMap_ |
std::vector< RenderContext * > | ContextList_ |
CriticalSection | TextureListSemaphore_ |
u8 | StdFillColor_ [4] |
SFogStates | Fog_ |
STextureCreationFlags | TexGenFlags_ |
SDepthRange | DepthRange_ |
ERenderModes | RenderMode_ |
dim::matrix4f | Matrix2D_ |
dim::matrix4f | FontTransform_ |
u32 | MaxClippingPlanes_ |
bool | isFrontFace_ |
s32 | TexLayerVisibleMask_ |
Texture * | RenderTarget_ |
ShaderClass * | CurShaderClass_ |
ShaderClass * | GlobalShaderClass_ |
ShaderSurfaceCallback | ShaderSurfaceCallback_ |
const MaterialStates * | PrevMaterial_ |
const TextureLayerListType * | PrevTextureLayers_ |
MaterialStates * | Material2DDrawing_ |
MaterialStates * | Material3DDrawing_ |
std::list< VertexFormat * > | VertexFormatList_ |
VertexFormatDefault * | VertexFormatDefault_ |
VertexFormatReduced * | VertexFormatReduced_ |
VertexFormatExtended * | VertexFormatExtended_ |
VertexFormatFull * | VertexFormatFull_ |
bool | RenderQuery_ [RENDERQUERY_COUNT] |
Static Protected Attributes | |
static u32 | NumDrawCalls_ |
Draw call counter. This counter will always be incremented when "drawMeshBuffer" has been called. | |
static u32 | NumMeshBufferBindings_ |
Mesh buffer binding counter. | |
static u32 | NumTexLayerBindings_ |
Texture layer list binding counter. | |
static u32 | NumMaterialUpdates_ |
Material states update counter. | |
Friends | |
class | Font |
class | GLTextureBase |
class | OpenGLTexture |
class | OpenGLES1Texture |
class | GLFramebufferObject |
class | sp::SoftPixelDevice |
class | VertexFormat |
class | VertexFormatUniversal |
class | Texture |
class | TextureLayer |
class | MeshBuffer |
class | SoftPixelDevice |
class | sp::SoftPixelDeviceWin32 |
class | sp::SoftPixelDeviceLinux |
class | sp::SoftPixelDeviceAndroid |
RenderSystem class used for all graphic operations such as drawing 2D, rendering 3D, shader programs etc. Since version 2.2 the SoftPixel Engine does no longer support a software renderer because of irrelevance. The supported render systems are OpenGL (1.1 - 4.1), Direct3D 9 and Direct3D 11.
enum sp::video::RenderSystem::ERenderQueries [protected] |
sp::video::RenderSystem::~RenderSystem | ( | ) | [virtual] |
sp::video::RenderSystem::RenderSystem | ( | const ERenderSystems | Type | ) | [protected] |
void sp::video::RenderSystem::addDynamicLightSource | ( | u32 | LightID, | |
scene::ELightModels | Type, | |||
video::color & | Diffuse, | |||
video::color & | Ambient, | |||
video::color & | Specular, | |||
f32 | AttenuationConstant, | |||
f32 | AttenuationLinear, | |||
f32 | AttenuationQuadratic | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::beginDrawing2D | ( | ) | [virtual] |
Configures the renderer to draw further in 2D.
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::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 in sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::beginSceneRendering | ( | ) | [virtual] |
Begins with scene rendering. Always call this before rendering mesh buffers.
void sp::video::RenderSystem::bindTextureLayers | ( | const TextureLayerListType & | TexLayers | ) | [virtual] |
Binds all given texture layers.
Reimplemented in sp::video::Direct3D11RenderSystem.
virtual void sp::video::RenderSystem::clearBuffers | ( | const s32 | ClearFlags = BUFFER_COLOR|BUFFER_DEPTH |
) | [pure 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). |
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::clearTextureList | ( | ) | [virtual] |
Copies the specified texture and returns the new instance.
Font * sp::video::RenderSystem::createBitmapFont | ( | const io::stringc & | FontName = "" , |
|
s32 | FontSize = 0 , |
|||
s32 | Flags = 0 | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
Shader * sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::OpenGLRenderSystem.
ShaderClass * sp::video::RenderSystem::createCgShaderClass | ( | VertexFormat * | VertexInputLayout = 0 |
) | [virtual] |
Creates a new Cg shader class. If the engine was compiled without the Cg toolkit this function returns null.
ComputeShaderIO * sp::video::RenderSystem::createComputeShaderIO | ( | ) | [virtual] |
Creates a new computer shader input/ouput interface. This is used to set data to and to get data from the GPU. Input- and output buffers are created with this interface.
Reimplemented in sp::video::Direct3D11RenderSystem.
Texture * sp::video::RenderSystem::createCubeMap | ( | const dim::size2di & | Size, | |
bool | isRenderTarget = true | |||
) | [virtual] |
Creates a texture cubemap. The functionality of this method is equivalent to the following code:
Texture* CubeMap = spRenderer->createTexture(dim::size2di(Size.Width, Size.Height*6)); CubeMap->setDimension(video::TEXTURE_CUBEMAP); CubeMap->setWrapMode(video::TEXWRAP_CLAMP); CubeMap->setRenderTarget(isRenderTarget);
Size,: | Specifies the size for each cubemap face. | |
isRenderTarget,: | Specifies whether this cubemap should be a render target or not. By default true. |
void sp::video::RenderSystem::createDefaultResources | ( | ) | [protected, virtual] |
void sp::video::RenderSystem::createDeviceFont | ( | void * | FontObject, | |
const io::stringc & | FontName, | |||
const dim::size2di & | FontSize, | |||
s32 | Flags = 0 , |
|||
s32 | CharSet = 0 | |||
) | const [protected, virtual] |
Shader * sp::video::RenderSystem::createEmptyShaderWithError | ( | const io::stringc & | Message, | |
ShaderClass * | ShaderClassObj, | |||
const EShaderTypes | Type, | |||
const EShaderVersions | Version | |||
) | [protected, virtual] |
Font * sp::video::RenderSystem::createFont | ( | const io::stringc & | FontName = "" , |
|
s32 | FontSize = 0 , |
|||
s32 | Flags = 0 | |||
) | [virtual] |
Loads a new font.
FontName,: | Specifies the type of font. By default the first font which could be found. Under MS/Windows this is often "Arial". | |
FontSize,: | Specifies the font size. By default the standard OS font size. | |
Flags,: | Additional options for the font. This can be a combination of the following values: FONT_BOLD, FONT_ITALIC, FONT_UNDERLINED, FONT_STRIKEOUT, FONT_SYMBOLS. |
Font * sp::video::RenderSystem::createFont | ( | video::Texture * | FontTexture | ) | [virtual] |
Font * sp::video::RenderSystem::createFont | ( | video::Texture * | FontTexture, | |
const io::stringc & | FontXMLFile | |||
) | [virtual] |
Font * sp::video::RenderSystem::createFont | ( | video::Texture * | FontTexture, | |
const std::vector< SFontGlyph > & | GlyphList, | |||
s32 | FontHeight | |||
) | [virtual] |
Texture * sp::video::RenderSystem::createFontTexture | ( | std::vector< SFontGlyph > & | GlyphList, | |
const io::stringc & | FontName = "" , |
|||
s32 | FontSize = 0 , |
|||
s32 | Flags = 0 | |||
) | [virtual] |
Creates a font texture with the given font type and styles.
GlyphList,: | Specifies the resulting glyph list. Assign this to the final font object. | |
FontName,: | Specifies the font name. Under MS/Windows there are default fonts like "Arial", "Courier New" or "Times New Roman". | |
FontSize,: | Specifies the font size. This is actually the font's height. The width will be computed automatically. | |
Flags,: | Specifies the font style flags. This can be a combination of the following values: FONT_BOLD, FONT_ITALIC, FONT_UNDERLINED, FONT_STRIKEOUT, FONT_SYMBOLS. |
virtual void sp::video::RenderSystem::createIndexBuffer | ( | void *& | BufferID | ) | [pure virtual] |
Creates a new hardware index buffer.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
Texture * sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
Shader * sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLProgrammableFunctionPipeline.
ShaderClass * sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLProgrammableFunctionPipeline.
Texture * sp::video::RenderSystem::createTexture | ( | const dim::size2di & | Size, | |
const EPixelFormats | Format = PIXELFORMAT_RGB , |
|||
const u8 * | ImageBuffer = 0 | |||
) | [virtual] |
Creates a new texture.
Size,: | Specifies the initial texture size. | |
Format,: | Specifies the image buffer format. By default RGB. | |
ImageBuffer,: | Specifies the image buffer which is to be used. Internally only a copy of this image buffer will be used. Thus you need to handle the memory by yourself. By default 0 which means that the texture will be filled by a default color which can be set with "setFillColor". |
Texture * sp::video::RenderSystem::createTexture | ( | const dim::size2di & | Size, | |
const EPixelFormats | Format, | |||
const f32 * | ImageBuffer | |||
) | [virtual] |
Creates a new float texture.
virtual Texture* sp::video::RenderSystem::createTexture | ( | const STextureCreationFlags & | CreationFlags | ) | [pure virtual] |
Creates a new texture with the specified creation flags.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
Font * sp::video::RenderSystem::createTexturedFont | ( | const io::stringc & | FontName = "" , |
|
s32 | FontSize = 0 , |
|||
s32 | Flags = 0 | |||
) | [virtual] |
Texture * sp::video::RenderSystem::createTextureFromDeviceBitmap | ( | void * | BitmapDC, | |
void * | Bitmap | |||
) |
Creates a new texture from the given device bitmap and its device-context. This is currently only supported for MS/Windows. The two pointers must reference to a HDC and a HBITMAP object.
// Code example for MS/Windows:
HDC hDC = GetDC(hWnd);
HBITMAP hBmp = CreateCompatibleBitmap(hDC, Width, Height);
HDC hBmpDC = CreateCompatibleDC(hDC);
video::Texture* Tex = spRenderer->createTextureFromDeviceBitmap(&hBmpDC, &hBmp);
virtual void sp::video::RenderSystem::createVertexBuffer | ( | void *& | BufferID | ) | [pure virtual] |
Creates a new hardware vertex buffer.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
T* sp::video::RenderSystem::createVertexFormat | ( | ) | [inline] |
Creates a new vertex format. This is a template function, thus you can create your own custom vertex formats. Just write a class which inherits from the VertexFormat base class.
void sp::video::RenderSystem::deleteComputeShaderIO | ( | ComputeShaderIO *& | IOInterface | ) | [virtual] |
void sp::video::RenderSystem::deleteDefaultResources | ( | ) | [protected, virtual] |
void sp::video::RenderSystem::deleteFont | ( | Font * | FontObj | ) | [virtual] |
Deletes the specified font.
virtual void sp::video::RenderSystem::deleteIndexBuffer | ( | void *& | BufferID | ) | [pure virtual] |
Deletes the specified hardware index buffer.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::deleteMovie | ( | Movie *& | MovieObject | ) |
void sp::video::RenderSystem::deleteShader | ( | Shader * | ShaderObj | ) | [virtual] |
Deletes the specified shader object.
void sp::video::RenderSystem::deleteShaderClass | ( | ShaderClass * | ShaderClassObj, | |
bool | DeleteAppendantShaders = false | |||
) | [virtual] |
Deletes the giben shader class.
ShaderClassObj,: | Pointer to the shader class which is to be deleted. | |
DeleteAppendantShaders,: | Specifies whether the appendant shaders are also to be deleted or not. By default false. |
virtual void sp::video::RenderSystem::deleteVertexBuffer | ( | void *& | BufferID | ) | [pure virtual] |
Deletes the specified hardware vertex buffer.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::deleteVertexFormat | ( | VertexFormat * | Format | ) |
Deletes the specified VertexFormat object.
void sp::video::RenderSystem::draw2DBox | ( | const dim::point2di & | Position, | |
const dim::size2di & | Size, | |||
const color & | Color = 255 , |
|||
bool | isSolid = true | |||
) | [virtual] |
void sp::video::RenderSystem::draw2DCircle | ( | const dim::point2di & | Position, | |
s32 | Radius, | |||
const color & | Color = 255 | |||
) | [virtual] |
Draws a 2D circle using the "Bresenham Algorithm".
void sp::video::RenderSystem::draw2DEllipse | ( | const dim::point2di & | Position, | |
const dim::size2di & | Radius, | |||
const color & | Color = 255 | |||
) | [virtual] |
Draws a 2D ellipse (time consuming drawing operation).
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::draw2DImage | ( | const Texture * | Tex, | |
dim::rect2di | Position, | |||
const dim::rect2df & | Clipping, | |||
f32 | Rotation, | |||
const dim::point2df & | RotationPoint = dim::point2df(0.5f, 0.5f) , |
|||
const color & | lefttopColor = color(255) , |
|||
const color & | righttopColor = color(255) , |
|||
const color & | rightbottomColor = color(255) , |
|||
const color & | leftbottomColor = color(255) | |||
) | [virtual] |
Draws an individual rotatable 2D image.
Rotation,: | Angle (in degrees) for the image rotation. | |
RotationPoint,: | Origin of the rotation in percent. By default 0.5 (50%) so it is centerd. | |
lefttopColor,: | Color of the left top image corner. | |
righttopColor,: | Color of the right top image corner. | |
rightbottomColor,: | Color of the right bottom image corner. | |
leftbottomColor,: | Color of the left bottom image corner. |
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::draw2DLine | ( | const dim::point2di & | PositionA, | |
const dim::point2di & | PositionB, | |||
const color & | Color = color(255) | |||
) | [virtual] |
Draws a 2D line at the specified position (PositionA to PositionB).
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::draw2DPoint | ( | const dim::point2di & | Position, | |
const color & | Color = color(255) | |||
) | [virtual] |
Draws a 2D point at the specified position in screen space.
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::draw2DPolygon | ( | const ERenderPrimitives | Type, | |
const scene::SPrimitiveVertex2D * | VerticesList, | |||
u32 | Count | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::draw2DPolygonImage | ( | const ERenderPrimitives | Type, | |
Texture * | Tex, | |||
const scene::SPrimitiveVertex2D * | VerticesList, | |||
u32 | Count | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::draw2DText | ( | const Font * | FontObject, | |
const dim::point2di & | Position, | |||
const io::stringc & | Text, | |||
const color & | Color = color(255) , |
|||
s32 | Flags = 0 | |||
) | [virtual] |
Draws a 2D text with the specified font.
FontObject,: | Specifies the font which is to be used for text drawing. | |
Position,: | Specifies the 2D position (in screen space). | |
Text,: | Specifies the text which is to be drawn. | |
Color,: | Specifies the color in which the text is to be drawn. | |
Flags,: | Specifies the drawing flags. |
void sp::video::RenderSystem::draw3DBox | ( | const dim::aabbox3df & | BoundBox, | |
const dim::matrix4f & | Transformation, | |||
const color & | Color = color(255) | |||
) | [virtual] |
Draws a 3D axis-aligned bounding-box. This is relatively time consuming. A faster way to draw complex line construction is to create a mesh and change the primitive type from triangles to lines, line-strip or line-fan.
void sp::video::RenderSystem::draw3DBox | ( | const dim::obbox3df & | BoundBox, | |
const color & | Color = color(255) | |||
) | [virtual] |
Draws a 3D oriented bounding-box.
void sp::video::RenderSystem::draw3DEllipse | ( | const dim::vector3df & | Position, | |
const dim::vector3df & | Rotation = 0.0f , |
|||
const dim::size2df & | Radius = 0.5f , |
|||
const color & | Color = 255 | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::draw3DLine | ( | const dim::vector3df & | PositionA, | |
const dim::vector3df & | PositionB, | |||
const color & | Color = 255 | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::draw3DLine | ( | const dim::vector3df & | PositionA, | |
const dim::vector3df & | PositionB, | |||
const color & | ColorA, | |||
const color & | ColorB | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::draw3DPoint | ( | const dim::vector3df & | Position, | |
const color & | Color = 255 | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::draw3DText | ( | const Font * | FontObject, | |
const dim::matrix4f & | Transformation, | |||
const io::stringc & | Text, | |||
const color & | Color = color(255) | |||
) | [virtual] |
Draws a 3D text.
FontObject,: | Specifies the font which is to be used for text drawing. | |
Transformation,: | Specifies the transformation matrix (in global space). | |
Text,: | Specifies the text which is to be drawn. | |
Color,: | Specifies the color in which the text is to be drawn. |
void sp::video::RenderSystem::draw3DTriangle | ( | Texture * | Tex, | |
const dim::triangle3df & | Triangle, | |||
const color & | Color = 255 | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::OpenGLRenderSystem, and sp::video::OpenGLES1RenderSystem.
void sp::video::RenderSystem::drawBitmapFont | ( | const Font * | FontObj, | |
const dim::point2di & | Position, | |||
const io::stringc & | Text, | |||
const color & | Color | |||
) | [protected, virtual] |
virtual void sp::video::RenderSystem::drawMeshBuffer | ( | const MeshBuffer * | MeshBuffer | ) | [pure virtual] |
Renders the given hardware mesh buffer.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, sp::video::OpenGLRenderSystem, sp::video::OpenGLES1RenderSystem, and sp::video::OpenGLES2RenderSystem.
void sp::video::RenderSystem::drawMeshBufferPlain | ( | const MeshBuffer * | MeshBuffer, | |
bool | useFirstTextureLayer = false | |||
) | [virtual] |
Renders only the plain geometry of the given hardware mesh buffer. No normals for lighting, no tex-coords for texture mapping, no fog-coord etc. This can be used to render fast shadow- or depth maps.
MeshBuffer,: | Specifies the hardware mesh buffer which is to be drawn. | |
useFirstTextureLayer,: | Specifies whether the first texture layer is to be bound or not. This can be used when the mesh buffer has a transparent color texture and you want to perform alpha-testing. |
Reimplemented in sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::drawTexturedFont | ( | const Font * | FontObj, | |
const dim::point2di & | Position, | |||
const io::stringc & | Text, | |||
const color & | Color | |||
) | [protected, virtual] |
Reimplemented in sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::endDrawing2D | ( | ) | [virtual] |
Reimplemented in sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::endDrawing3D | ( | ) | [virtual] |
void sp::video::RenderSystem::endSceneRendering | ( | ) | [virtual] |
Ends with scene rendering. Always call this after rendering mesh buffers.
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
std::vector< SFontGlyph > sp::video::RenderSystem::getCharWidths | ( | void * | FontObject | ) | const [protected, virtual] |
dim::matrix4f sp::video::RenderSystem::getColorMatrix | ( | ) | const [virtual] |
const std::list<ComputeShaderIO*>& sp::video::RenderSystem::getComputeShaderIOList | ( | ) | const [inline] |
Returns the global compute-shader IO list.
const video::Texture* sp::video::RenderSystem::getDefaultTexture | ( | const EDefaultTextures | Type | ) | [inline] |
Returns a constant default texture.
[in] | Type | Specifies the default texture type. |
bool sp::video::RenderSystem::getDepthClip | ( | ) | const [inline] |
Returns whether depth clipping is enabled or disabled.
Returns the depth range.
HDC sp::video::RenderSystem::getDeviceContext | ( | ) | const [inline] |
EFogTypes sp::video::RenderSystem::getFog | ( | ) | const [virtual] |
video::color sp::video::RenderSystem::getFogColor | ( | ) | const [virtual] |
void sp::video::RenderSystem::getFogRange | ( | f32 & | Range, | |
f32 & | NearPlane, | |||
f32 & | FarPlane, | |||
EFogModes & | Mode | |||
) | [virtual] |
dim::matrix4f sp::video::RenderSystem::getFontTransformation | ( | ) | const [inline] |
Returns the font transformation for 2D text drawing.
ShaderClass* sp::video::RenderSystem::getGlobalShaderClass | ( | ) | const [inline] |
EImageFileFormats sp::video::RenderSystem::getImageFileFormat | ( | io::File * | TexFile | ) | const |
Returns the image format of the specified file.
EImageFileFormats sp::video::RenderSystem::getImageFileFormat | ( | const io::stringc & | Filename | ) | const |
Returns the image format of the specified file given by the filename.
const MaterialStates* sp::video::RenderSystem::getMaterialDrawing2D | ( | ) | const [inline] |
Returns a constant pointer to the 2D drawing material.
const MaterialStates* sp::video::RenderSystem::getMaterialDrawing3D | ( | ) | const [inline] |
Returns a constant pointer to the 3D drawing material.
virtual s32 sp::video::RenderSystem::getMaxAnisotropicFilter | ( | ) | const [pure virtual] |
Returns the count of maximal anisotropic texture filter sampling.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
virtual s32 sp::video::RenderSystem::getMaxLightCount | ( | ) | const [pure virtual] |
Returns the count of maximal light sources for the fixed-function-pipeline.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, sp::video::GLFixedFunctionPipeline, and sp::video::OpenGLES2RenderSystem.
virtual s32 sp::video::RenderSystem::getMultitexCount | ( | ) | const [pure virtual] |
Returns the count of maximal texture layers for the fixed-function-pipeline.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, sp::video::GLFixedFunctionPipeline, and sp::video::OpenGLES2RenderSystem.
color sp::video::RenderSystem::getPixelColor | ( | const dim::point2di & | Position | ) | const [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
f32 sp::video::RenderSystem::getPixelDepth | ( | const dim::point2di & | Position | ) | const [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
dim::matrix4f sp::video::RenderSystem::getProjectionMatrix | ( | ) | const [virtual] |
dim::EMatrixCoordinateSystmes sp::video::RenderSystem::getProjectionMatrixType | ( | ) | const [virtual] |
Reimplemented in sp::video::GLBasePipeline.
virtual io::stringc sp::video::RenderSystem::getRenderer | ( | ) | const [pure virtual] |
Returns the renderer hardware (e.g. "NVIDIA GeForce 8800 GTX").
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
ERenderSystems sp::video::RenderSystem::getRendererType | ( | ) | const [inline] |
Returns type of render system (OpenGL, Direct3D9 etc.).
ERenderModes sp::video::RenderSystem::getRenderMode | ( | ) | const [inline] |
Returns the active render mode. This is used internally to switch render modes dynamically.
virtual s32 sp::video::RenderSystem::getRenderState | ( | const ERenderStates | Type | ) | const [pure virtual] |
Returns the current render state.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, sp::video::GLFixedFunctionPipeline, and sp::video::OpenGLES2RenderSystem.
Texture * sp::video::RenderSystem::getRenderTarget | ( | ) | const [virtual] |
const std::list<ShaderClass*>& sp::video::RenderSystem::getShaderClassList | ( | ) | const [inline] |
Returns the global shader-class list.
const std::list<Shader*>& sp::video::RenderSystem::getShaderList | ( | ) | const [inline] |
Returns the global shader list.
virtual io::stringc sp::video::RenderSystem::getShaderVersion | ( | ) | const [pure virtual] |
Returns the shader version (e.g. "1.50 NVIDIA via Cg compiler" or "HLSL Shader Model 2").
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, sp::video::GLBasePipeline, and sp::video::GLProgrammableFunctionPipeline.
s32 sp::video::RenderSystem::getTexLayerVisibleMask | ( | ) | const [inline] |
Returns the texture-layer visibility bit mask. By default 0xFFFFFFFF.
Texture * sp::video::RenderSystem::getTexture | ( | const io::stringc & | Filename | ) | [virtual] |
Returns the specified texture file. This function loads a texture file only once. If you call this function several times with the same file the engine will use the same Texture object to save memory and time.
STextureCreationFlags sp::video::RenderSystem::getTextureGenFlags | ( | ) | const [inline] |
Returns the texture generation flags structure.
std::list<Texture*> sp::video::RenderSystem::getTextureList | ( | ) | const [inline] |
Returns the whole texture list.
dim::matrix4f sp::video::RenderSystem::getTextureMatrix | ( | u8 | TextureLayer = 0 |
) | const [virtual] |
virtual io::stringc sp::video::RenderSystem::getVendor | ( | ) | const [pure virtual] |
Returns the graphics hardware vendor (e.g. "NVIDIA Corporation" or "ATI Technologies Inc.").
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
io::stringc sp::video::RenderSystem::getVendorNameByID | ( | const u32 | VendorID | ) | [static] |
virtual io::stringc sp::video::RenderSystem::getVersion | ( | ) | const [pure virtual] |
Returns the renderer API version (e.g. "OpenGL 3.2" or "Direct3D9.0c").
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, sp::video::GLBasePipeline, sp::video::OpenGLES1RenderSystem, and sp::video::OpenGLES2RenderSystem.
VertexFormatDefault* sp::video::RenderSystem::getVertexFormatDefault | ( | ) | const [inline] |
Returns the pre-defined "default" vertex format.
VertexFormatExtended* sp::video::RenderSystem::getVertexFormatExtended | ( | ) | const [inline] |
Returns the pre-defined "extended" vertex format.
VertexFormatFull* sp::video::RenderSystem::getVertexFormatFull | ( | ) | const [inline] |
Returns the pre-defined "full" vertex format.
const std::list<VertexFormat*>& sp::video::RenderSystem::getVertexFormatList | ( | ) | const [inline] |
Returns the vertex format list.
VertexFormatReduced* sp::video::RenderSystem::getVertexFormatReduced | ( | ) | const [inline] |
Returns the pre-defined "reduced" vertex format.
dim::matrix4f sp::video::RenderSystem::getViewMatrix | ( | ) | const [virtual] |
Reimplemented in sp::video::GLBasePipeline.
dim::matrix4f sp::video::RenderSystem::getWorldMatrix | ( | ) | const [virtual] |
bool sp::video::RenderSystem::isTexture | ( | const Texture * | Tex | ) | const [virtual] |
Returns true if the specifies texture is a valid hardware texture.
Movie * sp::video::RenderSystem::loadMovie | ( | const io::stringc & | Filename, | |
s32 | Resolution = 256 | |||
) |
Loads an AVI movie file.
Filename,: | Specifies the AVI movie file which is to be loaded. | |
Resolution,: | Specifies the movie resolution. By default 256. This should be a "power of two" value. |
Shader * sp::video::RenderSystem::loadShader | ( | ShaderClass * | ShaderClassObj, | |
const EShaderTypes | Type, | |||
const EShaderVersions | Version, | |||
const io::stringc & | Filename, | |||
const io::stringc & | EntryPoint = "" , |
|||
s32 | Flags = 0 , |
|||
const std::list< io::stringc > & | PreShaderCode = std::list<io::stringc>() | |||
) | [virtual] |
Loads a shader from the disk.
[in] | ShaderClassObj | Pointer to a valid shader-class object. Create a valid shader-class object with the "createShaderClass" function. |
[in] | Type | Specifies the shader type (Vertex-, Pixel shader etc.). |
[in] | Version | Specifies the shader version (GLSL 1.20/ HLSL Vertex 1.1 etc.). |
[in] | Filename | Specifies the shader source filename. |
[in] | EntryPoint | Specifies the shader entry point or rather the main function name. This is not required for GLSL. But for HLSL and Cg! |
[in] | Flags | Specifies the compilation and loading flags. This can be a combination of the bit masks specified in the EShaderLoadingFlags enumeration. By default 0. |
[in] | PreShaderCode | Specifies additional pre-shader source code. This can be used to add some macros to your code. Here is a small example:
std::list<io::stringc> PreShaderCode; PreShaderCode.push_back("#define ENABLE_EFFECT_XY\n"); // Don't forget the end-of-line character '\n'! |
ShaderClass * sp::video::RenderSystem::loadShaderClass | ( | const io::stringc & | FilenameVertex, | |
const io::stringc & | FilenamePixel, | |||
const EShaderVersions | VersionVertex, | |||
const EShaderVersions | VersionPixel, | |||
const io::stringc & | EntryPointVertex = "" , |
|||
const io::stringc & | EntryPointPixel = "" | |||
) | [virtual] |
Loads a vertex- and pixel shader, creates a shader class and links the program.
Texture * sp::video::RenderSystem::loadTexture | ( | const io::stringc & | Filename | ) | [virtual] |
Loads a texture (or rather image) used for 3D geometry and 2D drawing.
Filename,: | Image filename. The engine can load different file formats like BMP, JPG or PNG etc. The engine also detects the true file format i.e. if an image file ends with ".bmp" but it is truly a JPEG image it will be loaded correctly. This is because the engine looks inside the files and reads the magic number to identify the actual file format. To load WAD files use the "loadTextureList" function. |
Texture * sp::video::RenderSystem::loadTexture | ( | ImageLoader * | Loader | ) | [virtual] |
Loads a texture using the specified image loader.
std::list< Texture * > sp::video::RenderSystem::loadTextureList | ( | const io::stringc & | Filename | ) | [virtual] |
Loads a texture list. This is only used for WAD files (from the Quake and Half-Life maps).
Filename,: | Image list filename. In WAD (Where is All the Data) files several 100 images may be stored. |
void sp::video::RenderSystem::matrixWorldViewReset | ( | ) | [virtual] |
void sp::video::RenderSystem::noticeTextureLayerChanged | ( | const TextureLayer * | TexLayer | ) | [protected] |
void sp::video::RenderSystem::printWarning | ( | ) | [virtual] |
Reimplemented in sp::video::Direct3D11RenderSystem.
u32 sp::video::RenderSystem::queryDrawCalls | ( | ) | [static] |
Returns the current count of MeshBuffer draw calls. Call this after all drawing operations are done.
bool sp::video::RenderSystem::queryExtensionSupport | ( | const io::stringc & | TargetExtension | ) | const [virtual] |
Returns true if the specified extension is supported by the renderer (actually only used for OpenGL, especially for shader extensions).
TargetExtension,: | Extension name (e.g. "GL_ARB_shader_texture_lod" when using "texture2DGradARB" function in GLSL). |
Reimplemented in sp::video::GLBasePipeline.
u32 sp::video::RenderSystem::queryMaterialUpdates | ( | ) | [static] |
u32 sp::video::RenderSystem::queryMeshBufferBindings | ( | ) | [static] |
Returns the current count of MeshBuffer bindings. Call this after all drawing operations are done.
u32 sp::video::RenderSystem::queryTextureLayerBindings | ( | ) | [static] |
Returns the current count of TextureLayer list bindings. Call this after all drawing operations are done.
virtual bool sp::video::RenderSystem::queryVideoSupport | ( | const EVideoFeatureQueries | Query | ) | const [pure virtual] |
Returns true if the specified feature is supported by the renderer.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, sp::video::OpenGLRenderSystem, sp::video::OpenGLES1RenderSystem, and sp::video::OpenGLES2RenderSystem.
void sp::video::RenderSystem::releaseFontObject | ( | Font * | FontObj | ) | [protected, virtual] |
void sp::video::RenderSystem::reloadTextureList | ( | ) | [virtual] |
void sp::video::RenderSystem::resetQueryCounters | ( | ) | [static, protected] |
bool sp::video::RenderSystem::runComputeShader | ( | Shader * | ShaderObj, | |
ComputeShaderIO * | IOInterface, | |||
const dim::vector3di & | GroupSize | |||
) | [virtual] |
Runs a compute shader (Only available for Direct3D11).
ShaderObj,: | Compute shader object which is to be executed. | |
OutputData,: | Pointer to the memory where the output data is to be stored. | |
OutputDataSize,: | Size of the memory in bytes. | |
GroupSize,: | 3 dimensional group size. Minimal size is (1, 1, 1). For shader model 4.0 and 4.1 'GroupSize.Z' needs to be 1. |
Reimplemented in sp::video::Direct3D11RenderSystem.
bool sp::video::RenderSystem::saveTexture | ( | const Texture * | Tex, | |
io::stringc | Filename, | |||
const EImageFileFormats | FileFormat = IMAGEFORMAT_BMP | |||
) |
Saves the specified texture to the disk.
Tex,: | Pointer to the Texture object which is to be saved. | |
Filename,: | Image filename. | |
FileFormat,: | Image format. Currently only the BMP file format is supported. |
void sp::video::RenderSystem::setAntiAlias | ( | bool | isAntiAlias | ) | [virtual] |
Enables or disables anti-aliasing or multi-sampling.
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::setClearColor | ( | const color & | Color | ) | [virtual] |
Sets the color with which the color-buffer is to be cleared.
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::setClearStencil | ( | s32 | Stencil | ) | [virtual] |
Sets the stencil clear value. The default value is zero.
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::setClipping | ( | bool | Enable | ) | [inline] |
Only enabled or disables the rectangular clipping. This is actually only used to disable the clipping because it's equivalent to the following code:
setClipping(Enable, 0, 0);
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::setColorMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::setDepthClip | ( | bool | Enable | ) | [virtual] |
Enables or disables depth clipping. By default enabled.
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::setDepthMask | ( | bool | Enable | ) | [virtual] |
Enables or disables the depth component which is to be written for rendering operations.
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
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 in sp::video::Direct3D9RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::setFillColor | ( | const video::color & | Color | ) | [virtual] |
Sets the standard texture creation fill color.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::setFogColor | ( | const video::color & | Color | ) | [virtual] |
Sets the fog color.
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::setFogRange | ( | f32 | Range, | |
f32 | NearPlane = 1.0f , |
|||
f32 | FarPlane = 1000.0f , |
|||
const EFogModes | Mode = FOG_PALE | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::setFontTransformation | ( | const dim::matrix4f & | Transform | ) | [inline] |
Sets the font transformation for 2D text drawing.
void sp::video::RenderSystem::setFrontFace | ( | bool | isFrontFace | ) | [virtual] |
Sets triangle rendering to CW (clock-wise -> false) or CCW (counter-clock-wise -> true).
Reimplemented in sp::video::GLBasePipeline.
void sp::video::RenderSystem::setGlobalShaderClass | ( | ShaderClass * | GlobalShaderClass | ) | [inline] |
Sets the global shader class which will be used instead of each object's individual shader class.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::setPointSize | ( | s32 | Size = 1 |
) | [virtual] |
Sets the size for each point which is to be rendered. By default 1.
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::setProjectionMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::setRenderMode | ( | const ERenderModes | Mode | ) | [virtual] |
Sets the new render mode when it's a different type than before. This is used internally to change the render mode between drawing 2D, drawing 3D and scene rendering. This function was introduced to remove the old "begin/endDrawing2D/3D" functions.
virtual void sp::video::RenderSystem::setRenderState | ( | const ERenderStates | Type, | |
s32 | State | |||
) | [pure 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);
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, sp::video::GLFixedFunctionPipeline, and sp::video::OpenGLES2RenderSystem.
bool sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLProgrammableFunctionPipeline.
void sp::video::RenderSystem::setShadeMode | ( | const EShadeModeTypes | ShadeMode | ) | [virtual] |
Sets the shading mode for primitives (where primitives are points, lines and triangles).
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::setSurfaceCallback | ( | const ShaderSurfaceCallback & | CallbackProc | ) | [inline] |
void sp::video::RenderSystem::setTexLayerVisibleMask | ( | s32 | VisibleMask | ) | [inline] |
Sets the texture-layer visibility bit mask.
void sp::video::RenderSystem::setTextureGenFlags | ( | const STextureCreationFlags & | Flags | ) | [inline] |
Sets the new texture generation flags. You can also set each flag individual by calling the other "setTextureGenFlags" function.
void sp::video::RenderSystem::setTextureGenFlags | ( | const ETextureGenFlags | Flag, | |
const s32 | Value | |||
) |
Sets the texture generation flags. Use this function to configure textures which were not even loaded.
Flag,: | Texture generation flag which is to be set. | |
Value,: | Value for the specified flag. e.g. if TEXGEN_MIPMAPS is set as flag set this value to 'true' of 'false'. |
void sp::video::RenderSystem::setTextureMatrix | ( | const dim::matrix4f & | Matrix, | |
u8 | TextureLayer = 0 | |||
) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::setup2DDrawing | ( | ) | [protected, virtual] |
void sp::video::RenderSystem::setup3DDrawing | ( | ) | [protected, virtual] |
virtual void sp::video::RenderSystem::setupConfiguration | ( | ) | [pure virtual] |
void sp::video::RenderSystem::setupDefaultBlending | ( | ) | [inline] |
Sets the default blending mode: source = BLEND_SRCALPHA, destination = BLEND_INVSRCALPHA.
virtual bool sp::video::RenderSystem::setupMaterialStates | ( | const MaterialStates * | Material, | |
bool | Forced = false | |||
) | [pure 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. |
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::OpenGLRenderSystem.
void sp::video::RenderSystem::setupShaderClass | ( | const scene::MaterialNode * | Object, | |
ShaderClass * | ShaderObject | |||
) | [virtual] |
Configures the renderer with the specified shader class.
Reimplemented in sp::video::Direct3D11RenderSystem.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::setViewMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::setWorldMatrix | ( | const dim::matrix4f & | Matrix | ) | [virtual] |
Reimplemented in sp::video::Direct3D9RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::unbindPrevTextureLayers | ( | ) | [protected] |
void sp::video::RenderSystem::unbindShaders | ( | ) | [virtual] |
Unbinds (or rather disables) all shader types.
Reimplemented in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLProgrammableFunctionPipeline.
void sp::video::RenderSystem::unbindTextureLayers | ( | const TextureLayerListType & | TexLayers | ) | [virtual] |
Unbinds all given texture layers.
Reimplemented in sp::video::Direct3D11RenderSystem.
virtual void sp::video::RenderSystem::updateIndexBuffer | ( | void * | BufferID, | |
const dim::UniversalBuffer & | BufferData, | |||
const IndexFormat * | Format, | |||
const EHWBufferUsage | Usage | |||
) | [pure virtual] |
Updates the specified hardware index buffer by uploading the specified buffer data into VRAM.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
virtual void sp::video::RenderSystem::updateIndexBufferElement | ( | void * | BufferID, | |
const dim::UniversalBuffer & | BufferData, | |||
u32 | Index | |||
) | [pure virtual] |
Updates the specified hardware index buffer only for the specified element.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::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 in sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLFixedFunctionPipeline.
void sp::video::RenderSystem::updateMaterialStates | ( | MaterialStates * | Material, | |
bool | isClear = false | |||
) | [virtual] |
Updates the material states' references.
Reimplemented in sp::video::Direct3D11RenderSystem.
virtual void sp::video::RenderSystem::updateModelviewMatrix | ( | ) | [pure virtual] |
virtual void sp::video::RenderSystem::updateVertexBuffer | ( | void * | BufferID, | |
const dim::UniversalBuffer & | BufferData, | |||
const VertexFormat * | Format, | |||
const EHWBufferUsage | Usage | |||
) | [pure virtual] |
Updates the specified hardware vertex buffer by uploading the specified buffer data into VRAM.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
virtual void sp::video::RenderSystem::updateVertexBufferElement | ( | void * | BufferID, | |
const dim::UniversalBuffer & | BufferData, | |||
u32 | Index | |||
) | [pure virtual] |
Updates the specified hardware vertex buffer only for the specified element.
Implemented in sp::video::DummyRenderSystem, sp::video::Direct3D9RenderSystem, sp::video::Direct3D11RenderSystem, and sp::video::GLBasePipeline.
void sp::video::RenderSystem::updateVertexInputLayout | ( | VertexFormat * | Format, | |
bool | isCreate | |||
) | [protected, virtual] |
friend class Font [friend] |
friend class GLFramebufferObject [friend] |
Reimplemented in sp::video::GLBasePipeline.
friend class GLTextureBase [friend] |
Reimplemented in sp::video::GLBasePipeline.
friend class MeshBuffer [friend] |
friend class OpenGLES1Texture [friend] |
Reimplemented in sp::video::GLBasePipeline, and sp::video::GLFixedFunctionPipeline.
friend class OpenGLTexture [friend] |
Reimplemented in sp::video::GLFixedFunctionPipeline, and sp::video::OpenGLRenderSystem.
friend class SoftPixelDevice [friend] |
friend class sp::SoftPixelDevice [friend] |
friend class sp::SoftPixelDeviceAndroid [friend] |
friend class sp::SoftPixelDeviceLinux [friend] |
friend class sp::SoftPixelDeviceWin32 [friend] |
friend class Texture [friend] |
friend class TextureLayer [friend] |
friend class VertexFormat [friend] |
Reimplemented in sp::video::Direct3D11RenderSystem.
friend class VertexFormatUniversal [friend] |
std::list<ComputeShaderIO*> sp::video::RenderSystem::ComputeShaderIOList_ [protected] |
std::vector<RenderContext*> sp::video::RenderSystem::ContextList_ [protected] |
ShaderClass* sp::video::RenderSystem::CurShaderClass_ [protected] |
SDepthRange sp::video::RenderSystem::DepthRange_ [protected] |
HDC sp::video::RenderSystem::DeviceContext_ [protected] |
Display* sp::video::RenderSystem::Display_ [protected] |
SFogStates sp::video::RenderSystem::Fog_ [protected] |
std::list<Font*> sp::video::RenderSystem::FontList_ [protected] |
dim::matrix4f sp::video::RenderSystem::FontTransform_ [protected] |
ShaderClass* sp::video::RenderSystem::GlobalShaderClass_ [protected] |
bool sp::video::RenderSystem::isFrontFace_ [protected] |
dim::matrix4f sp::video::RenderSystem::Matrix2D_ [protected] |
u32 sp::video::RenderSystem::MaxClippingPlanes_ [protected] |
std::list<Movie*> sp::video::RenderSystem::MovieList_ [protected] |
u32 sp::video::RenderSystem::NumDrawCalls_ [static, protected] |
Draw call counter. This counter will always be incremented when "drawMeshBuffer" has been called.
u32 sp::video::RenderSystem::NumMaterialUpdates_ [static, protected] |
Material states update counter.
u32 sp::video::RenderSystem::NumMeshBufferBindings_ [static, protected] |
Mesh buffer binding counter.
u32 sp::video::RenderSystem::NumTexLayerBindings_ [static, protected] |
Texture layer list binding counter.
UINT sp::video::RenderSystem::PixelFormat_ [protected] |
const MaterialStates* sp::video::RenderSystem::PrevMaterial_ [protected] |
const TextureLayerListType* sp::video::RenderSystem::PrevTextureLayers_ [protected] |
ERenderSystems sp::video::RenderSystem::RendererType_ [protected] |
ERenderModes sp::video::RenderSystem::RenderMode_ [protected] |
bool sp::video::RenderSystem::RenderQuery_[RENDERQUERY_COUNT] [protected] |
Texture* sp::video::RenderSystem::RenderTarget_ [protected] |
std::list<ShaderClass*> sp::video::RenderSystem::ShaderClassList_ [protected] |
std::list<Shader*> sp::video::RenderSystem::ShaderList_ [protected] |
u8 sp::video::RenderSystem::StdFillColor_[4] [protected] |
s32 sp::video::RenderSystem::TexLayerVisibleMask_ [protected] |
std::list<Texture*> sp::video::RenderSystem::TextureList_ [protected] |
std::map<std::string, Texture*> sp::video::RenderSystem::TextureMap_ [protected] |
std::list<VertexFormat*> sp::video::RenderSystem::VertexFormatList_ [protected] |
Window* sp::video::RenderSystem::Window_ [protected] |