OpenGL2: Direct state access, part 1: Texture binds
This commit is contained in:
parent
3089df0398
commit
275317fefb
16 changed files with 356 additions and 235 deletions
|
@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include "tr_local.h"
|
||||
|
||||
#include "tr_dsa.h"
|
||||
|
||||
glconfig_t glConfig;
|
||||
glRefConfig_t glRefConfig;
|
||||
qboolean textureFilterAnisotropic = qfalse;
|
||||
|
@ -106,6 +108,7 @@ cvar_t *r_ext_framebuffer_multisample;
|
|||
cvar_t *r_arb_seamless_cube_map;
|
||||
cvar_t *r_arb_vertex_type_2_10_10_10_rev;
|
||||
cvar_t *r_arb_vertex_array_object;
|
||||
cvar_t *r_ext_direct_state_access;
|
||||
|
||||
cvar_t *r_mergeMultidraws;
|
||||
cvar_t *r_mergeLeafSurfaces;
|
||||
|
@ -837,7 +840,7 @@ void R_ScreenShotJPEG_f (void) {
|
|||
R_ExportCubemaps
|
||||
==================
|
||||
*/
|
||||
void R_ExportCubemaps()
|
||||
void R_ExportCubemaps(void)
|
||||
{
|
||||
exportCubemapsCommand_t *cmd;
|
||||
|
||||
|
@ -955,19 +958,10 @@ void GL_SetDefaultState( void )
|
|||
|
||||
qglColor4f (1,1,1,1);
|
||||
|
||||
// initialize downstream texture unit if we're running
|
||||
// in a multitexture environment
|
||||
if ( qglActiveTextureARB ) {
|
||||
GL_SelectTexture( 1 );
|
||||
GL_TextureMode( r_textureMode->string );
|
||||
GL_TexEnv( GL_MODULATE );
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
GL_SelectTexture( 0 );
|
||||
}
|
||||
GL_BindNullTextures();
|
||||
|
||||
qglEnable(GL_TEXTURE_2D);
|
||||
GL_TextureMode( r_textureMode->string );
|
||||
GL_TexEnv( GL_MODULATE );
|
||||
|
||||
//qglShadeModel( GL_SMOOTH );
|
||||
qglDepthFunc( GL_LEQUAL );
|
||||
|
@ -1180,6 +1174,7 @@ void R_Register( void )
|
|||
r_arb_seamless_cube_map = ri.Cvar_Get( "r_arb_seamless_cube_map", "0", CVAR_ARCHIVE | CVAR_LATCH);
|
||||
r_arb_vertex_type_2_10_10_10_rev = ri.Cvar_Get( "r_arb_vertex_type_2_10_10_10_rev", "1", CVAR_ARCHIVE | CVAR_LATCH);
|
||||
r_arb_vertex_array_object = ri.Cvar_Get( "r_arb_vertex_array_object", "1", CVAR_ARCHIVE | CVAR_LATCH);
|
||||
r_ext_direct_state_access = ri.Cvar_Get("r_ext_direct_state_access", "1", CVAR_ARCHIVE | CVAR_LATCH);
|
||||
|
||||
r_ext_texture_filter_anisotropic = ri.Cvar_Get( "r_ext_texture_filter_anisotropic",
|
||||
"0", CVAR_ARCHIVE | CVAR_LATCH );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue