IRenderer

C++
struct IRenderer {
  struct SLoadShaderItemArgs {
    IMaterial* m_pMtlSrc;
    IMaterial* m_pMtlSrcParent;
  };
  struct SUpdateRect {
    int dstX, dstY;
    int srcX, srcY;
    int width, height;
  };
  enum ESFMaskOp {
    BeginSubmitMask_Clear,
    BeginSubmitMask_Inc,
    BeginSubmitMask_Dec,
    EndSubmitMask,
    DisableMask
  };
  struct SArtProfileData {
    enum EArtProfileUnit {
      eArtProfileUnit_GPU = 0,
      eArtProfileUnit_CPU,
      eArtProfile_NumUnits
    };
    enum EArtProfileSections {
      eArtProfile_Shadows = 0,
      eArtProfile_ZPass,
      eArtProfile_Decals,
      eArtProfile_Lighting,
      eArtProfile_Opaque,
      eArtProfile_Transparent,
      eArtProfile_Max
    };
    float times[eArtProfile_Max];
    float budgets[eArtProfile_Max];
    float total, budgetTotal;
    enum EBreakdownDetailValues {
      eArtProfileDetail_LightsAmbient,
      eArtProfileDetail_LightsCubemaps,
      eArtProfileDetail_LightsDeferred,
      eArtProfileDetail_LightsShadowMaps,
      eArtProfileDetail_Reflections,
      eArtProfileDetail_Caustics,
      eArtProfileDetail_RefractionOverhead,
      eArtProfileDetail_Rain,
      eArtProfileDetail_LensOptics,
      eArtProfileDetail_Max
    };
    float breakdowns[eArtProfileDetail_Max];
    int batches, drawcalls, processedLights;
  };
  struct SRenderTimes {
    float fWaitForMain;
    float fWaitForRender;
    float fWaitForGPU;
    float fTimeProcessedRT;
    float fTimeProcessedRTScene;
    float fTimeProcessedGPU;
    float fTimeGPUIdlePercent;
  };
  struct SDrawCallCountInfo {
    const uint32 MESH_NAME_LENGTH = 32;
    const uint32 TYPE_NAME_LENGTH = 16;
    Vec3 pPos;
    uint8 nZpass, nShadows, nGeneral, nTransparent, nMisc;
    char meshName[MESH_NAME_LENGTH];
    char typeName[TYPE_NAME_LENGTH];
  };
};
File

IRenderer.h

IRenderer::ESFMaskOp Enumeration
C++
enum ESFMaskOp {
  BeginSubmitMask_Clear,
  BeginSubmitMask_Inc,
  BeginSubmitMask_Dec,
  EndSubmitMask,
  DisableMask
};
File

IRenderer.h

IRenderer::SArtProfileData Structure
C++
struct SArtProfileData {
  enum EArtProfileUnit {
    eArtProfileUnit_GPU = 0,
    eArtProfileUnit_CPU,
    eArtProfile_NumUnits
  };
  enum EArtProfileSections {
    eArtProfile_Shadows = 0,
    eArtProfile_ZPass,
    eArtProfile_Decals,
    eArtProfile_Lighting,
    eArtProfile_Opaque,
    eArtProfile_Transparent,
    eArtProfile_Max
  };
  float times[eArtProfile_Max];
  float budgets[eArtProfile_Max];
  float total, budgetTotal;
  enum EBreakdownDetailValues {
    eArtProfileDetail_LightsAmbient,
    eArtProfileDetail_LightsCubemaps,
    eArtProfileDetail_LightsDeferred,
    eArtProfileDetail_LightsShadowMaps,
    eArtProfileDetail_Reflections,
    eArtProfileDetail_Caustics,
    eArtProfileDetail_RefractionOverhead,
    eArtProfileDetail_Rain,
    eArtProfileDetail_LensOptics,
    eArtProfileDetail_Max
  };
  float breakdowns[eArtProfileDetail_Max];
  int batches, drawcalls, processedLights;
};
File

IRenderer.h

Members
Members
Description
eArtProfileDetail_LightsAmbient
Lighting
eArtProfileDetail_LightsShadowMaps
just the cost of the shadow maps
eArtProfileDetail_Reflections
Transparent
eArtProfileDetail_RefractionOverhead
partial resolves
Description

ifndef EXCLUDE_SCALEFORM_SDK

IRenderer::SArtProfileData::EArtProfileSections Enumeration
C++
enum EArtProfileSections {
  eArtProfile_Shadows = 0,
  eArtProfile_ZPass,
  eArtProfile_Decals,
  eArtProfile_Lighting,
  eArtProfile_Opaque,
  eArtProfile_Transparent,
  eArtProfile_Max
};
File

IRenderer.h

IRenderer::SArtProfileData::EArtProfileUnit Enumeration
C++
enum EArtProfileUnit {
  eArtProfileUnit_GPU = 0,
  eArtProfileUnit_CPU,
  eArtProfile_NumUnits
};
File

IRenderer.h

IRenderer::SArtProfileData::EBreakdownDetailValues Enumeration
C++
enum EBreakdownDetailValues {
  eArtProfileDetail_LightsAmbient,
  eArtProfileDetail_LightsCubemaps,
  eArtProfileDetail_LightsDeferred,
  eArtProfileDetail_LightsShadowMaps,
  eArtProfileDetail_Reflections,
  eArtProfileDetail_Caustics,
  eArtProfileDetail_RefractionOverhead,
  eArtProfileDetail_Rain,
  eArtProfileDetail_LensOptics,
  eArtProfileDetail_Max
};
File

IRenderer.h

Members
Members
Description
eArtProfileDetail_LightsAmbient
Lighting
eArtProfileDetail_LightsShadowMaps
just the cost of the shadow maps
eArtProfileDetail_Reflections
Transparent
eArtProfileDetail_RefractionOverhead
partial resolves
Description

detailed values for anything that is grouped together and can be timed

IRenderer::SDrawCallCountInfo Structure
C++
struct SDrawCallCountInfo {
  const uint32 MESH_NAME_LENGTH = 32;
  const uint32 TYPE_NAME_LENGTH = 16;
  Vec3 pPos;
  uint8 nZpass, nShadows, nGeneral, nTransparent, nMisc;
  char meshName[MESH_NAME_LENGTH];
  char typeName[TYPE_NAME_LENGTH];
};
File

IRenderer.h

IRenderer::SDrawCallCountInfo::MESH_NAME_LENGTH Data Member
C++
const uint32 MESH_NAME_LENGTH = 32;
IRenderer::SDrawCallCountInfo::meshName Data Member
C++
char meshName[MESH_NAME_LENGTH];
IRenderer::SDrawCallCountInfo::nGeneral Data Member
C++
uint8 nGeneral;
IRenderer::SDrawCallCountInfo::nMisc Data Member
C++
uint8 nMisc;
IRenderer::SDrawCallCountInfo::nShadows Data Member
C++
uint8 nShadows;
IRenderer::SDrawCallCountInfo::nTransparent Data Member
C++
uint8 nTransparent;
IRenderer::SDrawCallCountInfo::nZpass Data Member
C++
uint8 nZpass;
IRenderer::SDrawCallCountInfo::pPos Data Member
C++
Vec3 pPos;
IRenderer::SDrawCallCountInfo::TYPE_NAME_LENGTH Data Member
C++
const uint32 TYPE_NAME_LENGTH = 16;
IRenderer::SDrawCallCountInfo::typeName Data Member
C++
char typeName[TYPE_NAME_LENGTH];
IRenderer::SDrawCallCountInfo::SDrawCallCountInfo Constructor
C++
SDrawCallCountInfo();
IRenderer::SDrawCallCountInfo::Update Method
C++
void Update(CRenderObject * pObj, IRenderMesh * pRM);
IRenderer::SLoadShaderItemArgs Structure

Loads shader item for name (name).

C++
struct SLoadShaderItemArgs {
  IMaterial* m_pMtlSrc;
  IMaterial* m_pMtlSrcParent;
};
File

IRenderer.h

IRenderer::SLoadShaderItemArgs::m_pMtlSrc Data Member
C++
IMaterial* m_pMtlSrc;
IRenderer::SLoadShaderItemArgs::m_pMtlSrcParent Data Member
C++
IMaterial* m_pMtlSrcParent;
IRenderer::SLoadShaderItemArgs::SLoadShaderItemArgs Constructor
C++
SLoadShaderItemArgs(IMaterial* pMtlSrc, IMaterial* pMtlSrcParent);
IRenderer::SRenderTimes Structure
C++
struct SRenderTimes {
  float fWaitForMain;
  float fWaitForRender;
  float fWaitForGPU;
  float fTimeProcessedRT;
  float fTimeProcessedRTScene;
  float fTimeProcessedGPU;
  float fTimeGPUIdlePercent;
};
File

IRenderer.h

Members
Members
Description
float fTimeProcessedRTScene;
The part of the render thread between the "SCENE" profiler labels
IRenderer::SUpdateRect Structure
C++
struct SUpdateRect {
  int dstX, dstY;
  int srcX, srcY;
  int width, height;
};
File

IRenderer.h

IRenderer::SUpdateRect::dstX Data Member
C++
int dstX;
IRenderer::SUpdateRect::dstY Data Member
C++
int dstY;
IRenderer::SUpdateRect::height Data Member
C++
int height;
IRenderer::SUpdateRect::srcX Data Member
C++
int srcX;
IRenderer::SUpdateRect::srcY Data Member
C++
int srcY;
IRenderer::SUpdateRect::width Data Member
C++
int width;
IRenderer::SUpdateRect::Set Method
C++
void Set(int dx, int dy, int sx, int sy, int w, int h);
IRenderer::~IRenderer Destructor
C++
virtual ~IRenderer();
IRenderer::ActivateLayer Method
C++
virtual void ActivateLayer(const char* pLayerName, bool activate) = 0;
IRenderer::AddListener Method
C++
virtual void AddListener(IRendererEventListener * pRendererEventListener) = 0;
IRenderer::AllowGPUTimers2 Method
C++
virtual void AllowGPUTimers2(bool bAllow) = 0;
IRenderer::BakeMesh Method
C++
virtual bool BakeMesh(const SMeshBakingInputParams * pInputParams, SMeshBakingOutput * pReturnValues) = 0;
IRenderer::BeginFrame Method
C++
virtual void BeginFrame() = 0;
Notes

Should be called at the beginning of every frame.

IRenderer::BeginSpawningGeneratingRendItemJobs Method

tell the renderer that we will begin/stop spawning jobs which generate SRendItems

C++
virtual void BeginSpawningGeneratingRendItemJobs(int nThreadID) = 0;
IRenderer::BeginSpawningShadowGeneratingRendItemJobs Method
C++
virtual void BeginSpawningShadowGeneratingRendItemJobs(int nThreadID) = 0;
IRenderer::BuildTerrainTexture Method

Builds terrain sector texture.

C++
virtual void BuildTerrainTexture();
IRenderer::CaptureFrameBufferCallBack Method
C++
virtual void CaptureFrameBufferCallBack() = 0;
Parameters
Parameters
Description
Outputs
None
Description

This routine checks for any frame buffer callbacks that are needed and calls them

IRenderer::CaptureFrameBufferFast Method
C++
virtual bool CaptureFrameBufferFast(unsigned char * pDstRGBA8, int destinationWidth, int destinationHeight) = 0;
Parameters
Parameters
Description
int destinationWidth
Width of the frame to copy
int destinationHeight
Height of the frame to copy
pDstARGBA8
Pointer to a buffer that will hold the captured frame (should be at least 4*dstWidth*dstHieght for RGBA surface)
Description

This routines uses 2 destination surfaces. It triggers a backbuffer copy to one of its surfaces, and then copies the other surface to system memory. This hopefully will remove any CPU stalls due to the rect lock call since the buffer will already be in system memory when it is called

Notes

If dstWidth or dstHeight is larger than the current surface dimensions, the dimensions of the surface are used for the copy

IRenderer::ChangeDisplay Method

Changes display size.

C++
virtual bool ChangeDisplay(unsigned int width, unsigned int height, unsigned int cbpp) = 0;
IRenderer::ChangeResolution Method

Changes resolution of the window/device (doesn't require to reload the level.

C++
virtual bool ChangeResolution(int nNewWidth, int nNewHeight, int nNewColDepth, int nNewRefreshHZ, bool bFullScreen, bool bForceReset) = 0;
IRenderer::ChangeViewport Method

Changes viewport size.

C++
virtual void ChangeViewport(unsigned int x, unsigned int y, unsigned int width, unsigned int height, bool bMainViewport = false) = 0;
IRenderer::ClearBuffer Method
C++
virtual void ClearBuffer(uint32 nFlags, ColorF * vColor, float depth = 1.0f) = 0;
IRenderer::CloseCaptureFrameBufferFast Method
C++
virtual void CloseCaptureFrameBufferFast() = 0;
Returns

None

Description

This routine releases the 2 surfaces used for frame capture by the CaptureFrameBufferFast routine

IRenderer::CollectDrawCallsInfo Method
C++
virtual void CollectDrawCallsInfo(bool status) = 0;
IRenderer::CopyFrameBufferFast Method
C++
virtual bool CopyFrameBufferFast(unsigned char * pDstRGBA8, int destinationWidth, int destinationHeight) = 0;
Parameters
Parameters
Description
int destinationWidth
Width of the frame to copy
int destinationHeight
Height of the frame to copy
pDstARGBA8
Pointer to a buffer that will hold the captured frame (should be at least 4*dstWidth*dstHieght for RGBA surface)
Description

Copy a captured surface to a buffer

Notes

If dstWidth or dstHeight is larger than the current surface dimensions, the dimensions of the surface are used for the copy

IRenderer::CreateContext Method
C++
virtual bool CreateContext(WIN_HWND hWnd, bool bAllowMSAA = false) = 0;
IRenderer::CreateOptics Method
C++
virtual IOpticsElementBase* CreateOptics(EFlareType type) const = 0;
IRenderer::CreateRenderMesh Method

Creates/deletes RenderMesh object.

C++
virtual _smart_ptr CreateRenderMesh(const char * szType, const char * szSourceName, IRenderMesh::SInitParamerers * pInitParams = NULL, ERenderMeshType eBufType = eRMT_Static) = 0;
IRenderer::CreateRenderMeshInitialized Method
C++
virtual _smart_ptr CreateRenderMeshInitialized(const void * pVertBuffer, int nVertCount, EVertexFormat eVF, const vtx_idx* pIndices, int nIndices, const PublicRenderPrimitiveType nPrimetiveType, const char * szType, const char * szSourceName, ERenderMeshType eBufType = eRMT_Static, int nMatInfoCount = 1, int nClientTextureBindID = 0, bool (*PrepareBufferCallback)(IRenderMesh *, bool) = NULL, void * CustomData = NULL, bool bOnlyVideoBuffer = false, bool bPrecache = true, const SPipTangents* pTangents = NULL, bool bLockForThreadAcc = false, Vec3* pNormals = NULL) = 0;
IRenderer::CreateRenderTarget Method
C++
virtual int CreateRenderTarget(int nWidth, int nHeight, ETEX_Format eTF) = 0;
IRenderer::CreateResourceAsync Method
C++
virtual void CreateResourceAsync(SResourceAsync* Resource) = 0;
IRenderer::CreateShaderPublicParams Method
C++
virtual IShaderPublicParams* CreateShaderPublicParams() = 0;
Description

Creates an Interface to the public params container. Return: Created IShaderPublicParams interface.

IRenderer::DeleteContext Method
C++
virtual bool DeleteContext(WIN_HWND hWnd) = 0;
IRenderer::DestroyRenderTarget Method
C++
virtual bool DestroyRenderTarget(int nHandle) = 0;
IRenderer::DownLoadToVideoMemory Method
C++
virtual unsigned int DownLoadToVideoMemory(unsigned char * data, int w, int h, ETEX_Format eTFSrc, ETEX_Format eTFDst, int nummipmap, bool repeat = true, int filter = FILTER_BILINEAR, int Id = 0, const char * szCacheName = NULL, int flags = 0, EEndian eEndian = eLittleEndian, RectI * pRegion = NULL, bool bAsynDevTexCreation = false) = 0;
IRenderer::Draw2dImage Method

Draws a 2d image on the screen.

C++
virtual void Draw2dImage(float xpos, float ypos, float w, float h, int texture_id, float s0 = 0, float t0 = 0, float s1 = 1, float t1 = 1, float angle = 0, float r = 1, float g = 1, float b = 1, float a = 1, float z = 1) = 0;
Example

Hud etc.

IRenderer::Draw2dImageList Method

Draws all images to the screen that were collected with Push2dImage.

C++
virtual void Draw2dImageList() = 0;
IRenderer::Draw2dImageStretchMode Method
C++
virtual void Draw2dImageStretchMode(bool stretch) = 0;
IRenderer::Draw2dLabel Method (float, float, float, ColorF &, bool, char *, ...)
C++
void Draw2dLabel(float x, float y, float font_size, const ColorF & fColor, bool bCenter, const char * label_text, ...);
IRenderer::Draw2dLabel Method (float, float, float, float *, bool, char *, ...)
C++
void Draw2dLabel(float x, float y, float font_size, const float * pfColor, bool bCenter, const char * label_text, ...);
IRenderer::DrawDynVB Method

Draws user primitives.

C++
virtual void DrawDynVB(SVF_P3F_C4B_T2F * pBuf, uint16 * pInds, int nVerts, int nInds, const PublicRenderPrimitiveType nPrimType) = 0;
IRenderer::DrawImage Method

Draws a image using the current matrix.

C++
virtual void DrawImage(float xpos, float ypos, float w, float h, int texture_id, float s0, float t0, float s1, float t1, float r, float g, float b, float a, bool filtered = true) = 0;
IRenderer::DrawImageWithUV Method
C++
virtual void DrawImageWithUV(float xpos, float ypos, float z, float width, float height, int texture_id, float * s, float * t, float r = 1, float g = 1, float b = 1, float a = 1, bool filtered = true) = 0;
Description

Draws a image using the current matrix, more flexible than DrawImage order for s and t: 0=left_top, 1=right_top, 2=right_bottom, 3=left_bottom.

IRenderer::DrawLabel Method

Helper functions to draw text.

C++
void DrawLabel(Vec3 pos, float font_size, const char * label_text, ...);
IRenderer::DrawLabelEx Method
C++
void DrawLabelEx(Vec3 pos, float font_size, const float * pfColor, bool bFixedSize, bool bCenter, const char * label_text, ...);
IRenderer::DrawStringW Method
C++
virtual void DrawStringW(IFFont_RenderProxy* pFont, float x, float y, float z, const wchar_t* pStr, const bool asciiMultiLine, const STextDrawContext& ctx) const = 0;
IRenderer::DrawTextQueued Method (Vec3, SDrawTextInfo &, char *)
C++
virtual void DrawTextQueued(Vec3 pos, SDrawTextInfo & ti, const char * text) = 0;
Description

Draws text queued.

Notes

Position can be in 3d or in 2d depending on the flags.

IRenderer::DrawTextQueued Method (Vec3, SDrawTextInfo &, char *, va_list)
C++
virtual void DrawTextQueued(Vec3 pos, SDrawTextInfo & ti, const char * format, va_list args) = 0;
Description

Draws text queued.

Notes

Position can be in 3d or in 2d depending on the flags.

IRenderer::DXTCompress Method
C++
virtual bool DXTCompress(byte * raw_data, int nWidth, int nHeight, ETEX_Format eTF, bool bUseHW, bool bGenMips, int nSrcBytesPerPix, const Vec3 vLumWeight, MIPDXTcallback callback) = 0;
Parameters
Parameters
Description
const Vec3 vLumWeight
0,0,0 if default should be used.
Remarks

Without header.

IRenderer::DXTDecompress Method
C++
virtual bool DXTDecompress(byte * srcData, const size_t srcFileSize, byte * dstData, int nWidth, int nHeight, int nMips, ETEX_Format eSrcTF, bool bUseHW, int nDstBytesPerPix) = 0;
IRenderer::EF_AddDeferredDecal Method
C++
virtual bool EF_AddDeferredDecal(const SDeferredDecal & rDecal);
IRenderer::Ef_AddDeferredGIClipVolume Method
C++
virtual void Ef_AddDeferredGIClipVolume(const IRenderMesh * pClipVolume, const Matrix34& mxTransform) = 0;
Description

Deferred clip volumes

IRenderer::EF_AddDeferredLight Method
C++
virtual int EF_AddDeferredLight(const CDLight & pLight, float fMult, const SRenderingPassInfo & passInfo, const SRendItemSorter & rendItemSorter) = 0;
Description

Deferred lights/vis areas

IRenderer::EF_AddDeferredVisArea Method
C++
virtual void EF_AddDeferredVisArea(const IVisArea * pVisArea) = 0;
IRenderer::EF_ADDDlight Method
C++
virtual void EF_ADDDlight(CDLight * Source, const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_AddEf Method

Adds shader to the list.

C++
virtual void EF_AddEf(CRendElementBase * pRE, SShaderItem& pSH, CRenderObject * pObj, const SRenderingPassInfo & passInfo, int nList, int nAW, const SRendItemSorter & rendItemSorter) = 0;
IRenderer::EF_AddMultipleParticlesToScene Method
C++
virtual void EF_AddMultipleParticlesToScene(const SAddParticlesToSceneJob* jobs, size_t numJobs, const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_AddPolygonToScene Method (SShaderItem&, CRenderObject*, SRenderingPassInfo &, int, int, SVF_P3F_C4B_T2F*&, SPipTangents*&, uint16*&, int, SRendItemSorter &)
C++
virtual CRenderObject* EF_AddPolygonToScene(SShaderItem& si, CRenderObject* obj, const SRenderingPassInfo & passInfo, int numPts, int ninds, SVF_P3F_C4B_T2F*& verts, SPipTangents*& tangs, uint16*& inds, int nAW, const SRendItemSorter & rendItemSorter) = 0;
IRenderer::EF_AddPolygonToScene Method (SShaderItem&, int, SVF_P3F_C4B_T2F *, SPipTangents *, CRenderObject *, SRenderingPassInfo &, uint16 *, int, int, SRendItemSorter &)
C++
virtual CRenderObject* EF_AddPolygonToScene(SShaderItem& si, int numPts, const SVF_P3F_C4B_T2F * verts, const SPipTangents * tangs, CRenderObject * obj, const SRenderingPassInfo & passInfo, uint16 * inds, int ninds, int nAW, const SRendItemSorter & rendItemSorter) = 0;
IRenderer::EF_AddWaterSimHit Method
C++
virtual void EF_AddWaterSimHit(const Vec3 & vPos, const float scale, const float strength) = 0;
IRenderer::EF_ClearDeferredLightsList Method
C++
virtual void EF_ClearDeferredLightsList() = 0;
IRenderer::EF_ClearDeferredVisAreasList Method
C++
virtual void EF_ClearDeferredVisAreasList() = 0;
IRenderer::EF_ClearLightsList Method
C++
void EF_ClearLightsList();
Description

For FC Compatibility.

IRenderer::EF_ClearSkinningDataPool Method
C++
virtual void EF_ClearSkinningDataPool() = 0;
IRenderer::EF_CreateCompositeTexture Method
C++
virtual ITexture* EF_CreateCompositeTexture(int type, const char * szName, int nWidth, int nHeight, int nDepth, int nMips, int nFlags, ETEX_Format eTF, const STexComposition* pCompositions, size_t nCompositions, int8 nPriority = -1) = 0;
IRenderer::EF_CreateRE Method

Creates new RE (RenderElement) of type (edt).

C++
virtual CRendElementBase * EF_CreateRE(EDataType edt) = 0;
IRenderer::EF_CreateRemappedSkinningData Method
C++
virtual SSkinningData* EF_CreateRemappedSkinningData(uint32 nNumBones, SSkinningData * pSourceSkinningData, uint32 nCustomDataSize, uint32 pairGuid) = 0;
IRenderer::EF_CreateSkinningData Method
C++
virtual SSkinningData* EF_CreateSkinningData(uint32 nNumBones, bool bNeedJobSyncVar) = 0;
IRenderer::EF_DisableTemporalEffects Method
C++
virtual void EF_DisableTemporalEffects() = 0;
IRenderer::EF_DuplicateRO Method
C++
virtual CRenderObject * EF_DuplicateRO(CRenderObject * pObj, const SRenderObjectModifier * pROII, const SRenderingPassInfo & passInfo) = 0;
Description

Get permanent RenderObject

IRenderer::EF_EndEf2D Method
C++
virtual void EF_EndEf2D(const bool bSort) = 0;
Description

2d interface for the shaders

IRenderer::EF_EndEf3D Method

Draws all shaded REs in the list

C++
virtual void EF_EndEf3D(const int nFlags, const int nPrecacheUpdateId, const int nNearPrecacheUpdateId, const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_GetDeferredLights Method
C++
virtual TArray<SRenderLight>* EF_GetDeferredLights(const SRenderingPassInfo & passInfo, const eDeferredLightType eLightType = eDLT_DeferredLight) = 0;
IRenderer::EF_GetDeferredLightsNum Method
C++
virtual uint32 EF_GetDeferredLightsNum(const eDeferredLightType eLightType = eDLT_DeferredLight) = 0;
IRenderer::EF_GetObjData Method
C++
virtual SRenderObjData * EF_GetObjData(CRenderObject * pObj, bool bCreate, int nThreadID) = 0;
IRenderer::EF_GetObject_Temp Method

Gets CRenderObject for RE transformation. Get temporary RenderObject

C++
virtual CRenderObject * EF_GetObject_Temp(int nThreadID) = 0;
IRenderer::EF_GetPostEffectID Method
C++
virtual int32 EF_GetPostEffectID(const char* pPostEffectName) = 0;
IRenderer::EF_GetPostEffectParam Method
C++
virtual void EF_GetPostEffectParam(const char * pParam, float & fValue) = 0;
IRenderer::EF_GetPostEffectParamString Method
C++
virtual void EF_GetPostEffectParamString(const char * pParam, const char* & pszArg) = 0;
IRenderer::EF_GetPostEffectParamVec4 Method
C++
virtual void EF_GetPostEffectParamVec4(const char * pParam, Vec4 & pValue) = 0;
IRenderer::EF_GetRemapedShaderMaskGen Method

Remaps shader gen mask to common global mask.

C++
virtual uint64 EF_GetRemapedShaderMaskGen(const char * name, uint64 nMaskGen = 0, bool bFixup = 0) = 0;
IRenderer::EF_GetRenderQuality Method

Gets renderer quality.

C++
virtual ERenderQuality EF_GetRenderQuality() const = 0;
IRenderer::EF_GetShaderGlobalMaskGenFromString Method
C++
virtual uint64 EF_GetShaderGlobalMaskGenFromString(const char * szShaderName, const char * szShaderGen, uint64 nMaskGen = 0) = 0;
IRenderer::EF_GetShaderMissLogPath Method
C++
virtual const char* EF_GetShaderMissLogPath() = 0;
IRenderer::EF_GetShaderNames Method
C++
virtual string * EF_GetShaderNames(int& nNumShaders) = 0;
IRenderer::EF_GetShaderQuality Method

Gets shader type quality.

C++
virtual EShaderQuality EF_GetShaderQuality(EShaderType eST) = 0;
IRenderer::EF_GetSkinningPoolID Method
C++
virtual int EF_GetSkinningPoolID() = 0;
IRenderer::EF_GetStringFromShaderGlobalMaskGen Method
C++
virtual const char * EF_GetStringFromShaderGlobalMaskGen(const char * szShaderName, uint64 nMaskGen = 0) = 0;
IRenderer::EF_GetTextureByID Method

Gets texture object by ID.

C++
virtual ITexture * EF_GetTextureByID(int Id) = 0;
IRenderer::EF_GetTextureByName Method

Gets texture object by Name.

C++
virtual ITexture * EF_GetTextureByName(const char * name, uint32 flags = 0) = 0;
IRenderer::EF_GetVisAreaStencilRef Method
C++
virtual uint8 EF_GetVisAreaStencilRef(const IVisArea * pVisArea, const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_GetWaterZElevation Method
C++
virtual float EF_GetWaterZElevation(float fX, float fY) = 0;
IRenderer::EF_InvokeShadowMapRenderJobs Method
C++
virtual void EF_InvokeShadowMapRenderJobs(const int nFlags) = 0;
IRenderer::EF_IsFakeDLight Method
C++
virtual bool EF_IsFakeDLight(const CDLight * Source) = 0;
IRenderer::EF_LoadDynTexture Method

Loads the texture for name(nameTex).

C++
virtual IDynTextureSource * EF_LoadDynTexture(const char* dynsourceName, bool sharedRT = false) = 0;
IRenderer::EF_LoadLightmap Method

Loads lightmap for name.

C++
virtual int EF_LoadLightmap(const char * name) = 0;
IRenderer::EF_LoadShader Method

Loads shader for name (name).

C++
virtual IShader * EF_LoadShader(const char * name, int flags = 0, uint64 nMaskGen = 0) = 0;
IRenderer::EF_LoadShaderItem Method
C++
virtual SShaderItem EF_LoadShaderItem(const char * szName, bool bShare, int flags = 0, SInputShaderResources * Res = NULL, uint64 nMaskGen = 0, const SLoadShaderItemArgs* pArgs = 0) = 0;
IRenderer::EF_LoadTexture Method

Loads the texture for name(nameTex).

C++
virtual ITexture * EF_LoadTexture(const char* nameTex, const uint32 flags = 0) = 0;
IRenderer::EF_PrecacheResource Method (CDLight *, float, float, int, int)
C++
virtual bool EF_PrecacheResource(CDLight * pLS, float fMipFactor, float fTimeToReady, int Flags, int nUpdateId) = 0;
IRenderer::EF_PrecacheResource Method (IRenderMesh *, IMaterial *, float, float, int, int)
C++
virtual bool EF_PrecacheResource(IRenderMesh * pPB, IMaterial * pMaterial, float fMipFactor, float fTimeToReady, int Flags, int nUpdateId) = 0;
IRenderer::EF_PrecacheResource Method (IShader *, float, float, int)
C++
virtual bool EF_PrecacheResource(IShader * pSH, float fMipFactor, float fTimeToReady, int Flags) = 0;
IRenderer::EF_PrecacheResource Method (ITexture *, float, float, int, int, int)
C++
virtual bool EF_PrecacheResource(ITexture * pTP, float fMipFactor, float fTimeToReady, int Flags, int nUpdateId, int nCounter = 1) = 0;
IRenderer::EF_PrecacheResource Method (SShaderItem *, float, float, int, int, int)
C++
virtual bool EF_PrecacheResource(SShaderItem * pSI, float fMipFactor, float fTimeToReady, int Flags, int nUpdateId, int nCounter = 1) = 0;
Description

External interface for shaders

IRenderer::EF_Query Method (ERenderQueryTypes)

Returns various Renderer Settings, see ERenderQueryTypes.

C++
void EF_Query(ERenderQueryTypes eQuery);
Parameters
Parameters
Description
Query
e.g. EFQ_GetShaderCombinations.
rInOut
Input/Output Parameter, depends on the query if written to/read from, or both
IRenderer::EF_Query Method (ERenderQueryTypes, T &)
C++
template <typename T> void EF_Query(ERenderQueryTypes eQuery, T & rInOut);
IRenderer::EF_Query Method (ERenderQueryTypes, T0 &, T1 &)
C++
template <typename T0, typename T1> void EF_Query(ERenderQueryTypes eQuery, T0 & rInOut0, T1 & rInOut1);
IRenderer::EF_ReleaseDeferredData Method
C++
virtual void EF_ReleaseDeferredData() = 0;
Description

called in between levels to free up memory

IRenderer::EF_ReleaseInputShaderResource Method
C++
virtual void EF_ReleaseInputShaderResource(SInputShaderResources * pRes) = 0;
Description

called in between levels to free up memory

IRenderer::EF_ReloadFile Method

Reloads file

C++
virtual bool EF_ReloadFile(const char * szFileName) = 0;
IRenderer::EF_ReloadFile_Request Method

Reloads file at any time the renderer feels to do so (no guarantees, but likely on next frame update) Is threadsafe

C++
virtual bool EF_ReloadFile_Request(const char * szFileName) = 0;
IRenderer::EF_ReloadShaderFiles Method

Reinitializes all shader files (build hash tables).

C++
virtual void EF_ReloadShaderFiles(int nCategory) = 0;
IRenderer::EF_ReloadTextures Method

Reloads all texture files.

C++
virtual void EF_ReloadTextures() = 0;
IRenderer::EF_RenderEnvironmentCubeHDR Method
C++
virtual bool EF_RenderEnvironmentCubeHDR(int size, Vec3& Pos, TArray<unsigned short>& vecData) = 0;
IRenderer::EF_ResetPostEffects Method
C++
virtual void EF_ResetPostEffects(bool bOnSpecChange = false) = 0;
IRenderer::EF_SetPostEffectParam Method
C++
virtual void EF_SetPostEffectParam(const char * pParam, float fValue, bool bForceValue = false) = 0;
Description

Post processing effects interfaces

IRenderer::EF_SetPostEffectParamString Method
C++
virtual void EF_SetPostEffectParamString(const char * pParam, const char * pszArg) = 0;
IRenderer::EF_SetPostEffectParamVec4 Method
C++
virtual void EF_SetPostEffectParamVec4(const char * pParam, const Vec4 & pValue, bool bForceValue = false) = 0;
IRenderer::EF_SetShaderMissCallback Method
C++
virtual void EF_SetShaderMissCallback(ShaderCacheMissCallback callback) = 0;
Description

Shaders/Shaders management

IRenderer::EF_SetShaderQuality Method
C++
virtual void EF_SetShaderQuality(EShaderType eST, EShaderQuality eSQ) = 0;
IRenderer::EF_StartEf Method

Starts using of the shaders (return first index for allow recursions).

C++
virtual void EF_StartEf(const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_UpdateDLight Method
C++
virtual bool EF_UpdateDLight(SRenderLight * pDL) = 0;
IRenderer::EnableBatchMode Method
C++
virtual void EnableBatchMode(bool enable) = 0;
Description

Enable the batch mode if the meshpools are used to enable quick and dirty flushes.

IRenderer::EnableFog Method
C++
virtual bool EnableFog(bool enable) = 0;
IRenderer::EnableGPUTimers2 Method
C++
virtual void EnableGPUTimers2(bool bEnabled) = 0;
IRenderer::EnableLevelUnloading Method
C++
virtual void EnableLevelUnloading(bool enable) = 0;
Description

Flag level unloading in progress to disable f.i. rendermesh creation requests

IRenderer::EnablePipelineProfiler Method
C++
virtual void EnablePipelineProfiler(bool bEnable) = 0;
IRenderer::EnableSwapBuffers Method
C++
virtual void EnableSwapBuffers(bool bEnable) = 0;
IRenderer::EnableTerrainAO Method
C++
virtual void EnableTerrainAO(const bool bEnabled) = 0;
Description

allows to enable/disable TerrainAO on a per-level base

IRenderer::EnableVSync Method
C++
virtual void EnableVSync(bool enable) = 0;
Notes

The following functions will be removed.

IRenderer::EndFrame Method
C++
virtual void EndFrame() = 0;
Notes

Should be called at the end of every frame.

IRenderer::EndSpawningGeneratingRendItemJobs Method
C++
virtual void EndSpawningGeneratingRendItemJobs(int nThreadID) = 0;
IRenderer::EnumAAFormats Method

Returns all supported by video card video AA formats.

C++
virtual int EnumAAFormats(SAAFormat * Formats) = 0;
IRenderer::EnumDisplayFormats Method
C++
virtual int EnumDisplayFormats(SDispFormat * Formats) = 0;
Returns

Number of formats in memory.

Description

Creates array of all supported video formats (except low resolution formats).

IRenderer::ExecuteAsyncDIP Method
C++
virtual void ExecuteAsyncDIP() = 0;
IRenderer::FillArtProfileData Method
C++
virtual void FillArtProfileData(SArtProfileData & data, SArtProfileData::EArtProfileUnit unit) = 0;
IRenderer::FlushPendingTextureTasks Method
C++
virtual void FlushPendingTextureTasks() = 0;
IRenderer::FlushRTCommands Method
C++
virtual bool FlushRTCommands(bool bWait, bool bImmediatelly, bool bForce) = 0;
IRenderer::FlushTextMessages Method
C++
virtual void FlushTextMessages() = 0;
IRenderer::FontCreateTexture Method
C++
virtual int FontCreateTexture(int Width, int Height, byte * pData, ETEX_Format eTF = eTF_A8R8G8B8, bool genMips = false) = 0;
IRenderer::FontReleaseTexture Method
C++
virtual void FontReleaseTexture(class CFBitmap * pBmp) = 0;
IRenderer::FontRestoreRenderingState Method
C++
virtual void FontRestoreRenderingState() = 0;
IRenderer::FontSetBlending Method
C++
virtual void FontSetBlending(int src, int dst) = 0;
IRenderer::FontSetRenderingState Method
C++
virtual void FontSetRenderingState(unsigned int nVirtualScreenWidth, unsigned int nVirtualScreenHeight) = 0;
IRenderer::FontSetTexture Method (class CFBitmap*, int)
C++
virtual void FontSetTexture(class CFBitmap*, int nFilterMode) = 0;
IRenderer::FontSetTexture Method (int, int)
C++
virtual void FontSetTexture(int nTexId, int nFilterMode) = 0;
IRenderer::FontUpdateTexture Method
C++
virtual bool FontUpdateTexture(int nTexId, int X, int Y, int USize, int VSize, byte * pData) = 0;
IRenderer::FontUploadTexture Method
C++
virtual bool FontUploadTexture(class CFBitmap*, ETEX_Format eTF = eTF_A8R8G8B8) = 0;
Description

Replacement functions for Font

IRenderer::ForceGC Method

Toggles render mesh garbage collection

C++
virtual void ForceGC() = 0;
IRenderer::ForceSwapBuffers Method
C++
virtual void ForceSwapBuffers() = 0;
Description

Force a swap on the backbuffer

IRenderer::ForceUpdateShaderItem Method
C++
virtual void ForceUpdateShaderItem(SShaderItem * pShaderItem, IMaterial * pMaterial) = 0;
IRenderer::FreeResources Method

Frees the allocated resources.

C++
virtual void FreeResources(int nFlags) = 0;
IRenderer::GetBandwidthStats Method

Gets textures streaming bandwidth information

C++
virtual void GetBandwidthStats(float * fBandwidthRequested) = 0;
IRenderer::GetCamera Method

Gets the renderer camera.

C++
virtual const CCamera& GetCamera() = 0;
IRenderer::GetCloakFadeLightScale Method
C++
virtual float GetCloakFadeLightScale() const = 0;
IRenderer::GetColorBpp Method

Gets current bpp.

C++
virtual int GetColorBpp() = 0;
IRenderer::GetCurrentContextHWND Method
C++
virtual WIN_HWND GetCurrentContextHWND() = 0;
IRenderer::GetCurrentDrawCallRTTimes Method
C++
virtual float GetCurrentDrawCallRTTimes(const uint32 EFSListMask) = 0;
IRenderer::GetCurrentNumberOfDrawCalls Method ()
C++
virtual int GetCurrentNumberOfDrawCalls() = 0;
IRenderer::GetCurrentNumberOfDrawCalls Method (int &, int &)
C++
virtual void GetCurrentNumberOfDrawCalls(int & nGeneral, int & nShadowGen) = 0;
IRenderer::GetCurrentNumberOfDrawCalls Method (uint32)
C++
virtual int GetCurrentNumberOfDrawCalls(const uint32 EFSListMask) = 0;
Description

Sums DIP counts for the EFSLIST_* passes that match the submitted mask. Compose the mask with bitwise arithmetic, use (1 << EFSLIST_*) per list. e.g. to sum general and transparent, pass in ( (1 << EFSLIST_GENERAL) | (1 << EFSLIST_TRANSP) ) Please note that this doesn't subtract the global count of DIPs skipped on the PS3 due to conditional rendering 3 as it isn't per-pass information

IRenderer::GetDepthBpp Method

Gets current z-buffer depth.

C++
virtual int GetDepthBpp() = 0;
IRenderer::GetFeatures Method
C++
virtual int GetFeatures() = 0;
IRenderer::GetFinalizeRendItemJobState Method
C++
virtual JobManager::SJobState * GetFinalizeRendItemJobState(int nThreadID) = 0;
IRenderer::GetFinalizeShadowRendItemJobState Method
C++
virtual JobManager::SJobState * GetFinalizeShadowRendItemJobState(int nThreadID) = 0;
IRenderer::GetFrameID Method
C++
virtual int GetFrameID(bool bIncludeRecursiveCalls = true) = 0;
IRenderer::GetGenerateRendItemJobState Method

get the shared job state for SRendItem Generating jobs

C++
virtual JobManager::SJobState * GetGenerateRendItemJobState(int nThreadID) = 0;
IRenderer::GetGenerateRendItemJobStatePreProcess Method
C++
virtual JobManager::SJobState * GetGenerateRendItemJobStatePreProcess(int nThreadID) = 0;
IRenderer::GetGenerateShadowRendItemJobState Method
C++
virtual JobManager::SJobState * GetGenerateShadowRendItemJobState(int nThreadID) = 0;
IRenderer::GetGPUCount Method
C++
virtual uint32 GetGPUCount() const = 0;
IRenderer::GetGPUFrameTime Method
C++
virtual float GetGPUFrameTime() = 0;
IRenderer::GetHeight Method

Gets height of the main rendering resolution.

C++
virtual int GetHeight() = 0;
IRenderer::GetHWND Method
C++
virtual WIN_HWND GetHWND() = 0;
IRenderer::GetIColorGradingController Method
C++
virtual IColorGradingController* GetIColorGradingController() = 0;
IRenderer::GetImageCaps Method
C++
virtual bool GetImageCaps(const char* filename, int& width, int& height) const = 0;
IRenderer::GetIRenderAuxGeom Method

Interface for auxiliary geometry (for debugging, editor purposes, etc.)

C++
virtual IRenderAuxGeom* GetIRenderAuxGeom() = 0;
IRenderer::GetIStereoRenderer Method
C++
virtual IStereoRenderer* GetIStereoRenderer() = 0;
IRenderer::GetMaxTextureSize Method
C++
virtual int GetMaxTextureSize() = 0;
IRenderer::GetMemoryUsage Method

Gets memory status information

C++
virtual void GetMemoryUsage(ICrySizer* Sizer) = 0;
IRenderer::GetMemoryUsageParticleREs Method
C++
virtual void GetMemoryUsageParticleREs(ICrySizer * pSizer);
IRenderer::GetModelViewMatrix Method
C++
virtual void GetModelViewMatrix(float * mat) = 0;
Remarks

For editor.

IRenderer::GetMTRenderInfo Method
C++
virtual const MTRenderInfo& GetMTRenderInfo() const = 0;
IRenderer::GetNativeHeight Method

Gets height of the potentially native resolution framebuffer used for UI and debug output.

C++
virtual int GetNativeHeight() = 0;
IRenderer::GetNativeWidth Method

Gets width of the potentially native resolution framebuffer used for UI and debug output.

C++
virtual int GetNativeWidth() = 0;
IRenderer::GetNearestRangeMax Method

Returns values of nearest rendering z-range max

C++
virtual float GetNearestRangeMax() const = 0;
IRenderer::GetNumGeomInstanceDrawCalls Method
C++
virtual int GetNumGeomInstanceDrawCalls() = 0;
IRenderer::GetNumGeomInstances Method
C++
virtual int GetNumGeomInstances() = 0;
IRenderer::GetOcclusionBuffer Method
C++
virtual int GetOcclusionBuffer(uint16* pOutOcclBuffer, int32 nSizeX, int32 nSizeY, Matrix44* pmViewProj, Matrix44* pmCamBuffer) = 0;
IRenderer::GetPixelAspectRatio Method

Gets Pixel Aspect Ratio.

C++
virtual float GetPixelAspectRatio() const = 0;
IRenderer::GetPolyCount Method ()
C++
virtual int GetPolyCount() = 0;
virtual void GetPolyCount(int & nPolygons, int & nShadowVolPolys) = 0;
Remarks

For stats.

IRenderer::GetPolygonCountByType Method
C++
virtual int GetPolygonCountByType(uint32 EFSList, EVertexCostTypes vct, uint32 z, bool bCalledFromMainThread = true) = 0;
IRenderer::GetProjectionMatrix Method
C++
virtual void GetProjectionMatrix(float * mat) = 0;
Remarks

For editor.

IRenderer::GetRenderTimes Method
C++
virtual void GetRenderTimes(SRenderTimes & outTimes) = 0;
IRenderer::GetRenderType Method
C++
virtual ERenderType GetRenderType() const = 0;
IRenderer::GetRPPStats Method
C++
virtual const RPProfilerStats* GetRPPStats(ERenderPipelineProfilerStats eStat, bool bCalledFromMainThread = true) = 0;
IRenderer::GetRPPStatsArray Method
C++
virtual const RPProfilerStats* GetRPPStatsArray(bool bCalledFromMainThread = true) = 0;
IRenderer::GetScreenAspect Method
C++
virtual EScreenAspectRatio GetScreenAspect(int nWidth, int nHeight) = 0;
IRenderer::GetShaderProfile Method
C++
virtual const SShaderProfile & GetShaderProfile(EShaderType eST) const = 0;
IRenderer::GetShadowFrustumMGPUCache Method
C++
virtual ShadowFrustumMGPUCache* GetShadowFrustumMGPUCache() = 0;
IRenderer::GetShadowJittering Method
C++
virtual float GetShadowJittering() const = 0;
IRenderer::GetStencilBpp Method

Gets current stencil bits.

C++
virtual int GetStencilBpp() = 0;
IRenderer::GetTextureFormatDataSize Method
C++
virtual int GetTextureFormatDataSize(int nWidth, int nHeight, int nDepth, int nMips, ETEX_Format eTF) = 0;
IRenderer::GetTextureFormatName Method
C++
virtual const char * GetTextureFormatName(ETEX_Format eTF) = 0;
IRenderer::GetThreadIDs Method
C++
virtual void GetThreadIDs(threadID& mainThreadID, threadID& renderThreadID) const = 0;
IRenderer::GetVideoMemoryUsageStats Method
C++
virtual void GetVideoMemoryUsageStats(size_t& vidMemUsedThisFrame, size_t& vidMemUsedRecently, bool bGetPoolsSizes = false) = 0;
IRenderer::GetViewport Method
C++
virtual void GetViewport(int * x, int * y, int * width, int * height) = 0;
IRenderer::GetWhiteTextureId Method

Gets the white texture Id.

C++
virtual int GetWhiteTextureId() const = 0;
IRenderer::GetWidth Method

Gets width of the main rendering resolution.

C++
virtual int GetWidth() = 0;
IRenderer::Graph Method
C++
virtual void Graph(byte * g, int x, int y, int wdt, int hgt, int nC, int type, char * text, ColorF& color, float fScale) = 0;
IRenderer::Init Method

Initializes the renderer, params are self-explanatory.

C++
virtual WIN_HWND Init(int x, int y, int width, int height, unsigned int cbpp, int zbpp, int sbits, bool fullscreen, WIN_HINSTANCE hinst, WIN_HWND Glhwnd = 0, bool bReInit = false, const SCustomRenderInitArgs* pCustomArgs = 0, bool bShaderCacheGen = false) = 0;
IRenderer::InitCaptureFrameBufferFast Method
C++
virtual bool InitCaptureFrameBufferFast(uint32 bufferWidth = 0, uint32 bufferHeight = 0) = 0;
Parameters
Parameters
Description
uint32 bufferWidth = 0
Width of capture buffer, on consoles the scaling is done on the GPU. Pass in 0 (the default) to use backbuffer dimensions
uint32 bufferHeight = 0
Height of capture buffer.
Outputs
returns true if surfaces were created otherwise returns false
Description

This routine initializes 2 destination surfaces for use by the CaptureFrameBufferFast routine It also, captures the current backbuffer into one of the created surfaces

IRenderer::InitSystemResources Method

Creates default system shaders and textures.

C++
virtual void InitSystemResources(int nFlags) = 0;
IRenderer::IsDebugRenderNode Method
C++
virtual bool IsDebugRenderNode(IRenderNode* pRenderNode) const = 0;
IRenderer::IsMultiGPUModeActive Method
C++
virtual bool IsMultiGPUModeActive() const = 0;
IRenderer::IsPost3DRendererEnabled Method
C++
virtual bool IsPost3DRendererEnabled() const;
IRenderer::IsRenderingIntroMovies Method
C++
virtual bool IsRenderingIntroMovies() const = 0;
IRenderer::IsStereoEnabled Method

Returns true if stereo rendering is enabled.

C++
virtual bool IsStereoEnabled() const = 0;
IRenderer::IsStereoModeChangePending Method

Determine if a switch to stereo mode will occur at the start of the next frame

C++
virtual bool IsStereoModeChangePending() = 0;
IRenderer::LoadShaderLevelCache Method
C++
virtual bool LoadShaderLevelCache() = 0;
IRenderer::LoadShaderStartupCache Method
C++
virtual bool LoadShaderStartupCache() = 0;
IRenderer::LockParticleVideoMemory Method

Lock/Unlock the video memory buffer used by particles when using the jobsystem

C++
virtual void LockParticleVideoMemory(uint32 nId) = 0;
IRenderer::MakeMainContextActive Method
C++
virtual void MakeMainContextActive() = 0;
IRenderer::MakeMatrix Method
C++
virtual void MakeMatrix(const Vec3 & pos, const Vec3 & angles, const Vec3 & scale, Matrix34* mat) = 0;
IRenderer::MergeImages Method
C++
virtual bool MergeImages(const char* output_filename, int out_width, int out_height, const char** files, int* offsetsX, int* offsetsY, int* widths, int* heights, int* src_offsetsX, int* src_offsetsY, int* src_width, int* src_height, int count) const = 0;
IRenderer::OffsetPosition Method
C++
virtual void OffsetPosition(const Vec3 & delta) = 0;
IRenderer::OnEntityDeleted Method
C++
virtual void OnEntityDeleted(struct IRenderNode * pRenderNode) = 0;
IRenderer::PauseTimer Method
C++
virtual void PauseTimer(bool bPause) = 0;
Notes

Used for pausing timer related stuff.

Example

For texture animations, and shader 'time' parameter.

IRenderer::PopMatrix Method
C++
virtual void PopMatrix() = 0;
IRenderer::PopProfileMarker Method
C++
virtual void PopProfileMarker(char* label) = 0;
IRenderer::PopWireframeMode Method
C++
virtual void PopWireframeMode() = 0;
IRenderer::PostInit Method
C++
virtual void PostInit() = 0;
IRenderer::PostLevelLoading Method
C++
virtual void PostLevelLoading() = 0;
IRenderer::PostLevelUnload Method
C++
virtual void PostLevelUnload() = 0;
IRenderer::ProcessVoxTerrainDebugTarget Method
C++
virtual void ProcessVoxTerrainDebugTarget(int * pSrcTexIds, int nMipsNum, bool bOnlySetSrcTexture = true);
IRenderer::ProjectToScreen Method

Projects to screen. Returns true if successful.

C++
virtual bool ProjectToScreen(float ptx, float pty, float ptz, float * sx, float * sy, float * sz) = 0;
IRenderer::Push2dImage Method

Adds a 2d image that should be drawn on the screen to an internal render list. The list can be drawn with Draw2dImageList. If several images will be drawn, using this function is more efficient than calling Draw2dImage as it allows better batching. The function supports placing images in stereo 3d space.

C++
virtual void Push2dImage(float xpos, float ypos, float w, float h, int texture_id, float s0 = 0, float t0 = 0, float s1 = 1, float t1 = 1, float angle = 0, float r = 1, float g = 1, float b = 1, float a = 1, float z = 1, float stereoDepth = 0) = 0;
Parameters
Parameters
Description
float stereoDepth = 0
Places image in stereo 3d space. The depth is specified in camera space, the stereo params are the same that are used for the scene. A value of 0 is handled as a special case and always places the image on the screen plane.
IRenderer::PushFogVolumeContribution Method
C++
virtual uint16 PushFogVolumeContribution(const ColorF& fogVolumeContrib, const SRenderingPassInfo & passInfo) = 0;
IRenderer::PushMatrix Method
C++
virtual void PushMatrix() = 0;
IRenderer::PushProfileMarker Method
C++
virtual void PushProfileMarker(char* label) = 0;
IRenderer::PushWireframeMode Method

Sets the polygon mode with Push, Pop restores the last used one

C++
virtual void PushWireframeMode(int mode) = 0;
Example

Wireframe, solid.

IRenderer::ReadFrameBuffer Method
C++
virtual void ReadFrameBuffer(unsigned char * pRGB, int nImageX, int nSizeX, int nSizeY, ERB_Type eRBType, bool bRGBA, int nScaledX = -1, int nScaledY = -1) = 0;
IRenderer::ReadFrameBufferFast Method
C++
virtual void ReadFrameBufferFast(uint32* pDstARGBA8, int dstWidth, int dstHeight) = 0;
IRenderer::RegisterCaptureFrame Method
C++
virtual bool RegisterCaptureFrame(ICaptureFrameListener * pCapture) = 0;
Parameters
Parameters
Description
ICaptureFrameListener * pCapture
Address of the ICaptureFrameListener object
Outputs
returns true if successful, otherwise false
Description

This routine registers a callback address that is called when a new frame is available

IRenderer::Release Method

Shuts down the renderer.

C++
virtual void Release() = 0;
IRenderer::ReleaseResourceAsync Method
C++
virtual void ReleaseResourceAsync(SResourceAsync* Resource) = 0;
IRenderer::RemoveListener Method
C++
virtual void RemoveListener(IRendererEventListener * pRendererEventListener) = 0;
IRenderer::RemoveTexture Method
C++
virtual void RemoveTexture(unsigned int TextureId) = 0;
IRenderer::RenderDebug Method
C++
virtual void RenderDebug(bool bRenderStats = true) = 0;
See Also

r_ShowDynTextures

IRenderer::RequestFlushAllPendingTextureStreamingJobs Method
C++
virtual void RequestFlushAllPendingTextureStreamingJobs(int nFrames);
Description

for one frame allows to disable limit of texture streaming requests

IRenderer::RequestTerrainTexture Method
C++
virtual IDynTexture * RequestTerrainTexture(SBuildTerrainTextureParams & params);
IRenderer::ResetToDefault Method
C++
virtual void ResetToDefault() = 0;
IRenderer::RestoreGamma Method

Restores gamma

C++
virtual void RestoreGamma() = 0;
Notes

Reset gamma setting if not in fullscreen mode.

IRenderer::RT_CurThreadList Method
C++
virtual int RT_CurThreadList() = 0;
IRenderer::RT_FlashRemoveTexture Method
C++
virtual void RT_FlashRemoveTexture(ITexture* pTexture) = 0;
IRenderer::RT_FlashRender Method
C++
virtual void RT_FlashRender(IFlashPlayer_RenderProxy* pPlayer, bool stereo) = 0;
IRenderer::RT_FlashRenderPlaybackLockless Method
C++
virtual void RT_FlashRenderPlaybackLockless(IFlashPlayer_RenderProxy* pPlayer, int cbIdx, bool stereo, bool finalPlayback) = 0;
IRenderer::RT_InsertGpuCallback Method
C++
virtual void RT_InsertGpuCallback(uint32 context, GpuCallbackFunc callback) = 0;
Description

platform specific

IRenderer::SaveTga Method

Saves source data to a Tga file.

C++
virtual bool SaveTga(unsigned char * sourcedata, int sourceformat, int w, int h, const char * filename, bool flip) const = 0;
Notes

Should not be here.

IRenderer::ScaleCoord Method
C++
virtual void ScaleCoord(float& x, float& y) const = 0;
IRenderer::ScaleCoordX Method
C++
virtual float ScaleCoordX(float value) const = 0;
IRenderer::ScaleCoordY Method
C++
virtual float ScaleCoordY(float value) const = 0;
IRenderer::ScreenShot Method

Gets a screenshot and save to a file

C++
virtual bool ScreenShot(const char * filename = NULL, int width = 0) = 0;
Returns

true=success

IRenderer::ScreenToTexture Method
C++
virtual int ScreenToTexture(int nTexID) = 0;
IRenderer::Set2DMode Method
C++
virtual void Set2DMode(bool enable, int ortox, int ortoy, float znear = -1e10f, float zfar = 1e10f) = 0;
IRenderer::SetCamera Method

Sets the renderer camera.

C++
virtual void SetCamera(const CCamera & cam) = 0;
IRenderer::SetClearColor Method
C++
virtual void SetClearColor(const Vec3 & vColor) = 0;
Notes

3d engine set this color to fog color.

IRenderer::SetCloakFadeLightScale Method
C++
virtual void SetCloakFadeLightScale(float fColorScale) = 0;
IRenderer::SetCloakParams Method
C++
virtual void SetCloakParams(const SRendererCloakParams& cloakParams) = 0;
IRenderer::SetCloudShadowsParams Method
C++
virtual void SetCloudShadowsParams(int nTexID, const Vec3& speed, float tiling, bool invert, float brightness) = 0;
IRenderer::SetColorOp Method
C++
virtual void SetColorOp(byte eCo, byte eAo, byte eCa, byte eAa) = 0;
IRenderer::SetCullMode Method
C++
virtual void SetCullMode(int mode = R_CULL_BACK) = 0;
IRenderer::SetCurrentContext Method
C++
virtual bool SetCurrentContext(WIN_HWND hWnd) = 0;
IRenderer::SetDebugRenderNode Method
C++
virtual void SetDebugRenderNode(IRenderNode* pRenderNode) = 0;
IRenderer::SetDefaultMaterials Method
C++
virtual void SetDefaultMaterials(IMaterial * pDefMat, IMaterial * pTerrainDefMat) = 0;
IRenderer::SetFogColor Method
C++
virtual void SetFogColor(const ColorF& color) = 0;
IRenderer::SetGammaDelta Method

Sets delta gamma.

C++
virtual bool SetGammaDelta(const float fGamma) = 0;
IRenderer::SetMaterialColor Method
C++
virtual void SetMaterialColor(float r, float g, float b, float a) = 0;
IRenderer::SetRendererCVar Method
C++
virtual void SetRendererCVar(ICVar* pCVar, const char* pArgText, const bool bSilentMode = false) = 0;
IRenderer::SetRenderTarget Method
C++
virtual bool SetRenderTarget(int nHandle, int nFlags = 0) = 0;
IRenderer::SetRenderTile Method
C++
virtual void SetRenderTile(f32 nTilesPosX = 0.f, f32 nTilesPosY = 0.f, f32 nTilesGridSizeX = 1.f, f32 nTilesGridSizeY = 1.f) = 0;
IRenderer::SetScissor Method
C++
virtual void SetScissor(int x = 0, int y = 0, int width = 0, int height = 0) = 0;
IRenderer::SetShadowJittering Method
C++
virtual void SetShadowJittering(float fShadowJittering) = 0;
IRenderer::SetShouldCopyScreenToBackBuffer Method

Set whether or not the screen should be copied into the back buffer each frame

C++
virtual void SetShouldCopyScreenToBackBuffer(bool bEnable) = 0;
IRenderer::SetState Method
C++
virtual void SetState(int State, int AlphaRef = -1) = 0;
IRenderer::SetTerrainAONodes Method
C++
virtual void SetTerrainAONodes(PodArray<SSectorTextureSet> * terrainAONodes) = 0;
IRenderer::SetTexture Method

Sets the current binded texture.

C++
virtual void SetTexture(int tnum) = 0;
IRenderer::SetTexturePrecaching Method
C++
virtual void SetTexturePrecaching(bool stat) = 0;
IRenderer::SetTexturesStreamingGlobalMipFactor Method
C++
virtual void SetTexturesStreamingGlobalMipFactor(float fFactor);
Description

allows to dynamically adjust texture streaming load depending on game conditions

IRenderer::SetTextureStreamListener Method

Sets an event listener for texture streaming updates

C++
virtual void SetTextureStreamListener(ITextureStreamListener* pListener) = 0;
IRenderer::SetViewport Method
C++
virtual void SetViewport(int x, int y, int width, int height, int id = 0) = 0;
IRenderer::SetViewportDownscale Method
C++
virtual Vec2 SetViewportDownscale(float xscale, float yscale) = 0;
IRenderer::SetWhiteTexture Method

Sets the white texture.

C++
virtual void SetWhiteTexture() = 0;
IRenderer::SF_ConfigMask Method
C++
virtual void SF_ConfigMask(ESFMaskOp maskOp, unsigned int stencilRef) = 0;
IRenderer::SF_CreateTexture Method
C++
virtual int SF_CreateTexture(int width, int height, int numMips, unsigned char* pData, ETEX_Format eTF, int flags) = 0;
IRenderer::SF_DrawBlurRect Method
C++
virtual void SF_DrawBlurRect(const SSF_GlobalDrawParams * pParams) = 0;
IRenderer::SF_DrawGlyphClear Method
C++
virtual void SF_DrawGlyphClear(const SSF_GlobalDrawParams& params) = 0;
IRenderer::SF_DrawIndexedTriList Method
C++
virtual void SF_DrawIndexedTriList(int baseVertexIndex, int minVertexIndex, int numVertices, int startIndex, int triangleCount, const SSF_GlobalDrawParams& params) = 0;
IRenderer::SF_DrawLineStrip Method
C++
virtual void SF_DrawLineStrip(int baseVertexIndex, int lineCount, const SSF_GlobalDrawParams& params) = 0;
IRenderer::SF_Flush Method
C++
virtual void SF_Flush() = 0;
IRenderer::SF_GetMeshMaxSize Method
C++
virtual void SF_GetMeshMaxSize(int& numVertices, int& numIndices) const = 0;
IRenderer::SF_MapTexture Method
C++
virtual bool SF_MapTexture(int texID, int level, void*& pBits, uint32& pitch) = 0;
IRenderer::SF_UnmapTexture Method
C++
virtual bool SF_UnmapTexture(int texID, int level) = 0;
IRenderer::SF_UpdateTexture Method
C++
virtual bool SF_UpdateTexture(int texId, int mipLevel, int numRects, const SUpdateRect* pRects, unsigned char* pData, size_t pitch, ETEX_Format eTF) = 0;
IRenderer::ShutDown Method

Shuts down the renderer.

C++
virtual void ShutDown(bool bReInit = false) = 0;
IRenderer::ShutDownFast Method
C++
virtual void ShutDownFast() = 0;
IRenderer::StartLoadtimeFlashPlayback Method
C++
virtual void StartLoadtimeFlashPlayback(ILoadtimeCallback* pCallback) = 0;
IRenderer::StartRenderIntroMovies Method
C++
virtual void StartRenderIntroMovies() = 0;
Description

start active rendering of the intro movies while initializing the rest of the engine

IRenderer::StopLoadtimeFlashPlayback Method
C++
virtual void StopLoadtimeFlashPlayback() = 0;
IRenderer::StopRenderIntroMovies Method
C++
virtual void StopRenderIntroMovies(bool bWaitForFinished) = 0;
IRenderer::SwitchToNativeResolutionBackbuffer Method

Switches subsequent rendering from the internal backbuffer to the native resolution backbuffer if available.

C++
virtual void SwitchToNativeResolutionBackbuffer() = 0;
IRenderer::SyncComputeVerticesJobs Method

Wait for all particle ComputeVertices jobs to finish

C++
virtual void SyncComputeVerticesJobs() = 0;
IRenderer::TextToScreen Method
C++
virtual void TextToScreen(float x, float y, const char * format, ...);
IRenderer::TextToScreenColor Method
C++
virtual void TextToScreenColor(int x, int y, float r, float g, float b, float a, const char * format, ...);
IRenderer::TryFlush Method

Try to flush the render thread commands to keep the render thread active during level loading, but simpy return if the render thread is still busy

C++
virtual void TryFlush() = 0;
IRenderer::UnloadShaderLevelCache Method
C++
virtual void UnloadShaderLevelCache() = 0;
IRenderer::UnloadShaderStartupCache Method
C++
virtual void UnloadShaderStartupCache() = 0;
IRenderer::UnLockParticleVideoMemory Method
C++
virtual void UnLockParticleVideoMemory(uint32 nId) = 0;
IRenderer::UnProject Method

Unprojects to screen.

C++
virtual int UnProject(float sx, float sy, float sz, float * px, float * py, float * pz, const float modelMatrix[16], const float projMatrix[16], const int viewport[4]) = 0;
IRenderer::UnProjectFromScreen Method

Unprojects from screen.

C++
virtual int UnProjectFromScreen(float sx, float sy, float sz, float * px, float * py, float * pz) = 0;
IRenderer::UnRegisterCaptureFrame Method
C++
virtual bool UnRegisterCaptureFrame(ICaptureFrameListener * pCapture) = 0;
Parameters
Parameters
Description
ICaptureFrameListener * pCapture
Address of the ICaptureFrameListener object to unregister
Outputs
returns true if successful, otherwise false
Description

This routine unregisters a callback address that was previously registered

IRenderer::UpdateShaderItem Method
C++
virtual void UpdateShaderItem(SShaderItem * pShaderItem, IMaterial * pMaterial) = 0;
IRenderer::UpdateTextureInVideoMemory Method
C++
virtual void UpdateTextureInVideoMemory(uint32 tnum, unsigned char * newdata, int posx, int posy, int w, int h, ETEX_Format eTFSrc = eTF_R8G8B8) = 0;
IRenderer::WriteDDS Method
C++
virtual bool WriteDDS(byte * dat, int wdt, int hgt, int Size, const char * name, ETEX_Format eF, int NumMips) = 0;
IRenderer::WriteJPG Method
C++
virtual bool WriteJPG(byte * dat, int wdt, int hgt, char * name, int src_bits_per_pixel, int nQuality = 100) = 0;
IRenderer::WriteTGA Method
C++
virtual bool WriteTGA(byte * dat, int wdt, int hgt, const char * name, int src_bits_per_pixel, int dest_bits_per_pixel) = 0;
IRenderer::RNDrawcallsMapMesh Nested Type
C++
typedef std::map< IRenderMesh*, IRenderer::SDrawCallCountInfo > RNDrawcallsMapMesh;
Description

Debug draw call info (per mesh)

IRenderer::RNDrawcallsMapMeshItor Nested Type
C++
typedef RNDrawcallsMapMesh::iterator RNDrawcallsMapMeshItor;
IRenderer::RNDrawcallsMapNode Nested Type
C++
typedef std::map< IRenderNode*, IRenderer::SDrawCallCountInfo > RNDrawcallsMapNode;
Description

Debug draw call info (per node)

IRenderer::RNDrawcallsMapNodeItor Nested Type
C++
typedef RNDrawcallsMapNode::iterator RNDrawcallsMapNodeItor;