removed xo code that was causing 3 frame delay when taking a hibuffer path of rendering

This commit is contained in:
qeed 2009-12-04 22:20:22 +00:00
parent 270ce9466b
commit 63be69bd72
1 changed files with 5 additions and 7 deletions

View File

@ -91,14 +91,12 @@ BlitOpenGL(uint8 *buf)
{ {
p_glBindTexture(GL_TEXTURE_2D, textures[0]); p_glBindTexture(GL_TEXTURE_2D, textures[0]);
if(HiBuffer) { if(HiBuffer) {
static int xo = 0;
xo = (xo + 1) & 3;
Blit8ToHigh(buf, (uint8*)HiBuffer, 256, 240, 256*4, 1, 1); Blit8ToHigh(buf, (uint8*)HiBuffer, 256, 240, 256*4, 1, 1);
if(!xo) {
p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 256, 256, 0, p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 256, 256, 0,
GL_RGBA, GL_UNSIGNED_BYTE, HiBuffer); GL_RGBA, GL_UNSIGNED_BYTE, HiBuffer);
} }
} else { else {
//glPixelStorei(GL_UNPACK_ROW_LENGTH, 256); //glPixelStorei(GL_UNPACK_ROW_LENGTH, 256);
p_glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, 256, 256, 0, p_glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, 256, 256, 0,
GL_COLOR_INDEX,GL_UNSIGNED_BYTE,buf); GL_COLOR_INDEX,GL_UNSIGNED_BYTE,buf);