From: lordhavoc Date: Wed, 15 May 2002 03:58:00 +0000 (+0000) Subject: change a lot of calls from gl to qgl X-Git-Tag: RELEASE_0_2_0_RC1~514 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=76d7f3a54dabd285f3b084b1a13dc184b9fd799f change a lot of calls from gl to qgl git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1838 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_models.c b/gl_models.c index 815ddb48..6f435a0e 100644 --- a/gl_models.c +++ b/gl_models.c @@ -26,16 +26,16 @@ rmeshinfo_t aliasmeshinfo; /* void GL_SetupModelTransform (vec3_t origin, vec3_t angles, vec_t scale) { - glTranslatef (origin[0], origin[1], origin[2]); + qglTranslatef (origin[0], origin[1], origin[2]); if (scale != 1) - glScalef (scale, scale, scale); + qglScalef (scale, scale, scale); if (angles[1]) - glRotatef (angles[1], 0, 0, 1); + qglRotatef (angles[1], 0, 0, 1); if (angles[0]) - glRotatef (-angles[0], 0, 1, 0); + qglRotatef (-angles[0], 0, 1, 0); if (angles[2]) - glRotatef (angles[2], 1, 0, 0); + qglRotatef (angles[2], 1, 0, 0); } */ diff --git a/gl_textures.c b/gl_textures.c index 5648a1e7..8961ffe8 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -462,7 +462,7 @@ char engineversion[40]; static void r_textures_start(void) { // deal with size limits of various drivers (3dfx in particular) - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &realmaxsize); + qglGetIntegerv(GL_MAX_TEXTURE_SIZE, &realmaxsize); CHECKGLERROR // use the largest scrap texture size we can (not sure if this is really a good idea) diff --git a/r_clip.c b/r_clip.c index ee67e2b2..db77a808 100644 --- a/r_clip.c +++ b/r_clip.c @@ -880,20 +880,20 @@ void R_Clip_DisplayBuffer(void) return; if (clipwidth > 256 || clipheight > 256) return; - glBlendFunc(GL_ONE, GL_ONE); - glBindTexture(GL_TEXTURE_2D, 8000); + qglBlendFunc(GL_ONE, GL_ONE); + qglBindTexture(GL_TEXTURE_2D, 8000); if (firstupload) { memset(clipbuffertex, 0, sizeof(clipbuffertex)); - glTexImage2D(GL_TEXTURE_2D, 0, 1, 256, 256, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, clipbuffertex); + qglTexImage2D(GL_TEXTURE_2D, 0, 1, 256, 256, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, clipbuffertex); } - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + qglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); if (lighthalf) - glColor4ub(0.5, 0.5, 0.5); + qglColor4ub(128, 128, 128, 255); else - glColor4ub(1, 1, 1); + qglColor4ub(255, 255, 255, 255); firstupload = false; b = clipbuffertex; for (i = 0;i < clipwidth*clipheight;i++) @@ -903,16 +903,16 @@ void R_Clip_DisplayBuffer(void) else *b++ = 0; } - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, clipwidth, clipheight, GL_LUMINANCE, GL_UNSIGNED_BYTE, clipbuffertex); - glBegin (GL_QUADS); - glTexCoord2f (0 , 0 );glVertex2f (0 , 0 ); - glTexCoord2f (clipwidth / 256.0f, 0 );glVertex2f (vid.conwidth, 0 ); - glTexCoord2f (clipwidth / 256.0f, clipheight / 256.0f);glVertex2f (vid.conwidth, vid.conheight); - glTexCoord2f (0 , clipheight / 256.0f);glVertex2f (0 , vid.conheight); - glEnd (); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, clipwidth, clipheight, GL_LUMINANCE, GL_UNSIGNED_BYTE, clipbuffertex); + qglBegin (GL_QUADS); + qglTexCoord2f (0 , 0 );qglVertex2f (0 , 0 ); + qglTexCoord2f (clipwidth / 256.0f, 0 );qglVertex2f (vid.conwidth, 0 ); + qglTexCoord2f (clipwidth / 256.0f, clipheight / 256.0f);qglVertex2f (vid.conwidth, vid.conheight); + qglTexCoord2f (0 , clipheight / 256.0f);qglVertex2f (0 , vid.conheight); + qglEnd (); + qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +// qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); +// qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); #endif */ } diff --git a/vid_3dfxsvga.c b/vid_3dfxsvga.c index 00a0593b..9cbb5819 100644 --- a/vid_3dfxsvga.c +++ b/vid_3dfxsvga.c @@ -127,7 +127,7 @@ void VID_SetupDithering(void) dither_select(GR_DITHER_4x4); Con_Printf ("4x4.\n"); } else { - glDisable(GL_DITHER); + qglDisable(GL_DITHER); Con_Printf ("disabled.\n"); } } @@ -151,7 +151,7 @@ void VID_Finish (void) { if (r_render.integer) { - glFinish(); + qglFinish(); fxMesaSwapBuffers(); } } diff --git a/vid_glx.c b/vid_glx.c index 878429ce..bb42edca 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -489,7 +489,7 @@ void VID_Finish (void) int usemouse; if (r_render.integer) { - glFinish(); + qglFinish(); glXSwapBuffers(vidx11_display, win); } diff --git a/vid_shared.c b/vid_shared.c index c0b9fba8..1e9a9636 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -330,7 +330,7 @@ void VID_CheckExtensions(void) if (gl_checkextension("GL_ARB_multitexture", multitexturefuncs, "-nomtex")) { - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_textureunits); + qglGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_textureunits); if (gl_textureunits > 1) gl_combine_extension = gl_checkextension("GL_ARB_texture_env_combine", NULL, "-nocombine") || gl_checkextension("GL_EXT_texture_env_combine", NULL, "-nocombine"); else diff --git a/vid_wgl.c b/vid_wgl.c index 08f7cdd4..d8ca7651 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -380,7 +380,7 @@ void VID_Finish (void) int usemouse; if (r_render.integer && !scr_skipupdate) { - glFinish(); + qglFinish(); SwapBuffers(maindc); } @@ -437,7 +437,7 @@ void VID_Shutdown (void) // LordHavoc: free textures before closing (may help NVIDIA) for (i = 0;i < 8192;i++) temp[i] = i+1; - glDeleteTextures(8192, temp); + qglDeleteTextures(8192, temp); if (hRC) wglDeleteContext(hRC);