Mercurial > sdl-ios-xcode
annotate src/render/opengl/SDL_shaders_gl.h @ 5236:e82908c86c9c
Made the shaders easier to debug when they don't compile
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 08 Feb 2011 20:31:39 -0800 |
parents | 811beeb698f9 |
children | c0e9d3897a85 |
rev | line source |
---|---|
5233
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 Copyright (C) 1997-2010 Sam Lantinga |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 #include "SDL_config.h" |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 /* OpenGL shader implementation */ |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 typedef enum { |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 SHADER_NONE, |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 SHADER_SOLID, |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 SHADER_RGB, |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 //SHADER_YV12, |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 NUM_SHADERS |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 } GL_Shader; |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
34 typedef struct GL_ShaderContext GL_ShaderContext; |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 extern GL_ShaderContext * GL_CreateShaderContext(); |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 extern void GL_SelectShader(GL_ShaderContext *ctx, GL_Shader shader); |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 extern void GL_DestroyShaderContext(GL_ShaderContext *ctx); |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 |
811beeb698f9
Beginning of a framework for OpenGL shaders
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 /* vi: set ts=4 sw=4 expandtab: */ |