mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 12:11:34 +00:00
removing the bindtexture extension
This commit is contained in:
parent
d3dbe394ce
commit
c7499f8a68
3 changed files with 4 additions and 58 deletions
|
@ -75,7 +75,6 @@ typedef void (GLAPIENTRY *PRIORTEXFUNCPTR)(GLsizei, const GLuint *,
|
|||
const GLclampf *);
|
||||
typedef void (GLAPIENTRY *TEXSUBIMAGEPTR)(int, int, int, int, int, int, int, int, void *);
|
||||
|
||||
extern BINDTEXFUNCPTR bindTexFunc;
|
||||
extern DELTEXFUNCPTR delTexFunc;
|
||||
extern TEXSUBIMAGEPTR TexSubImage2DFunc;
|
||||
|
||||
|
@ -265,8 +264,6 @@ void R_DrawSkyChain (msurface_t *s);
|
|||
void R_LoadSkys (char *);
|
||||
void R_ClearSkyBox (void);
|
||||
void R_DrawSkyBox (void);
|
||||
byte *LoadTGA (FILE *fin);
|
||||
byte *LoadPCX (FILE *f);
|
||||
|
||||
//
|
||||
// gl_draw.c
|
||||
|
|
|
@ -129,11 +129,7 @@ void GL_Bind (int texnum)
|
|||
if (currenttexture == texnum)
|
||||
return;
|
||||
currenttexture = texnum;
|
||||
#ifdef _WIN32
|
||||
bindTexFunc (GL_TEXTURE_2D, texnum);
|
||||
#else
|
||||
glBindTexture (GL_TEXTURE_2D, texnum);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1405,7 +1401,7 @@ void GL_SelectTexture (GLenum target)
|
|||
{
|
||||
if (!gl_mtexable)
|
||||
return;
|
||||
qglSelectTexture(target+gl_mtex_enum);
|
||||
qglSelectTexture (target + gl_mtex_enum);
|
||||
if (target == oldtarget)
|
||||
return;
|
||||
cnttextures[oldtarget] = currenttexture;
|
||||
|
|
|
@ -152,8 +152,6 @@ typedef void (APIENTRY *lp3DFXFUNC) (int, int, int, int, int, const void*);
|
|||
lp3DFXFUNC glColorTableEXT;
|
||||
qboolean is8bit = false;
|
||||
qboolean isPermedia = false;
|
||||
int gl_mtex_enum = TEXTURE0_SGIS;
|
||||
qboolean gl_arb_mtex = false;
|
||||
qboolean gl_mtexable = false;
|
||||
|
||||
//====================================
|
||||
|
@ -519,51 +517,6 @@ void VID_UpdateWindowStatus (void)
|
|||
}
|
||||
|
||||
|
||||
//====================================
|
||||
|
||||
BINDTEXFUNCPTR bindTexFunc;
|
||||
|
||||
#define TEXTURE_EXT_STRING "GL_EXT_texture_object"
|
||||
|
||||
|
||||
void CheckTextureExtensions (void)
|
||||
{
|
||||
char *tmp;
|
||||
qboolean texture_ext;
|
||||
HINSTANCE hInstGL;
|
||||
|
||||
texture_ext = FALSE;
|
||||
/* check for texture extension */
|
||||
tmp = (unsigned char *)glGetString(GL_EXTENSIONS);
|
||||
while (*tmp)
|
||||
{
|
||||
if (strncmp((const char*)tmp, TEXTURE_EXT_STRING, strlen(TEXTURE_EXT_STRING)) == 0)
|
||||
texture_ext = TRUE;
|
||||
tmp++;
|
||||
}
|
||||
|
||||
if (!texture_ext || COM_CheckParm ("-gl11") )
|
||||
{
|
||||
hInstGL = LoadLibrary("opengl32.dll");
|
||||
|
||||
if (hInstGL == NULL)
|
||||
Sys_Error ("Couldn't load opengl32.dll\n");
|
||||
|
||||
bindTexFunc = (void *)GetProcAddress(hInstGL,"glBindTexture");
|
||||
|
||||
if (!bindTexFunc)
|
||||
Sys_Error ("No texture objects!");
|
||||
return;
|
||||
}
|
||||
|
||||
/* load library and get procedure adresses for texture extension API */
|
||||
if ((bindTexFunc = (BINDTEXFUNCPTR)
|
||||
wglGetProcAddress((LPCSTR) "glBindTextureEXT")) == NULL)
|
||||
{
|
||||
Sys_Error ("GetProcAddress for BindTextureEXT failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void CheckArrayExtensions (void)
|
||||
{
|
||||
|
@ -614,9 +567,9 @@ void CheckMultiTextureExtensions(void)
|
|||
{
|
||||
Con_Printf ("GL_ARB_multitexture\n");
|
||||
qglMTexCoord2f =
|
||||
(void *)wglGetProcAddress("glMultiTexCoord2fARB");
|
||||
qglSelectTexture =
|
||||
(void *) wglGetProcAddress("glActiveTextureARB");
|
||||
(void *)wglGetProcAddress("glMTexCoord2fARB");
|
||||
qglSelectTexture =
|
||||
(void *)wglGetProcAddress("glSelectTextureARB");
|
||||
gl_mtex_enum = GL_TEXTURE0_ARB;
|
||||
gl_mtexable = true;
|
||||
gl_arb_mtex = true;
|
||||
|
|
Loading…
Reference in a new issue