Irrlicht 3D Engine
IVideoDriver.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __IRR_I_VIDEO_DRIVER_H_INCLUDED__
6 #define __IRR_I_VIDEO_DRIVER_H_INCLUDED__
7 
8 #include "rect.h"
9 #include "SColor.h"
10 #include "ITexture.h"
11 #include "irrArray.h"
12 #include "matrix4.h"
13 #include "plane3d.h"
14 #include "dimension2d.h"
15 #include "position2d.h"
16 #include "SMaterial.h"
17 #include "IMeshBuffer.h"
18 #include "triangle3d.h"
19 #include "EDriverTypes.h"
20 #include "EDriverFeatures.h"
21 #include "SExposedVideoData.h"
22 
23 namespace irr
24 {
25 namespace io
26 {
27  class IAttributes;
28  struct SAttributeReadWriteOptions;
29  class IReadFile;
30  class IWriteFile;
31 } // end namespace io
32 namespace scene
33 {
34  class IMeshBuffer;
35  class IMesh;
36  class IMeshManipulator;
37  class ISceneNode;
38 } // end namespace scene
39 
40 namespace video
41 {
42  struct S3DVertex;
43  struct S3DVertex2TCoords;
44  struct S3DVertexTangents;
45  struct SLight;
46  class IImageLoader;
47  class IImageWriter;
48  class IMaterialRenderer;
49  class IGPUProgrammingServices;
50 
53  {
55  ETS_VIEW = 0,
68 #if _IRR_MATERIAL_MAX_TEXTURES_>4
69  ETS_TEXTURE_4,
71 #if _IRR_MATERIAL_MAX_TEXTURES_>5
72  ETS_TEXTURE_5,
74 #if _IRR_MATERIAL_MAX_TEXTURES_>6
75  ETS_TEXTURE_6,
77 #if _IRR_MATERIAL_MAX_TEXTURES_>7
78  ETS_TEXTURE_7,
80 #endif
81 #endif
82 #endif
83 #endif
84  ETS_COUNT
86  };
87 
89 
93  {
99  ELR_RTTS = 4,
102  };
103 
105 
107  {
130  };
131 
134  {
138  };
139 
140  const c8* const FogTypeNames[] =
141  {
142  "FogExp",
143  "FogLinear",
144  "FogExp2",
145  0
146  };
147 
149  {
153 
156 
159 
161  bool Enabled;
162 
164  SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false) {}
165 
167  void apply(SMaterial& material)
168  {
169  if (Enabled)
170  {
171  for (u32 i=0; i<32; ++i)
172  {
173  const u32 num=(1<<i);
174  if (EnableFlags & num)
175  {
176  switch (num)
177  {
178  case EMF_WIREFRAME: material.Wireframe = Material.Wireframe; break;
179  case EMF_POINTCLOUD: material.PointCloud = Material.PointCloud; break;
180  case EMF_GOURAUD_SHADING: material.GouraudShading = Material.GouraudShading; break;
181  case EMF_LIGHTING: material.Lighting = Material.Lighting; break;
182  case EMF_ZBUFFER: material.ZBuffer = Material.ZBuffer; break;
183  case EMF_ZWRITE_ENABLE: material.ZWriteEnable = Material.ZWriteEnable; break;
184  case EMF_BACK_FACE_CULLING: material.BackfaceCulling = Material.BackfaceCulling; break;
185  case EMF_FRONT_FACE_CULLING: material.FrontfaceCulling = Material.FrontfaceCulling; break;
186  case EMF_BILINEAR_FILTER: material.TextureLayer[0].BilinearFilter = Material.TextureLayer[0].BilinearFilter; break;
187  case EMF_TRILINEAR_FILTER: material.TextureLayer[0].TrilinearFilter = Material.TextureLayer[0].TrilinearFilter; break;
189  case EMF_FOG_ENABLE: material.FogEnable = Material.FogEnable; break;
190  case EMF_NORMALIZE_NORMALS: material.NormalizeNormals = Material.NormalizeNormals; break;
191  case EMF_TEXTURE_WRAP:
192  material.TextureLayer[0].TextureWrapU = Material.TextureLayer[0].TextureWrapU;
193  material.TextureLayer[0].TextureWrapV = Material.TextureLayer[0].TextureWrapV;
194  break;
195  case EMF_ANTI_ALIASING: material.AntiAliasing = Material.AntiAliasing; break;
196  case EMF_COLOR_MASK: material.ColorMask = Material.ColorMask; break;
197  case EMF_COLOR_MATERIAL: material.ColorMaterial = Material.ColorMaterial; break;
198  case EMF_USE_MIP_MAPS: material.UseMipMaps = Material.UseMipMaps; break;
199  case EMF_BLEND_OPERATION: material.BlendOperation = Material.BlendOperation; break;
200  case EMF_POLYGON_OFFSET:
202  material.PolygonOffsetFactor = Material.PolygonOffsetFactor; break;
203  }
204  }
205  }
206  }
207  }
208 
209  };
210 
212  {
214  E_COLOR_PLANE colorMask=ECP_ALL,
215  E_BLEND_FACTOR blendFuncSrc=EBF_ONE,
217  E_BLEND_OPERATION blendOp=EBO_NONE) :
218  RenderTexture(texture),
219  TargetType(ERT_RENDER_TEXTURE), ColorMask(colorMask),
220  BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst),
221  BlendOp(blendOp) {}
223  E_COLOR_PLANE colorMask=ECP_ALL,
224  E_BLEND_FACTOR blendFuncSrc=EBF_ONE,
226  E_BLEND_OPERATION blendOp=EBO_NONE) :
227  RenderTexture(0),
228  TargetType(target), ColorMask(colorMask),
229  BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst),
230  BlendOp(blendOp) {}
231  bool operator!=(const IRenderTarget& other) const
232  {
233  return ((RenderTexture != other.RenderTexture) ||
234  (TargetType != other.TargetType) ||
235  (ColorMask != other.ColorMask) ||
236  (BlendFuncSrc != other.BlendFuncSrc) ||
237  (BlendFuncDst != other.BlendFuncDst) ||
238  (BlendOp != other.BlendOp));
239  }
246  };
247 
249 
256  class IVideoDriver : public virtual IReferenceCounted
257  {
258  public:
259 
261 
278  virtual bool beginScene(bool backBuffer=true, bool zBuffer=true,
279  SColor color=SColor(255,0,0,0),
280  const SExposedVideoData& videoData=SExposedVideoData(),
281  core::rect<s32>* sourceRect=0) =0;
282 
284 
287  virtual bool endScene() =0;
288 
290 
293  virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const =0;
294 
296 
300  virtual void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true) =0;
301 
303 
319  virtual const io::IAttributes& getDriverAttributes() const=0;
320 
322 
325  virtual bool checkDriverReset() =0;
326 
328 
331  virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) =0;
332 
334 
336  virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const =0;
337 
339 
340  virtual u32 getImageLoaderCount() const = 0;
341 
343 
346  virtual IImageLoader* getImageLoader(u32 n) = 0;
347 
349 
350  virtual u32 getImageWriterCount() const = 0;
351 
353 
356  virtual IImageWriter* getImageWriter(u32 n) = 0;
357 
359 
361  virtual void setMaterial(const SMaterial& material) =0;
362 
364 
373  virtual ITexture* getTexture(const io::path& filename) = 0;
374 
376 
385  virtual ITexture* getTexture(io::IReadFile* file) =0;
386 
388 
394  virtual ITexture* getTextureByIndex(u32 index) =0;
395 
397 
398  virtual u32 getTextureCount() const = 0;
399 
401 
403  virtual void renameTexture(ITexture* texture, const io::path& newName) = 0;
404 
406 
415  virtual ITexture* addTexture(const core::dimension2d<u32>& size,
416  const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0;
417 
419 
429  virtual ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData=0) = 0;
430 
432 
443  virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
444  const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
445 
447 
454  virtual void removeTexture(ITexture* texture) =0;
455 
457 
463  virtual void removeAllTextures() =0;
464 
466  virtual void removeHardwareBuffer(const scene::IMeshBuffer* mb) =0;
467 
469  virtual void removeAllHardwareBuffers() =0;
470 
472 
473  virtual void addOcclusionQuery(scene::ISceneNode* node,
474  const scene::IMesh* mesh=0) =0;
475 
477  virtual void removeOcclusionQuery(scene::ISceneNode* node) =0;
478 
480  virtual void removeAllOcclusionQueries() =0;
481 
483 
485  virtual void runOcclusionQuery(scene::ISceneNode* node, bool visible=false) =0;
486 
488 
490  virtual void runAllOcclusionQueries(bool visible=false) =0;
491 
493 
495  virtual void updateOcclusionQuery(scene::ISceneNode* node, bool block=true) =0;
496 
498 
500  virtual void updateAllOcclusionQueries(bool block=true) =0;
501 
503 
506  virtual u32 getOcclusionQueryResult(scene::ISceneNode* node) const =0;
507 
509 
525  virtual void makeColorKeyTexture(video::ITexture* texture,
526  video::SColor color,
527  bool zeroTexels = false) const =0;
528 
530 
542  virtual void makeColorKeyTexture(video::ITexture* texture,
543  core::position2d<s32> colorKeyPixelPos,
544  bool zeroTexels = false) const =0;
545 
547 
554  virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) const =0;
555 
557 
588  virtual bool setRenderTarget(video::ITexture* texture,
589  bool clearBackBuffer=true, bool clearZBuffer=true,
590  SColor color=video::SColor(0,0,0,0)) =0;
591 
593 
604  virtual bool setRenderTarget(E_RENDER_TARGET target, bool clearTarget=true,
605  bool clearZBuffer=true,
606  SColor color=video::SColor(0,0,0,0)) =0;
607 
609  virtual bool setRenderTarget(const core::array<video::IRenderTarget>& texture,
610  bool clearBackBuffer=true, bool clearZBuffer=true,
611  SColor color=video::SColor(0,0,0,0)) =0;
612 
614 
617  virtual void setViewPort(const core::rect<s32>& area) =0;
618 
620 
621  virtual const core::rect<s32>& getViewPort() const =0;
622 
624 
638  virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,
639  const void* indexList, u32 primCount,
642  E_INDEX_TYPE iType=EIT_16BIT) =0;
643 
645 
664  virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount,
665  const void* indexList, u32 primCount,
668  E_INDEX_TYPE iType=EIT_16BIT) =0;
669 
671 
679  void drawIndexedTriangleList(const S3DVertex* vertices,
680  u32 vertexCount, const u16* indexList, u32 triangleCount)
681  {
682  drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT);
683  }
684 
686 
695  u32 vertexCount, const u16* indexList, u32 triangleCount)
696  {
697  drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLES, EIT_16BIT);
698  }
699 
701 
710  u32 vertexCount, const u16* indexList, u32 triangleCount)
711  {
712  drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLES, EIT_16BIT);
713  }
714 
716 
724  void drawIndexedTriangleFan(const S3DVertex* vertices,
725  u32 vertexCount, const u16* indexList, u32 triangleCount)
726  {
727  drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
728  }
729 
731 
740  u32 vertexCount, const u16* indexList, u32 triangleCount)
741  {
742  drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
743  }
744 
746 
755  u32 vertexCount, const u16* indexList, u32 triangleCount)
756  {
757  drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
758  }
759 
761 
775  virtual void draw3DLine(const core::vector3df& start,
776  const core::vector3df& end, SColor color = SColor(255,255,255,255)) =0;
777 
779 
792  virtual void draw3DTriangle(const core::triangle3df& triangle,
793  SColor color = SColor(255,255,255,255)) =0;
794 
796 
807  virtual void draw3DBox(const core::aabbox3d<f32>& box,
808  SColor color = SColor(255,255,255,255)) =0;
809 
811 
814  virtual void draw2DImage(const video::ITexture* texture,
815  const core::position2d<s32>& destPos) =0;
816 
818 
833  virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
834  const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,
835  SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false) =0;
836 
838 
857  virtual void draw2DImageBatch(const video::ITexture* texture,
858  const core::position2d<s32>& pos,
859  const core::array<core::rect<s32> >& sourceRects,
860  const core::array<s32>& indices,
861  s32 kerningWidth=0,
862  const core::rect<s32>* clipRect=0,
863  SColor color=SColor(255,255,255,255),
864  bool useAlphaChannelOfTexture=false) =0;
865 
867 
882  virtual void draw2DImageBatch(const video::ITexture* texture,
883  const core::array<core::position2d<s32> >& positions,
884  const core::array<core::rect<s32> >& sourceRects,
885  const core::rect<s32>* clipRect=0,
886  SColor color=SColor(255,255,255,255),
887  bool useAlphaChannelOfTexture=false) =0;
888 
890 
899  virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
900  const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,
901  const video::SColor * const colors=0, bool useAlphaChannelOfTexture=false) =0;
902 
904 
911  virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos,
912  const core::rect<s32>* clip =0) =0;
913 
915 
931  virtual void draw2DRectangle(const core::rect<s32>& pos,
932  SColor colorLeftUp, SColor colorRightUp,
933  SColor colorLeftDown, SColor colorRightDown,
934  const core::rect<s32>* clip =0) =0;
935 
937 
940  virtual void draw2DRectangleOutline(const core::recti& pos,
941  SColor color=SColor(255,255,255,255)) =0;
942 
944 
949  virtual void draw2DLine(const core::position2d<s32>& start,
950  const core::position2d<s32>& end,
951  SColor color=SColor(255,255,255,255)) =0;
952 
954 
957  virtual void drawPixel(u32 x, u32 y, const SColor& color) =0;
958 
960 
972  virtual void draw2DPolygon(core::position2d<s32> center,
973  f32 radius,
974  video::SColor color=SColor(100,255,255,255),
975  s32 vertexCount=10) =0;
976 
978 
991  virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0) =0;
992 
994 
1013  virtual void drawStencilShadow(bool clearStencilBuffer=false,
1014  video::SColor leftUpEdge = video::SColor(255,0,0,0),
1015  video::SColor rightUpEdge = video::SColor(255,0,0,0),
1016  video::SColor leftDownEdge = video::SColor(255,0,0,0),
1017  video::SColor rightDownEdge = video::SColor(255,0,0,0)) =0;
1018 
1020 
1021  virtual void drawMeshBuffer(const scene::IMeshBuffer* mb) =0;
1022 
1024 
1028  virtual void drawMeshBufferNormals(const scene::IMeshBuffer* mb, f32 length=10.f, SColor color=0xffffffff) =0;
1029 
1031 
1047  virtual void setFog(SColor color=SColor(0,255,255,255),
1048  E_FOG_TYPE fogType=EFT_FOG_LINEAR,
1049  f32 start=50.0f, f32 end=100.0f, f32 density=0.01f,
1050  bool pixelFog=false, bool rangeFog=false) =0;
1051 
1053  virtual void getFog(SColor& color, E_FOG_TYPE& fogType,
1054  f32& start, f32& end, f32& density,
1055  bool& pixelFog, bool& rangeFog) = 0;
1056 
1058 
1059  virtual ECOLOR_FORMAT getColorFormat() const =0;
1060 
1062 
1063  virtual const core::dimension2d<u32>& getScreenSize() const =0;
1064 
1066 
1070  virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const =0;
1071 
1073 
1078  virtual s32 getFPS() const =0;
1079 
1081 
1085  virtual u32 getPrimitiveCountDrawn( u32 mode =0 ) const =0;
1086 
1088  virtual void deleteAllDynamicLights() =0;
1089 
1093  virtual s32 addDynamicLight(const SLight& light) =0;
1094 
1096 
1097  virtual u32 getMaximalDynamicLightAmount() const =0;
1098 
1100 
1101  virtual u32 getDynamicLightCount() const =0;
1102 
1104 
1107  virtual const SLight& getDynamicLight(u32 idx) const =0;
1108 
1112  virtual void turnLightOn(s32 lightIndex, bool turnOn) =0;
1113 
1115 
1117  virtual const wchar_t* getName() const =0;
1118 
1120 
1126  virtual void addExternalImageLoader(IImageLoader* loader) =0;
1127 
1129 
1135  virtual void addExternalImageWriter(IImageWriter* writer) =0;
1136 
1138 
1141  virtual u32 getMaximalPrimitiveCount() const =0;
1142 
1144 
1153  virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled=true) =0;
1154 
1156 
1159  virtual bool getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const =0;
1160 
1162 
1170  virtual IImage* createImageFromFile(const io::path& filename) = 0;
1171 
1173 
1180  virtual IImage* createImageFromFile(io::IReadFile* file) =0;
1181 
1183 
1190  virtual bool writeImageToFile(IImage* image, const io::path& filename, u32 param = 0) = 0;
1191 
1193 
1201  virtual bool writeImageToFile(IImage* image, io::IWriteFile* file, u32 param =0) =0;
1202 
1204 
1218  virtual IImage* createImageFromData(ECOLOR_FORMAT format,
1219  const core::dimension2d<u32>& size, void *data,
1220  bool ownForeignMemory=false,
1221  bool deleteMemory = true) =0;
1222 
1224 
1230  virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) =0;
1231 
1233 
1239  _IRR_DEPRECATED_ virtual IImage* createImage(ECOLOR_FORMAT format, IImage *imageToCopy) =0;
1240 
1242 
1249  _IRR_DEPRECATED_ virtual IImage* createImage(IImage* imageToCopy,
1250  const core::position2d<s32>& pos,
1251  const core::dimension2d<u32>& size) =0;
1252 
1254 
1261  virtual IImage* createImage(ITexture* texture,
1262  const core::position2d<s32>& pos,
1263  const core::dimension2d<u32>& size) =0;
1264 
1266 
1268  virtual void OnResize(const core::dimension2d<u32>& size) =0;
1269 
1271 
1291  virtual s32 addMaterialRenderer(IMaterialRenderer* renderer, const c8* name =0) =0;
1292 
1294 
1298  virtual IMaterialRenderer* getMaterialRenderer(u32 idx) =0;
1299 
1301 
1302  virtual u32 getMaterialRendererCount() const =0;
1303 
1305 
1314  virtual const c8* getMaterialRendererName(u32 idx) const =0;
1315 
1317 
1322  virtual void setMaterialRendererName(s32 idx, const c8* name) =0;
1323 
1325 
1334  virtual io::IAttributes* createAttributesFromMaterial(const video::SMaterial& material,
1335  io::SAttributeReadWriteOptions* options=0) =0;
1336 
1338 
1344  virtual void fillMaterialStructureFromAttributes(video::SMaterial& outMaterial, io::IAttributes* attributes) =0;
1345 
1347 
1350  virtual const SExposedVideoData& getExposedVideoData() =0;
1351 
1353 
1354  virtual E_DRIVER_TYPE getDriverType() const =0;
1355 
1357 
1360  virtual IGPUProgrammingServices* getGPUProgrammingServices() =0;
1361 
1363  virtual scene::IMeshManipulator* getMeshManipulator() =0;
1364 
1366 
1372  virtual void clearZBuffer() =0;
1373 
1375 
1377 
1379 
1383  virtual video::ITexture* findTexture(const io::path& filename) = 0;
1384 
1386 
1394  virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false) =0;
1395 
1397 
1403  virtual void enableClipPlane(u32 index, bool enable) =0;
1404 
1406 
1407  virtual void setMinHardwareBufferVertexCount(u32 count) =0;
1408 
1410 
1414  virtual SOverrideMaterial& getOverrideMaterial() =0;
1415 
1417 
1430  virtual SMaterial& getMaterial2D() =0;
1431 
1433 
1435  virtual void enableMaterial2D(bool enable=true) =0;
1436 
1438  virtual core::stringc getVendorInfo() =0;
1439 
1441 
1444  virtual void setAmbientLight(const SColorf& color) =0;
1445 
1447 
1450  virtual void setAllowZWriteOnTransparent(bool flag) =0;
1451 
1453  virtual core::dimension2du getMaxTextureSize() const =0;
1454 
1456 
1465  virtual void convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN,
1466  void* dP, ECOLOR_FORMAT dF) const =0;
1467  };
1468 
1469 } // end namespace video
1470 } // end namespace irr
1471 
1472 
1473 #endif
E_RENDER_TARGET
Special render targets, which usually map to dedicated hardware.
Definition: IVideoDriver.h:106
SMaterial Material
The Material values.
Definition: IVideoDriver.h:151
u8 ZBuffer
Is the ZBuffer enabled? Default: ECFN_LESSEQUAL.
Definition: SMaterial.h:366
Is backface culling enabled? Default: true.
E_BLEND_FACTOR
Flag for EMT_ONETEXTURE_BLEND, ( BlendFactor ) BlendFunc = source * sourceFactor + dest * destFactor...
Definition: SMaterial.h:23
u32 EnableFlags
Which values are taken for override.
Definition: IVideoDriver.h:154
Provides a generic interface for attributes and their values and the possiblity to serialize them...
Definition: IAttributes.h:41
#define _IRR_DEPRECATED_
Defines a deprecated macro which generates a warning at compile time.
Definition: irrTypes.h:195
bool FrontfaceCulling
Is frontface culling enabled? Default: false.
Definition: SMaterial.h:428
Is fog enabled? Default: false.
Interface providing read acess to a file.
Definition: IReadFile.h:17
E_PRIMITIVE_TYPE
Enumeration for all primitive types there are.
E_BLEND_FACTOR BlendFuncSrc
Definition: IVideoDriver.h:243
u8 ColorMaterial
Defines the interpretation of vertex color in the lighting equation.
Definition: SMaterial.h:387
Auxiliary buffer 1.
Definition: IVideoDriver.h:123
float f32
32 bit floating point variable.
Definition: irrTypes.h:104
const c8 *const FogTypeNames[]
Definition: IVideoDriver.h:140
bool PointCloud
Draw as point cloud or filled triangles? Default: false.
Definition: SMaterial.h:410
Is the ZBuffer enabled? Default: true.
bool UseMipMaps
Shall mipmaps be used if available.
Definition: SMaterial.h:439
bool TrilinearFilter
Is trilinear filtering enabled? Default: false.
u8 ColorMask
Defines the enabled color planes.
Definition: SMaterial.h:379
char c8
8 bit character variable.
Definition: irrTypes.h:31
Scene node interface.
Definition: ISceneNode.h:40
void drawIndexedTriangleList(const S3DVertex *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)
Draws an indexed triangle list.
Definition: IVideoDriver.h:679
Flag for blend operation.
bool GouraudShading
Flat or Gouraud shading? Default: true.
Definition: SMaterial.h:413
3d triangle template class for doing collision detection and other things.
Definition: triangle3d.h:20
IRenderTarget(E_RENDER_TARGET target, E_COLOR_PLANE colorMask=ECP_ALL, E_BLEND_FACTOR blendFuncSrc=EBF_ONE, E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA, E_BLEND_OPERATION blendOp=EBO_NONE)
Definition: IVideoDriver.h:222
struct holding data describing options
Auxiliary buffer 3.
Definition: IVideoDriver.h:127
u8 TextureWrapU
Texture Clamp Mode.
E_BLEND_OPERATION
Values defining the blend operation used when blend is enabled.
Definition: SMaterial.h:39
E_LOST_RESOURCE
enumeration for signaling resources which were lost after the last render cycle
Definition: IVideoDriver.h:92
ECOLOR_FORMAT
An enum for the color format of textures used by the Irrlicht Engine.
Definition: SColor.h:17
Everything in the Irrlicht Engine can be found in this namespace.
Definition: aabbox3d.h:12
bool Enabled
Global enable flag, overwritten by the SceneManager in each pass.
Definition: IVideoDriver.h:161
void drawIndexedTriangleFan(const S3DVertex *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)
Draws an indexed triangle fan.
Definition: IVideoDriver.h:724
ColorMaterial enum for vertex color interpretation.
E_BLEND_OPERATION BlendOperation
Store the blend operation of choice.
Definition: SMaterial.h:392
Render target is the main color frame buffer.
Definition: IVideoDriver.h:109
Interface providing write access to a file.
Definition: IWriteFile.h:17
ColorMask bits, for enabling the color planes.
src & dest (1, 1, 1, 1)
Definition: SMaterial.h:26
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition: S3DVertex.h:25
Interface for software image data.
Definition: IImage.h:22
Projection transformation.
Definition: IVideoDriver.h:59
Class which holds the geometry of an object.
Definition: IMesh.h:23
SOverrideMaterial()
Default constructor.
Definition: IVideoDriver.h:164
Is bilinear filtering enabled? Default: true.
void drawIndexedTriangleList(const S3DVertexTangents *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)
Draws an indexed triangle list.
Definition: IVideoDriver.h:709
Render target is a render texture.
Definition: IVideoDriver.h:111
unsigned short u16
16 bit unsigned variable.
Definition: irrTypes.h:40
Vertex with two texture coordinates.
Definition: S3DVertex.h:109
E_COLOR_PLANE
Enum values for enabling/disabling color planes for rendering.
Definition: SMaterial.h:83
No blending happens.
Definition: SMaterial.h:41
All texture are lost, rare problem.
Definition: IVideoDriver.h:97
bool operator!=(const IRenderTarget &other) const
Definition: IVideoDriver.h:231
E_TRANSFORMATION_STATE
enumeration for geometry transformation states
Definition: IVideoDriver.h:52
Class which is able to create a image from a file.
Definition: IImageLoader.h:26
signed int s32
32 bit signed variable.
Definition: irrTypes.h:66
Struct for holding a mesh with a single material.
Definition: IMeshBuffer.h:39
E_DRIVER_TYPE
An enum for all types of drivers the Irrlicht Engine supports.
Definition: EDriverTypes.h:14
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:29
Interface for material rendering.
bool BackfaceCulling
Is backface culling enabled? Default: true.
Definition: SMaterial.h:425
u8 AntiAliasing
Sets the antialiasing mode.
Definition: SMaterial.h:372
Unknown color format:
Definition: SColor.h:55
E_BLEND_FACTOR BlendFuncDst
Definition: IVideoDriver.h:244
IRenderTarget(ITexture *texture, E_COLOR_PLANE colorMask=ECP_ALL, E_BLEND_FACTOR blendFuncSrc=EBF_ONE, E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA, E_BLEND_OPERATION blendOp=EBO_NONE)
Definition: IVideoDriver.h:213
Render target is the main color frame buffer.
Definition: IVideoDriver.h:115
World transformation.
Definition: IVideoDriver.h:57
The whole device/driver is lost.
Definition: IVideoDriver.h:95
Render target is the right color buffer (left is the main buffer)
Definition: IVideoDriver.h:117
Normalizes normals. Default: false.
Auxiliary buffer 2.
Definition: IVideoDriver.h:125
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:58
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
Definition: S3DVertex.h:21
Explicitly set all vertices for each triangle.
Texture transformation.
Definition: IVideoDriver.h:67
void drawIndexedTriangleFan(const S3DVertex2TCoords *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)
Draws an indexed triangle fan.
Definition: IVideoDriver.h:739
Texture transformation.
Definition: IVideoDriver.h:61
Auxiliary buffer 0.
Definition: IVideoDriver.h:121
standard vertex used by the Irrlicht engine.
Definition: S3DVertex.h:42
u8 PolygonOffsetFactor
Factor specifying how far the polygon offset should be made.
Definition: SMaterial.h:397
src & dest (1-srcA, 1-srcA, 1-srcA, 1-srcA)
Definition: SMaterial.h:32
E_FOG_TYPE
Enum for the types of fog distributions to choose from.
Definition: IVideoDriver.h:133
structure for holding data describing a dynamic point light.
Definition: SLight.h:41
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition: IVideoDriver.h:256
bool NormalizeNormals
Should normals be normalized?
Definition: SMaterial.h:435
Is anisotropic filtering? Default: false.
Flag for enabling/disabling mipmap usage.
bool FogEnable
Is fog enabled? Default: false.
Definition: SMaterial.h:431
Class representing a 32 bit ARGB color.
Definition: SColor.h:201
u8 AnisotropicFilter
Is anisotropic filtering enabled? Default: 0, disabled.
bool BilinearFilter
Is bilinear filtering enabled? Default: true.
View transformation.
Definition: IVideoDriver.h:55
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
Definition: matrix4.h:45
All planes enabled.
Definition: SMaterial.h:98
May be written to the zbuffer or is it readonly. Default: true.
Will this material be lighted? Default: true.
Render to both stereo buffers at once.
Definition: IVideoDriver.h:119
Texture transformation.
Definition: IVideoDriver.h:63
Self reallocating template array (like stl vector) with additional features.
Definition: irrArray.h:22
E_VIDEO_DRIVER_FEATURE
enumeration for querying features of the video driver.
Texture transformation.
Definition: IVideoDriver.h:65
u16 EnablePasses
Set in which render passes the material override is active.
Definition: IVideoDriver.h:157
bool Lighting
Will this material be lighted? Default: true.
Definition: SMaterial.h:416
bool ZWriteEnable
Is the zbuffer writeable or is it read-only. Default: true.
Definition: SMaterial.h:422
E_TEXTURE_CREATION_FLAG
Enumeration flags telling the video driver in which format textures should be created.
Definition: ITexture.h:22
SMaterialLayer TextureLayer[MATERIAL_MAX_TEXTURES]
Texture layer array.
Definition: SMaterial.h:297
E_POLYGON_OFFSET PolygonOffsetDirection
Flag defining the direction the polygon offset is applied to.
Definition: SMaterial.h:401
void drawIndexedTriangleFan(const S3DVertexTangents *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)
Draws an indexed triangle fan.
Definition: IVideoDriver.h:754
Interface of a Video Driver dependent Texture.
Definition: ITexture.h:98
Base class of most objects of the Irrlicht Engine.
structure for holding data describing a driver and operating system specific data.
Multi-Render target textures.
Definition: IVideoDriver.h:113
E_VERTEX_TYPE
Enumeration for all vertex types there are.
Definition: S3DVertex.h:18
void drawIndexedTriangleList(const S3DVertex2TCoords *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)
Draws an indexed triangle list.
Definition: IVideoDriver.h:694
bool Wireframe
Draw as wireframe or filled triangles? Default: false.
Definition: SMaterial.h:407
The HW buffers are lost, will be recreated automatically, but might require some more time this frame...
Definition: IVideoDriver.h:101
Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha...
Definition: SColor.h:32
An interface for easy manipulation of meshes.
Interface for writing software image data.
Definition: IImageWriter.h:25
Flat or Gouraud shading? Default: true.
void apply(SMaterial &material)
Apply the enabled overrides.
Definition: IVideoDriver.h:167
Access to all layers texture wrap settings. Overwrites separate layer settings.
Vertex with a tangent and binormal vector.
Definition: S3DVertex.h:187
Is trilinear filtering enabled? Default: false.
Class representing a color with four floats.
Definition: SColor.h:458
Struct for holding parameters for a material renderer.
Definition: SMaterial.h:226
Draw as wireframe or filled triangles? Default: false.
Auxiliary buffer 4.
Definition: IVideoDriver.h:129
Is frontface culling enabled? Default: false.
Draw as point cloud or filled triangles? Default: false.
The Render Target Textures are lost, typical problem for D3D.
Definition: IVideoDriver.h:99
E_BLEND_OPERATION BlendOp
Definition: IVideoDriver.h:245
E_RENDER_TARGET TargetType
Definition: IVideoDriver.h:241
Interface making it possible to create and use programs running on the GPU.
Flag for polygon offset.