Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::gfx::Renderer Class Reference

The Renderer interface has functions to work with graphics card. More...

#include <Renderer.h>

Inheritance diagram for kge::gfx::Renderer:
kge::KgeUnknown

Public Member Functions

 Renderer ()
 Constructor.
virtual ~Renderer ()
 Destructor.
virtual void SetCallbacks (kgeRenderCallback clbk_OnLost, kgeRenderCallback clbk_OnReset)
 set callback functions for rendering device
virtual bool Init (Device *device, InitParameters &params)=0
 Amade kardane Renderer.
virtual bool Clear (bool Pixel, bool Zbuffer, bool Stencil)=0
 Pak kardane pixel ha va buffer ha.
virtual bool BeginRendering (bool ClearPixel, bool ClearZbuffer, bool ClearStencil)=0
 Shroe be render gereftan.
virtual bool CreateRenderableTexture (Texture **ppOutTexture, int width, int height, TextureFormat tf, bool CreateDepthStencilBuffer=true, bool AntiAliasing=false)=0
virtual void EndRendering ()=0
 End the Rendering.
virtual void SetClearColor (const Colorf &ClearColor)=0
 Set kardane Range pas zamine.
virtual void SetCullingMode (CullMode cm)=0
 Sets the culling mode.
virtual void SetVertexBuffer (HardwareBuffer *pBuffer, int stage=0)=0
 Sets the vertex buffer for multi streaming.
virtual void SetIndexBuffer (HardwareBuffer *pBuffer)=0
 Sets the index buffer for rendering.
virtual void SetRenderTarget (int RenderNumber=0, Texture *RenderTarget=NULL)=0
virtual void SetViewLookatLH (math::Vector &Position, math::Vector &Lookat, math::Vector &UpDirection)=0
virtual void SetViewLookatRH (math::Vector &Position, math::Vector &Lookat, math::Vector &UpDirection)=0
virtual void SetPerspectiveLH (float Fov=0.7853f, float NearPlane=1.0f, float FarPlane=1000.0f)=0
 Matrixe Projection ro set mikone Be sorate Chap Dast.
virtual void SetPerspectiveRH (float Fov=0.8f, float NearPlane=1.0f, float FarPlane=1000.0f)=0
 Matrixe Projection ro set mikone Be sorate Rast Dast.
virtual void SetTransForm (math::Matrix *mat, TransformMode TM=ETM_World)=0
 Matrix haye asli dorbin va ajsam ra taghir midahad.
virtual math::Matrix GetTransForm (TransformMode TM=ETM_World)=0
 Matrix haye asli dorbin va ajsam ra bar migardone.
int GetFPS ()
 Meghdar Frames Per Second ro bar migardone.
virtual bool AddTexture (Texture **ppOutTexture, u32 Handle, const char *FileName, const char *Name, void *ExtraParam)=0
 This function is for Texture Manager for adding textures use SceneManager AddTexture function instead.
virtual void SetTexture (Texture *pTex, int index=0)=0
virtual void Enable (RenderFlags RF)=0
virtual void Disable (RenderFlags RF)=0
virtual void SetMaterial (Material *pMaterial)=0
virtual void SetTextureParams (TextureParams Params, int TextureStage=0)=0
virtual bool CanDo (GraphicCardCaps Item)=0
virtual void SetStencilBuffer (kge::efx::EffectType ET, u8 State)=0
virtual void AddFont (kge::gui::Font **ppOut, const char *strFontName, ul32 FontSize)=0
 Create font base on API type.
virtual HardwareBufferCreateVertexBuffer (void *Vertices, u32 VCount, VertexType eVType=EVT_V3TN, bool isDynamic=false)=0
virtual HardwareBufferCreateVertexBuffer (void *Vertices, u32 VCount, u32 Stride, bool isDynamic=false)=0
virtual HardwareBufferCreateIndexBuffer (void *Indices, u32 ICount, IndexBufferType eIndexBufferType=EIBT_16Bit, bool isDynamic=false)=0
 Creates an Index buffer on video memory.
virtual void DrawTriangleList (HardwareBuffer *VB, HardwareBuffer *IB, u32 VCount, u32 ICount, VertexType eVType=EVT_V3TN)=0
virtual void DrawTriangleList (u32 VCount, u32 ICount, VertexDec *CV, u32 VertexStart, u32 StartIndex)=0
virtual ShaderCreateVertexShaderFromFile (const char *VertexFileName, const char *VertexMain="VSMain", ShaderVersion eVVersion=ESV_VS1_1)=0
virtual ShaderCreateVertexShaderFromString (const char *VertexCode, const char *VertexMain="VSMain", ShaderVersion eVVersion=ESV_VS1_1)=0
virtual ShaderCreatePixelShaderFromFile (const char *PixelFileName, const char *PixelMain="PSMain", ShaderVersion ePVersion=ESV_PS1_1)=0
virtual ShaderCreatePixelShaderFromString (const char *PixelCode, const char *PixelMain="PSMain", ShaderVersion ePVersion=ESV_PS1_1)=0
virtual TextureCreateTexture (ImageData *pImg)=0
virtual bool AddVertexShader (Shader **ppOutShader, u32 handle, const char *fileName, const char *mainName, void *extraParam)=0
virtual bool AddPixelShader (Shader **ppOutShader, u32 handle, const char *fileName, const char *mainName, void *extraParam)=0
virtual MaterialGetLastMaterial ()
 Returns the last material used to render.
virtual RendererAPI GetRendererType ()=0
 Returns the renderer type (DirectX or OpenGL)
virtual bool SetFog (FogType mode, Colorf FogColor, float expDensity=0, float linearStart=0, float linearEnd=1000000)=0
virtual bool SetVideoMode (int Width, int Height, int Bits, bool UseStencil=false, bool Fullscreen=false, int MultiSample=0, bool VSync=false)=0
virtual u32 GetTriangleCount ()
 returns the number of triangle rendered.
virtual u32 GetDrawCallsCount ()
 returns the number of draw functions called.
virtual void SetMainSceneManager (sn::SceneManager *smgr)
 For internal use.
virtual void SetViewPort (const core::RectI &viewport)=0
 Sets the rendering view port.
virtual bool GetRenderFlag (RenderFlags r)
virtual void * GetDirect3dDevice ()
 Returns the direct 3d device.
virtual int GetWindowWidth ()
 Returns the width of the rendering area.
virtual int GetWindowHeight ()
 Returns the width of the rendering area.
virtual VertexDecCreateVertexDeclaration (CustomVertexElement *pVertexInfoArray, core::stringc sName)=0
 Create a custom vertex declaration and returns its pointer.
virtual void SetVertexDec (VertexDec *pVD)=0
 Sets the vertex declaration.
VertexDecGetVertexDec (VertexType evt)
 Returns the default vertex declaration.
virtual void SetRenderingWindow (void *hwnd)=0
 Set the second rendering window.
virtual void OnResize (int width, int height)=0
 Resize the view port and rendering.
virtual void OnResize (unsigned int width, unsigned int height, bool fullscreen, bool vsync)=0
 Change resolution, toggle full screen, turn on/off vertical sync.
virtual void SetStreamSourceFreq (u32 StreamID, u32 Count)=0
 Sets the stream source frequency for rendering instanced meshes.
void SetMaxTextureSize (u32 maxTextureSize)
u32 GetMaxTextureSize () const
virtual void SetDepthBias (float fBias)=0
 Sets the depth bias.
virtual void SetDepthBiasSlope (float fSlope)=0
 Sets the depth bias slope.
virtual void SetRendererPipeline (RendererPipeline rp)
 Sets the renderer pipeline.
virtual RendererPipeline GetRendererPipeline ()
 Gets the current renderer pipeline.
virtual TextureGetPositionMap ()
 Returns the position map.
virtual TextureGetNormalMap ()
 Returns the normal map.
virtual TextureGetDiffuseMap ()
 Returns the Diffuse map.
virtual void DrawScreenQuad ()
 Draw a screen quad on screen. Note the 2D mode must be enabled before this action.
virtual void SetFarPlaneAsScreenQuad (sn::Camera *pCam)
 Sets the camera far plane as screen quad vectors.
virtual void SetDepthMode (DepthTestMode e=EDTM_LessEqual)=0
 Sets the depth test mode.
virtual void SetScissorRegion (int x, int y, int width, int height)
 Sets the scissor properties.
void SetVertexBufferID (u32 id, int index)
 For internal use.
void SetIndexBufferID (u32 id)
 For internal use.
- Public Member Functions inherited from kge::KgeUnknown
 KgeUnknown ()
 Constructor.
virtual ~KgeUnknown ()
 Destructor.
virtual void AddRef ()
 Add a reference to the object.
virtual void DecRef ()
 Decrease a reference from the object. if its reference count get 0 then the object will destroy.
u32 GetRefCount ()
 Return resource reference count.
const char * GetDebugText ()
 returns the instance debug text.

Static Public Member Functions

static RendererGetSingletonPtr ()
 Returns the Renderer class pointer.

Public Attributes

LightingLights
 Tamame kar ba norha dar in pointer gharar darad.

Protected Member Functions

virtual bool AfterInit ()=0
virtual void InitGCC ()=0
virtual void AddVertexDec (VertexDec *pVD)
 Adds VertexDec pointers.
virtual void AddHardwareBuffer (HardwareBuffer *pHB)
 Adds hardware buffer pointer.
- Protected Member Functions inherited from kge::KgeUnknown
void SetDebugText (char *text)

Protected Attributes

Devicem_pDevice
sn::SceneManagerm_pSnmgr
InitParameters m_Params
Colorf m_cClearColor
bool m_bIsSceneRunning
bool m_bUseShaders
core::Timerm_pTimer
int m_iFPS
int m_iFPSTemp
u32 m_nTextID [8]
u32 m_nVertexBufferID [16]
u32 m_nIndexBufferID
u32 m_nVertexDecID
bool m_bRF [ERF_Count]
bool m_bGCC [EGCC_Count]
Materialm_pLastMaterial
u32 m_iTriCount
u32 m_iDrawCount
u32 m_iBatchCount
core::RectI m_rViewPort
VertexDec ** m_ppVertexDecs
 Vertex declarations.
std::vector< VertexDec * > m_vVertexDecs
 The created VertexDec pointers.
std::vector< HardwareBuffer * > m_vBuffers
 The created buffer pointers.
RendererPipeline m_eRendererPipeline
Texturem_pPosMap
Texturem_pDifMap
Texturem_pNorMap
gui::Imagem_pScreenQuad
kgeRenderCallback m_clbk_OnLost
 rendering callbacks
kgeRenderCallback m_clbk_OnReset

Detailed Description

The Renderer interface has functions to work with graphics card.

Definition at line 142 of file Renderer.h.

Constructor & Destructor Documentation

kge::gfx::Renderer::Renderer ( )

Constructor.

virtual kge::gfx::Renderer::~Renderer ( )
virtual

Destructor.

Member Function Documentation

virtual void kge::gfx::Renderer::AddFont ( kge::gui::Font **  ppOut,
const char *  strFontName,
ul32  FontSize 
)
pure virtual

Create font base on API type.

virtual void kge::gfx::Renderer::AddHardwareBuffer ( HardwareBuffer pHB)
protectedvirtual

Adds hardware buffer pointer.

virtual bool kge::gfx::Renderer::AddPixelShader ( Shader **  ppOutShader,
u32  handle,
const char *  fileName,
const char *  mainName,
void *  extraParam 
)
pure virtual
virtual bool kge::gfx::Renderer::AddTexture ( Texture **  ppOutTexture,
u32  Handle,
const char *  FileName,
const char *  Name,
void *  ExtraParam 
)
pure virtual

This function is for Texture Manager for adding textures use SceneManager AddTexture function instead.

virtual void kge::gfx::Renderer::AddVertexDec ( VertexDec pVD)
protectedvirtual

Adds VertexDec pointers.

virtual bool kge::gfx::Renderer::AddVertexShader ( Shader **  ppOutShader,
u32  handle,
const char *  fileName,
const char *  mainName,
void *  extraParam 
)
pure virtual
virtual bool kge::gfx::Renderer::AfterInit ( )
protectedpure virtual
virtual bool kge::gfx::Renderer::BeginRendering ( bool  ClearPixel,
bool  ClearZbuffer,
bool  ClearStencil 
)
pure virtual

Shroe be render gereftan.

virtual bool kge::gfx::Renderer::CanDo ( GraphicCardCaps  Item)
pure virtual

Check for graphics card capabilities

Parameters
ItemGhabeliyati ke mikhahid check shavad.
Returns
agar poshtibani shavad true barmigardanad.
virtual bool kge::gfx::Renderer::Clear ( bool  Pixel,
bool  Zbuffer,
bool  Stencil 
)
pure virtual

Pak kardane pixel ha va buffer ha.

virtual HardwareBuffer* kge::gfx::Renderer::CreateIndexBuffer ( void *  Indices,
u32  ICount,
IndexBufferType  eIndexBufferType = EIBT_16Bit,
bool  isDynamic = false 
)
pure virtual

Creates an Index buffer on video memory.

virtual Shader* kge::gfx::Renderer::CreatePixelShaderFromFile ( const char *  PixelFileName,
const char *  PixelMain = "PSMain",
ShaderVersion  ePVersion = ESV_PS1_1 
)
pure virtual

Load a pixel shader from a file then compile it and return the created pixel shader.

Parameters
PixelFileNameThe file name that contain the pixel shader source code.
PixelMainThe main pixel shader function name.
ePVersionThe pixel shader version that the code must be compiled in that version.
Returns
Returns the created pixel shader.
virtual Shader* kge::gfx::Renderer::CreatePixelShaderFromString ( const char *  PixelCode,
const char *  PixelMain = "PSMain",
ShaderVersion  ePVersion = ESV_PS1_1 
)
pure virtual

Load a pixel shader from a string then compile it and return the created pixel shader.

Parameters
PixelCodeThe string that contain the pixel shader source code.
PixelMainThe main pixel shader function name.
ePVersionThe pixel shader version that the code must be compiled in that version.
Returns
Returns the created pixel shader.
virtual bool kge::gfx::Renderer::CreateRenderableTexture ( Texture **  ppOutTexture,
int  width,
int  height,
TextureFormat  tf,
bool  CreateDepthStencilBuffer = true,
bool  AntiAliasing = false 
)
pure virtual

Creates a renderable texture to use it as a render target

Parameters
widthThe texture width
heightThe texture height
tfTexture color format
virtual Texture* kge::gfx::Renderer::CreateTexture ( ImageData pImg)
pure virtual

Creates a texture from an ImageData

Note
If you use this function manually you must add your texture to texture manager to avoid bugs.
virtual HardwareBuffer* kge::gfx::Renderer::CreateVertexBuffer ( void *  Vertices,
u32  VCount,
VertexType  eVType = EVT_V3TN,
bool  isDynamic = false 
)
pure virtual

Create a vertex buffer and store it on video memory.

Parameters
VerticesA pointer to the Vertices array.
VCountThe Vertices count.
eVTypeThe vertex type default value = EVT_V3TN witch is a vertex with texture and normal vector.
Returns
Returns the created vertex buffer.
virtual HardwareBuffer* kge::gfx::Renderer::CreateVertexBuffer ( void *  Vertices,
u32  VCount,
u32  Stride,
bool  isDynamic = false 
)
pure virtual

Create a vertex buffer from custom vertex type and store it on video memory.

Parameters
VerticesA pointer to the Vertices array.
VCountThe Vertices count.
StrideThe vertex struct size in bytes.
Returns
Returns the created vertex buffer.
virtual VertexDec* kge::gfx::Renderer::CreateVertexDeclaration ( CustomVertexElement pVertexInfoArray,
core::stringc  sName 
)
pure virtual

Create a custom vertex declaration and returns its pointer.

virtual Shader* kge::gfx::Renderer::CreateVertexShaderFromFile ( const char *  VertexFileName,
const char *  VertexMain = "VSMain",
ShaderVersion  eVVersion = ESV_VS1_1 
)
pure virtual

Load a vertex shader from a file then compile it and return the created vertex shader.

Parameters
VertexFileNameThe file name that contain the vertex shader source code.
VertexMainThe main vertex shader function name.
eVVersionThe vertex shader version that the code must be compiled in that version.
Returns
Returns the created vertex shader.
virtual Shader* kge::gfx::Renderer::CreateVertexShaderFromString ( const char *  VertexCode,
const char *  VertexMain = "VSMain",
ShaderVersion  eVVersion = ESV_VS1_1 
)
pure virtual

Load a vertex shader from a string then compile it and return the created vertex shader.

Parameters
VertexCodeThe string that contain the vertex shader source code.
VertexMainThe main vertex shader function name.
eVVersionThe vertex shader version that the code must be compiled in that version.
PixelCodeThe string that contain the pixel shader source code.
PixelMainThe main pixel shader function name.
ePVersionThe pixel shader version that the code must be compiled in that version.
Returns
Returns the created vertex shader.
virtual void kge::gfx::Renderer::Disable ( RenderFlags  RF)
pure virtual

Disable kardane khsiyat haye render.

Parameters
RFParchami ke mikhahid Disable shavad.
virtual void kge::gfx::Renderer::DrawScreenQuad ( )
virtual

Draw a screen quad on screen. Note the 2D mode must be enabled before this action.

virtual void kge::gfx::Renderer::DrawTriangleList ( HardwareBuffer VB,
HardwareBuffer IB,
u32  VCount,
u32  ICount,
VertexType  eVType = EVT_V3TN 
)
pure virtual

Draw a vertex buffer

Parameters
VBidVertex buffer index.
VCountThe Vertices count.
ICountThe Indices couont.
eVTypeThe vertex type default value = EVT_V3TN witch is a vertex with texture and normal vector.
virtual void kge::gfx::Renderer::DrawTriangleList ( u32  VCount,
u32  ICount,
VertexDec CV,
u32  VertexStart,
u32  StartIndex 
)
pure virtual

Draw a vertex buffer you must set the buffers manually before calling this function this function is good for multi streaming

Parameters
VCountThe Vertices count.
ICountThe Indices count.
CVcustom vertex pointer
virtual void kge::gfx::Renderer::Enable ( RenderFlags  RF)
pure virtual

Enable kardane khsiyat haye render.

Parameters
RFParchami ke mikhahid enable shavad.
virtual void kge::gfx::Renderer::EndRendering ( )
pure virtual

End the Rendering.

virtual Texture* kge::gfx::Renderer::GetDiffuseMap ( )
inlinevirtual

Returns the Diffuse map.

Definition at line 471 of file Renderer.h.

virtual void* kge::gfx::Renderer::GetDirect3dDevice ( )
inlinevirtual

Returns the direct 3d device.

Definition at line 420 of file Renderer.h.

References NULL.

virtual u32 kge::gfx::Renderer::GetDrawCallsCount ( )
inlinevirtual

returns the number of draw functions called.

Definition at line 409 of file Renderer.h.

int kge::gfx::Renderer::GetFPS ( )
inline

Meghdar Frames Per Second ro bar migardone.

Definition at line 247 of file Renderer.h.

virtual Material* kge::gfx::Renderer::GetLastMaterial ( )
inlinevirtual

Returns the last material used to render.

Definition at line 393 of file Renderer.h.

u32 kge::gfx::Renderer::GetMaxTextureSize ( ) const
virtual Texture* kge::gfx::Renderer::GetNormalMap ( )
inlinevirtual

Returns the normal map.

Definition at line 468 of file Renderer.h.

virtual Texture* kge::gfx::Renderer::GetPositionMap ( )
inlinevirtual

Returns the position map.

Definition at line 465 of file Renderer.h.

virtual RendererPipeline kge::gfx::Renderer::GetRendererPipeline ( )
inlinevirtual

Gets the current renderer pipeline.

Definition at line 462 of file Renderer.h.

virtual RendererAPI kge::gfx::Renderer::GetRendererType ( )
pure virtual

Returns the renderer type (DirectX or OpenGL)

virtual bool kge::gfx::Renderer::GetRenderFlag ( RenderFlags  r)
inlinevirtual

Definition at line 417 of file Renderer.h.

static Renderer* kge::gfx::Renderer::GetSingletonPtr ( )
static

Returns the Renderer class pointer.

virtual math::Matrix kge::gfx::Renderer::GetTransForm ( TransformMode  TM = ETM_World)
pure virtual

Matrix haye asli dorbin va ajsam ra bar migardone.

Parameters
matMatrix taghir dahande.
virtual u32 kge::gfx::Renderer::GetTriangleCount ( )
inlinevirtual

returns the number of triangle rendered.

Definition at line 406 of file Renderer.h.

VertexDec* kge::gfx::Renderer::GetVertexDec ( VertexType  evt)
inline

Returns the default vertex declaration.

Definition at line 435 of file Renderer.h.

virtual int kge::gfx::Renderer::GetWindowHeight ( )
inlinevirtual

Returns the width of the rendering area.

Definition at line 426 of file Renderer.h.

virtual int kge::gfx::Renderer::GetWindowWidth ( )
inlinevirtual

Returns the width of the rendering area.

Definition at line 423 of file Renderer.h.

virtual bool kge::gfx::Renderer::Init ( Device device,
InitParameters params 
)
pure virtual

Amade kardane Renderer.

virtual void kge::gfx::Renderer::InitGCC ( )
protectedpure virtual
virtual void kge::gfx::Renderer::OnResize ( int  width,
int  height 
)
pure virtual

Resize the view port and rendering.

virtual void kge::gfx::Renderer::OnResize ( unsigned int  width,
unsigned int  height,
bool  fullscreen,
bool  vsync 
)
pure virtual

Change resolution, toggle full screen, turn on/off vertical sync.

virtual void kge::gfx::Renderer::SetCallbacks ( kgeRenderCallback  clbk_OnLost,
kgeRenderCallback  clbk_OnReset 
)
virtual

set callback functions for rendering device

virtual void kge::gfx::Renderer::SetClearColor ( const Colorf ClearColor)
pure virtual

Set kardane Range pas zamine.

virtual void kge::gfx::Renderer::SetCullingMode ( CullMode  cm)
pure virtual

Sets the culling mode.

virtual void kge::gfx::Renderer::SetDepthBias ( float  fBias)
pure virtual

Sets the depth bias.

virtual void kge::gfx::Renderer::SetDepthBiasSlope ( float  fSlope)
pure virtual

Sets the depth bias slope.

virtual void kge::gfx::Renderer::SetDepthMode ( DepthTestMode  e = EDTM_LessEqual)
pure virtual

Sets the depth test mode.

virtual void kge::gfx::Renderer::SetFarPlaneAsScreenQuad ( sn::Camera pCam)
virtual

Sets the camera far plane as screen quad vectors.

virtual bool kge::gfx::Renderer::SetFog ( FogType  mode,
Colorf  FogColor,
float  expDensity = 0,
float  linearStart = 0,
float  linearEnd = 1000000 
)
pure virtual
virtual void kge::gfx::Renderer::SetIndexBuffer ( HardwareBuffer pBuffer)
pure virtual

Sets the index buffer for rendering.

void kge::gfx::Renderer::SetIndexBufferID ( u32  id)
inline

For internal use.

Definition at line 489 of file Renderer.h.

virtual void kge::gfx::Renderer::SetMainSceneManager ( sn::SceneManager smgr)
inlinevirtual

For internal use.

Definition at line 412 of file Renderer.h.

virtual void kge::gfx::Renderer::SetMaterial ( Material pMaterial)
pure virtual

Set kardane kamele ya matrial besorate automatic.

Parameters
pMaterialMateriali ke bayad set shavad ghabl az render.
void kge::gfx::Renderer::SetMaxTextureSize ( u32  maxTextureSize)
virtual void kge::gfx::Renderer::SetPerspectiveLH ( float  Fov = 0.7853f,
float  NearPlane = 1.0f,
float  FarPlane = 1000.0f 
)
pure virtual

Matrixe Projection ro set mikone Be sorate Chap Dast.

Parameters
FovZavie dorbin.
NearPlaneParde joloyee.
FarPlaneParde aghabi.
virtual void kge::gfx::Renderer::SetPerspectiveRH ( float  Fov = 0.8f,
float  NearPlane = 1.0f,
float  FarPlane = 1000.0f 
)
pure virtual

Matrixe Projection ro set mikone Be sorate Rast Dast.

Parameters
FovZavie dorbin.
NearPlaneParde joloyee.
FarPlaneParde aghabi.
virtual void kge::gfx::Renderer::SetRendererPipeline ( RendererPipeline  rp)
virtual

Sets the renderer pipeline.

virtual void kge::gfx::Renderer::SetRenderingWindow ( void *  hwnd)
pure virtual

Set the second rendering window.

virtual void kge::gfx::Renderer::SetRenderTarget ( int  RenderNumber = 0,
Texture RenderTarget = NULL 
)
pure virtual

Set the renderable target where renderer will render there.

Parameters
RenderNumberThe target index you can use Multi Render Targets(MRT) with shaders.
RenderTargetA pointer to the texture that you want to render there pass NULL to render to screen.
virtual void kge::gfx::Renderer::SetScissorRegion ( int  x,
int  y,
int  width,
int  height 
)
inlinevirtual

Sets the scissor properties.

Definition at line 483 of file Renderer.h.

virtual void kge::gfx::Renderer::SetStencilBuffer ( kge::efx::EffectType  ET,
u8  State 
)
pure virtual

Tanzimate stencil buffer baraye effect haye mokhtalef.

virtual void kge::gfx::Renderer::SetStreamSourceFreq ( u32  StreamID,
u32  Count 
)
pure virtual

Sets the stream source frequency for rendering instanced meshes.

virtual void kge::gfx::Renderer::SetTexture ( Texture pTex,
int  index = 0 
)
pure virtual

Set a texture

virtual void kge::gfx::Renderer::SetTextureParams ( TextureParams  Params,
int  TextureStage = 0 
)
pure virtual

Set kardane keyfiyat texture ha va address mode ha.

Parameters
ParamsNoe keyfiyat texture va address mode ha.
virtual void kge::gfx::Renderer::SetTransForm ( math::Matrix mat,
TransformMode  TM = ETM_World 
)
pure virtual

Matrix haye asli dorbin va ajsam ra taghir midahad.

Parameters
matMatrix taghir dahande.
virtual void kge::gfx::Renderer::SetVertexBuffer ( HardwareBuffer pBuffer,
int  stage = 0 
)
pure virtual

Sets the vertex buffer for multi streaming.

void kge::gfx::Renderer::SetVertexBufferID ( u32  id,
int  index 
)
inline

For internal use.

Definition at line 486 of file Renderer.h.

virtual void kge::gfx::Renderer::SetVertexDec ( VertexDec pVD)
pure virtual

Sets the vertex declaration.

virtual bool kge::gfx::Renderer::SetVideoMode ( int  Width,
int  Height,
int  Bits,
bool  UseStencil = false,
bool  Fullscreen = false,
int  MultiSample = 0,
bool  VSync = false 
)
pure virtual
virtual void kge::gfx::Renderer::SetViewLookatLH ( math::Vector Position,
math::Vector Lookat,
math::Vector UpDirection 
)
pure virtual

Sets camera for left-hand

Parameters
PositionJaee ke dorbin gharar migirad.
LookatJaee ke dorbin be anja negah mikonad.
UpDirectionBordari ke jahat bala ra moshakas mikonad.
Returns
Agar movafagh bood meghdare true ra barmigardone.
virtual void kge::gfx::Renderer::SetViewLookatRH ( math::Vector Position,
math::Vector Lookat,
math::Vector UpDirection 
)
pure virtual

Sets camera for right hand

Parameters
PositionJaee ke dorbin gharar migirad.
LookatJaee ke dorbin be anja negah mikonad.
UpDirectionBordari ke jahat bala ra moshakas mikonad.
Returns
Agar movafagh bood meghdare true ra barmigardone.
virtual void kge::gfx::Renderer::SetViewPort ( const core::RectI viewport)
pure virtual

Sets the rendering view port.

Member Data Documentation

Lighting* kge::gfx::Renderer::Lights

Tamame kar ba norha dar in pointer gharar darad.

Definition at line 268 of file Renderer.h.

bool kge::gfx::Renderer::m_bGCC[EGCC_Count]
protected

Definition at line 507 of file Renderer.h.

bool kge::gfx::Renderer::m_bIsSceneRunning
protected

Definition at line 496 of file Renderer.h.

bool kge::gfx::Renderer::m_bRF[ERF_Count]
protected

Definition at line 505 of file Renderer.h.

bool kge::gfx::Renderer::m_bUseShaders
protected

Definition at line 497 of file Renderer.h.

Colorf kge::gfx::Renderer::m_cClearColor
protected

Definition at line 495 of file Renderer.h.

kgeRenderCallback kge::gfx::Renderer::m_clbk_OnLost
protected

rendering callbacks

Definition at line 533 of file Renderer.h.

kgeRenderCallback kge::gfx::Renderer::m_clbk_OnReset
protected

Definition at line 534 of file Renderer.h.

RendererPipeline kge::gfx::Renderer::m_eRendererPipeline
protected

Definition at line 522 of file Renderer.h.

u32 kge::gfx::Renderer::m_iBatchCount
protected

Definition at line 509 of file Renderer.h.

u32 kge::gfx::Renderer::m_iDrawCount
protected

Definition at line 509 of file Renderer.h.

int kge::gfx::Renderer::m_iFPS
protected

Definition at line 499 of file Renderer.h.

int kge::gfx::Renderer::m_iFPSTemp
protected

Definition at line 500 of file Renderer.h.

u32 kge::gfx::Renderer::m_iTriCount
protected

Definition at line 509 of file Renderer.h.

u32 kge::gfx::Renderer::m_nIndexBufferID
protected

Definition at line 501 of file Renderer.h.

u32 kge::gfx::Renderer::m_nTextID[8]
protected

Definition at line 501 of file Renderer.h.

u32 kge::gfx::Renderer::m_nVertexBufferID[16]
protected

Definition at line 501 of file Renderer.h.

u32 kge::gfx::Renderer::m_nVertexDecID
protected

Definition at line 501 of file Renderer.h.

InitParameters kge::gfx::Renderer::m_Params
protected

Definition at line 494 of file Renderer.h.

Device* kge::gfx::Renderer::m_pDevice
protected

Definition at line 492 of file Renderer.h.

Texture * kge::gfx::Renderer::m_pDifMap
protected

Definition at line 525 of file Renderer.h.

Material* kge::gfx::Renderer::m_pLastMaterial
protected

Definition at line 508 of file Renderer.h.

Texture * kge::gfx::Renderer::m_pNorMap
protected

Definition at line 525 of file Renderer.h.

Texture* kge::gfx::Renderer::m_pPosMap
protected

Definition at line 525 of file Renderer.h.

VertexDec** kge::gfx::Renderer::m_ppVertexDecs
protected

Vertex declarations.

Definition at line 515 of file Renderer.h.

gui::Image* kge::gfx::Renderer::m_pScreenQuad
protected

Definition at line 530 of file Renderer.h.

sn::SceneManager* kge::gfx::Renderer::m_pSnmgr
protected

Definition at line 493 of file Renderer.h.

core::Timer* kge::gfx::Renderer::m_pTimer
protected

Definition at line 498 of file Renderer.h.

core::RectI kge::gfx::Renderer::m_rViewPort
protected

Definition at line 512 of file Renderer.h.

std::vector<HardwareBuffer*> kge::gfx::Renderer::m_vBuffers
protected

The created buffer pointers.

Definition at line 520 of file Renderer.h.

std::vector<VertexDec*> kge::gfx::Renderer::m_vVertexDecs
protected

The created VertexDec pointers.

Definition at line 518 of file Renderer.h.


The documentation for this class was generated from the following file: