comparison src/video/SDL_renderer_gl.c @ 2804:7af8c4ad427e

Fixed crash in glTexSubImage2D() with testoverlay on Mac OS X.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 29 Nov 2008 06:29:33 +0000
parents 38dfc890ee6b
children 368410632f2d
comparison
equal deleted inserted replaced
2803:8fe261aae1bb 2804:7af8c4ad427e
687 renderdata->glPixelStorei(GL_UNPACK_LSB_FIRST, 1); 687 renderdata->glPixelStorei(GL_UNPACK_LSB_FIRST, 1);
688 } else if (texture->format == SDL_PIXELFORMAT_INDEX1MSB) { 688 } else if (texture->format == SDL_PIXELFORMAT_INDEX1MSB) {
689 renderdata->glPixelStorei(GL_UNPACK_LSB_FIRST, 0); 689 renderdata->glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
690 } 690 }
691 renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); 691 renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
692 renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH,
693 pitch / SDL_BYTESPERPIXEL(texture->format));
694 } 692 }
695 693
696 static int 694 static int
697 GL_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture) 695 GL_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
698 { 696 {