comparison src/video/SDL_renderer_gl.c @ 2809:7e257c3a3bf0

Temporary fix for Mac OS X crash in textoverlay
author Sam Lantinga <slouken@libsdl.org>
date Sat, 29 Nov 2008 21:48:14 +0000
parents 368410632f2d
children dc39c0b02f12
comparison
equal deleted inserted replaced
2808:368410632f2d 2809:7e257c3a3bf0
592 GL_STORAGE_SHARED_APPLE); 592 GL_STORAGE_SHARED_APPLE);
593 } else { 593 } else {
594 renderdata->glTexParameteri(data->type, GL_TEXTURE_STORAGE_HINT_APPLE, 594 renderdata->glTexParameteri(data->type, GL_TEXTURE_STORAGE_HINT_APPLE,
595 GL_STORAGE_CACHED_APPLE); 595 GL_STORAGE_CACHED_APPLE);
596 } 596 }
597 /* This causes a crash in testoverlay for some reason. Apple bug? */
598 #if 0
597 if (texture->access == SDL_TEXTUREACCESS_STREAMING 599 if (texture->access == SDL_TEXTUREACCESS_STREAMING
598 && texture->format == SDL_PIXELFORMAT_ARGB8888) { 600 && texture->format == SDL_PIXELFORMAT_ARGB8888) {
599 /* 601 /*
600 if (renderdata->glTextureRangeAPPLE) { 602 if (renderdata->glTextureRangeAPPLE) {
601 renderdata->glTextureRangeAPPLE(data->type, 603 renderdata->glTextureRangeAPPLE(data->type,
605 */ 607 */
606 renderdata->glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); 608 renderdata->glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
607 renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w, 609 renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
608 texture_h, 0, format, type, data->pixels); 610 texture_h, 0, format, type, data->pixels);
609 } else 611 } else
612 #endif
610 #endif 613 #endif
611 { 614 {
612 renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w, 615 renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
613 texture_h, 0, format, type, NULL); 616 texture_h, 0, format, type, NULL);
614 } 617 }