Quake II RTX doxygen  1.0 dev
fixed.c File Reference
#include "shared/shared.h"
#include "common/common.h"
#include "client/video.h"
#include "fixed.h"

Go to the source code of this file.

Macros

#define GPA(x)   VID_GetProcAddr(x)
 

Functions

void QGL_ShutdownExtensions (unsigned mask)
 
void QGL_InitExtensions (unsigned mask)
 
unsigned QGL_ParseExtensionString (const char *s)
 

Variables

PFNGLGENERATEMIPMAPPROC qglGenerateMipmap
 
PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB
 
PFNGLBINDPROGRAMARBPROC qglBindProgramARB
 
PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB
 
PFNGLGENPROGRAMSARBPROC qglGenProgramsARB
 
PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB
 
PFNGLPROGRAMLOCALPARAMETER4FVARBPROC qglProgramLocalParameter4fvARB
 
PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB
 
PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB
 
PFNGLBINDBUFFERARBPROC qglBindBufferARB
 
PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB
 
PFNGLGENBUFFERSARBPROC qglGenBuffersARB
 
PFNGLBUFFERDATAARBPROC qglBufferDataARB
 
PFNGLBUFFERSUBDATAARBPROC qglBufferSubDataARB
 
PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT
 
PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT
 

Macro Definition Documentation

◆ GPA

#define GPA (   x)    VID_GetProcAddr(x)

Definition at line 88 of file fixed.c.

Function Documentation

◆ QGL_InitExtensions()

void QGL_InitExtensions ( unsigned  mask)

Definition at line 90 of file fixed.c.

91 {
92  if (mask & QGL_ARB_fragment_program) {
93  qglProgramStringARB = GPA("glProgramStringARB");
94  qglBindProgramARB = GPA("glBindProgramARB");
95  qglDeleteProgramsARB = GPA("glDeleteProgramsARB");
96  qglGenProgramsARB = GPA("glGenProgramsARB");
97  qglProgramEnvParameter4fvARB = GPA("glProgramEnvParameter4fvARB");
98  qglProgramLocalParameter4fvARB = GPA("glProgramLocalParameter4fvARB");
99  }
100 
101  if (mask & QGL_ARB_multitexture) {
102  qglActiveTextureARB = GPA("glActiveTextureARB");
103  qglClientActiveTextureARB = GPA("glClientActiveTextureARB");
104  }
105 
106  if (mask & QGL_ARB_vertex_buffer_object) {
107  qglBindBufferARB = GPA("glBindBufferARB");
108  qglDeleteBuffersARB = GPA("glDeleteBuffersARB");
109  qglGenBuffersARB = GPA("glGenBuffersARB");
110  qglBufferDataARB = GPA("glBufferDataARB");
111  qglBufferSubDataARB = GPA("glBufferSubDataARB");
112  }
113 
114  if (mask & QGL_EXT_compiled_vertex_array) {
115  qglLockArraysEXT = GPA("glLockArraysEXT");
116  qglUnlockArraysEXT = GPA("glUnlockArraysEXT");
117  }
118 
119  if (mask & QGL_3_0_core_functions) {
120  qglGenerateMipmap = GPA("glGenerateMipmap");
121  }
122 }

◆ QGL_ParseExtensionString()

unsigned QGL_ParseExtensionString ( const char *  s)

Definition at line 126 of file fixed.c.

127 {
128  // must match defines in fixed.h!
129  static const char *const extnames[] = {
130  "GL_ARB_fragment_program",
131  "GL_ARB_multitexture",
132  "GL_ARB_vertex_buffer_object",
133  "GL_EXT_compiled_vertex_array",
134  "GL_EXT_texture_filter_anisotropic",
135  NULL
136  };
137 
138  return Com_ParseExtensionString(s, extnames);
139 }

◆ QGL_ShutdownExtensions()

void QGL_ShutdownExtensions ( unsigned  mask)

Definition at line 54 of file fixed.c.

55 {
56  if (mask & QGL_ARB_fragment_program) {
57  qglProgramStringARB = NULL;
58  qglBindProgramARB = NULL;
59  qglDeleteProgramsARB = NULL;
60  qglGenProgramsARB = NULL;
63  }
64 
65  if (mask & QGL_ARB_multitexture) {
66  qglActiveTextureARB = NULL;
68  }
69 
70  if (mask & QGL_ARB_vertex_buffer_object) {
71  qglBindBufferARB = NULL;
72  qglDeleteBuffersARB = NULL;
73  qglGenBuffersARB = NULL;
74  qglBufferDataARB = NULL;
75  qglBufferSubDataARB = NULL;
76  }
77 
78  if (mask & QGL_EXT_compiled_vertex_array) {
79  qglLockArraysEXT = NULL;
80  qglUnlockArraysEXT = NULL;
81  }
82 
83  if (mask & QGL_3_0_core_functions) {
84  qglGenerateMipmap = NULL;
85  }
86 }

Variable Documentation

◆ qglActiveTextureARB

PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB

◆ qglBindBufferARB

PFNGLBINDBUFFERARBPROC qglBindBufferARB

◆ qglBindProgramARB

PFNGLBINDPROGRAMARBPROC qglBindProgramARB

Definition at line 31 of file fixed.c.

Referenced by GL_InitPrograms(), GL_StateBits(), QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglBufferDataARB

PFNGLBUFFERDATAARBPROC qglBufferDataARB

Definition at line 45 of file fixed.c.

Referenced by create_surface_vbo(), QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglBufferSubDataARB

PFNGLBUFFERSUBDATAARBPROC qglBufferSubDataARB

◆ qglClientActiveTextureARB

PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB

◆ qglDeleteBuffersARB

PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB

◆ qglDeleteProgramsARB

PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB

◆ qglGenBuffersARB

PFNGLGENBUFFERSARBPROC qglGenBuffersARB

Definition at line 44 of file fixed.c.

Referenced by create_surface_vbo(), QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglGenerateMipmap

PFNGLGENERATEMIPMAPPROC qglGenerateMipmap

Definition at line 27 of file fixed.c.

Referenced by QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglGenProgramsARB

PFNGLGENPROGRAMSARBPROC qglGenProgramsARB

Definition at line 33 of file fixed.c.

Referenced by GL_InitPrograms(), QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglLockArraysEXT

PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT

Definition at line 49 of file fixed.c.

Referenced by GL_LockArrays(), QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglProgramEnvParameter4fvARB

PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB

Definition at line 34 of file fixed.c.

Referenced by QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglProgramLocalParameter4fvARB

PFNGLPROGRAMLOCALPARAMETER4FVARBPROC qglProgramLocalParameter4fvARB

Definition at line 35 of file fixed.c.

Referenced by GL_StateBits(), QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglProgramStringARB

PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB

Definition at line 30 of file fixed.c.

Referenced by GL_InitPrograms(), QGL_InitExtensions(), and QGL_ShutdownExtensions().

◆ qglUnlockArraysEXT

PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT

Definition at line 50 of file fixed.c.

Referenced by GL_UnlockArrays(), QGL_InitExtensions(), and QGL_ShutdownExtensions().

edict_s::s
entity_state_t s
Definition: g_local.h:954
QGL_3_0_core_functions
#define QGL_3_0_core_functions
Definition: dynamic.h:161
qglClientActiveTextureARB
PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB
Definition: fixed.c:39
qglBufferSubDataARB
PFNGLBUFFERSUBDATAARBPROC qglBufferSubDataARB
Definition: fixed.c:46
qglGenerateMipmap
PFNGLGENERATEMIPMAPPROC qglGenerateMipmap
Definition: fixed.c:27
qglProgramLocalParameter4fvARB
PFNGLPROGRAMLOCALPARAMETER4FVARBPROC qglProgramLocalParameter4fvARB
Definition: fixed.c:35
qglLockArraysEXT
PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT
Definition: fixed.c:49
qglProgramStringARB
PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB
Definition: fixed.c:30
qglDeleteProgramsARB
PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB
Definition: fixed.c:32
qglDeleteBuffersARB
PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB
Definition: fixed.c:43
qglBufferDataARB
PFNGLBUFFERDATAARBPROC qglBufferDataARB
Definition: fixed.c:45
qglGenBuffersARB
PFNGLGENBUFFERSARBPROC qglGenBuffersARB
Definition: fixed.c:44
QGL_ARB_fragment_program
#define QGL_ARB_fragment_program
Definition: dynamic.h:155
qglProgramEnvParameter4fvARB
PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB
Definition: fixed.c:34
qglActiveTextureARB
PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB
Definition: fixed.c:38
QGL_ARB_vertex_buffer_object
#define QGL_ARB_vertex_buffer_object
Definition: dynamic.h:157
qglGenProgramsARB
PFNGLGENPROGRAMSARBPROC qglGenProgramsARB
Definition: fixed.c:33
qglBindBufferARB
PFNGLBINDBUFFERARBPROC qglBindBufferARB
Definition: fixed.c:42
QGL_ARB_multitexture
#define QGL_ARB_multitexture
Definition: dynamic.h:156
qglUnlockArraysEXT
PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT
Definition: fixed.c:50
GPA
#define GPA(x)
Definition: fixed.c:88
qglBindProgramARB
PFNGLBINDPROGRAMARBPROC qglBindProgramARB
Definition: fixed.c:31
QGL_EXT_compiled_vertex_array
#define QGL_EXT_compiled_vertex_array
Definition: dynamic.h:158