diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-14 11:41:23 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-14 11:41:23 -0700 |
commit | 0d3524b29e5e8718f80c51de4975f4c1e838d015 (patch) | |
tree | 0e2a3ad537012e74886c291a55f0d23702435076 /tests/sdl_ogl.c | |
parent | 80d2ed3d9781011fb473b7e034abf4980ca7883e (diff) |
retrieve pixel data from IMG_Load, for maximum compatibility
Diffstat (limited to 'tests/sdl_ogl.c')
-rw-r--r-- | tests/sdl_ogl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sdl_ogl.c b/tests/sdl_ogl.c index c423a16e..b7dd29e1 100644 --- a/tests/sdl_ogl.c +++ b/tests/sdl_ogl.c @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); - SDL_LockSurface(surface); + //SDL_LockSurface(surface); // Add some greyness memset(surface->pixels, 0x66, surface->w*surface->h); @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, surface->w, surface->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, surface->pixels ); - SDL_UnlockSurface(surface); + //SDL_UnlockSurface(surface); } else { printf("SDL could not load image.bmp: %s\n", SDL_GetError()); |