Mercurial > sdl-ios-xcode
comparison src/render/opengl/SDL_render_gl.c @ 5206:25ffd4e5255c
Minor consistency cleanup and documentation link update.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 06 Feb 2011 00:48:41 -0800 |
parents | bb45ecd958d8 |
children | daa5463466c5 |
comparison
equal
deleted
inserted
replaced
5205:1f2b17f42fd0 | 5206:25ffd4e5255c |
---|---|
32 | 32 |
33 | 33 |
34 /* OpenGL renderer implementation */ | 34 /* OpenGL renderer implementation */ |
35 | 35 |
36 /* Details on optimizing the texture path on Mac OS X: | 36 /* Details on optimizing the texture path on Mac OS X: |
37 http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/chapter_10_section_2.html | 37 http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/opengl_texturedata.html |
38 */ | 38 */ |
39 | 39 |
40 /* Used to re-create the window with OpenGL capability */ | 40 /* Used to re-create the window with OpenGL capability */ |
41 extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags); | 41 extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags); |
42 | 42 |
70 | 70 |
71 SDL_RenderDriver GL_RenderDriver = { | 71 SDL_RenderDriver GL_RenderDriver = { |
72 GL_CreateRenderer, | 72 GL_CreateRenderer, |
73 { | 73 { |
74 "opengl", | 74 "opengl", |
75 (SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED), | 75 (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC), |
76 1, | 76 1, |
77 {SDL_PIXELFORMAT_ARGB8888}, | 77 {SDL_PIXELFORMAT_ARGB8888}, |
78 0, | 78 0, |
79 0} | 79 0} |
80 }; | 80 }; |
329 static __inline__ SDL_bool | 329 static __inline__ SDL_bool |
330 convert_format(GL_RenderData *renderdata, Uint32 pixel_format, | 330 convert_format(GL_RenderData *renderdata, Uint32 pixel_format, |
331 GLint* internalFormat, GLenum* format, GLenum* type) | 331 GLint* internalFormat, GLenum* format, GLenum* type) |
332 { | 332 { |
333 switch (pixel_format) { | 333 switch (pixel_format) { |
334 case SDL_PIXELFORMAT_RGB888: | |
335 case SDL_PIXELFORMAT_ARGB8888: | 334 case SDL_PIXELFORMAT_ARGB8888: |
336 *internalFormat = GL_RGBA8; | 335 *internalFormat = GL_RGBA8; |
337 *format = GL_BGRA; | 336 *format = GL_BGRA; |
338 *type = GL_UNSIGNED_INT_8_8_8_8_REV; | 337 *type = GL_UNSIGNED_INT_8_8_8_8_REV; |
339 break; | 338 break; |