关于unity3d meshrendererr,材质和DrawCall的关系是怎样的

UNITE2015BEIJING参会日志_影视攻略_影视知识_影视信息_百度攻略
相关攻略推荐
当前位置: > 文章阅读页
亚洲开发者大会 参会日志国家会议中心
精彩内容,尽在百度攻略: UNITE 2015 BEIJING大会于日至20日在北京国家会议中心中心召开,主题是“创造、连接、成就”。大会包含了新手训练营、VR Day、Keynote、国外技术、国内技术、游戏制作人、虚拟现实等多个版块。作为实验室一名新成员,我有幸能得到置身此大会的机会,并参与了精彩的开放式演讲与部分技术课程。精彩内容,尽在百度攻略:Unity上午我来到大会现场,四层与三层有着琳琅满目的会场,商户们展现了它们各式各样的互动体验式产品,包括头戴式显示器、游戏手环以及诸多虚拟游戏系统、游戏开发社区等。精彩内容,尽在百度攻略: 精彩内容,尽在百度攻略:上午四层大会堂进行了“Unity5中国首秀,此世代引擎霸气降临”的开放式演讲以及“Unity技术与艺术的完美碰撞-继承之物”的新媒体艺术秀。在开放式演讲中,Unity的创始人David Helgason为我们介绍了功能丰富的Unity5专业版与个人版引擎的强大技术与先进理念,涵盖了出色的图形绘制技术、渲染技术、云构建提供的高效率、多平台支持等性能。Rayn Payton的《Republique》游戏为我们展示了Unity5所能实现的逼真炫酷的游戏场景,包括自发光材质、状态集、音效等新型功能。下午的时间我主要参加了大中华区技术专场的四场演讲,包括“The Matrix:精彩内容,尽在百度攻略:全新的Unity移动游戏优化解决方案”、“Unity引擎的资源管理架构详解”、“3D移动游戏高级技术案例分享”与“最新Unity热门插件推荐及其使用技巧”。 精彩内容,尽在百度攻略:·The Matrix:全新的Unity移动游戏优化解决方案(张鑫)游戏优化中后期的问题:1.缺少大量人力、物力;2.缺乏优化经验。而Matrix游戏技术咨询包括游戏性能真机测试分析与Asset Bundle资源检测。游戏游戏性能真机测试分析根据用户需求反馈总体性能数据,包括CPU、内存、Modern Memory、DrawCall统计、渲染Triangle数量、VBO传播、Skinned Meshshulaing 、Rigidbody数量。资源使用包括Texture、Mesh、动画片段使用情况、音频、RenderTexture等,同时还有代码性能测试,生成崩溃信息报告。测试流程:1.Matrix插件集成性能检测;2.真人10-20min游戏测试;3.性能分析。精彩内容,尽在百度攻略: ·Unity引擎的资源管理架构详解常见问题:1.Miss问题(Editor/Runtime);2.内存问题(内存回收不掉/GC频繁);3.代码热更新问题。精彩内容,尽在百度攻略:同步问题:注意Unity的版本;将binary文件转化为Text;代码混淆:Parts of Managed Module。 精彩内容,尽在百度攻略:·3D移动游戏高级技术案例分享1.高表现力UIUI界面交互、3D、可移动,有自定义Button组。精彩内容,尽在百度攻略:·默认材质优化(Stencil/Mask,_Color,Clip)·Drawcall自动优化(尽量将Text放在Image上方,尽可能保证Image之间不存在不必要的重叠);·UI变色(材质vs顶点色)精彩内容,尽在百度攻略:材质的修改导致Drawcall增加,以及Canvas重建;顶点色的修改只是导致Canvas数据更新。·UI边框(Sliced & Fill Center)精彩内容,尽在百度攻略:Sliced模式的Sprite更节省纹理尺寸;中空的边框不应勾选Fill 。2.多人同屏动画动画的性能瓶颈有Drawcall,Mesh skinning,Animator Update。精彩内容,尽在百度攻略:最优化GameObject包括Animator Update与Mesh Skinning Update。 BakeMesh的几种用法:关键帧预bake加插值计算,全帧预bake不插值,实时bake不插值。关键帧预bake加插值计算:输入AnimationName与time,根据AnimationName找到blendsnape数值,根据time找到前后两个关键的blendsnape。实时bake不插值:场景中存在几个SkinnedMeshRenderer,实时bakeMesh作为模板,其他的角色(MeshRenderer)直接引用模板。精彩内容,尽在百度攻略:3.无缝大地形地形块的管理以九宫格的形式。卡顿的拟解决:避免过多的粒子系统,避免层级复杂解决过多。讲者介绍了Asset bundle的打包策略、加载策略(基础包常驻内存与预制包动态加载)与卸载方式(预制包、基础包)。4.新光照系统精彩内容,尽在百度攻略:包含了Uber Shader的引入与Enlighten简介与性能。·最新Unity热门插件推荐及其使用技巧 精彩内容,尽在百度攻略:资源篇1.Mesh Baker· 对网格进行Batch减少Drawcall(纹理拼合、网格拼合);精彩内容,尽在百度攻略:· 对Skinned Mesh进行Batch;合并后将原始模型的Bone保持Active;Disable原始模型的Skinned Mesh Renderer;确保原始的Animation始终在运行;如果需要MR与SMR一起合并,则需要保证在其在同一张Texture Atlas和Mesh容器中。· 将Mesh Renderer与Skinned Mesh Renderer一起合并。精彩内容,尽在百度攻略:2.SimpleLOD很棒的模型简化工具,用于Mesh的合并、Atlas烘焙、Mesh简化、LOD生成,减少Drawcall,并且支持Skinned Mesh,可在Run-time和Editor中使用,源码提供,No dll。 精彩内容,尽在百度攻略:功能篇1.Mobile Movie Texture仅支持OGG格式,可通过工具转换;支持视频暂停、播放点选取;支持透明区域分离(Alpha Split)。精彩内容,尽在百度攻略:2.Magic Splitscreen电视游戏分屏,应用于多人同时同地对战。3.Dynamic Bone精彩内容,尽在百度攻略:可以自然地模拟主体运动时的附属运动(头发、衣服等任何附属物件的动画);非常易用、无需代码;稳定和高效;适用于移动设备;源码提供。原理:对于每个附属物体,获取骨骼根节点和控制节点的Transform信息;根据这两个节点信息,根据设定参数计算运动。4.Wireframe Shader精彩内容,尽在百度攻略:线绘制效果更加出众;不需要DX11支持;支持Mobile;支持Skinned M支持Anti-atlasing;支持Lightmap/Shadow。5.See-Through System通过Camera生成的Depth Buffer来进行处理。精彩内容,尽在百度攻略:6.Realistic Effects Pack产生很棒的视觉效果,可用于移动设备。 精彩内容,尽在百度攻略:工具篇1.xARM:Aspect and Resolution Master·ScreenCap:选择想要适配的主流硬件设备;;精彩内容,尽在百度攻略:·xARM Preview:查看具体的适配效果(1:1 设备的真实尺寸,用来查看内容的布局以及内容的清晰度);·xARM Galary:适配效果缩略图2.Texture Overview Pro精彩内容,尽在百度攻略:检测项目中纹理Texture详细使用情况,以及Memory使用情况分析。3.Build Report Tool检测项目发布总体情况,包括发布选项、Size统计、Used Assets与Unused Assets。精彩内容,尽在百度攻略:
相似攻略推荐  本人是个小白,但是有个做技术的理想。
  关于合并网格和贴图这个问题困扰了我好久,问群友,逛论坛,翻帖子,或者说是我的愚笨吧,不过经过努力还是我解决了,测试通过,一个8drawcall的模型,合并后降到2drawcall,当然现在移动设备的性能都比较高了,不必过多纠结于drawcall,如果没这需要请路过吧。。。
  好的,废话不多说,我把代码贴出来。
1 using UnityE
2 using System.C
3 using System.Collections.G
4 using System.IO;
6 public class CombineMesher : MonoBehaviour
// Use this for initialization
void Start()
Combine(transform);
// Update is called once per frame
void Update()
public Transform Combine(Transform root)
float startTime = Time.realtimeSinceS
// The SkinnedMeshRenderers that will make up a character will be
// combined into one SkinnedMeshRenderers using one material.
// This will speed up rendering the resulting character.
// note:each SkinnedMeshRenderer must share a same material
List&CombineInstance& combineInstances = new List&CombineInstance&();
List&Material& materials = new List&Material&();
Material material = null;
List&Transform& bones = new List&Transform&();
Transform[] transforms = root.GetComponentsInChildren&Transform&();
List&Texture2D& textures = new List&Texture2D&();
int width = 0;
int height = 0;
int uvCount = 0;
List&Vector2[]& uvList = new List&Vector2[]&();
foreach (SkinnedMeshRenderer smr in root.GetComponentsInChildren&SkinnedMeshRenderer&())
if (material == null)
material = Instantiate(smr.sharedMaterial) as M
for (int sub = 0; sub & smr.sharedMesh.subMeshC sub++)
CombineInstance ci = new CombineInstance();
ci.mesh = smr.sharedM
ci.subMeshIndex =
combineInstances.Add(ci);
uvList.Add(smr.sharedMesh.uv);
uvCount += smr.sharedMesh.uv.L
if (smr.material.mainTexture != null)
textures.Add(smr.renderer.material.mainTexture as Texture2D);
width += smr.renderer.material.mainTexture.
height += smr.renderer.material.mainTexture.
// we need to recollect references to the bones we are using
foreach (Transform bone in smr.bones)
foreach (Transform transform in transforms)
if (transform.name != bone.name) continue;
bones.Add(transform);
Object.Destroy(smr.gameObject);
// Obtain and configure the SkinnedMeshRenderer attached to
// the character base.
SkinnedMeshRenderer r = root.gameObject.GetComponent&SkinnedMeshRenderer&();
r = root.gameObject.AddComponent&SkinnedMeshRenderer&();
r.sharedMesh = new Mesh();
//only set mergeSubMeshes true will combine meshs into single submesh
bineMeshes(combineInstances.ToArray(), true, false);
r.bones = bones.ToArray();
r.material =
Texture2D skinnedMeshAtlas = new Texture2D(1024, 512);
Rect[] packingResult = skinnedMeshAtlas.PackTextures(textures.ToArray(), 0);
Vector2[] atlasUVs = new Vector2[uvCount];
//as combine textures into single texture,so need recalculate uvs
int j = 0;
for (int i = 0; i & uvList.C i++)
foreach (Vector2 uv in uvList[i])
atlasUVs[j].x = Mathf.Lerp(packingResult[i].xMin, packingResult[i].xMax, uv.x);
atlasUVs[j].y = Mathf.Lerp(packingResult[i].yMin, packingResult[i].yMax, uv.y);
r.material.mainTexture = skinnedMeshA
r.sharedMesh.uv = atlasUVs;
Debug.Log("combine meshes takes : " + (Time.realtimeSinceStartup - startTime) * 1000 + " ms");
阅读(...) 评论()You are here:
IRenderer Structure
struct IRenderer {
IMaterial* m_pMtlSrc;
IMaterial* m_pMtlSrcParent;
int dstX, dstY;
int srcX, srcY;
int width,
BeginSubmitMask_Clear,
BeginSubmitMask_Inc,
BeginSubmitMask_Dec,
EndSubmitMask,
DisableMask
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, budgetT
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, processedL
float fWaitForMain;
float fWaitForRender;
float fWaitForGPU;
float fTimeProcessedRT;
float fTimeProcessedRTScene;
float fTimeProcessedGPU;
float fTimeGPUIdlePercent;
const uint32 MESH_NAME_LENGTH = 32;
const uint32 TYPE_NAME_LENGTH = 16;
Vec3 pPos;
uint8 nZpass, nShadows, nGeneral, nTransparent, nM
char meshName[MESH_NAME_LENGTH];
char typeName[TYPE_NAME_LENGTH];
IRenderer.h
IRenderer::ESFMaskOp Enumeration
enum ESFMaskOp {
BeginSubmitMask_Clear,
BeginSubmitMask_Inc,
BeginSubmitMask_Dec,
EndSubmitMask,
DisableMask
IRenderer.h
IRenderer::SArtProfileData Structure
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, budgetT
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, processedL
IRenderer.h
Description&
eArtProfileDetail_LightsAmbient&
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
enum EArtProfileSections {
eArtProfile_Shadows = 0,
eArtProfile_ZPass,
eArtProfile_Decals,
eArtProfile_Lighting,
eArtProfile_Opaque,
eArtProfile_Transparent,
eArtProfile_Max
IRenderer.h
IRenderer::SArtProfileData::EArtProfileUnit Enumeration
enum EArtProfileUnit {
eArtProfileUnit_GPU = 0,
eArtProfileUnit_CPU,
eArtProfile_NumUnits
IRenderer.h
IRenderer::SArtProfileData::EBreakdownDetailValues Enumeration
enum EBreakdownDetailValues {
eArtProfileDetail_LightsAmbient,
eArtProfileDetail_LightsCubemaps,
eArtProfileDetail_LightsDeferred,
eArtProfileDetail_LightsShadowMaps,
eArtProfileDetail_Reflections,
eArtProfileDetail_Caustics,
eArtProfileDetail_RefractionOverhead,
eArtProfileDetail_Rain,
eArtProfileDetail_LensOptics,
eArtProfileDetail_Max
IRenderer.h
Description&
eArtProfileDetail_LightsAmbient&
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
struct SDrawCallCountInfo {
const uint32
const uint32
uint8 , , , , ;
IRenderer.h
IRenderer::SDrawCallCountInfo::MESH_NAME_LENGTH Data Member
const uint32 MESH_NAME_LENGTH = 32;
IRenderer::SDrawCallCountInfo::meshName Data Member
char meshName[];
IRenderer::SDrawCallCountInfo::nGeneral Data Member
uint8 nGeneral;
IRenderer::SDrawCallCountInfo::nMisc Data Member
uint8 nMisc;
IRenderer::SDrawCallCountInfo::nShadows Data Member
uint8 nShadows;
IRenderer::SDrawCallCountInfo::nTransparent Data Member
uint8 nTransparent;
IRenderer::SDrawCallCountInfo::nZpass Data Member
uint8 nZpass;
IRenderer::SDrawCallCountInfo::pPos Data Member
Vec3 pPos;
IRenderer::SDrawCallCountInfo::TYPE_NAME_LENGTH Data Member
const uint32 TYPE_NAME_LENGTH = 16;
IRenderer::SDrawCallCountInfo::typeName Data Member
char typeName[];
IRenderer::SDrawCallCountInfo::SDrawCallCountInfo Constructor
SDrawCallCountInfo();
IRenderer::SDrawCallCountInfo::Update Method
void Update( * pObj, IRenderMesh * pRM);
IRenderer::SLoadShaderItemArgs Structure
Loads shader item for name (name).
struct SLoadShaderItemArgs {
IMaterial* ;
IMaterial* ;
IRenderer.h
IRenderer::SLoadShaderItemArgs::m_pMtlSrc Data Member
IMaterial* m_pMtlSrc;
IRenderer::SLoadShaderItemArgs::m_pMtlSrcParent Data Member
IMaterial* m_pMtlSrcParent;
IRenderer::SLoadShaderItemArgs::SLoadShaderItemArgs Constructor
SLoadShaderItemArgs(IMaterial* pMtlSrc, IMaterial* pMtlSrcParent);
IRenderer::SRenderTimes Structure
struct SRenderTimes {
float fWaitForMain;
float fWaitForRender;
float fWaitForGPU;
float fTimeProcessedRT;
float fTimeProcessedRTScene;
float fTimeProcessedGPU;
float fTimeGPUIdlePercent;
IRenderer.h
Description&
float fTimeProcessedRTS&
The part of the render thread between the &SCENE& profiler labels&
IRenderer::SUpdateRect Structure
struct SUpdateRect {
IRenderer.h
IRenderer::SUpdateRect::dstX Data Member
IRenderer::SUpdateRect::dstY Data Member
IRenderer::SUpdateRect::height Data Member
int height;
IRenderer::SUpdateRect::srcX Data Member
IRenderer::SUpdateRect::srcY Data Member
IRenderer::SUpdateRect::width Data Member
int width;
IRenderer::SUpdateRect::Set Method
void Set(int dx, int dy, int sx, int sy, int w, int h);
IRenderer::~IRenderer Destructor
virtual ~();
IRenderer::ActivateLayer Method
virtual void ActivateLayer(const char* pLayerName, bool activate) = 0;
IRenderer::AddListener Method
virtual void AddListener( * pRendererEventListener) = 0;
IRenderer::AllowGPUTimers2 Method
virtual void AllowGPUTimers2(bool bAllow) = 0;
IRenderer::BakeMesh Method
virtual bool BakeMesh(const SMeshBakingInputParams * pInputParams, SMeshBakingOutput * pReturnValues) = 0;
IRenderer::BeginFrame Method
virtual void BeginFrame() = 0;
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
virtual void BeginSpawningGeneratingRendItemJobs(int nThreadID) = 0;
IRenderer::BeginSpawningShadowGeneratingRendItemJobs Method
virtual void BeginSpawningShadowGeneratingRendItemJobs(int nThreadID) = 0;
IRenderer::BuildTerrainTexture Method
Builds terrain sector texture.
virtual void BuildTerrainTexture();
IRenderer::CaptureFrameBufferCallBack Method
virtual void CaptureFrameBufferCallBack() = 0;
Parameters
Parameters&
Description&
Description
This routine checks for any frame buffer callbacks that are needed and calls them
IRenderer::CaptureFrameBufferFast Method
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
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.
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.
virtual bool ChangeResolution(int nNewWidth, int nNewHeight, int nNewColDepth, int nNewRefreshHZ, bool bFullScreen, bool bForceReset) = 0;
IRenderer::ChangeViewport Method
Changes viewport size.
virtual void ChangeViewport(unsigned int x, unsigned int y, unsigned int width, unsigned int height, bool bMainViewport = false) = 0;
IRenderer::ClearBuffer Method
virtual void ClearBuffer(uint32 nFlags,
* vColor, float depth = 1.0f) = 0;
IRenderer::CloseCaptureFrameBufferFast Method
virtual void CloseCaptureFrameBufferFast() = 0;
Description
This routine releases the 2 surfaces used for frame capture by the
IRenderer::CollectDrawCallsInfo Method
virtual void CollectDrawCallsInfo(bool status) = 0;
IRenderer::CopyFrameBufferFast Method
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
If dstWidth or dstHeight is larger than the current surface dimensions, the dimensions of the surface are used for the copy
IRenderer::CreateContext Method
virtual bool CreateContext( hWnd, bool bAllowMSAA = false) = 0;
IRenderer::CreateOptics Method
virtual IOpticsElementBase* CreateOptics(EFlareType type) const = 0;
IRenderer::CreateRenderMesh Method
Creates/deletes RenderMesh object.
virtual _smart_ptr&IRenderMesh& CreateRenderMesh(const char * szType, const char * szSourceName, IRenderMesh::SInitParamerers * pInitParams = NULL, ERenderMeshType eBufType = eRMT_Static) = 0;
IRenderer::CreateRenderMeshInitialized Method
virtual _smart_ptr&IRenderMesh& CreateRenderMeshInitialized(const void * pVertBuffer, int nVertCount,
eVF, const vtx_idx* pIndices, int nIndices, const
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
virtual int CreateRenderTarget(int nWidth, int nHeight, ETEX_Format eTF) = 0;
IRenderer::CreateResourceAsync Method
virtual void CreateResourceAsync(* Resource) = 0;
IRenderer::CreateShaderPublicParams Method
virtual * CreateShaderPublicParams() = 0;
Description
Creates an Interface to the public params container. Return: Created
interface.
IRenderer::DeleteContext Method
virtual bool DeleteContext( hWnd) = 0;
IRenderer::DestroyRenderTarget Method
virtual bool DestroyRenderTarget(int nHandle) = 0;
IRenderer::DownLoadToVideoMemory Method
virtual unsigned int DownLoadToVideoMemory(unsigned char * data, int w, int h, ETEX_Format eTFSrc, ETEX_Format eTFDst, int nummipmap, bool repeat = true, int filter = , 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.
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;
IRenderer::Draw2dImageList Method
Draws all images to the screen that were collected with .
virtual void Draw2dImageList() = 0;
IRenderer::Draw2dImageStretchMode Method
virtual void Draw2dImageStretchMode(bool stretch) = 0;
IRenderer::Draw2dLabel Method (float, float, float, ColorF &, bool, char *, ...)
void Draw2dLabel(float x, float y, float font_size, const
& fColor, bool bCenter, const char * label_text, ...);
IRenderer::Draw2dLabel Method (float, float, float, float *, bool, char *, ...)
void Draw2dLabel(float x, float y, float font_size, const float * pfColor, bool bCenter, const char * label_text, ...);
IRenderer::DrawDynVB Method
Draws user primitives.
virtual void DrawDynVB(SVF_P3F_C4B_T2F * pBuf, uint16 * pInds, int nVerts, int nInds, const
nPrimType) = 0;
IRenderer::DrawImage Method
Draws a image using the current matrix.
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
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
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.
void DrawLabel(Vec3 pos, float font_size, const char * label_text, ...);
IRenderer::DrawLabelEx Method
void DrawLabelEx(Vec3 pos, float font_size, const float * pfColor, bool bFixedSize, bool bCenter, const char * label_text, ...);
IRenderer::DrawStringW Method
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 *)
virtual void DrawTextQueued(Vec3 pos,
& ti, const char * text) = 0;
Description
Draws text queued.
Position can be in 3d or in 2d depending on the flags.
IRenderer::DrawTextQueued Method (Vec3, SDrawTextInfo &, char *, va_list)
virtual void DrawTextQueued(Vec3 pos,
& ti, const char * format, va_list args) = 0;
Description
Draws text queued.
Position can be in 3d or in 2d depending on the flags.
IRenderer::DXTCompress Method
virtual bool DXTCompress( * raw_data, int nWidth, int nHeight, ETEX_Format eTF, bool bUseHW, bool bGenMips, int nSrcBytesPerPix, const Vec3 vLumWeight,
callback) = 0;
Parameters
Parameters&
Description&
const Vec3 vLumWeight&
0,0,0 if default should be used.&
Without header.
IRenderer::DXTDecompress Method
virtual bool DXTDecompress( * srcData, const size_t srcFileSize,
* dstData, int nWidth, int nHeight, int nMips, ETEX_Format eSrcTF, bool bUseHW, int nDstBytesPerPix) = 0;
IRenderer::EF_AddDeferredDecal Method
virtual bool EF_AddDeferredDecal(const
& rDecal);
IRenderer::Ef_AddDeferredGIClipVolume Method
virtual void Ef_AddDeferredGIClipVolume(const IRenderMesh * pClipVolume, const Matrix34& mxTransform) = 0;
Description
Deferred clip volumes
IRenderer::EF_AddDeferredLight Method
virtual int EF_AddDeferredLight(const
& pLight, float fMult, const SRenderingPassInfo & passInfo, const SRendItemSorter & rendItemSorter) = 0;
Description
Deferred lights/vis areas
IRenderer::EF_AddDeferredVisArea Method
virtual void EF_AddDeferredVisArea(const
* pVisArea) = 0;
IRenderer::EF_ADDDlight Method
virtual void EF_ADDDlight( * Source, const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_AddEf Method
Adds shader to the list.
virtual void EF_AddEf( * pRE, & pSH,
* pObj, const SRenderingPassInfo & passInfo, int nList, int nAW, const SRendItemSorter & rendItemSorter) = 0;
IRenderer::EF_AddMultipleParticlesToScene Method
virtual void EF_AddMultipleParticlesToScene(const * 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 &)
virtual * EF_AddPolygonToScene(& si, * 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 &)
virtual * EF_AddPolygonToScene(& si, int numPts, const SVF_P3F_C4B_T2F * verts, const SPipTangents * tangs,
* obj, const SRenderingPassInfo & passInfo, uint16 * inds, int ninds, int nAW, const SRendItemSorter & rendItemSorter) = 0;
IRenderer::EF_AddWaterSimHit Method
virtual void EF_AddWaterSimHit(const Vec3 & vPos, const float scale, const float strength) = 0;
IRenderer::EF_ClearDeferredLightsList Method
virtual void EF_ClearDeferredLightsList() = 0;
IRenderer::EF_ClearDeferredVisAreasList Method
virtual void EF_ClearDeferredVisAreasList() = 0;
IRenderer::EF_ClearLightsList Method
void EF_ClearLightsList();
Description
For FC Compatibility.
IRenderer::EF_ClearSkinningDataPool Method
virtual void EF_ClearSkinningDataPool() = 0;
IRenderer::EF_CreateCompositeTexture Method
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).
* EF_CreateRE( edt) = 0;
IRenderer::EF_CreateRemappedSkinningData Method
virtual * EF_CreateRemappedSkinningData(uint32 nNumBones,
* pSourceSkinningData, uint32 nCustomDataSize, uint32 pairGuid) = 0;
IRenderer::EF_CreateSkinningData Method
virtual * EF_CreateSkinningData(uint32 nNumBones, bool bNeedJobSyncVar) = 0;
IRenderer::EF_DisableTemporalEffects Method
virtual void EF_DisableTemporalEffects() = 0;
IRenderer::EF_DuplicateRO Method
* EF_DuplicateRO( * pObj, const
* pROII, const SRenderingPassInfo & passInfo) = 0;
Description
Get permanent RenderObject
IRenderer::EF_EndEf2D Method
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
virtual void EF_EndEf3D(const int nFlags, const int nPrecacheUpdateId, const int nNearPrecacheUpdateId, const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_GetDeferredLights Method
virtual TArray&&* EF_GetDeferredLights(const SRenderingPassInfo & passInfo, const
eLightType = eDLT_DeferredLight) = 0;
IRenderer::EF_GetDeferredLightsNum Method
virtual uint32 EF_GetDeferredLightsNum(const
eLightType = eDLT_DeferredLight) = 0;
IRenderer::EF_GetObjData Method
* EF_GetObjData( * pObj, bool bCreate, int nThreadID) = 0;
IRenderer::EF_GetObject_Temp Method
for RE transformation. Get temporary RenderObject
* EF_GetObject_Temp(int nThreadID) = 0;
IRenderer::EF_GetPostEffectID Method
virtual int32 EF_GetPostEffectID(const char* pPostEffectName) = 0;
IRenderer::EF_GetPostEffectParam Method
virtual void EF_GetPostEffectParam(const char * pParam, float & fValue) = 0;
IRenderer::EF_GetPostEffectParamString Method
virtual void EF_GetPostEffectParamString(const char * pParam, const char* & pszArg) = 0;
IRenderer::EF_GetPostEffectParamVec4 Method
virtual void EF_GetPostEffectParamVec4(const char * pParam, Vec4 & pValue) = 0;
IRenderer::EF_GetRemapedShaderMaskGen Method
Remaps shader gen mask to common global mask.
virtual uint64 EF_GetRemapedShaderMaskGen(const char * name, uint64 nMaskGen = 0, bool bFixup = 0) = 0;
IRenderer::EF_GetRenderQuality Method
Gets renderer quality.
EF_GetRenderQuality() const = 0;
IRenderer::EF_GetShaderGlobalMaskGenFromString Method
virtual uint64 EF_GetShaderGlobalMaskGenFromString(const char * szShaderName, const char * szShaderGen, uint64 nMaskGen = 0) = 0;
IRenderer::EF_GetShaderMissLogPath Method
virtual const char* EF_GetShaderMissLogPath() = 0;
IRenderer::EF_GetShaderNames Method
virtual string * EF_GetShaderNames(int& nNumShaders) = 0;
IRenderer::EF_GetShaderQuality Method
Gets shader type quality.
EF_GetShaderQuality( eST) = 0;
IRenderer::EF_GetSkinningPoolID Method
virtual int EF_GetSkinningPoolID() = 0;
IRenderer::EF_GetStringFromShaderGlobalMaskGen Method
virtual const char * EF_GetStringFromShaderGlobalMaskGen(const char * szShaderName, uint64 nMaskGen = 0) = 0;
IRenderer::EF_GetTextureByID Method
Gets texture object by ID.
virtual ITexture * EF_GetTextureByID(int Id) = 0;
IRenderer::EF_GetTextureByName Method
Gets texture object by Name.
virtual ITexture * EF_GetTextureByName(const char * name, uint32 flags = 0) = 0;
IRenderer::EF_GetVisAreaStencilRef Method
virtual uint8 EF_GetVisAreaStencilRef(const
* pVisArea, const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_GetWaterZElevation Method
virtual float EF_GetWaterZElevation(float fX, float fY) = 0;
IRenderer::EF_InvokeShadowMapRenderJobs Method
virtual void EF_InvokeShadowMapRenderJobs(const int nFlags) = 0;
IRenderer::EF_IsFakeDLight Method
virtual bool EF_IsFakeDLight(const
* Source) = 0;
IRenderer::EF_LoadDynTexture Method
Loads the texture for name(nameTex).
virtual IDynTextureSource * EF_LoadDynTexture(const char* dynsourceName, bool sharedRT = false) = 0;
IRenderer::EF_LoadLightmap Method
Loads lightmap for name.
virtual int EF_LoadLightmap(const char * name) = 0;
IRenderer::EF_LoadShader Method
Loads shader for name (name).
* EF_LoadShader(const char * name, int flags = 0, uint64 nMaskGen = 0) = 0;
IRenderer::EF_LoadShaderItem Method
EF_LoadShaderItem(const char * szName, bool bShare, int flags = 0,
* Res = NULL, uint64 nMaskGen = 0, const * pArgs = 0) = 0;
IRenderer::EF_LoadTexture Method
Loads the texture for name(nameTex).
virtual ITexture * EF_LoadTexture(const char* nameTex, const uint32 flags = 0) = 0;
IRenderer::EF_PrecacheResource Method (CDLight *, float, float, int, int)
virtual bool EF_PrecacheResource( * pLS, float fMipFactor, float fTimeToReady, int Flags, int nUpdateId) = 0;
IRenderer::EF_PrecacheResource Method (IRenderMesh *, IMaterial *, float, float, int, int)
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)
virtual bool EF_PrecacheResource( * pSH, float fMipFactor, float fTimeToReady, int Flags) = 0;
IRenderer::EF_PrecacheResource Method (ITexture *, float, float, int, int, int)
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)
virtual bool EF_PrecacheResource( * 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 .
void EF_Query( eQuery);
Parameters
Parameters&
Description&
e.g. EFQ_GetShaderCombinations.&
Input/Output Parameter, depends on the query if written to/read from, or both&
IRenderer::EF_Query Method (ERenderQueryTypes, T &)
template &typename T& void EF_Query( eQuery, T & rInOut);
IRenderer::EF_Query Method (ERenderQueryTypes, T0 &, T1 &)
template &typename T0, typename T1& void EF_Query( eQuery, T0 & rInOut0, T1 & rInOut1);
IRenderer::EF_ReleaseDeferredData Method
virtual void EF_ReleaseDeferredData() = 0;
Description
called in between levels to
IRenderer::EF_ReleaseInputShaderResource Method
virtual void EF_ReleaseInputShaderResource( * pRes) = 0;
Description
called in between levels to
IRenderer::EF_ReloadFile Method
Reloads file
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
virtual bool EF_ReloadFile_Request(const char * szFileName) = 0;
IRenderer::EF_ReloadShaderFiles Method
Reinitializes all shader files (build hash tables).
virtual void EF_ReloadShaderFiles(int nCategory) = 0;
IRenderer::EF_ReloadTextures Method
Reloads all texture files.
virtual void EF_ReloadTextures() = 0;
IRenderer::EF_RenderEnvironmentCubeHDR Method
virtual bool EF_RenderEnvironmentCubeHDR(int size, Vec3& Pos, TArray&unsigned short&& vecData) = 0;
IRenderer::EF_ResetPostEffects Method
virtual void EF_ResetPostEffects(bool bOnSpecChange = false) = 0;
IRenderer::EF_SetPostEffectParam Method
virtual void EF_SetPostEffectParam(const char * pParam, float fValue, bool bForceValue = false) = 0;
Description
Post processing effects interfaces
IRenderer::EF_SetPostEffectParamString Method
virtual void EF_SetPostEffectParamString(const char * pParam, const char * pszArg) = 0;
IRenderer::EF_SetPostEffectParamVec4 Method
virtual void EF_SetPostEffectParamVec4(const char * pParam, const Vec4 & pValue, bool bForceValue = false) = 0;
IRenderer::EF_SetShaderMissCallback Method
virtual void EF_SetShaderMissCallback( callback) = 0;
Description
Shaders/Shaders management
IRenderer::EF_SetShaderQuality Method
virtual void EF_SetShaderQuality( eST,
IRenderer::EF_StartEf Method
Starts using of the shaders (return first index for allow recursions).
virtual void EF_StartEf(const SRenderingPassInfo & passInfo) = 0;
IRenderer::EF_UpdateDLight Method
virtual bool EF_UpdateDLight( * pDL) = 0;
IRenderer::EnableBatchMode Method
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
virtual bool EnableFog(bool enable) = 0;
IRenderer::EnableGPUTimers2 Method
virtual void EnableGPUTimers2(bool bEnabled) = 0;
IRenderer::EnableLevelUnloading Method
virtual void EnableLevelUnloading(bool enable) = 0;
Description
Flag level unloading in progress to disable f.i. rendermesh creation requests
IRenderer::EnablePipelineProfiler Method
virtual void EnablePipelineProfiler(bool bEnable) = 0;
IRenderer::EnableSwapBuffers Method
virtual void EnableSwapBuffers(bool bEnable) = 0;
IRenderer::EnableTerrainAO Method
virtual void EnableTerrainAO(const bool bEnabled) = 0;
Description
allows to enable/disable TerrainAO on a per-level base
IRenderer::EnableVSync Method
virtual void EnableVSync(bool enable) = 0;
The following functions will be removed.
IRenderer::EndFrame Method
virtual void EndFrame() = 0;
Should be called at the end of every frame.
IRenderer::EndSpawningGeneratingRendItemJobs Method
virtual void EndSpawningGeneratingRendItemJobs(int nThreadID) = 0;
IRenderer::EnumAAFormats Method
Returns all supported by video card video AA formats.
virtual int EnumAAFormats( * Formats) = 0;
IRenderer::EnumDisplayFormats Method
virtual int EnumDisplayFormats( * Formats) = 0;
Number of formats in memory.
Description
Creates array of all supported video formats (except low resolution formats).
IRenderer::ExecuteAsyncDIP Method
virtual void ExecuteAsyncDIP() = 0;
IRenderer::FillArtProfileData Method
virtual void FillArtProfileData( & data, SArtProfileData::EArtProfileUnit unit) = 0;
IRenderer::FlushPendingTextureTasks Method
virtual void FlushPendingTextureTasks() = 0;
IRenderer::FlushRTCommands Method
virtual bool FlushRTCommands(bool bWait, bool bImmediatelly, bool bForce) = 0;
IRenderer::FlushTextMessages Method
virtual void FlushTextMessages() = 0;
IRenderer::FontCreateTexture Method
virtual int FontCreateTexture(int Width, int Height,
* pData, ETEX_Format eTF = eTF_A8R8G8B8, bool genMips = false) = 0;
IRenderer::FontReleaseTexture Method
virtual void FontReleaseTexture(class CFBitmap * pBmp) = 0;
IRenderer::FontRestoreRenderingState Method
virtual void FontRestoreRenderingState() = 0;
IRenderer::FontSetBlending Method
virtual void FontSetBlending(int src, int dst) = 0;
IRenderer::FontSetRenderingState Method
virtual void FontSetRenderingState(unsigned int nVirtualScreenWidth, unsigned int nVirtualScreenHeight) = 0;
IRenderer::FontSetTexture Method (class CFBitmap*, int)
virtual void FontSetTexture(class CFBitmap*, int nFilterMode) = 0;
IRenderer::FontSetTexture Method (int, int)
virtual void FontSetTexture(int nTexId, int nFilterMode) = 0;
IRenderer::FontUpdateTexture Method
virtual bool FontUpdateTexture(int nTexId, int X, int Y, int USize, int VSize,
* pData) = 0;
IRenderer::FontUploadTexture Method
virtual bool FontUploadTexture(class CFBitmap*, ETEX_Format eTF = eTF_A8R8G8B8) = 0;
Description
Replacement functions for Font
IRenderer::ForceGC Method
Toggles render mesh garbage collection
virtual void ForceGC() = 0;
IRenderer::ForceSwapBuffers Method
virtual void ForceSwapBuffers() = 0;
Description
Force a swap on the backbuffer
IRenderer::ForceUpdateShaderItem Method
virtual void ForceUpdateShaderItem( * pShaderItem, IMaterial * pMaterial) = 0;
IRenderer::FreeResources Method
Frees the allocated resources.
virtual void FreeResources(int nFlags) = 0;
IRenderer::GetBandwidthStats Method
Gets textures streaming bandwidth information
virtual void GetBandwidthStats(float * fBandwidthRequested) = 0;
IRenderer::GetCamera Method
Gets the renderer camera.
virtual const & GetCamera() = 0;
IRenderer::GetCloakFadeLightScale Method
virtual float GetCloakFadeLightScale() const = 0;
IRenderer::GetColorBpp Method
Gets current bpp.
virtual int GetColorBpp() = 0;
IRenderer::GetCurrentContextHWND Method
GetCurrentContextHWND() = 0;
IRenderer::GetCurrentDrawCallRTTimes Method
virtual float GetCurrentDrawCallRTTimes(const uint32 EFSListMask) = 0;
IRenderer::GetCurrentNumberOfDrawCalls Method ()
virtual int GetCurrentNumberOfDrawCalls() = 0;
IRenderer::GetCurrentNumberOfDrawCalls Method (int &, int &)
virtual void GetCurrentNumberOfDrawCalls(int & nGeneral, int & nShadowGen) = 0;
IRenderer::GetCurrentNumberOfDrawCalls Method (uint32)
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.
virtual int GetDepthBpp() = 0;
IRenderer::GetFeatures Method
virtual int GetFeatures() = 0;
IRenderer::GetFinalizeRendItemJobState Method
virtual JobManager::SJobState * GetFinalizeRendItemJobState(int nThreadID) = 0;
IRenderer::GetFinalizeShadowRendItemJobState Method
virtual JobManager::SJobState * GetFinalizeShadowRendItemJobState(int nThreadID) = 0;
IRenderer::GetFrameID Method
virtual int GetFrameID(bool bIncludeRecursiveCalls = true) = 0;
IRenderer::GetGenerateRendItemJobState Method
get the shared job state for SRendItem Generating jobs
virtual JobManager::SJobState * GetGenerateRendItemJobState(int nThreadID) = 0;
IRenderer::GetGenerateRendItemJobStatePreProcess Method
virtual JobManager::SJobState * GetGenerateRendItemJobStatePreProcess(int nThreadID) = 0;
IRenderer::GetGenerateShadowRendItemJobState Method
virtual JobManager::SJobState * GetGenerateShadowRendItemJobState(int nThreadID) = 0;
IRenderer::GetGPUCount Method
virtual uint32 GetGPUCount() const = 0;
IRenderer::GetGPUFrameTime Method
virtual float GetGPUFrameTime() = 0;
IRenderer::GetHeight Method
Gets height of the main rendering resolution.
virtual int GetHeight() = 0;
IRenderer::GetHWND Method
GetHWND() = 0;
IRenderer::GetIColorGradingController Method
virtual * GetIColorGradingController() = 0;
IRenderer::GetImageCaps Method
virtual bool GetImageCaps(const char* filename, int& width, int& height) const = 0;
IRenderer::GetIRenderAuxGeom Method
Interface for auxiliary geometry (for debugging, editor purposes, etc.)
virtual * GetIRenderAuxGeom() = 0;
IRenderer::GetIStereoRenderer Method
virtual IStereoRenderer* GetIStereoRenderer() = 0;
IRenderer::GetMaxTextureSize Method
virtual int GetMaxTextureSize() = 0;
IRenderer::GetMemoryUsage Method
Gets memory status information
virtual void GetMemoryUsage(ICrySizer* Sizer) = 0;
IRenderer::GetMemoryUsageParticleREs Method
virtual void GetMemoryUsageParticleREs(ICrySizer * pSizer);
IRenderer::GetModelViewMatrix Method
virtual void GetModelViewMatrix(float * mat) = 0;
For editor.
IRenderer::GetMTRenderInfo Method
virtual const & GetMTRenderInfo() const = 0;
IRenderer::GetNativeHeight Method
Gets height of the potentially native resolution framebuffer used for UI and debug output.
virtual int GetNativeHeight() = 0;
IRenderer::GetNativeWidth Method
Gets width of the potentially native resolution framebuffer used for UI and debug output.
virtual int GetNativeWidth() = 0;
IRenderer::GetNearestRangeMax Method
Returns values of nearest rendering z-range max
virtual float GetNearestRangeMax() const = 0;
IRenderer::GetNumGeomInstanceDrawCalls Method
virtual int GetNumGeomInstanceDrawCalls() = 0;
IRenderer::GetNumGeomInstances Method
virtual int GetNumGeomInstances() = 0;
IRenderer::GetOcclusionBuffer Method
virtual int GetOcclusionBuffer(uint16* pOutOcclBuffer, int32 nSizeX, int32 nSizeY, Matrix44* pmViewProj, Matrix44* pmCamBuffer) = 0;
IRenderer::GetPixelAspectRatio Method
Gets Pixel Aspect Ratio.
virtual float GetPixelAspectRatio() const = 0;
IRenderer::GetPolyCount Method ()
virtual int GetPolyCount() = 0;
virtual void GetPolyCount(int & nPolygons, int & nShadowVolPolys) = 0;
For stats.
IRenderer::GetPolygonCountByType Method
virtual int GetPolygonCountByType(uint32 EFSList,
vct, uint32 z, bool bCalledFromMainThread = true) = 0;
IRenderer::GetProjectionMatrix Method
virtual void GetProjectionMatrix(float * mat) = 0;
For editor.
IRenderer::GetRenderTimes Method
virtual void GetRenderTimes( & outTimes) = 0;
IRenderer::GetRenderType Method
GetRenderType() const = 0;
IRenderer::GetRPPStats Method
virtual const * GetRPPStats( eStat, bool bCalledFromMainThread = true) = 0;
IRenderer::GetRPPStatsArray Method
virtual const * GetRPPStatsArray(bool bCalledFromMainThread = true) = 0;
IRenderer::GetScreenAspect Method
GetScreenAspect(int nWidth, int nHeight) = 0;
IRenderer::GetShaderProfile Method
virtual const
& GetShaderProfile( eST) const = 0;
IRenderer::GetShadowFrustumMGPUCache Method
virtual ShadowFrustumMGPUCache* GetShadowFrustumMGPUCache() = 0;
IRenderer::GetShadowJittering Method
virtual float GetShadowJittering() const = 0;
IRenderer::GetStencilBpp Method
Gets current stencil bits.
virtual int GetStencilBpp() = 0;
IRenderer::GetTextureFormatDataSize Method
virtual int GetTextureFormatDataSize(int nWidth, int nHeight, int nDepth, int nMips, ETEX_Format eTF) = 0;
IRenderer::GetTextureFormatName Method
virtual const char * GetTextureFormatName(ETEX_Format eTF) = 0;
IRenderer::GetThreadIDs Method
virtual void GetThreadIDs(threadID& mainThreadID, threadID& renderThreadID) const = 0;
IRenderer::GetVideoMemoryUsageStats Method
virtual void GetVideoMemoryUsageStats(size_t& vidMemUsedThisFrame, size_t& vidMemUsedRecently, bool bGetPoolsSizes = false) = 0;
IRenderer::GetViewport Method
virtual void GetViewport(int * x, int * y, int * width, int * height) = 0;
IRenderer::GetWhiteTextureId Method
Gets the white texture Id.
virtual int GetWhiteTextureId() const = 0;
IRenderer::GetWidth Method
Gets width of the main rendering resolution.
virtual int GetWidth() = 0;
IRenderer::Graph Method
virtual void Graph( * g, int x, int y, int wdt, int hgt, int nC, int type, char * text, & color, float fScale) = 0;
IRenderer::Init Method
Initializes the renderer, params are self-explanatory.
Init(int x, int y, int width, int height, unsigned int cbpp, int zbpp, int sbits, bool fullscreen,
Glhwnd = 0, bool bReInit = false, const * pCustomArgs = 0, bool bShaderCacheGen = false) = 0;
IRenderer::InitCaptureFrameBufferFast Method
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.&
returns true if surfaces were created otherwise returns false&
Description
This routine initializes 2 destination surfaces for use by the
routine It also, captures the current backbuffer into one of the created surfaces
IRenderer::InitSystemResources Method
Creates default system shaders and textures.
virtual void InitSystemResources(int nFlags) = 0;
IRenderer::IsDebugRenderNode Method
virtual bool IsDebugRenderNode(* pRenderNode) const = 0;
IRenderer::IsMultiGPUModeActive Method
virtual bool IsMultiGPUModeActive() const = 0;
IRenderer::IsPost3DRendererEnabled Method
virtual bool IsPost3DRendererEnabled() const;
IRenderer::IsRenderingIntroMovies Method
virtual bool IsRenderingIntroMovies() const = 0;
IRenderer::IsStereoEnabled Method
Returns true if stereo rendering is enabled.
virtual bool IsStereoEnabled() const = 0;
IRenderer::IsStereoModeChangePending Method
Determine if a switch to stereo mode will occur at the start of the next frame
virtual bool IsStereoModeChangePending() = 0;
IRenderer::LoadShaderLevelCache Method
virtual bool LoadShaderLevelCache() = 0;
IRenderer::LoadShaderStartupCache Method
virtual bool LoadShaderStartupCache() = 0;
IRenderer::LockParticleVideoMemory Method
Lock/Unlock the video memory buffer used by particles when using the jobsystem
virtual void LockParticleVideoMemory(uint32 nId) = 0;
IRenderer::MakeMainContextActive Method
virtual void MakeMainContextActive() = 0;
IRenderer::MakeMatrix Method
virtual void MakeMatrix(const Vec3 & pos, const Vec3 & angles, const Vec3 & scale, Matrix34* mat) = 0;
IRenderer::MergeImages Method
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
virtual void OffsetPosition(const Vec3 & delta) = 0;
IRenderer::OnEntityDeleted Method
virtual void OnEntityDeleted(struct
* pRenderNode) = 0;
IRenderer::PauseTimer Method
virtual void PauseTimer(bool bPause) = 0;
Used for pausing timer related stuff.
For texture animations, and shader 'time' parameter.
IRenderer::PopMatrix Method
virtual void PopMatrix() = 0;
IRenderer::PopProfileMarker Method
virtual void PopProfileMarker(char* label) = 0;
IRenderer::PopWireframeMode Method
virtual void PopWireframeMode() = 0;
IRenderer::PostInit Method
virtual void PostInit() = 0;
IRenderer::PostLevelLoading Method
virtual void PostLevelLoading() = 0;
IRenderer::PostLevelUnload Method
virtual void PostLevelUnload() = 0;
IRenderer::ProcessVoxTerrainDebugTarget Method
virtual void ProcessVoxTerrainDebugTarget(int * pSrcTexIds, int nMipsNum, bool bOnlySetSrcTexture = true);
IRenderer::ProjectToScreen Method
Projects to screen. Returns true if successful.
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 . If several images will be drawn, using this function is more efficient than calling
as it allows better batching. The function supports placing images in stereo 3d space.
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
virtual uint16 PushFogVolumeContribution(const & fogVolumeContrib, const SRenderingPassInfo & passInfo) = 0;
IRenderer::PushMatrix Method
virtual void PushMatrix() = 0;
IRenderer::PushProfileMarker Method
virtual void PushProfileMarker(char* label) = 0;
IRenderer::PushWireframeMode Method
Sets the polygon mode with Push, Pop restores the last used one
virtual void PushWireframeMode(int mode) = 0;
Wireframe, solid.
IRenderer::ReadFrameBuffer Method
virtual void ReadFrameBuffer(unsigned char * pRGB, int nImageX, int nSizeX, int nSizeY,
eRBType, bool bRGBA, int nScaledX = -1, int nScaledY = -1) = 0;
IRenderer::ReadFrameBufferFast Method
virtual void ReadFrameBufferFast(uint32* pDstARGBA8, int dstWidth, int dstHeight) = 0;
IRenderer::RegisterCaptureFrame Method
virtual bool RegisterCaptureFrame( * pCapture) = 0;
Parameters
Parameters&
Description&
ICaptureFrameListener * pCapture&
Address of the
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.
virtual void Release() = 0;
IRenderer::ReleaseResourceAsync Method
virtual void ReleaseResourceAsync(* Resource) = 0;
IRenderer::RemoveListener Method
virtual void RemoveListener( * pRendererEventListener) = 0;
IRenderer::RemoveTexture Method
virtual void RemoveTexture(unsigned int TextureId) = 0;
IRenderer::RenderDebug Method
virtual void RenderDebug(bool bRenderStats = true) = 0;
r_ShowDynTextures
IRenderer::RequestFlushAllPendingTextureStreamingJobs Method
virtual void RequestFlushAllPendingTextureStreamingJobs(int nFrames);
Description
for one frame allows to disable limit of texture streaming requests
IRenderer::RequestTerrainTexture Method
virtual IDynTexture * RequestTerrainTexture( & params);
IRenderer::ResetToDefault Method
virtual void ResetToDefault() = 0;
IRenderer::RestoreGamma Method
Restores gamma
virtual void RestoreGamma() = 0;
Reset gamma setting if not in fullscreen mode.
IRenderer::RT_CurThreadList Method
virtual int RT_CurThreadList() = 0;
IRenderer::RT_FlashRemoveTexture Method
virtual void RT_FlashRemoveTexture(ITexture* pTexture) = 0;
IRenderer::RT_FlashRender Method
virtual void RT_FlashRender(* pPlayer, bool stereo) = 0;
IRenderer::RT_FlashRenderPlaybackLockless Method
virtual void RT_FlashRenderPlaybackLockless(* pPlayer, int cbIdx, bool stereo, bool finalPlayback) = 0;
IRenderer::RT_InsertGpuCallback Method
virtual void RT_InsertGpuCallback(uint32 context,
callback) = 0;
Description
platform specific
IRenderer::SaveTga Method
Saves source data to a Tga file.
virtual bool SaveTga(unsigned char * sourcedata, int sourceformat, int w, int h, const char * filename, bool flip) const = 0;
Should not be here.
IRenderer::ScaleCoord Method
virtual void ScaleCoord(float& x, float& y) const = 0;
IRenderer::ScaleCoordX Method
virtual float ScaleCoordX(float value) const = 0;
IRenderer::ScaleCoordY Method
virtual float ScaleCoordY(float value) const = 0;
IRenderer::ScreenShot Method
Gets a screenshot and save to a file
virtual bool ScreenShot(const char * filename = NULL, int width = 0) = 0;
true=success
IRenderer::ScreenToTexture Method
virtual int ScreenToTexture(int nTexID) = 0;
IRenderer::Set2DMode Method
virtual void Set2DMode(bool enable, int ortox, int ortoy, float znear = -1e10f, float zfar = 1e10f) = 0;
IRenderer::SetCamera Method
Sets the renderer camera.
virtual void SetCamera(const
& cam) = 0;
IRenderer::SetClearColor Method
virtual void SetClearColor(const Vec3 & vColor) = 0;
3d engine set this color to fog color.
IRenderer::SetCloakFadeLightScale Method
virtual void SetCloakFadeLightScale(float fColorScale) = 0;
IRenderer::SetCloakParams Method
virtual void SetCloakParams(const & cloakParams) = 0;
IRenderer::SetCloudShadowsParams Method
virtual void SetCloudShadowsParams(int nTexID, const Vec3& speed, float tiling, bool invert, float brightness) = 0;
IRenderer::SetColorOp Method
virtual void SetColorOp( eCo,
IRenderer::SetCullMode Method
virtual void SetCullMode(int mode = ) = 0;
IRenderer::SetCurrentContext Method
virtual bool SetCurrentContext( hWnd) = 0;
IRenderer::SetDebugRenderNode Method
virtual void SetDebugRenderNode(* pRenderNode) = 0;
IRenderer::SetDefaultMaterials Method
virtual void SetDefaultMaterials(IMaterial * pDefMat, IMaterial * pTerrainDefMat) = 0;
IRenderer::SetFogColor Method
virtual void SetFogColor(const & color) = 0;
IRenderer::SetGammaDelta Method
Sets delta gamma.
virtual bool SetGammaDelta(const float fGamma) = 0;
IRenderer::SetMaterialColor Method
virtual void SetMaterialColor(float r, float g, float b, float a) = 0;
IRenderer::SetRendererCVar Method
virtual void SetRendererCVar(* pCVar, const char* pArgText, const bool bSilentMode = false) = 0;
IRenderer::SetRenderTarget Method
virtual bool SetRenderTarget(int nHandle, int nFlags = 0) = 0;
IRenderer::SetRenderTile Method
virtual void SetRenderTile(f32 nTilesPosX = 0.f, f32 nTilesPosY = 0.f, f32 nTilesGridSizeX = 1.f, f32 nTilesGridSizeY = 1.f) = 0;
IRenderer::SetScissor Method
virtual void SetScissor(int x = 0, int y = 0, int width = 0, int height = 0) = 0;
IRenderer::SetShadowJittering Method
virtual void SetShadowJittering(float fShadowJittering) = 0;
IRenderer::SetShouldCopyScreenToBackBuffer Method
Set whether or not the screen should be copied into the back buffer each frame
virtual void SetShouldCopyScreenToBackBuffer(bool bEnable) = 0;
IRenderer::SetState Method
virtual void SetState(int State, int AlphaRef = -1) = 0;
IRenderer::SetTerrainAONodes Method
virtual void SetTerrainAONodes(PodArray&& * terrainAONodes) = 0;
IRenderer::SetTexture Method
Sets the current binded texture.
virtual void SetTexture(int tnum) = 0;
IRenderer::SetTexturePrecaching Method
virtual void SetTexturePrecaching(bool stat) = 0;
IRenderer::SetTexturesStreamingGlobalMipFactor Method
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
virtual void SetTextureStreamListener(* pListener) = 0;
IRenderer::SetViewport Method
virtual void SetViewport(int x, int y, int width, int height, int id = 0) = 0;
IRenderer::SetViewportDownscale Method
virtual Vec2 SetViewportDownscale(float xscale, float yscale) = 0;
IRenderer::SetWhiteTexture Method
Sets the white texture.
virtual void SetWhiteTexture() = 0;
IRenderer::SF_ConfigMask Method
virtual void SF_ConfigMask( maskOp, unsigned int stencilRef) = 0;
IRenderer::SF_CreateTexture Method
virtual int SF_CreateTexture(int width, int height, int numMips, unsigned char* pData, ETEX_Format eTF, int flags) = 0;
IRenderer::SF_DrawBlurRect Method
virtual void SF_DrawBlurRect(const
* pParams) = 0;
IRenderer::SF_DrawGlyphClear Method
virtual void SF_DrawGlyphClear(const & params) = 0;
IRenderer::SF_DrawIndexedTriList Method
virtual void SF_DrawIndexedTriList(int baseVertexIndex, int minVertexIndex, int numVertices, int startIndex, int triangleCount, const & params) = 0;
IRenderer::SF_DrawLineStrip Method
virtual void SF_DrawLineStrip(int baseVertexIndex, int lineCount, const & params) = 0;
IRenderer::SF_Flush Method
virtual void SF_Flush() = 0;
IRenderer::SF_GetMeshMaxSize Method
virtual void SF_GetMeshMaxSize(int& numVertices, int& numIndices) const = 0;
IRenderer::SF_MapTexture Method
virtual bool SF_MapTexture(int texID, int level, void*& pBits, uint32& pitch) = 0;
IRenderer::SF_UnmapTexture Method
virtual bool SF_UnmapTexture(int texID, int level) = 0;
IRenderer::SF_UpdateTexture Method
virtual bool SF_UpdateTexture(int texId, int mipLevel, int numRects, const * pRects, unsigned char* pData, size_t pitch, ETEX_Format eTF) = 0;
IRenderer::ShutDown Method
Shuts down the renderer.
virtual void ShutDown(bool bReInit = false) = 0;
IRenderer::ShutDownFast Method
virtual void ShutDownFast() = 0;
IRenderer::StartLoadtimeFlashPlayback Method
virtual void StartLoadtimeFlashPlayback(* pCallback) = 0;
IRenderer::StartRenderIntroMovies Method
virtual void StartRenderIntroMovies() = 0;
Description
start active rendering of the intro movies while initializing the rest of the engine
IRenderer::StopLoadtimeFlashPlayback Method
virtual void StopLoadtimeFlashPlayback() = 0;
IRenderer::StopRenderIntroMovies Method
virtual void StopRenderIntroMovies(bool bWaitForFinished) = 0;
IRenderer::SwitchToNativeResolutionBackbuffer Method
Switches subsequent rendering from the internal backbuffer to the native resolution backbuffer if available.
virtual void SwitchToNativeResolutionBackbuffer() = 0;
IRenderer::SyncComputeVerticesJobs Method
Wait for all particle ComputeVertices jobs to finish
virtual void SyncComputeVerticesJobs() = 0;
IRenderer::TextToScreen Method
virtual void TextToScreen(float x, float y, const char * format, ...);
IRenderer::TextToScreenColor Method
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
virtual void TryFlush() = 0;
IRenderer::UnloadShaderLevelCache Method
virtual void UnloadShaderLevelCache() = 0;
IRenderer::UnloadShaderStartupCache Method
virtual void UnloadShaderStartupCache() = 0;
IRenderer::UnLockParticleVideoMemory Method
virtual void UnLockParticleVideoMemory(uint32 nId) = 0;
IRenderer::UnProject Method
Unprojects to screen.
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.
virtual int UnProjectFromScreen(float sx, float sy, float sz, float * px, float * py, float * pz) = 0;
IRenderer::UnRegisterCaptureFrame Method
virtual bool UnRegisterCaptureFrame( * pCapture) = 0;
Parameters
Parameters&
Description&
ICaptureFrameListener * pCapture&
Address of the
object to unregister&
returns true if successful, otherwise false&
Description
This routine unregisters a callback address that was previously registered
IRenderer::UpdateShaderItem Method
virtual void UpdateShaderItem( * pShaderItem, IMaterial * pMaterial) = 0;
IRenderer::UpdateTextureInVideoMemory Method
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
virtual bool WriteDDS( * dat, int wdt, int hgt, int Size, const char * name, ETEX_Format eF, int NumMips) = 0;
IRenderer::WriteJPG Method
virtual bool WriteJPG( * dat, int wdt, int hgt, char * name, int src_bits_per_pixel, int nQuality = 100) = 0;
IRenderer::WriteTGA Method
virtual bool WriteTGA( * dat, int wdt, int hgt, const char * name, int src_bits_per_pixel, int dest_bits_per_pixel) = 0;
IRenderer::RNDrawcallsMapMesh Nested Type
typedef std::map& IRenderMesh*,
& RNDrawcallsMapMesh;
Description
Debug draw call info (per mesh)
IRenderer::RNDrawcallsMapMeshItor Nested Type
typedef RNDrawcallsMapMesh::iterator RNDrawcallsMapMeshItor;
IRenderer::RNDrawcallsMapNode Nested Type
typedef std::map& *,
& RNDrawcallsMapNode;
Description
Debug draw call info (per node)
IRenderer::RNDrawcallsMapNodeItor Nested Type
typedef RNDrawcallsMapNode::iterator RNDrawcallsMapNodeItor;
In This Topic

我要回帖

更多关于 unity3d meshrenderer 的文章

 

随机推荐