Mercurial > sdl-ios-xcode
comparison src/render/opengles2/SDL_shaders_gles2.h @ 5204:523409574510
Added an OpenGL ES 2.0 renderer, contributed by itsnotabigtruck
This compiles, but it untested.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 06 Feb 2011 00:00:13 -0800 |
parents | |
children | daa5463466c5 |
comparison
equal
deleted
inserted
replaced
5203:01bced9a4cc1 | 5204:523409574510 |
---|---|
1 /* | |
2 SDL - Simple DirectMedia Layer | |
3 Copyright (C) 2010 itsnotabigtruck. | |
4 | |
5 Permission is hereby granted, free of charge, to any person obtaining a | |
6 copy of this software and associated documentation files (the "Software"), | |
7 to deal in the Software without restriction, including without limitation | |
8 the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
9 and/or sell copies of the Software, and to permit persons to whom the | |
10 Software is furnished to do so, subject to the following conditions: | |
11 | |
12 The above copyright notice and this permission notice shall be included in | |
13 all copies or substantial portions of the Software. | |
14 | |
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
20 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
21 DEALINGS IN THE SOFTWARE. | |
22 */ | |
23 | |
24 #include "SDL_config.h" | |
25 | |
26 #if SDL_VIDEO_RENDER_OGL_ES2 | |
27 | |
28 #ifndef SDL_shaderdata_h_ | |
29 #define SDL_shaderdata_h_ | |
30 | |
31 #ifdef __IPHONEOS__ | |
32 #include <OpenGLES/ES2/gl.h> | |
33 #else | |
34 #include <GLES2/gl2.h> | |
35 #endif | |
36 | |
37 typedef struct GLES2_ShaderInstance | |
38 { | |
39 GLenum type; | |
40 GLenum format; | |
41 int length; | |
42 const void *data; | |
43 } GLES2_ShaderInstance; | |
44 | |
45 typedef struct GLES2_Shader | |
46 { | |
47 int instance_count; | |
48 const GLES2_ShaderInstance *instances[4]; | |
49 } GLES2_Shader; | |
50 | |
51 typedef enum | |
52 { | |
53 GLES2_SHADER_VERTEX_DEFAULT, | |
54 GLES2_SHADER_FRAGMENT_SOLID_SRC, | |
55 GLES2_SHADER_FRAGMENT_TEXTURE_SRC | |
56 } GLES2_ShaderType; | |
57 | |
58 #define GLES2_SOURCE_SHADER (GLenum)-1 | |
59 | |
60 const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMode); | |
61 | |
62 #endif /* SDL_shaderdata_h_ */ | |
63 | |
64 #endif /* SDL_VIDEO_RENDER_OGL_ES2 */ | |
65 | |
66 /* vi: set ts=4 sw=4 expandtab: */ |