Browse Source

ref: simplify gldebug switchcase in output function, kinda fix const qualifiers

pull/2/head
Alibek Omarov 3 years ago
parent
commit
5fb4edeb36
  1. 2
      ref_gl/gl-wes-v2
  2. 20
      ref_gl/gl_opengl.c
  3. 3
      ref_gl/gl_studio.c
  4. 4
      ref_soft/r_glblit.c
  5. 2
      ref_soft/r_studio.c

2
ref_gl/gl-wes-v2

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit 11384d5cf6de22de3a9a47f97f2e1a4f069d4cd4
Subproject commit 7f567393d4273d8f33924d98968c9a96991aba3c

20
ref_gl/gl_opengl.c

@ -273,8 +273,6 @@ static void APIENTRY GL_DebugOutput( GLuint source, GLuint type, GLuint id, GLui @@ -273,8 +273,6 @@ static void APIENTRY GL_DebugOutput( GLuint source, GLuint type, GLuint id, GLui
gEngfuncs.Con_Printf( S_OPENGL_ERROR "%s\n", message );
break;
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB:
gEngfuncs.Con_Printf( S_OPENGL_WARN "%s\n", message );
break;
case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB:
gEngfuncs.Con_Printf( S_OPENGL_WARN "%s\n", message );
break;
@ -282,8 +280,6 @@ static void APIENTRY GL_DebugOutput( GLuint source, GLuint type, GLuint id, GLui @@ -282,8 +280,6 @@ static void APIENTRY GL_DebugOutput( GLuint source, GLuint type, GLuint id, GLui
gEngfuncs.Con_Reportf( S_OPENGL_WARN "%s\n", message );
break;
case GL_DEBUG_TYPE_PERFORMANCE_ARB:
gEngfuncs.Con_Printf( S_OPENGL_NOTE "%s\n", message );
break;
case GL_DEBUG_TYPE_OTHER_ARB:
default:
gEngfuncs.Con_Printf( S_OPENGL_NOTE "%s\n", message );
@ -498,10 +494,10 @@ void R_RenderInfo_f( void ) @@ -498,10 +494,10 @@ void R_RenderInfo_f( void )
if( glConfig.wrapper == GLES_WRAPPER_GL4ES )
{
const char *vendor = pglGetString( GL_VENDOR | 0x10000 );
const char *renderer = pglGetString( GL_RENDERER | 0x10000 );
const char *version = pglGetString( GL_VERSION | 0x10000 );
const char *extensions = pglGetString( GL_EXTENSIONS | 0x10000 );
const char *vendor = (const char *)pglGetString( GL_VENDOR | 0x10000 );
const char *renderer = (const char *)pglGetString( GL_RENDERER | 0x10000 );
const char *version = (const char *)pglGetString( GL_VERSION | 0x10000 );
const char *extensions = (const char *)pglGetString( GL_EXTENSIONS | 0x10000 );
if( vendor )
gEngfuncs.Con_Printf( "GL4ES_VENDOR: %s\n", vendor );
@ -644,10 +640,10 @@ void GL_InitExtensionsBigGL( void ) @@ -644,10 +640,10 @@ void GL_InitExtensionsBigGL( void )
// gl4es may be used system-wide
if( Q_stristr( glConfig.renderer_string, "gl4es" ))
{
const char *vendor = pglGetString( GL_VENDOR | 0x10000 );
const char *renderer = pglGetString( GL_RENDERER | 0x10000 );
const char *version = pglGetString( GL_VERSION | 0x10000 );
const char *extensions = pglGetString( GL_EXTENSIONS | 0x10000 );
const char *vendor = (const char *)pglGetString( GL_VENDOR | 0x10000 );
const char *renderer = (const char *)pglGetString( GL_RENDERER | 0x10000 );
const char *version = (const char *)pglGetString( GL_VERSION | 0x10000 );
const char *extensions = (const char *)pglGetString( GL_EXTENSIONS | 0x10000 );
glConfig.wrapper = GLES_WRAPPER_GL4ES;
}

3
ref_gl/gl_studio.c

@ -34,7 +34,8 @@ typedef struct @@ -34,7 +34,8 @@ typedef struct
model_t *model;
} player_model_t;
cvar_t r_shadows = { "r_shadows", "0", 0 };
// never gonna change, just shut up const warning
cvar_t r_shadows = { (char *)"r_shadows", (char *)"0", 0 };
static vec3_t hullcolor[8] =
{

4
ref_soft/r_glblit.c

@ -58,8 +58,6 @@ static void APIENTRY GL_DebugOutput( GLuint source, GLuint type, GLuint id, GLui @@ -58,8 +58,6 @@ static void APIENTRY GL_DebugOutput( GLuint source, GLuint type, GLuint id, GLui
gEngfuncs.Con_Printf( S_OPENGL_ERROR "%s\n", message );
break;
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB:
gEngfuncs.Con_Printf( S_OPENGL_WARN "%s\n", message );
break;
case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB:
gEngfuncs.Con_Printf( S_OPENGL_WARN "%s\n", message );
break;
@ -67,8 +65,6 @@ static void APIENTRY GL_DebugOutput( GLuint source, GLuint type, GLuint id, GLui @@ -67,8 +65,6 @@ static void APIENTRY GL_DebugOutput( GLuint source, GLuint type, GLuint id, GLui
gEngfuncs.Con_Reportf( S_OPENGL_WARN "%s\n", message );
break;
case GL_DEBUG_TYPE_PERFORMANCE_ARB:
gEngfuncs.Con_Printf( S_OPENGL_NOTE "%s\n", message );
break;
case GL_DEBUG_TYPE_OTHER_ARB:
default:
gEngfuncs.Con_Printf( S_OPENGL_NOTE "%s\n", message );

2
ref_soft/r_studio.c

@ -34,7 +34,7 @@ typedef struct @@ -34,7 +34,7 @@ typedef struct
model_t *model;
} player_model_t;
cvar_t r_shadows = { "r_shadows", "0", 0 };
cvar_t r_shadows = { (char *)"r_shadows", (char *)"0", 0 };
static vec3_t hullcolor[8] =
{

Loading…
Cancel
Save