mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
add a cvar to control the maximum vertex array size for buggy drivers.
defaults to 0 (no limit).
This commit is contained in:
parent
250a920ae2
commit
a99329eff9
1 changed files with 13 additions and 6 deletions
|
@ -84,6 +84,7 @@ QF_glColorTableEXT qglColorTableEXT = NULL;
|
|||
qboolean is8bit = false;
|
||||
|
||||
cvar_t *gl_multitexture;
|
||||
cvar_t *gl_max_vaelements;
|
||||
cvar_t *gl_screenshot_byte_swap;
|
||||
cvar_t *vid_mode;
|
||||
cvar_t *vid_use8bit;
|
||||
|
@ -107,6 +108,10 @@ GL_Common_Init_Cvars (void)
|
|||
{
|
||||
vid_use8bit = Cvar_Get ("vid_use8bit", "0", CVAR_ROM, NULL, "Use 8-bit "
|
||||
"shared palettes.");
|
||||
gl_max_vaelements = Cvar_Get ("gl_max_vaelements", "0", CVAR_ROM, NULL,
|
||||
"limit the vertex array size for buggy "
|
||||
"drivers. 0 (default) uses driver provided "
|
||||
"limit");
|
||||
gl_multitexture = Cvar_Get ("gl_multitexture", "0", CVAR_ARCHIVE,
|
||||
gl_multitexture_f, "Use multitexture when "
|
||||
"available");
|
||||
|
@ -161,6 +166,8 @@ CheckVertexArraySize (void)
|
|||
qfglGetIntegerv (GL_MAX_ELEMENTS_VERTICES, &vaelements);
|
||||
if (vaelements > 65536)
|
||||
vaelements = 65536;
|
||||
if (gl_max_vaelements->int_val)
|
||||
vaelements = min (gl_max_vaelements->int_val, vaelements);
|
||||
// qfglGetIntegerv (MAX_ELEMENTS_INDICES, *vaindices);
|
||||
}
|
||||
|
||||
|
@ -256,6 +263,8 @@ GL_Pre_Init (void)
|
|||
void
|
||||
GL_Init_Common (void)
|
||||
{
|
||||
GL_Common_Init_Cvars ();
|
||||
|
||||
gl_vendor = qfglGetString (GL_VENDOR);
|
||||
Con_Printf ("GL_VENDOR: %s\n", gl_vendor);
|
||||
gl_renderer = qfglGetString (GL_RENDERER);
|
||||
|
@ -289,8 +298,6 @@ GL_Init_Common (void)
|
|||
|
||||
CheckMultiTextureExtensions ();
|
||||
CheckVertexArraySize ();
|
||||
|
||||
GL_Common_Init_Cvars ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue