Don't load non-core GL functions for OpenGL 3.2 core context
Also declare the GL functions in tr_local.h so there is compile error for non-core GL functions instead of SEGFAULT from dereferencing a NULL pointer. Disable the non-functional stencil shadow code that hasn't been updated to use OpenGL 3.2 core compatible drawing.
This commit is contained in:
parent
255c33b367
commit
7391215bd4
5 changed files with 74 additions and 27 deletions
|
@ -43,8 +43,8 @@ typedef struct {
|
|||
|
||||
static edgeDef_t edgeDefs[SHADER_MAX_VERTEXES][MAX_EDGE_DEFS];
|
||||
static int numEdgeDefs[SHADER_MAX_VERTEXES];
|
||||
static int facing[SHADER_MAX_INDEXES/3];
|
||||
static vec3_t shadowXyz[SHADER_MAX_VERTEXES];
|
||||
//static int facing[SHADER_MAX_INDEXES/3];
|
||||
//static vec3_t shadowXyz[SHADER_MAX_VERTEXES];
|
||||
|
||||
void R_AddEdgeDef( int i1, int i2, int facing ) {
|
||||
int c;
|
||||
|
@ -60,6 +60,8 @@ void R_AddEdgeDef( int i1, int i2, int facing ) {
|
|||
}
|
||||
|
||||
void R_RenderShadowEdges( void ) {
|
||||
// FIXME: implement this
|
||||
#if 0
|
||||
int i;
|
||||
|
||||
#if 0
|
||||
|
@ -138,6 +140,7 @@ void R_RenderShadowEdges( void ) {
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -153,6 +156,8 @@ triangleFromEdge[ v1 ][ v2 ]
|
|||
=================
|
||||
*/
|
||||
void RB_ShadowTessEnd( void ) {
|
||||
// FIXME: implement this
|
||||
#if 0
|
||||
int i;
|
||||
int numTris;
|
||||
vec3_t lightDir;
|
||||
|
@ -230,6 +235,7 @@ void RB_ShadowTessEnd( void ) {
|
|||
|
||||
// reenable writing to the color buffer
|
||||
qglColorMask(rgba[0], rgba[1], rgba[2], rgba[3]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -244,6 +250,8 @@ overlap and double darken.
|
|||
=================
|
||||
*/
|
||||
void RB_ShadowFinish( void ) {
|
||||
// FIXME: implement this
|
||||
#if 0
|
||||
if ( r_shadows->integer != 2 ) {
|
||||
return;
|
||||
}
|
||||
|
@ -275,6 +283,7 @@ void RB_ShadowFinish( void ) {
|
|||
|
||||
qglColor4f(1,1,1,1);
|
||||
qglDisable( GL_STENCIL_TEST );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue