src/render/opengles2/SDL_shaders_gles2.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 11 Feb 2011 19:11:27 -0800
changeset 5260 62d2bc792002
parent 5204 daa5463466c5
child 5262 b530ef003506
permissions -rw-r--r--
itsnotabigtruck has given me permission to replace the license for his contribution.
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2010 Sam Lantinga
     4     Copyright (C) 2010 itsnotabigtruck.
     5 
     6     This library is free software; you can redistribute it and/or
     7     modify it under the terms of the GNU Lesser General Public
     8     License as published by the Free Software Foundation; either
     9     version 2.1 of the License, or (at your option) any later version.
    10 
    11     This library is distributed in the hope that it will be useful,
    12     but WITHOUT ANY WARRANTY; without even the implied warranty of
    13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    14     Lesser General Public License for more details.
    15 
    16     You should have received a copy of the GNU Lesser General Public
    17     License along with this library; if not, write to the Free Software
    18     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    19 
    20     Sam Lantinga
    21     slouken@libsdl.org
    22 */
    23 #include "SDL_config.h"
    24 
    25 #if SDL_VIDEO_RENDER_OGL_ES2
    26 
    27 #ifndef SDL_shaderdata_h_
    28 #define SDL_shaderdata_h_
    29 
    30 typedef struct GLES2_ShaderInstance
    31 {
    32     GLenum type;
    33     GLenum format;
    34     int length;
    35     const void *data;
    36 } GLES2_ShaderInstance;
    37 
    38 typedef struct GLES2_Shader
    39 {
    40     int instance_count;
    41     const GLES2_ShaderInstance *instances[4];
    42 } GLES2_Shader;
    43 
    44 typedef enum
    45 {
    46     GLES2_SHADER_VERTEX_DEFAULT,
    47     GLES2_SHADER_FRAGMENT_SOLID_SRC,
    48     GLES2_SHADER_FRAGMENT_TEXTURE_SRC
    49 } GLES2_ShaderType;
    50 
    51 #define GLES2_SOURCE_SHADER (GLenum)-1
    52 
    53 const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMode);
    54 
    55 #endif /* SDL_shaderdata_h_ */
    56 
    57 #endif /* SDL_VIDEO_RENDER_OGL_ES2 */
    58 
    59 /* vi: set ts=4 sw=4 expandtab: */