]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/OpenGL/Driver.h
Split new GL3/GLES2 drivers
[irrlicht.git] / source / Irrlicht / OpenGL / Driver.h
index b73259548b47f4758c5abf28129cdb3aed53dd3c..e95a633c546f408402a0d87f17be370e57adc157 100644 (file)
@@ -20,23 +20,23 @@ namespace irr
 {\r
 namespace video\r
 {\r
+       struct VertexType;\r
 \r
        class COpenGL3FixedPipelineRenderer;\r
        class COpenGL3Renderer2D;\r
 \r
-       class COpenGL3Driver : public CNullDriver, public IMaterialRendererServices, public COpenGL3ExtensionHandler\r
+       class COpenGL3DriverBase : public CNullDriver, public IMaterialRendererServices, public COpenGL3ExtensionHandler\r
        {\r
-               friend class COpenGLCoreTexture<COpenGL3Driver>;\r
-               friend IVideoDriver* createOpenGL3Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager);\r
+               friend class COpenGLCoreTexture<COpenGL3DriverBase>;\r
 \r
        protected:\r
                //! constructor (use createOpenGL3Driver instead)\r
-               COpenGL3Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager);\r
+               COpenGL3DriverBase(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager);\r
 \r
        public:\r
 \r
                //! destructor\r
-               virtual ~COpenGL3Driver();\r
+               virtual ~COpenGL3DriverBase();\r
 \r
                virtual bool beginScene(u16 clearFlag, SColor clearColor = SColor(255, 0, 0, 0), f32 clearDepth = 1.f, u8 clearStencil = 0,\r
                        const SExposedVideoData& videoData = SExposedVideoData(), core::rect<s32>* sourceRect = 0) override;\r
@@ -329,9 +329,13 @@ namespace video
                //! Same as `CacheHandler->setViewport`, but also sets `ViewPort`\r
                virtual void setViewPortRaw(u32 width, u32 height);\r
 \r
-               void drawQuad(const S3DVertex (&vertices)[4], bool textured);\r
-               void drawQuads(const S3DVertex *vertices, int quad_count, bool textured);\r
-               void drawArrays(GLenum type, const S3DVertex *vertices, int vertex_count, bool textured);\r
+               void drawQuad(const VertexType &vertexType, const S3DVertex (&vertices)[4]);\r
+               void drawArrays(GLenum primitiveType, const VertexType &vertexType, const void *vertices, int vertexCount);\r
+               void drawElements(GLenum primitiveType, const VertexType &vertexType, const void *vertices, const u16 *indices, int indexCount);\r
+               void drawElements(GLenum primitiveType, const VertexType &vertexType, uintptr_t vertices, uintptr_t indices, int indexCount);\r
+\r
+               void beginDraw(const VertexType &vertexType, uintptr_t verticesBase);\r
+               void endDraw(const VertexType &vertexType);\r
 \r
                COpenGL3CacheHandler* CacheHandler;\r
                core::stringw Name;\r