Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CAPI_GL_Util.h
Go to the documentation of this file.
1 /************************************************************************************
2 
3 Filename : CAPI_GL_Util.h
4 Content : Utility header for OpenGL
5 Created : March 27, 2014
6 Authors : Andrew Reisse, David Borel
7 
8 Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved.
9 
10 Licensed under the Apache License, Version 2.0 (the "License");
11 you may not use this file except in compliance with the License.
12 You may obtain a copy of the License at
13 
14 http://www.apache.org/licenses/LICENSE-2.0
15 
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21 
22 ************************************************************************************/
23 
24 #ifndef INC_OVR_CAPI_GL_Util_h
25 #define INC_OVR_CAPI_GL_Util_h
26 
27 #include "../../OVR_CAPI.h"
28 #include "../../Kernel/OVR_Array.h"
29 #include "../../Kernel/OVR_Math.h"
30 #include "../../Kernel/OVR_RefCount.h"
31 #include "../../Kernel/OVR_String.h"
32 #include "../../Kernel/OVR_Types.h"
33 #include "../../Kernel/OVR_Log.h"
34 
35 #if defined(OVR_OS_WIN32)
36 #include <Windows.h>
37 #endif
38 
39 #if defined(OVR_OS_MAC)
40 #include <OpenGL/gl3.h>
41 #include <OpenGL/gl3ext.h>
42 #else
43 #ifndef GL_GLEXT_PROTOTYPES
44 #define GL_GLEXT_PROTOTYPES
45 #endif
46 #include <GL/gl.h>
47 #include <GL/glext.h>
48 #if defined(OVR_OS_WIN32)
49 #include <GL/wglext.h>
50 #elif defined(OVR_OS_LINUX)
51 #include <GL/glx.h>
52 #endif
53 #endif
54 
55 namespace OVR { namespace CAPI { namespace GL {
56 
57 // GL extension Hooks for Non-Mac.
58 #if !defined(OVR_OS_MAC)
59 
60 // Let Windows apps build without linking GL.
61 #if defined(OVR_OS_WIN32)
62 
63 typedef void (__stdcall *PFNGLENABLEPROC) (GLenum);
64 typedef void (__stdcall *PFNGLDISABLEPROC) (GLenum);
65 typedef void (__stdcall *PFNGLGETFLOATVPROC) (GLenum, GLfloat*);
66 typedef const GLubyte * (__stdcall *PFNGLGETSTRINGPROC) (GLenum);
67 typedef void (__stdcall *PFNGLGETINTEGERVPROC) (GLenum, GLint*);
68 typedef PROC (__stdcall *PFNWGLGETPROCADDRESS) (LPCSTR);
69 typedef void (__stdcall *PFNGLFLUSHPROC) ();
70 typedef void (__stdcall *PFNGLFINISHPROC) ();
71 typedef void (__stdcall *PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
72 typedef void (__stdcall *PFNGLCLEARPROC) (GLbitfield);
73 typedef void (__stdcall *PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
74 typedef void (__stdcall *PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
75 typedef void (__stdcall *PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
76 typedef void (__stdcall *PFNGLDELETETEXTURESPROC) (GLsizei n, GLuint *textures);
77 typedef void (__stdcall *PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
78 typedef void (__stdcall *PFNGLCLEARCOLORPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a);
79 typedef void (__stdcall *PFNGLCLEARDEPTHPROC) (GLclampd depth);
80 typedef void (__stdcall *PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
81 typedef void (__stdcall *PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
82 
83 extern PFNWGLGETPROCADDRESS wglGetProcAddress;
84 extern PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT;
85 extern PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
86 
87 extern PFNGLENABLEPROC glEnable;
88 extern PFNGLDISABLEPROC glDisable;
89 extern PFNGLCOLORMASKPROC glColorMask;
90 extern PFNGLGETFLOATVPROC glGetFloatv;
91 extern PFNGLGETSTRINGPROC glGetString;
92 extern PFNGLGETINTEGERVPROC glGetIntegerv;
93 extern PFNGLCLEARPROC glClear;
94 extern PFNGLCLEARCOLORPROC glClearColor;
95 extern PFNGLCLEARDEPTHPROC glClearDepth;
96 extern PFNGLVIEWPORTPROC glViewport;
97 extern PFNGLDRAWARRAYSPROC glDrawArrays;
98 extern PFNGLDRAWELEMENTSPROC glDrawElements;
99 extern PFNGLGENTEXTURESPROC glGenTextures;
100 extern PFNGLDELETETEXTURESPROC glDeleteTextures;
101 extern PFNGLBINDTEXTUREPROC glBindTexture;
102 extern PFNGLTEXPARAMETERIPROC glTexParameteri;
103 extern PFNGLFLUSHPROC glFlush;
104 extern PFNGLFINISHPROC glFinish;
105 
106 #elif defined(OVR_OS_LINUX)
107 
108 extern PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT;
109 
110 #endif // defined(OVR_OS_WIN32)
111 
112 extern PFNGLDELETESHADERPROC glDeleteShader;
113 extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
114 extern PFNGLACTIVETEXTUREPROC glActiveTexture;
115 extern PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
116 extern PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;
117 extern PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray;
118 extern PFNGLBINDBUFFERPROC glBindBuffer;
119 extern PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;
120 extern PFNGLDELETEBUFFERSPROC glDeleteBuffers;
121 extern PFNGLBUFFERDATAPROC glBufferData;
122 extern PFNGLGENBUFFERSPROC glGenBuffers;
123 extern PFNGLMAPBUFFERPROC glMapBuffer;
124 extern PFNGLUNMAPBUFFERPROC glUnmapBuffer;
125 extern PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
126 extern PFNGLGETSHADERIVPROC glGetShaderiv;
127 extern PFNGLCOMPILESHADERPROC glCompileShader;
128 extern PFNGLSHADERSOURCEPROC glShaderSource;
129 extern PFNGLCREATESHADERPROC glCreateShader;
130 extern PFNGLCREATEPROGRAMPROC glCreateProgram;
131 extern PFNGLATTACHSHADERPROC glAttachShader;
132 extern PFNGLDETACHSHADERPROC glDetachShader;
133 extern PFNGLDELETEPROGRAMPROC glDeleteProgram;
134 extern PFNGLUNIFORM1IPROC glUniform1i;
135 extern PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
136 extern PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform;
137 extern PFNGLUSEPROGRAMPROC glUseProgram;
138 extern PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
139 extern PFNGLGETPROGRAMIVPROC glGetProgramiv;
140 extern PFNGLLINKPROGRAMPROC glLinkProgram;
141 extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation;
142 extern PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;
143 extern PFNGLUNIFORM4FVPROC glUniform4fv;
144 extern PFNGLUNIFORM3FVPROC glUniform3fv;
145 extern PFNGLUNIFORM2FVPROC glUniform2fv;
146 extern PFNGLUNIFORM1FVPROC glUniform1fv;
147 extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
148 extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
149 extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
150 
151 extern void InitGLExtensions();
152 
153 #endif // !defined(OVR_OS_MAC)
154 
155 
156 // Rendering primitive type used to render Model.
158 {
164 };
165 
166 // Types of shaders that can be stored together in a ShaderSet.
168 {
173 };
174 
176 {
178  Map_Read = 2, // do not use
179  Map_Unsynchronized = 4, // like D3D11_MAP_NO_OVERWRITE
180 };
181 
182 
183 // Buffer types used for uploading geometry & constants.
185 {
191  Buffer_ReadOnly = 0x100, // Buffer must be created with Data().
192 };
193 
195 {
196  Texture_RGBA = 0x0100,
197  Texture_Depth = 0x8000,
202 };
203 
204 // Texture sampling modes.
206 {
211 
214  Sample_ClampBorder = 8, // If unsupported Clamp is used instead.
216 
218 };
219 
220 
221 // Rendering parameters/pointers describing GL rendering setup.
223 {
224 #if defined(OVR_OS_WIN32)
225  HWND Window;
226 #elif defined(OVR_OS_LINUX)
227  Display* Disp;
228  Window Win;
229 #endif
230 
233 };
234 
235 
236 class Buffer : public RefCountBase<Buffer>
237 {
238 public:
240  size_t Size;
241  GLenum Use;
242  GLuint GLBuffer;
243 
244 public:
246  ~Buffer();
247 
248  GLuint GetBuffer() { return GLBuffer; }
249 
250  virtual size_t GetSize() { return Size; }
251  virtual void* Map(size_t start, size_t size, int flags = 0);
252  virtual bool Unmap(void *m);
253  virtual bool Data(int use, const void* buffer, size_t size);
254 };
255 
256 class Texture : public RefCountBase<Texture>
257 {
259 
260 public:
262  GLuint TexId;
263  int Width, Height;
264 
265  Texture(RenderParams* rp, int w, int h);
266  ~Texture();
267 
268  virtual int GetWidth() const { return Width; }
269  virtual int GetHeight() const { return Height; }
270 
271  virtual void SetSampleMode(int sm);
272 
273  // Updates texture to point to specified resources
274  // - used for slave rendering.
275  void UpdatePlaceholderTexture(GLuint texId,
276  const Sizei& textureSize);
277 
278  virtual void Set(int slot, ShaderStage stage = Shader_Fragment) const;
279 };
280 
281 // Base class for vertex and pixel shaders. Stored in ShaderSet.
282 class Shader : public RefCountBase<Shader>
283 {
284  friend class ShaderSet;
285 
286 protected:
288 
289 public:
291  virtual ~Shader() {}
292 
293  ShaderStage GetStage() const { return Stage; }
294 
295  virtual void Set(PrimitiveType) const { }
296  virtual void SetUniformBuffer(class Buffer* buffers, int i = 0) { OVR_UNUSED2(buffers, i); }
297 
298 protected:
299  virtual bool SetUniform(const char* name, int n, const float* v) { OVR_UNUSED3(name, n, v); return false; }
300  virtual bool SetUniformBool(const char* name, int n, const bool* v) { OVR_UNUSED3(name, n, v); return false; }
301 };
302 
303 
304 
305 // A group of shaders, one per stage.
306 // A ShaderSet is applied for rendering with a given fill.
307 class ShaderSet : public RefCountBase<ShaderSet>
308 {
309 protected:
311 
312  struct Uniform
313  {
316  int Type; // currently number of floats in vector
317  };
319 
320 public:
321  GLuint Prog;
322  GLint ProjLoc, ViewLoc;
323  GLint TexLoc[8];
326 
327  ShaderSet();
328  ~ShaderSet();
329 
330  virtual void SetShader(Shader *s);
331  virtual void UnsetShader(int stage);
332  Shader* GetShader(int stage) { return Shaders[stage]; }
333 
334  virtual void Set(PrimitiveType prim) const
335  {
337 
338  for (int i = 0; i < Shader_Count; i++)
339  if (Shaders[i])
340  Shaders[i]->Set(prim);
341  }
342 
343  // Set a uniform (other than the standard matrices). It is undefined whether the
344  // uniforms from one shader occupy the same space as those in other shaders
345  // (unless a buffer is used, then each buffer is independent).
346  virtual bool SetUniform(const char* name, int n, const float* v);
347  bool SetUniform1f(const char* name, float x)
348  {
349  const float v[] = {x};
350  return SetUniform(name, 1, v);
351  }
352  bool SetUniform2f(const char* name, float x, float y)
353  {
354  const float v[] = {x,y};
355  return SetUniform(name, 2, v);
356  }
357  bool SetUniform3f(const char* name, float x, float y, float z)
358  {
359  const float v[] = {x,y,z};
360  return SetUniform(name, 3, v);
361  }
362  bool SetUniform4f(const char* name, float x, float y, float z, float w = 1)
363  {
364  const float v[] = {x,y,z,w};
365  return SetUniform(name, 4, v);
366  }
367 
368  bool SetUniformv(const char* name, const Vector3f& v)
369  {
370  const float a[] = {v.x,v.y,v.z,1};
371  return SetUniform(name, 4, a);
372  }
373 
374  virtual bool SetUniform4x4f(const char* name, const Matrix4f& m)
375  {
376  Matrix4f mt = m.Transposed();
377  return SetUniform(name, 16, &mt.M[0][0]);
378  }
379 
380 protected:
381  GLint GetGLShader(Shader* s);
382  bool Link();
383 };
384 
385 
386 // Fill combines a ShaderSet (vertex, pixel) with textures, if any.
387 // Every model has a fill.
388 class ShaderFill : public RefCountBase<ShaderFill>
389 {
392  void* InputLayout; // HACK this should be abstracted
393 
394 public:
397 
398  ShaderSet* GetShaders() const { return Shaders; }
399  void* GetInputLayout() const { return InputLayout; }
400 
401  virtual void Set(PrimitiveType prim = Prim_Unknown) const {
402  Shaders->Set(prim);
403  for(int i = 0; i < 8; i++)
404  {
405  if(Textures[i])
406  {
407  Textures[i]->Set(i);
408  }
409  }
410  }
411 
412  virtual void SetTexture(int i, class Texture* tex) { if (i < 8) Textures[i] = tex; }
413 };
414 
415 
416 struct DisplayId
417 {
418  // Windows
419  String MonitorName; // Monitor name for fullscreen mode
420 
421  // MacOS
422  long CgDisplayId; // CGDirectDisplayID
423 
425  DisplayId(long id) : CgDisplayId(id) {}
426  DisplayId(String m, long id=0) : MonitorName(m), CgDisplayId(id) {}
427 
428  operator bool () const
429  {
430  return MonitorName.GetLength() || CgDisplayId;
431  }
432 
433  bool operator== (const DisplayId& b) const
434  {
435  return CgDisplayId == b.CgDisplayId &&
438  }
439 };
440 
441 
442 class ShaderBase : public Shader
443 {
444 public:
446  unsigned char* UniformData;
448 
449  enum VarType
450  {
454  };
455 
456  struct Uniform
457  {
458  const char* Name;
460  int Offset, Size;
461  };
464 
467  {
468  if (UniformData)
470  }
471 
472  void InitUniforms(const Uniform* refl, size_t reflSize);
473  bool SetUniform(const char* name, int n, const float* v);
474  bool SetUniformBool(const char* name, int n, const bool* v);
475 };
476 
477 
478 template<ShaderStage SStage, GLenum SType>
479 class ShaderImpl : public ShaderBase
480 {
481  friend class ShaderSet;
482 
483 public:
484  ShaderImpl(RenderParams* rp, void* s, size_t size, const Uniform* refl, size_t reflSize)
485  : ShaderBase(rp, SStage)
486  , GLShader(0)
487  {
488  bool success;
489  OVR_UNUSED(size);
490  success = Compile((const char*) s);
491  OVR_ASSERT(success);
492  InitUniforms(refl, reflSize);
493  }
495  {
496  if (GLShader)
497  {
499  GLShader = 0;
500  }
501  }
502  bool Compile(const char* src)
503  {
504  if (!GLShader)
506 
507  glShaderSource(GLShader, 1, &src, 0);
509  GLint r;
510  glGetShaderiv(GLShader, GL_COMPILE_STATUS, &r);
511  if (!r)
512  {
513  GLchar msg[1024];
514  glGetShaderInfoLog(GLShader, sizeof(msg), 0, msg);
515  if (msg[0])
516  OVR_DEBUG_LOG(("Compiling shader\n%s\nfailed: %s\n", src, msg));
517 
518  return 0;
519  }
520  return 1;
521  }
522 
523  GLenum GLStage() const
524  {
525  return SType;
526  }
527 
528 private:
529  GLuint GLShader;
530 };
531 
534 
535 }}}
536 
537 #endif // INC_OVR_CAPI_GL_Util_h
PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray
const Uniform * UniformRefl
Definition: CAPI_GL_Util.h:462
virtual void SetShader(Shader *s)
bool SetUniform1f(const char *name, float x)
Definition: CAPI_GL_Util.h:347
Ptr< ShaderSet > Shaders
Definition: CAPI_GL_Util.h:390
ShaderImpl< Shader_Fragment, GL_FRAGMENT_SHADER > FragmentShader
Definition: CAPI_GL_Util.h:533
virtual int GetHeight() const
Definition: CAPI_GL_Util.h:269
PFNGLUNIFORM4FVPROC glUniform4fv
virtual int GetWidth() const
Definition: CAPI_GL_Util.h:268
GLenum GLStage() const
Definition: CAPI_GL_Util.h:523
PFNGLUNIFORM3FVPROC glUniform3fv
PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer
Shader * GetShader(int stage)
Definition: CAPI_GL_Util.h:332
virtual void SetSampleMode(int sm)
#define OVR_UNUSED3(a1, a2, a3)
PFNGLUNIFORM1IPROC glUniform1i
unsigned char * UniformData
Definition: CAPI_GL_Util.h:446
DisplayId(String m, long id=0)
Definition: CAPI_GL_Util.h:426
#define NULL
PFNGLBUFFERDATAPROC glBufferData
ShaderFill(ShaderSet *sh)
Definition: CAPI_GL_Util.h:395
PFNGLCREATEPROGRAMPROC glCreateProgram
ShaderStage GetStage() const
Definition: CAPI_GL_Util.h:293
PFNGLDELETEPROGRAMPROC glDeleteProgram
bool Compile(const char *src)
Definition: CAPI_GL_Util.h:502
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays
Texture(RenderParams *rp, int w, int h)
PFNGLDELETESHADERPROC glDeleteShader
PFNGLGETPROGRAMIVPROC glGetProgramiv
Matrix4 Transposed() const
Definition: OVR_Math.h:1412
virtual bool SetUniform(const char *name, int n, const float *v)
Definition: CAPI_GL_Util.h:299
ShaderImpl(RenderParams *rp, void *s, size_t size, const Uniform *refl, size_t reflSize)
Definition: CAPI_GL_Util.h:484
#define OVR_UNUSED(a)
void UpdatePlaceholderTexture(GLuint texId, const Sizei &textureSize)
bool SetUniform3f(const char *name, float x, float y, float z)
Definition: CAPI_GL_Util.h:357
PFNGLUNMAPBUFFERPROC glUnmapBuffer
GLint GetGLShader(Shader *s)
ShaderSet * GetShaders() const
Definition: CAPI_GL_Util.h:398
PFNGLSHADERSOURCEPROC glShaderSource
PFNGLUNIFORM1FVPROC glUniform1fv
virtual void Set(int slot, ShaderStage stage=Shader_Fragment) const
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer
const char * ToCStr() const
Definition: OVR_String.h:186
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog
virtual bool Unmap(void *m)
bool SetUniform(const char *name, int n, const float *v)
virtual void * Map(size_t start, size_t size, int flags=0)
PFNGLCOMPILESHADERPROC glCompileShader
PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform
PFNGLLINKPROGRAMPROC glLinkProgram
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays
bool SetUniformv(const char *name, const Vector3f &v)
Definition: CAPI_GL_Util.h:368
virtual void UnsetShader(int stage)
PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation
Ptr< Shader > Shaders[Shader_Count]
Definition: CAPI_GL_Util.h:310
#define OVR_ASSERT(p)
PFNGLUSEPROGRAMPROC glUseProgram
virtual void Set(PrimitiveType prim=Prim_Unknown) const
Definition: CAPI_GL_Util.h:401
ShaderBase(RenderParams *rp, ShaderStage stage)
Definition: CAPI_GL_Util.h:465
virtual bool SetUniformBool(const char *name, int n, const bool *v)
Definition: CAPI_GL_Util.h:300
virtual bool SetUniform4x4f(const char *name, const Matrix4f &m)
Definition: CAPI_GL_Util.h:374
PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray
virtual void Set(PrimitiveType) const
Definition: CAPI_GL_Util.h:295
PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog
T M[4][4]
Definition: OVR_Math.h:1197
PFNGLBINDVERTEXARRAYPROC glBindVertexArray
UPInt GetLength() const
Definition: OVR_String.cpp:142
PFNGLUNIFORM2FVPROC glUniform2fv
Ptr< class Texture > Textures[8]
Definition: CAPI_GL_Util.h:391
PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation
PFNGLATTACHSHADERPROC glAttachShader
bool SetUniformBool(const char *name, int n, const bool *v)
virtual bool SetUniform(const char *name, int n, const float *v)
virtual size_t GetSize()
Definition: CAPI_GL_Util.h:250
PFNGLGENBUFFERSPROC glGenBuffers
PFNGLBINDBUFFERPROC glBindBuffer
Buffer(RenderParams *r)
PFNGLDETACHSHADERPROC glDetachShader
void InitUniforms(const Uniform *refl, size_t reflSize)
PFNGLCREATESHADERPROC glCreateShader
void * GetInputLayout() const
Definition: CAPI_GL_Util.h:399
bool SetUniform2f(const char *name, float x, float y)
Definition: CAPI_GL_Util.h:352
virtual void Set(PrimitiveType prim) const
Definition: CAPI_GL_Util.h:334
virtual void SetUniformBuffer(class Buffer *buffers, int i=0)
Definition: CAPI_GL_Util.h:296
Shader(ShaderStage s)
Definition: CAPI_GL_Util.h:290
virtual void SetTexture(int i, class Texture *tex)
Definition: CAPI_GL_Util.h:412
PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv
Array< Uniform > UniformInfo
Definition: CAPI_GL_Util.h:318
bool SetUniform4f(const char *name, float x, float y, float z, float w=1)
Definition: CAPI_GL_Util.h:362
PFNGLDELETEBUFFERSPROC glDeleteBuffers
ShaderImpl< Shader_Vertex, GL_VERTEX_SHADER > VertexShader
Definition: CAPI_GL_Util.h:532
#define OVR_DEBUG_LOG(args)
Definition: OVR_Log.h:196
virtual bool Data(int use, const void *buffer, size_t size)
PFNGLACTIVETEXTUREPROC glActiveTexture
PFNGLMAPBUFFERPROC glMapBuffer
ShaderFill(ShaderSet &sh)
Definition: CAPI_GL_Util.h:396
RenderParams * pParams
Definition: CAPI_GL_Util.h:261
#define OVR_FREE(p)
RenderParams * pParams
Definition: CAPI_GL_Util.h:239
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD size_t size_t char char * strstr(const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull((1
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation
#define OVR_UNUSED2(a1, a2)
bool operator==(const DisplayId &b) const
Definition: CAPI_GL_Util.h:433
void InitGLExtensions()
PFNGLGETSHADERIVPROC glGetShaderiv