mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix white flash levelshot bug in OpenGL1
If you tried to draw the last loaded image, gl texture 0 (which is appearently white) was used because renderer thought the image was already bound. Why OpenGL1 renderer binds texture 0, I have no idea. It's been removed from OpenGL2.
This commit is contained in:
parent
c02528cf1d
commit
973a616061
3 changed files with 2 additions and 10 deletions
|
@ -900,6 +900,8 @@ image_t *R_CreateImage( const char *name, byte *pic, int width, int height,
|
||||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glWrapClampMode );
|
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glWrapClampMode );
|
||||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, glWrapClampMode );
|
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, glWrapClampMode );
|
||||||
|
|
||||||
|
// FIXME: this stops fog from setting border color?
|
||||||
|
glState.currenttextures[glState.currenttmu] = 0;
|
||||||
qglBindTexture( GL_TEXTURE_2D, 0 );
|
qglBindTexture( GL_TEXTURE_2D, 0 );
|
||||||
|
|
||||||
if ( image->TMU == 1 ) {
|
if ( image->TMU == 1 ) {
|
||||||
|
|
|
@ -886,11 +886,6 @@ void RE_BeginRegistration( glconfig_t *glconfigOut ) {
|
||||||
RE_ClearScene();
|
RE_ClearScene();
|
||||||
|
|
||||||
tr.registered = qtrue;
|
tr.registered = qtrue;
|
||||||
|
|
||||||
// NOTE: this sucks, for some reason the first stretch pic is never drawn
|
|
||||||
// without this we'd see a white flash on a level load because the very
|
|
||||||
// first time the level shot would not be drawn
|
|
||||||
// RE_StretchPic(0, 0, 0, 0, 0, 0, 1, 1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
|
@ -1147,11 +1147,6 @@ void RE_BeginRegistration( glconfig_t *glconfigOut ) {
|
||||||
RE_ClearScene();
|
RE_ClearScene();
|
||||||
|
|
||||||
tr.registered = qtrue;
|
tr.registered = qtrue;
|
||||||
|
|
||||||
// NOTE: this sucks, for some reason the first stretch pic is never drawn
|
|
||||||
// without this we'd see a white flash on a level load because the very
|
|
||||||
// first time the level shot would not be drawn
|
|
||||||
// RE_StretchPic(0, 0, 0, 0, 0, 0, 1, 1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
Loading…
Reference in a new issue