src/render/opengl/SDL_shaders_gl.h
author Sam Lantinga <slouken@libsdl.org>
Wed, 09 Feb 2011 10:31:12 -0800
changeset 5238 c0e9d3897a85
parent 5228 811beeb698f9
child 5262 b530ef003506
permissions -rw-r--r--
Fixed compiling on Windows Added an untested shader for YV12 textures
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5228
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,
5238
c0e9d3897a85 Fixed compiling on Windows
Sam Lantinga <slouken@libsdl.org>
parents: 5228
diff changeset
    30
    SHADER_YV12,
5228
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: */