]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/COpenGLDriver.h
c60d2ba88ae491598ca7d1be8ac57e3e2cba9c25
[irrlicht.git] / source / Irrlicht / COpenGLDriver.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in Irrlicht.h\r
4 \r
5 #ifndef __C_VIDEO_OPEN_GL_H_INCLUDED__\r
6 #define __C_VIDEO_OPEN_GL_H_INCLUDED__\r
7 \r
8 \r
9 #include "SIrrCreationParameters.h"\r
10 \r
11 namespace irr\r
12 {\r
13         class CIrrDeviceWin32;\r
14         class CIrrDeviceLinux;\r
15         class CIrrDeviceSDL;\r
16         class CIrrDeviceMacOSX;\r
17 }\r
18 \r
19 #ifdef _IRR_COMPILE_WITH_OPENGL_\r
20 \r
21 #include "IMaterialRendererServices.h"\r
22 #include "CNullDriver.h"\r
23 \r
24 #include "COpenGLExtensionHandler.h"\r
25 #include "IContextManager.h"\r
26 \r
27 namespace irr\r
28 {\r
29 \r
30 namespace video\r
31 {\r
32         class IContextManager;\r
33 \r
34         class COpenGLDriver : public CNullDriver, public IMaterialRendererServices, public COpenGLExtensionHandler\r
35         {\r
36         public:\r
37                 // Information about state of fixed pipeline activity.\r
38                 enum E_OPENGL_FIXED_PIPELINE_STATE\r
39                 {\r
40                         EOFPS_ENABLE = 0, // fixed pipeline.\r
41                         EOFPS_DISABLE, // programmable pipeline.\r
42                         EOFPS_ENABLE_TO_DISABLE, // switch from fixed to programmable pipeline.\r
43                         EOFPS_DISABLE_TO_ENABLE // switch from programmable to fixed pipeline.\r
44                 };\r
45 \r
46                 COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager);\r
47 \r
48                 bool initDriver();\r
49 \r
50                 //! destructor\r
51                 virtual ~COpenGLDriver();\r
52 \r
53                 virtual bool beginScene(u16 clearFlag, SColor clearColor = SColor(255,0,0,0), f32 clearDepth = 1.f, u8 clearStencil = 0,\r
54                         const SExposedVideoData& videoData = SExposedVideoData(), core::rect<s32>* sourceRect = 0) override;\r
55 \r
56                 bool endScene() override;\r
57 \r
58                 //! sets transformation\r
59                 void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) override;\r
60 \r
61 \r
62                 struct SHWBufferLink_opengl : public SHWBufferLink\r
63                 {\r
64                         SHWBufferLink_opengl(const scene::IMeshBuffer *_MeshBuffer): SHWBufferLink(_MeshBuffer), vbo_verticesID(0),vbo_indicesID(0){}\r
65 \r
66                         GLuint vbo_verticesID; //tmp\r
67                         GLuint vbo_indicesID; //tmp\r
68 \r
69                         GLuint vbo_verticesSize; //tmp\r
70                         GLuint vbo_indicesSize; //tmp\r
71                 };\r
72 \r
73                 //! updates hardware buffer if needed\r
74                 bool updateHardwareBuffer(SHWBufferLink *HWBuffer) override;\r
75 \r
76                 //! Create hardware buffer from mesh\r
77                 SHWBufferLink *createHardwareBuffer(const scene::IMeshBuffer* mb) override;\r
78 \r
79                 //! Delete hardware buffer (only some drivers can)\r
80                 void deleteHardwareBuffer(SHWBufferLink *HWBuffer) override;\r
81 \r
82                 //! Draw hardware buffer\r
83                 void drawHardwareBuffer(SHWBufferLink *HWBuffer) override;\r
84 \r
85                 //! Create occlusion query.\r
86                 /** Use node for identification and mesh for occlusion test. */\r
87                 virtual void addOcclusionQuery(scene::ISceneNode* node,\r
88                                 const scene::IMesh* mesh=0) override;\r
89 \r
90                 //! Remove occlusion query.\r
91                 void removeOcclusionQuery(scene::ISceneNode* node) override;\r
92 \r
93                 //! Run occlusion query. Draws mesh stored in query.\r
94                 /** If the mesh shall not be rendered visible, use\r
95                 overrideMaterial to disable the color and depth buffer. */\r
96                 void runOcclusionQuery(scene::ISceneNode* node, bool visible=false) override;\r
97 \r
98                 //! Update occlusion query. Retrieves results from GPU.\r
99                 /** If the query shall not block, set the flag to false.\r
100                 Update might not occur in this case, though */\r
101                 void updateOcclusionQuery(scene::ISceneNode* node, bool block=true) override;\r
102 \r
103                 //! Return query result.\r
104                 /** Return value is the number of visible pixels/fragments.\r
105                 The value is a safe approximation, i.e. can be larger then the\r
106                 actual value of pixels. */\r
107                 u32 getOcclusionQueryResult(scene::ISceneNode* node) const override;\r
108 \r
109                 //! Create render target.\r
110                 IRenderTarget* addRenderTarget() override;\r
111 \r
112                 //! draws a vertex primitive list\r
113                 virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,\r
114                                 const void* indexList, u32 primitiveCount,\r
115                                 E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) override;\r
116 \r
117                 //! draws a vertex primitive list in 2d\r
118                 virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount,\r
119                                 const void* indexList, u32 primitiveCount,\r
120                                 E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) override;\r
121 \r
122                 //! queries the features of the driver, returns true if feature is available\r
123                 bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const override\r
124                 {\r
125                         return FeatureEnabled[feature] && COpenGLExtensionHandler::queryFeature(feature);\r
126                 }\r
127 \r
128                 //! Disable a feature of the driver.\r
129                 void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true) override;\r
130 \r
131                 //! Sets a material. All 3d drawing functions draw geometry now\r
132                 //! using this material.\r
133                 //! \param material: Material to be used from now on.\r
134                 void setMaterial(const SMaterial& material) override;\r
135 \r
136                 virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,\r
137                         const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,\r
138                         SColor color = SColor(255, 255, 255, 255), bool useAlphaChannelOfTexture = false) override;\r
139 \r
140                 virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,\r
141                         const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,\r
142                         const video::SColor* const colors = 0, bool useAlphaChannelOfTexture = false) override;\r
143 \r
144                 // Explicitly bring in base class methods, otherwise\r
145                 // this overload would hide them.\r
146                 using CNullDriver::draw2DImage;\r
147                 virtual void draw2DImage(const video::ITexture* texture, u32 layer, bool flip);\r
148 \r
149                 //! draws a set of 2d images, using a color and the alpha channel of the\r
150                 //! texture if desired.\r
151                 void draw2DImageBatch(const video::ITexture* texture,\r
152                                 const core::array<core::position2d<s32> >& positions,\r
153                                 const core::array<core::rect<s32> >& sourceRects,\r
154                                 const core::rect<s32>* clipRect,\r
155                                 SColor color,\r
156                                 bool useAlphaChannelOfTexture) override;\r
157 \r
158                 //! draws a set of 2d images, using a color and the alpha\r
159                 /** channel of the texture if desired. The images are drawn\r
160                 beginning at pos and concatenated in one line. All drawings\r
161                 are clipped against clipRect (if != 0).\r
162                 The subtextures are defined by the array of sourceRects\r
163                 and are chosen by the indices given.\r
164                 \param texture: Texture to be drawn.\r
165                 \param pos: Upper left 2d destination position where the image will be drawn.\r
166                 \param sourceRects: Source rectangles of the image.\r
167                 \param indices: List of indices which choose the actual rectangle used each time.\r
168                 \param clipRect: Pointer to rectangle on the screen where the image is clipped to.\r
169                 This pointer can be 0. Then the image is not clipped.\r
170                 \param color: Color with which the image is colored.\r
171                 Note that the alpha component is used: If alpha is other than 255, the image will be transparent.\r
172                 \param useAlphaChannelOfTexture: If true, the alpha channel of the texture is\r
173                 used to draw the image. */\r
174                 virtual void draw2DImageBatch(const video::ITexture* texture,\r
175                                 const core::position2d<s32>& pos,\r
176                                 const core::array<core::rect<s32> >& sourceRects,\r
177                                 const core::array<s32>& indices,\r
178                                 s32 kerningWidth=0,\r
179                                 const core::rect<s32>* clipRect=0,\r
180                                 SColor color=SColor(255,255,255,255),\r
181                                 bool useAlphaChannelOfTexture=false) override;\r
182 \r
183                 //! draw an 2d rectangle\r
184                 virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos,\r
185                         const core::rect<s32>* clip = 0) override;\r
186 \r
187                 //!Draws an 2d rectangle with a gradient.\r
188                 virtual void draw2DRectangle(const core::rect<s32>& pos,\r
189                         SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown,\r
190                         const core::rect<s32>* clip = 0) override;\r
191 \r
192                 //! Draws a 2d line.\r
193                 virtual void draw2DLine(const core::position2d<s32>& start,\r
194                                         const core::position2d<s32>& end,\r
195                                         SColor color=SColor(255,255,255,255)) override;\r
196 \r
197                 //! Draws a single pixel\r
198                 void drawPixel(u32 x, u32 y, const SColor & color) override;\r
199 \r
200                 //! Draws a 3d box\r
201                 void draw3DBox( const core::aabbox3d<f32>& box, SColor color = SColor(255,255,255,255 ) ) override;\r
202 \r
203                 //! Draws a 3d line.\r
204                 virtual void draw3DLine(const core::vector3df& start,\r
205                                         const core::vector3df& end,\r
206                                         SColor color = SColor(255,255,255,255)) override;\r
207 \r
208                 //! \return Returns the name of the video driver. Example: In case of the Direct3D8\r
209                 //! driver, it would return "Direct3D8.1".\r
210                 const wchar_t* getName() const override;\r
211 \r
212                 //! Sets the dynamic ambient light color. The default color is\r
213                 //! (0,0,0,0) which means it is dark.\r
214                 //! \param color: New color of the ambient light.\r
215                 void setAmbientLight(const SColorf& color) override;\r
216 \r
217                 //! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do\r
218                 //! this: First, draw all geometry. Then use this method, to draw the shadow\r
219                 //! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow.\r
220                 void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible=0) override;\r
221 \r
222                 //! Fills the stencil shadow with color. After the shadow volume has been drawn\r
223                 //! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this\r
224                 //! to draw the color of the shadow.\r
225                 virtual void drawStencilShadow(bool clearStencilBuffer=false,\r
226                         video::SColor leftUpEdge = video::SColor(0,0,0,0),\r
227                         video::SColor rightUpEdge = video::SColor(0,0,0,0),\r
228                         video::SColor leftDownEdge = video::SColor(0,0,0,0),\r
229                         video::SColor rightDownEdge = video::SColor(0,0,0,0)) override;\r
230 \r
231                 //! sets a viewport\r
232                 void setViewPort(const core::rect<s32>& area) override;\r
233 \r
234                 //! Sets the fog mode.\r
235                 virtual void setFog(SColor color, E_FOG_TYPE fogType, f32 start,\r
236                         f32 end, f32 density, bool pixelFog, bool rangeFog) override;\r
237 \r
238                 //! Only used by the internal engine. Used to notify the driver that\r
239                 //! the window was resized.\r
240                 void OnResize(const core::dimension2d<u32>& size) override;\r
241 \r
242                 //! Returns type of video driver\r
243                 E_DRIVER_TYPE getDriverType() const override;\r
244 \r
245                 //! get color format of the current color buffer\r
246                 ECOLOR_FORMAT getColorFormat() const override;\r
247 \r
248                 //! Returns the transformation set by setTransform\r
249                 const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const override;\r
250 \r
251                 //! Can be called by an IMaterialRenderer to make its work easier.\r
252                 virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastmaterial,\r
253                         bool resetAllRenderstates) override;\r
254 \r
255                 //! Compare in SMaterial doesn't check texture parameters, so we should call this on each OnRender call.\r
256                 virtual void setTextureRenderStates(const SMaterial& material, bool resetAllRenderstates);\r
257 \r
258                 //! Get a vertex shader constant index.\r
259                 s32 getVertexShaderConstantID(const c8* name) override;\r
260 \r
261                 //! Get a pixel shader constant index.\r
262                 s32 getPixelShaderConstantID(const c8* name) override;\r
263 \r
264                 //! Sets a vertex shader constant.\r
265                 void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;\r
266 \r
267                 //! Sets a pixel shader constant.\r
268                 void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) override;\r
269 \r
270                 //! Sets a constant for the vertex shader based on an index.\r
271                 bool setVertexShaderConstant(s32 index, const f32* floats, int count) override;\r
272 \r
273                 //! Int interface for the above.\r
274                 bool setVertexShaderConstant(s32 index, const s32* ints, int count) override;\r
275 \r
276                 //! Uint interface for the above.\r
277                 bool setVertexShaderConstant(s32 index, const u32* ints, int count) override;\r
278 \r
279                 //! Sets a constant for the pixel shader based on an index.\r
280                 bool setPixelShaderConstant(s32 index, const f32* floats, int count) override;\r
281 \r
282                 //! Int interface for the above.\r
283                 bool setPixelShaderConstant(s32 index, const s32* ints, int count) override;\r
284 \r
285                 //! Uint interface for the above.\r
286                 bool setPixelShaderConstant(s32 index, const u32* ints, int count) override;\r
287 \r
288                 //! disables all textures beginning with the optional fromStage parameter. Otherwise all texture stages are disabled.\r
289                 //! Returns whether disabling was successful or not.\r
290                 bool disableTextures(u32 fromStage=0);\r
291 \r
292                 //! Adds a new material renderer to the VideoDriver, using\r
293                 //! extGLGetObjectParameteriv(shaderHandle, GL_OBJECT_COMPILE_STATUS_ARB, &status)\r
294                 //! pixel and/or vertex shaders to render geometry.\r
295                 virtual s32 addShaderMaterial(const c8* vertexShaderProgram, const c8* pixelShaderProgram,\r
296                         IShaderConstantSetCallBack* callback, E_MATERIAL_TYPE baseMaterial, s32 userData) override;\r
297 \r
298                 //! Adds a new material renderer to the VideoDriver, using GLSL to render geometry.\r
299                 virtual s32 addHighLevelShaderMaterial(\r
300                                 const c8* vertexShaderProgram,\r
301                                 const c8* vertexShaderEntryPointName,\r
302                                 E_VERTEX_SHADER_TYPE vsCompileTarget,\r
303                                 const c8* pixelShaderProgram,\r
304                                 const c8* pixelShaderEntryPointName,\r
305                                 E_PIXEL_SHADER_TYPE psCompileTarget,\r
306                                 const c8* geometryShaderProgram,\r
307                                 const c8* geometryShaderEntryPointName = "main",\r
308                                 E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,\r
309                                 scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,\r
310                                 scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,\r
311                                 u32 verticesOut = 0,\r
312                                 IShaderConstantSetCallBack* callback = 0,\r
313                                 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,\r
314                                 s32 userData = 0) override;\r
315 \r
316                 //! Returns a pointer to the IVideoDriver interface. (Implementation for\r
317                 //! IMaterialRendererServices)\r
318                 IVideoDriver* getVideoDriver() override;\r
319 \r
320                 //! Returns the maximum amount of primitives (mostly vertices) which\r
321                 //! the device is able to render with one drawIndexedTriangleList\r
322                 //! call.\r
323                 u32 getMaximalPrimitiveCount() const override;\r
324 \r
325                 virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,\r
326                                 const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN) override;\r
327 \r
328                 //! Creates a render target texture for a cubemap\r
329                 ITexture* addRenderTargetTextureCubemap(const irr::u32 sideLen,\r
330                                 const io::path& name, const ECOLOR_FORMAT format) override;\r
331 \r
332                 virtual bool setRenderTargetEx(IRenderTarget* target, u16 clearFlag, SColor clearColor = SColor(255,0,0,0),\r
333                         f32 clearDepth = 1.f, u8 clearStencil = 0) override;\r
334 \r
335                 void clearBuffers(u16 flag, SColor color = SColor(255,0,0,0), f32 depth = 1.f, u8 stencil = 0) override;\r
336 \r
337                 //! Returns an image created from the last rendered frame.\r
338                 IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER) override;\r
339 \r
340                 //! checks if an OpenGL error has happened and prints it (+ some internal code which is usually the line number)\r
341                 //! for performance reasons only available in debug mode\r
342                 bool testGLError(int code=0);\r
343 \r
344                 //! Set/unset a clipping plane.\r
345                 //! There are at least 6 clipping planes available for the user to set at will.\r
346                 //! \param index: The plane index. Must be between 0 and MaxUserClipPlanes.\r
347                 //! \param plane: The plane itself.\r
348                 //! \param enable: If true, enable the clipping plane else disable it.\r
349                 bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false) override;\r
350 \r
351                 //! Enable/disable a clipping plane.\r
352                 //! There are at least 6 clipping planes available for the user to set at will.\r
353                 //! \param index: The plane index. Must be between 0 and MaxUserClipPlanes.\r
354                 //! \param enable: If true, enable the clipping plane else disable it.\r
355                 void enableClipPlane(u32 index, bool enable) override;\r
356 \r
357                 //! Enable the 2d override material\r
358                 void enableMaterial2D(bool enable=true) override;\r
359 \r
360                 //! Returns the graphics card vendor name.\r
361                 core::stringc getVendorInfo() override {return VendorName;}\r
362 \r
363                 //! Returns the maximum texture size supported.\r
364                 core::dimension2du getMaxTextureSize() const override;\r
365 \r
366                 //! Removes a texture from the texture cache and deletes it, freeing lot of memory.\r
367                 void removeTexture(ITexture* texture) override;\r
368 \r
369                 //! Check if the driver supports creating textures with the given color format\r
370                 bool queryTextureFormat(ECOLOR_FORMAT format) const override;\r
371 \r
372                 //! Used by some SceneNodes to check if a material should be rendered in the transparent render pass\r
373                 bool needsTransparentRenderPass(const irr::video::SMaterial& material) const override;\r
374 \r
375                 //! Convert E_PRIMITIVE_TYPE to OpenGL equivalent\r
376                 GLenum primitiveTypeToGL(scene::E_PRIMITIVE_TYPE type) const;\r
377 \r
378                 //! Convert E_BLEND_FACTOR to OpenGL equivalent\r
379                 GLenum getGLBlend(E_BLEND_FACTOR factor) const;\r
380 \r
381                 //! Get ZBuffer bits.\r
382                 GLenum getZBufferBits() const;\r
383 \r
384                 bool getColorFormatParameters(ECOLOR_FORMAT format, GLint& internalFormat, GLenum& pixelFormat,\r
385                         GLenum& pixelType, void(**converter)(const void*, s32, void*)) const;\r
386 \r
387                 //! Return info about fixed pipeline state.\r
388                 E_OPENGL_FIXED_PIPELINE_STATE getFixedPipelineState() const;\r
389 \r
390                 //! Set info about fixed pipeline state.\r
391                 void setFixedPipelineState(E_OPENGL_FIXED_PIPELINE_STATE state);\r
392 \r
393                 //! Get current material.\r
394                 const SMaterial& getCurrentMaterial() const;\r
395 \r
396                 COpenGLCacheHandler* getCacheHandler() const;\r
397 \r
398         private:\r
399 \r
400                 bool updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer);\r
401                 bool updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer);\r
402 \r
403                 void uploadClipPlane(u32 index);\r
404 \r
405                 //! inits the parts of the open gl driver used on all platforms\r
406                 bool genericDriverInit();\r
407 \r
408                 ITexture* createDeviceDependentTexture(const io::path& name, IImage* image) override;\r
409 \r
410                 ITexture* createDeviceDependentTextureCubemap(const io::path& name, const core::array<IImage*>& image) override;\r
411 \r
412                 //! creates a transposed matrix in supplied GLfloat array to pass to OpenGL\r
413                 inline void getGLMatrix(GLfloat gl_matrix[16], const core::matrix4& m);\r
414                 inline void getGLTextureMatrix(GLfloat gl_matrix[16], const core::matrix4& m);\r
415 \r
416                 //! get native wrap mode value\r
417                 GLint getTextureWrapMode(const u8 clamp);\r
418 \r
419                 //! sets the needed renderstates\r
420                 void setRenderStates3DMode();\r
421 \r
422                 //! sets the needed renderstates\r
423                 void setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel);\r
424 \r
425                 void createMaterialRenderers();\r
426 \r
427                 //! Assign a hardware light to the specified requested light, if any\r
428                 //! free hardware lights exist.\r
429                 //! \param[in] lightIndex: the index of the requesting light\r
430                 void assignHardwareLight(u32 lightIndex);\r
431 \r
432                 //! helper function for render setup.\r
433                 void getColorBuffer(const void* vertices, u32 vertexCount, E_VERTEX_TYPE vType);\r
434 \r
435                 //! helper function doing the actual rendering.\r
436                 void renderArray(const void* indexList, u32 primitiveCount,\r
437                                 scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType);\r
438 \r
439                 //! Same as `CacheHandler->setViewport`, but also sets `ViewPort`\r
440                 virtual void setViewPortRaw(u32 width, u32 height);\r
441 \r
442                 COpenGLCacheHandler* CacheHandler;\r
443 \r
444                 core::stringw Name;\r
445                 core::matrix4 Matrices[ETS_COUNT];\r
446                 core::array<u8> ColorBuffer;\r
447 \r
448                 //! enumeration for rendering modes such as 2d and 3d for minizing the switching of renderStates.\r
449                 enum E_RENDER_MODE\r
450                 {\r
451                         ERM_NONE = 0,   // no render state has been set yet.\r
452                         ERM_2D,         // 2d drawing rendermode\r
453                         ERM_3D          // 3d rendering mode\r
454                 };\r
455 \r
456                 E_RENDER_MODE CurrentRenderMode;\r
457                 //! bool to make all renderstates reset if set to true.\r
458                 bool ResetRenderStates;\r
459                 bool Transformation3DChanged;\r
460                 u8 AntiAlias;\r
461 \r
462                 SMaterial Material, LastMaterial;\r
463 \r
464                 struct SUserClipPlane\r
465                 {\r
466                         SUserClipPlane() : Enabled(false) {}\r
467                         core::plane3df Plane;\r
468                         bool Enabled;\r
469                 };\r
470                 core::array<SUserClipPlane> UserClipPlanes;\r
471 \r
472                 core::stringc VendorName;\r
473 \r
474                 core::matrix4 TextureFlipMatrix;\r
475 \r
476                 //! Color buffer format\r
477                 ECOLOR_FORMAT ColorFormat;\r
478 \r
479                 E_OPENGL_FIXED_PIPELINE_STATE FixedPipelineState;\r
480 \r
481                 SIrrlichtCreationParameters Params;\r
482 \r
483                 //! Built-in 2D quad for 2D rendering.\r
484                 S3DVertex Quad2DVertices[4];\r
485                 static const u16 Quad2DIndices[4];\r
486 \r
487                 IContextManager* ContextManager;\r
488         };\r
489 \r
490 } // end namespace video\r
491 } // end namespace irr\r
492 \r
493 \r
494 #endif // _IRR_COMPILE_WITH_OPENGL_\r
495 #endif\r
496 \r