Mercurial > sdl-ios-xcode
comparison src/video/SDL_renderer_gl.c @ 2295:dbc6d1893869
Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
author | Bob Pendleton <bob@pendleton.com> |
---|---|
date | Tue, 08 Jan 2008 00:10:46 +0000 |
parents | 12ea0fdc0df2 |
children | 91e601d9df8b |
comparison
equal
deleted
inserted
replaced
2294:386ebf50dd91 | 2295:dbc6d1893869 |
---|---|
293 } | 293 } |
294 if (SDL_GL_MakeCurrent(window->id, data->context) < 0) { | 294 if (SDL_GL_MakeCurrent(window->id, data->context) < 0) { |
295 GL_DestroyRenderer(renderer); | 295 GL_DestroyRenderer(renderer); |
296 return NULL; | 296 return NULL; |
297 } | 297 } |
298 | |
299 #ifdef __MACOSX__ | 298 #ifdef __MACOSX__ |
300 /* Enable multi-threaded rendering */ | 299 /* Enable multi-threaded rendering */ |
301 /* Disabled until Ryan finishes his VBO/PBO code... | 300 /* Disabled until Ryan finishes his VBO/PBO code... |
302 CGLEnable(CGLGetCurrentContext(), kCGLCEMPEngine); | 301 CGLEnable(CGLGetCurrentContext(), kCGLCEMPEngine); |
303 */ | 302 */ |
304 #endif | 303 #endif |
305 | 304 |
306 if (flags & SDL_RENDERER_PRESENTVSYNC) { | 305 if (flags & SDL_RENDERER_PRESENTVSYNC) { |
307 SDL_GL_SetSwapInterval(1); | 306 SDL_GL_SetSwapInterval(1); |
308 } else { | 307 } else { |
577 GL_STORAGE_SHARED_APPLE); | 576 GL_STORAGE_SHARED_APPLE); |
578 } else { | 577 } else { |
579 renderdata->glTexParameteri(data->type, GL_TEXTURE_STORAGE_HINT_APPLE, | 578 renderdata->glTexParameteri(data->type, GL_TEXTURE_STORAGE_HINT_APPLE, |
580 GL_STORAGE_CACHED_APPLE); | 579 GL_STORAGE_CACHED_APPLE); |
581 } | 580 } |
582 if (texture->access == SDL_TEXTUREACCESS_STREAMING && texture->format == SDL_PIXELFORMAT_ARGB8888 ) { | 581 if (texture->access == SDL_TEXTUREACCESS_STREAMING |
582 && texture->format == SDL_PIXELFORMAT_ARGB8888) { | |
583 /* | 583 /* |
584 if (renderdata->glTextureRangeAPPLE) { | 584 if (renderdata->glTextureRangeAPPLE) { |
585 renderdata->glTextureRangeAPPLE(data->type, | 585 renderdata->glTextureRangeAPPLE(data->type, |
586 texture->h * data->pitch, | 586 texture->h * data->pitch, |
587 data->pixels); | 587 data->pixels); |
588 } | 588 } |
589 */ | 589 */ |
590 renderdata->glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); | 590 renderdata->glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); |
591 renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w, | 591 renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w, |
592 texture_h, 0, format, type, data->pixels); | 592 texture_h, 0, format, type, data->pixels); |
593 } else | 593 } else |
594 #endif | 594 #endif |