comparison src/video/SDL_renderer_gl.c @ 2840:53ca0d758b0a

The previous checkin fixes the crash, so at least we're not overrunning the texture pixel data anymore...
author Sam Lantinga <slouken@libsdl.org>
date Sat, 06 Dec 2008 17:43:10 +0000
parents f89700cc9272
children e919f2e3700d
comparison
equal deleted inserted replaced
2839:f89700cc9272 2840:53ca0d758b0a
744 GL_NEAREST); 744 GL_NEAREST);
745 renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S, 745 renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
746 GL_CLAMP_TO_EDGE); 746 GL_CLAMP_TO_EDGE);
747 renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T, 747 renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
748 GL_CLAMP_TO_EDGE); 748 GL_CLAMP_TO_EDGE);
749 #if 0 //def __MACOSX__ 749 #ifdef __MACOSX__
750 #ifndef GL_TEXTURE_STORAGE_HINT_APPLE 750 #ifndef GL_TEXTURE_STORAGE_HINT_APPLE
751 #define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC 751 #define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
752 #endif 752 #endif
753 #ifndef STORAGE_CACHED_APPLE 753 #ifndef STORAGE_CACHED_APPLE
754 #define STORAGE_CACHED_APPLE 0x85BE 754 #define STORAGE_CACHED_APPLE 0x85BE
779 texture_h, 0, format, type, data->pixels); 779 texture_h, 0, format, type, data->pixels);
780 } else 780 } else
781 #endif 781 #endif
782 #endif 782 #endif
783 { 783 {
784 printf("teximage2d(%d,%d,%d,%d)\n", (int) texture_w, (int) texture_h); 784 printf("teximage2d(%d,%d)\n", (int) texture_w, (int) texture_h);
785 renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w, 785 renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
786 texture_h, 0, format, type, NULL); 786 texture_h, 0, format, type, NULL);
787 } 787 }
788 result = renderdata->glGetError(); 788 result = renderdata->glGetError();
789 if (result != GL_NO_ERROR) { 789 if (result != GL_NO_ERROR) {