zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Video_GL_Fixed.hxx
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2  * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3  *
4  * zenilib is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * zenilib is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ZENI_VIDEO_GL_FIXED_HXX
19 #define ZENI_VIDEO_GL_FIXED_HXX
20 
21 // HXXed below
22 #include <Zeni/Light.h>
23 #include <Zeni/Material.h>
24 #include <Zeni/Renderable.h>
25 #include <Zeni/Shader.h>
26 #include <Zeni/Texture.h>
27 #include <Zeni/Textures.h>
28 #include <Zeni/Video.h>
29 
30 #include <Zeni/Video_GL_Fixed.h>
31 
32 // Not HXXed
33 #include <Zeni/Fog.h>
34 #include <Zeni/Shader.h>
35 #include <Zeni/Vertex_Buffer.h>
36 
37 #ifndef DISABLE_GL
38 
39 namespace Zeni {
40 
42 #ifdef REQUIRE_GL_ES
43  glBindBuffer(target, buffer);
44 #else
45  m_pglBindBufferARB(target, buffer);
46 #endif
47  }
48 
50 #ifdef REQUIRE_GL_ES
51  glDeleteBuffers(n, buffers);
52 #else
53  m_pglDeleteBuffersARB(n, buffers);
54 #endif
55  }
56 
58 #ifdef REQUIRE_GL_ES
59  glGenBuffers(n, buffers);
60 #else
61  m_pglGenBuffersARB(n, buffers);
62 #endif
63  }
64 
65  void Video_GL_Fixed::pglBufferDataARB(const GLenum target, const int size, const GLvoid * const data, const GLenum usage) const {
66 #ifdef REQUIRE_GL_ES
67  glBufferData(target, size, data, usage);
68 #else
69  m_pglBufferDataARB(target, size, data, usage);
70 #endif
71  }
72 
73 }
74 
75 #endif
76 
77 #include <Zeni/Fonts.h>
78 #include <Zeni/Light.hxx>
79 #include <Zeni/Material.hxx>
80 #include <Zeni/Renderable.hxx>
81 #include <Zeni/Shader.hxx>
82 #include <Zeni/Texture.hxx>
83 #include <Zeni/Textures.hxx>
84 #include <Zeni/Video.hxx>
85 
86 #endif
int GLsizei
Definition: gl2.h:29
void pglBufferDataARB(const GLenum target, const int size, const GLvoid *const data, const GLenum usage) const
The glBufferDataARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers(...
unsigned int GLenum
Definition: gl2.h:23
GLclampd n
Definition: glew.h:7287
const GLuint * buffers
Definition: glew.h:1669
EGLContext EGLenum target
Definition: eglext.h:87
EGLContext EGLenum EGLClientBuffer buffer
Definition: eglext.h:87
GL_APICALL void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl2ext.h:848
GL_APICALL void GL_APIENTRY glGenBuffers(GLsizei n, GLuint *buffers)
void pglDeleteBuffersARB(const GLsizei n, GLuint *const buffers) const
The glDeleteBuffersARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffe...
void pglGenBuffersARB(const GLsizei n, GLuint *const buffers) const
The glGenBuffersARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers(...
unsigned int GLuint
Definition: gl2.h:32
void GLvoid
Definition: gl2.h:21
GL_APICALL void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint *buffers)
GL_APICALL void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
GLsizeiptr const GLvoid GLenum usage
Definition: glew.h:1667
void pglBindBufferARB(const GLenum target, const GLuint buffer) const
The glBindBufferARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers(...
GLsizei size
Definition: gl2ext.h:1467