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