Irrlicht 3D Engine
IVideoDriver.h
Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
00002 // This file is part of the "Irrlicht Engine".
00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
00004 
00005 #ifndef __IRR_I_VIDEO_DRIVER_H_INCLUDED__
00006 #define __IRR_I_VIDEO_DRIVER_H_INCLUDED__
00007 
00008 #include "rect.h"
00009 #include "SColor.h"
00010 #include "ITexture.h"
00011 #include "irrArray.h"
00012 #include "matrix4.h"
00013 #include "plane3d.h"
00014 #include "dimension2d.h"
00015 #include "position2d.h"
00016 #include "SMaterial.h"
00017 #include "IMeshBuffer.h"
00018 #include "triangle3d.h"
00019 #include "EDriverTypes.h"
00020 #include "EDriverFeatures.h"
00021 #include "SExposedVideoData.h"
00022 
00023 namespace irr
00024 {
00025 namespace io
00026 {
00027     class IAttributes;
00028     struct SAttributeReadWriteOptions;
00029     class IReadFile;
00030     class IWriteFile;
00031 } // end namespace io
00032 namespace scene
00033 {
00034     class IMeshBuffer;
00035     class IMesh;
00036     class IMeshManipulator;
00037     class ISceneNode;
00038 } // end namespace scene
00039 
00040 namespace video
00041 {
00042     struct S3DVertex;
00043     struct S3DVertex2TCoords;
00044     struct S3DVertexTangents;
00045     struct SLight;
00046     class IImageLoader;
00047     class IImageWriter;
00048     class IMaterialRenderer;
00049     class IGPUProgrammingServices;
00050 
00052     enum E_TRANSFORMATION_STATE
00053     {
00055         ETS_VIEW = 0,
00057         ETS_WORLD,
00059         ETS_PROJECTION,
00061         ETS_TEXTURE_0,
00063         ETS_TEXTURE_1,
00065         ETS_TEXTURE_2,
00067         ETS_TEXTURE_3,
00068 #if _IRR_MATERIAL_MAX_TEXTURES_>4
00069 
00070         ETS_TEXTURE_4,
00071 #if _IRR_MATERIAL_MAX_TEXTURES_>5
00072 
00073         ETS_TEXTURE_5,
00074 #if _IRR_MATERIAL_MAX_TEXTURES_>6
00075 
00076         ETS_TEXTURE_6,
00077 #if _IRR_MATERIAL_MAX_TEXTURES_>7
00078 
00079         ETS_TEXTURE_7,
00080 #endif
00081 #endif
00082 #endif
00083 #endif
00084 
00085         ETS_COUNT
00086     };
00087 
00089 
00092     enum E_LOST_RESOURCE
00093     {
00095         ELR_DEVICE = 1,
00097         ELR_TEXTURES = 2,
00099         ELR_RTTS = 4,
00101         ELR_HW_BUFFERS = 8
00102     };
00103 
00105 
00106     enum E_RENDER_TARGET
00107     {
00109         ERT_FRAME_BUFFER=0,
00111         ERT_RENDER_TEXTURE,
00113         ERT_MULTI_RENDER_TEXTURES,
00115         ERT_STEREO_LEFT_BUFFER,
00117         ERT_STEREO_RIGHT_BUFFER,
00119         ERT_STEREO_BOTH_BUFFERS,
00121         ERT_AUX_BUFFER0,
00123         ERT_AUX_BUFFER1,
00125         ERT_AUX_BUFFER2,
00127         ERT_AUX_BUFFER3,
00129         ERT_AUX_BUFFER4
00130     };
00131 
00133     enum E_FOG_TYPE
00134     {
00135         EFT_FOG_EXP=0,
00136         EFT_FOG_LINEAR,
00137         EFT_FOG_EXP2
00138     };
00139 
00140     const c8* const FogTypeNames[] =
00141     {
00142         "FogExp",
00143         "FogLinear",
00144         "FogExp2",
00145         0
00146     };
00147 
00148     struct SOverrideMaterial
00149     {
00151         SMaterial Material;
00153 
00154         u32 EnableFlags;
00156 
00157         u16 EnablePasses;
00159 
00161         bool Enabled;
00162 
00164         SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false) {}
00165 
00167         void apply(SMaterial& material)
00168         {
00169             if (Enabled)
00170             {
00171                 for (u32 i=0; i<32; ++i)
00172                 {
00173                     const u32 num=(1<<i);
00174                     if (EnableFlags & num)
00175                     {
00176                         switch (num)
00177                         {
00178                         case EMF_WIREFRAME: material.Wireframe = Material.Wireframe; break;
00179                         case EMF_POINTCLOUD: material.PointCloud = Material.PointCloud; break;
00180                         case EMF_GOURAUD_SHADING: material.GouraudShading = Material.GouraudShading; break;
00181                         case EMF_LIGHTING: material.Lighting = Material.Lighting; break;
00182                         case EMF_ZBUFFER: material.ZBuffer = Material.ZBuffer; break;
00183                         case EMF_ZWRITE_ENABLE: material.ZWriteEnable = Material.ZWriteEnable; break;
00184                         case EMF_BACK_FACE_CULLING: material.BackfaceCulling = Material.BackfaceCulling; break;
00185                         case EMF_FRONT_FACE_CULLING: material.FrontfaceCulling = Material.FrontfaceCulling; break;
00186                         case EMF_BILINEAR_FILTER: material.TextureLayer[0].BilinearFilter = Material.TextureLayer[0].BilinearFilter; break;
00187                         case EMF_TRILINEAR_FILTER: material.TextureLayer[0].TrilinearFilter = Material.TextureLayer[0].TrilinearFilter; break;
00188                         case EMF_ANISOTROPIC_FILTER: material.TextureLayer[0].AnisotropicFilter = Material.TextureLayer[0].AnisotropicFilter; break;
00189                         case EMF_FOG_ENABLE: material.FogEnable = Material.FogEnable; break;
00190                         case EMF_NORMALIZE_NORMALS: material.NormalizeNormals = Material.NormalizeNormals; break;
00191                         case EMF_TEXTURE_WRAP:
00192                             material.TextureLayer[0].TextureWrapU = Material.TextureLayer[0].TextureWrapU;
00193                             material.TextureLayer[0].TextureWrapV = Material.TextureLayer[0].TextureWrapV;
00194                             break;
00195                         case EMF_ANTI_ALIASING: material.AntiAliasing = Material.AntiAliasing; break;
00196                         case EMF_COLOR_MASK: material.ColorMask = Material.ColorMask; break;
00197                         case EMF_COLOR_MATERIAL: material.ColorMaterial = Material.ColorMaterial; break;
00198                         case EMF_USE_MIP_MAPS: material.UseMipMaps = Material.UseMipMaps; break;
00199                         case EMF_BLEND_OPERATION: material.BlendOperation = Material.BlendOperation; break;
00200                         case EMF_POLYGON_OFFSET:
00201                             material.PolygonOffsetDirection = Material.PolygonOffsetDirection;
00202                             material.PolygonOffsetFactor = Material.PolygonOffsetFactor; break;
00203                         }
00204                     }
00205                 }
00206             }
00207         }
00208 
00209     };
00210 
00211     struct IRenderTarget
00212     {
00213         IRenderTarget(ITexture* texture,
00214                 E_COLOR_PLANE colorMask=ECP_ALL,
00215                 E_BLEND_FACTOR blendFuncSrc=EBF_ONE,
00216                 E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA,
00217                 E_BLEND_OPERATION blendOp=EBO_NONE) :
00218             RenderTexture(texture),
00219             TargetType(ERT_RENDER_TEXTURE), ColorMask(colorMask),
00220             BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst),
00221             BlendOp(blendOp) {}
00222         IRenderTarget(E_RENDER_TARGET target,
00223                 E_COLOR_PLANE colorMask=ECP_ALL,
00224                 E_BLEND_FACTOR blendFuncSrc=EBF_ONE,
00225                 E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA,
00226                 E_BLEND_OPERATION blendOp=EBO_NONE) :
00227             RenderTexture(0),
00228             TargetType(target), ColorMask(colorMask),
00229             BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst),
00230             BlendOp(blendOp) {}
00231         bool operator!=(const IRenderTarget& other) const
00232         {
00233             return ((RenderTexture != other.RenderTexture) ||
00234                 (TargetType != other.TargetType) ||
00235                 (ColorMask != other.ColorMask) ||
00236                 (BlendFuncSrc != other.BlendFuncSrc) ||
00237                 (BlendFuncDst != other.BlendFuncDst) ||
00238                 (BlendOp != other.BlendOp));
00239         }
00240         ITexture* RenderTexture;
00241         E_RENDER_TARGET TargetType:8;
00242         E_COLOR_PLANE ColorMask:8;
00243         E_BLEND_FACTOR BlendFuncSrc:4;
00244         E_BLEND_FACTOR BlendFuncDst:4;
00245         E_BLEND_OPERATION BlendOp:4;
00246     };
00247 
00249 
00256     class IVideoDriver : public virtual IReferenceCounted
00257     {
00258     public:
00259 
00261 
00278         virtual bool beginScene(bool backBuffer=true, bool zBuffer=true,
00279                 SColor color=SColor(255,0,0,0),
00280                 const SExposedVideoData& videoData=SExposedVideoData(),
00281                 core::rect<s32>* sourceRect=0) =0;
00282 
00284 
00287         virtual bool endScene() =0;
00288 
00290 
00293         virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const =0;
00294 
00296 
00300         virtual void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true) =0;
00301 
00303 
00319         virtual const io::IAttributes& getDriverAttributes() const=0;
00320 
00322 
00325         virtual bool checkDriverReset() =0;
00326 
00328 
00331         virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) =0;
00332 
00334 
00336         virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const =0;
00337 
00339 
00340         virtual u32 getImageLoaderCount() const = 0;
00341 
00343 
00346         virtual IImageLoader* getImageLoader(u32 n) = 0;
00347 
00349 
00350         virtual u32 getImageWriterCount() const = 0;
00351 
00353 
00356         virtual IImageWriter* getImageWriter(u32 n) = 0;
00357 
00359 
00361         virtual void setMaterial(const SMaterial& material) =0;
00362 
00364 
00373         virtual ITexture* getTexture(const io::path& filename) = 0;
00374 
00376 
00385         virtual ITexture* getTexture(io::IReadFile* file) =0;
00386 
00388 
00394         virtual ITexture* getTextureByIndex(u32 index) =0;
00395 
00397 
00398         virtual u32 getTextureCount() const = 0;
00399 
00401 
00403         virtual void renameTexture(ITexture* texture, const io::path& newName) = 0;
00404 
00406 
00415         virtual ITexture* addTexture(const core::dimension2d<u32>& size,
00416             const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0;
00417 
00419 
00429         virtual ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData=0) = 0;
00430 
00432 
00443         virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
00444                 const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
00445 
00447 
00454         virtual void removeTexture(ITexture* texture) =0;
00455 
00457 
00463         virtual void removeAllTextures() =0;
00464 
00466         virtual void removeHardwareBuffer(const scene::IMeshBuffer* mb) =0;
00467 
00469         virtual void removeAllHardwareBuffers() =0;
00470 
00472 
00473         virtual void addOcclusionQuery(scene::ISceneNode* node,
00474                 const scene::IMesh* mesh=0) =0;
00475 
00477         virtual void removeOcclusionQuery(scene::ISceneNode* node) =0;
00478 
00480         virtual void removeAllOcclusionQueries() =0;
00481 
00483 
00485         virtual void runOcclusionQuery(scene::ISceneNode* node, bool visible=false) =0;
00486 
00488 
00490         virtual void runAllOcclusionQueries(bool visible=false) =0;
00491 
00493 
00495         virtual void updateOcclusionQuery(scene::ISceneNode* node, bool block=true) =0;
00496 
00498 
00500         virtual void updateAllOcclusionQueries(bool block=true) =0;
00501 
00503 
00506         virtual u32 getOcclusionQueryResult(scene::ISceneNode* node) const =0;
00507 
00509 
00525         virtual void makeColorKeyTexture(video::ITexture* texture,
00526                         video::SColor color,
00527                         bool zeroTexels = false) const =0;
00528 
00530 
00542         virtual void makeColorKeyTexture(video::ITexture* texture,
00543                 core::position2d<s32> colorKeyPixelPos,
00544                 bool zeroTexels = false) const =0;
00545 
00547 
00554         virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) const =0;
00555 
00557 
00588         virtual bool setRenderTarget(video::ITexture* texture,
00589             bool clearBackBuffer=true, bool clearZBuffer=true,
00590             SColor color=video::SColor(0,0,0,0)) =0;
00591 
00593 
00604         virtual bool setRenderTarget(E_RENDER_TARGET target, bool clearTarget=true,
00605                     bool clearZBuffer=true,
00606                     SColor color=video::SColor(0,0,0,0)) =0;
00607 
00609         virtual bool setRenderTarget(const core::array<video::IRenderTarget>& texture,
00610             bool clearBackBuffer=true, bool clearZBuffer=true,
00611             SColor color=video::SColor(0,0,0,0)) =0;
00612 
00614 
00617         virtual void setViewPort(const core::rect<s32>& area) =0;
00618 
00620 
00621         virtual const core::rect<s32>& getViewPort() const =0;
00622 
00624 
00638         virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,
00639                 const void* indexList, u32 primCount,
00640                 E_VERTEX_TYPE vType=EVT_STANDARD,
00641                 scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES,
00642                 E_INDEX_TYPE iType=EIT_16BIT) =0;
00643 
00645 
00664         virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount,
00665                 const void* indexList, u32 primCount,
00666                 E_VERTEX_TYPE vType=EVT_STANDARD,
00667                 scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES,
00668                 E_INDEX_TYPE iType=EIT_16BIT) =0;
00669 
00671 
00679         void drawIndexedTriangleList(const S3DVertex* vertices,
00680             u32 vertexCount, const u16* indexList, u32 triangleCount)
00681         {
00682             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT);
00683         }
00684 
00686 
00694         void drawIndexedTriangleList(const S3DVertex2TCoords* vertices,
00695             u32 vertexCount, const u16* indexList, u32 triangleCount)
00696         {
00697             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLES, EIT_16BIT);
00698         }
00699 
00701 
00709         void drawIndexedTriangleList(const S3DVertexTangents* vertices,
00710             u32 vertexCount, const u16* indexList, u32 triangleCount)
00711         {
00712             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLES, EIT_16BIT);
00713         }
00714 
00716 
00724         void drawIndexedTriangleFan(const S3DVertex* vertices,
00725             u32 vertexCount, const u16* indexList, u32 triangleCount)
00726         {
00727             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
00728         }
00729 
00731 
00739         void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices,
00740             u32 vertexCount, const u16* indexList, u32 triangleCount)
00741         {
00742             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
00743         }
00744 
00746 
00754         void drawIndexedTriangleFan(const S3DVertexTangents* vertices,
00755             u32 vertexCount, const u16* indexList, u32 triangleCount)
00756         {
00757             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
00758         }
00759 
00761 
00775         virtual void draw3DLine(const core::vector3df& start,
00776             const core::vector3df& end, SColor color = SColor(255,255,255,255)) =0;
00777 
00779 
00792         virtual void draw3DTriangle(const core::triangle3df& triangle,
00793             SColor color = SColor(255,255,255,255)) =0;
00794 
00796 
00807         virtual void draw3DBox(const core::aabbox3d<f32>& box,
00808             SColor color = SColor(255,255,255,255)) =0;
00809 
00811 
00814         virtual void draw2DImage(const video::ITexture* texture,
00815             const core::position2d<s32>& destPos) =0;
00816 
00818 
00833         virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
00834             const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,
00835             SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false) =0;
00836 
00838 
00857         virtual void draw2DImageBatch(const video::ITexture* texture,
00858                 const core::position2d<s32>& pos,
00859                 const core::array<core::rect<s32> >& sourceRects,
00860                 const core::array<s32>& indices,
00861                 s32 kerningWidth=0,
00862                 const core::rect<s32>* clipRect=0,
00863                 SColor color=SColor(255,255,255,255),
00864                 bool useAlphaChannelOfTexture=false) =0;
00865 
00867 
00882         virtual void draw2DImageBatch(const video::ITexture* texture,
00883                 const core::array<core::position2d<s32> >& positions,
00884                 const core::array<core::rect<s32> >& sourceRects,
00885                 const core::rect<s32>* clipRect=0,
00886                 SColor color=SColor(255,255,255,255),
00887                 bool useAlphaChannelOfTexture=false) =0;
00888 
00890 
00899         virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
00900             const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,
00901             const video::SColor * const colors=0, bool useAlphaChannelOfTexture=false) =0;
00902 
00904 
00911         virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos,
00912             const core::rect<s32>* clip =0) =0;
00913 
00915 
00931         virtual void draw2DRectangle(const core::rect<s32>& pos,
00932                 SColor colorLeftUp, SColor colorRightUp,
00933                 SColor colorLeftDown, SColor colorRightDown,
00934                 const core::rect<s32>* clip =0) =0;
00935 
00937 
00940         virtual void draw2DRectangleOutline(const core::recti& pos,
00941                 SColor color=SColor(255,255,255,255)) =0;
00942 
00944 
00949         virtual void draw2DLine(const core::position2d<s32>& start,
00950                     const core::position2d<s32>& end,
00951                     SColor color=SColor(255,255,255,255)) =0;
00952 
00954 
00957         virtual void drawPixel(u32 x, u32 y, const SColor& color) =0;
00958 
00960 
00972         virtual void draw2DPolygon(core::position2d<s32> center,
00973                 f32 radius,
00974                 video::SColor color=SColor(100,255,255,255),
00975                 s32 vertexCount=10) =0;
00976 
00978 
00991         virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0) =0;
00992 
00994 
01013         virtual void drawStencilShadow(bool clearStencilBuffer=false,
01014             video::SColor leftUpEdge = video::SColor(255,0,0,0),
01015             video::SColor rightUpEdge = video::SColor(255,0,0,0),
01016             video::SColor leftDownEdge = video::SColor(255,0,0,0),
01017             video::SColor rightDownEdge = video::SColor(255,0,0,0)) =0;
01018 
01020 
01021         virtual void drawMeshBuffer(const scene::IMeshBuffer* mb) =0;
01022 
01024 
01028         virtual void drawMeshBufferNormals(const scene::IMeshBuffer* mb, f32 length=10.f, SColor color=0xffffffff) =0;
01029 
01031 
01047         virtual void setFog(SColor color=SColor(0,255,255,255),
01048                 E_FOG_TYPE fogType=EFT_FOG_LINEAR,
01049                 f32 start=50.0f, f32 end=100.0f, f32 density=0.01f,
01050                 bool pixelFog=false, bool rangeFog=false) =0;
01051 
01053         virtual void getFog(SColor& color, E_FOG_TYPE& fogType,
01054                 f32& start, f32& end, f32& density,
01055                 bool& pixelFog, bool& rangeFog) = 0;
01056 
01058 
01059         virtual ECOLOR_FORMAT getColorFormat() const =0;
01060 
01062 
01063         virtual const core::dimension2d<u32>& getScreenSize() const =0;
01064 
01066 
01070         virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const =0;
01071 
01073 
01078         virtual s32 getFPS() const =0;
01079 
01081 
01085         virtual u32 getPrimitiveCountDrawn( u32 mode =0 ) const =0;
01086 
01088         virtual void deleteAllDynamicLights() =0;
01089 
01093         virtual s32 addDynamicLight(const SLight& light) =0;
01094 
01096 
01097         virtual u32 getMaximalDynamicLightAmount() const =0;
01098 
01100 
01101         virtual u32 getDynamicLightCount() const =0;
01102 
01104 
01107         virtual const SLight& getDynamicLight(u32 idx) const =0;
01108 
01112         virtual void turnLightOn(s32 lightIndex, bool turnOn) =0;
01113 
01115 
01117         virtual const wchar_t* getName() const =0;
01118 
01120 
01126         virtual void addExternalImageLoader(IImageLoader* loader) =0;
01127 
01129 
01135         virtual void addExternalImageWriter(IImageWriter* writer) =0;
01136 
01138 
01141         virtual u32 getMaximalPrimitiveCount() const =0;
01142 
01144 
01153         virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled=true) =0;
01154 
01156 
01159         virtual bool getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const =0;
01160 
01162 
01170         virtual IImage* createImageFromFile(const io::path& filename) = 0;
01171 
01173 
01180         virtual IImage* createImageFromFile(io::IReadFile* file) =0;
01181 
01183 
01190         virtual bool writeImageToFile(IImage* image, const io::path& filename, u32 param = 0) = 0;
01191 
01193 
01201         virtual bool writeImageToFile(IImage* image, io::IWriteFile* file, u32 param =0) =0;
01202 
01204 
01218         virtual IImage* createImageFromData(ECOLOR_FORMAT format,
01219             const core::dimension2d<u32>& size, void *data,
01220             bool ownForeignMemory=false,
01221             bool deleteMemory = true) =0;
01222 
01224 
01230         virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) =0;
01231 
01233 
01239         _IRR_DEPRECATED_ virtual IImage* createImage(ECOLOR_FORMAT format, IImage *imageToCopy) =0;
01240 
01242 
01249         _IRR_DEPRECATED_ virtual IImage* createImage(IImage* imageToCopy,
01250                 const core::position2d<s32>& pos,
01251                 const core::dimension2d<u32>& size) =0;
01252 
01254 
01261         virtual IImage* createImage(ITexture* texture,
01262                 const core::position2d<s32>& pos,
01263                 const core::dimension2d<u32>& size) =0;
01264 
01266 
01268         virtual void OnResize(const core::dimension2d<u32>& size) =0;
01269 
01271 
01291         virtual s32 addMaterialRenderer(IMaterialRenderer* renderer, const c8* name =0) =0;
01292 
01294 
01298         virtual IMaterialRenderer* getMaterialRenderer(u32 idx) =0;
01299 
01301 
01302         virtual u32 getMaterialRendererCount() const =0;
01303 
01305 
01314         virtual const c8* getMaterialRendererName(u32 idx) const =0;
01315 
01317 
01322         virtual void setMaterialRendererName(s32 idx, const c8* name) =0;
01323 
01325 
01334         virtual io::IAttributes* createAttributesFromMaterial(const video::SMaterial& material,
01335             io::SAttributeReadWriteOptions* options=0) =0;
01336 
01338 
01344         virtual void fillMaterialStructureFromAttributes(video::SMaterial& outMaterial, io::IAttributes* attributes) =0;
01345 
01347 
01350         virtual const SExposedVideoData& getExposedVideoData() =0;
01351 
01353 
01354         virtual E_DRIVER_TYPE getDriverType() const =0;
01355 
01357 
01360         virtual IGPUProgrammingServices* getGPUProgrammingServices() =0;
01361 
01363         virtual scene::IMeshManipulator* getMeshManipulator() =0;
01364 
01366 
01372         virtual void clearZBuffer() =0;
01373 
01375 
01376         virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER) =0;
01377 
01379 
01383         virtual video::ITexture* findTexture(const io::path& filename) = 0;
01384 
01386 
01394         virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false) =0;
01395 
01397 
01403         virtual void enableClipPlane(u32 index, bool enable) =0;
01404 
01406 
01407         virtual void setMinHardwareBufferVertexCount(u32 count) =0;
01408 
01410 
01414         virtual SOverrideMaterial& getOverrideMaterial() =0;
01415 
01417 
01430         virtual SMaterial& getMaterial2D() =0;
01431 
01433 
01435         virtual void enableMaterial2D(bool enable=true) =0;
01436 
01438         virtual core::stringc getVendorInfo() =0;
01439 
01441 
01444         virtual void setAmbientLight(const SColorf& color) =0;
01445 
01447 
01450         virtual void setAllowZWriteOnTransparent(bool flag) =0;
01451 
01453         virtual core::dimension2du getMaxTextureSize() const =0;
01454 
01456 
01465         virtual void convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN,
01466                 void* dP, ECOLOR_FORMAT dF) const =0;
01467     };
01468 
01469 } // end namespace video
01470 } // end namespace irr
01471 
01472 
01473 #endif