OpenGL2: Direct state access, part 1: Texture binds

This commit is contained in:
SmileTheory 2016-01-18 04:46:01 -08:00
parent 3089df0398
commit 275317fefb
16 changed files with 356 additions and 235 deletions

View file

@ -1351,8 +1351,6 @@ typedef struct {
// the renderer front end should never modify glstate_t
typedef struct {
int currenttextures[NUM_TEXTURE_BUNDLES];
int currenttmu;
qboolean finishCalled;
int texEnv[2];
int faceCulling;
@ -1420,6 +1418,7 @@ typedef struct {
qboolean floatLightmap;
qboolean vertexArrayObject;
qboolean directStateAccess;
} glRefConfig_t;
@ -1718,6 +1717,7 @@ extern cvar_t *r_ext_framebuffer_multisample;
extern cvar_t *r_arb_seamless_cube_map;
extern cvar_t *r_arb_vertex_type_2_10_10_10_rev;
extern cvar_t *r_arb_vertex_array_object;
extern cvar_t *r_ext_direct_state_access;
extern cvar_t *r_nobind; // turns off binding to appropriate textures
extern cvar_t *r_singleShader; // make most world faces use default shader
@ -1882,17 +1882,14 @@ void R_RotateForEntity( const trRefEntity_t *ent, const viewParms_t *viewParms,
/*
** GL wrapper/helper functions
*/
void GL_Bind( image_t *image );
void GL_BindToTMU( image_t *image, int tmu );
void GL_SetDefaultState (void);
void GL_SelectTexture( int unit );
void GL_TextureMode( const char *string );
void GL_CheckErrs( char *file, int line );
#define GL_CheckErrors(...) GL_CheckErrs(__FILE__, __LINE__)
void GL_State( unsigned long stateVector );
void GL_SetProjectionMatrix(mat4_t matrix);
void GL_SetModelviewMatrix(mat4_t matrix);
void GL_TexEnv( int env );
void GL_Cull( int cullType );
#define GLS_SRCBLEND_ZERO 0x00000001