src/render/opengles2/SDL_shaders_gles2.c
author Sam Lantinga <slouken@libsdl.org>
Sun, 06 Feb 2011 00:00:13 -0800
changeset 5201 523409574510
child 5204 daa5463466c5
permissions -rw-r--r--
Added an OpenGL ES 2.0 renderer, contributed by itsnotabigtruck

This compiles, but it untested.
slouken@5201
     1
/*
slouken@5201
     2
    SDL - Simple DirectMedia Layer
slouken@5201
     3
    Copyright (C) 2010 itsnotabigtruck.
slouken@5201
     4
slouken@5201
     5
    Permission is hereby granted, free of charge, to any person obtaining a
slouken@5201
     6
    copy of this software and associated documentation files (the "Software"),
slouken@5201
     7
    to deal in the Software without restriction, including without limitation
slouken@5201
     8
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
slouken@5201
     9
    and/or sell copies of the Software, and to permit persons to whom the
slouken@5201
    10
    Software is furnished to do so, subject to the following conditions:
slouken@5201
    11
slouken@5201
    12
    The above copyright notice and this permission notice shall be included in
slouken@5201
    13
    all copies or substantial portions of the Software.
slouken@5201
    14
slouken@5201
    15
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
slouken@5201
    16
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
slouken@5201
    17
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
slouken@5201
    18
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
slouken@5201
    19
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
slouken@5201
    20
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
slouken@5201
    21
    DEALINGS IN THE SOFTWARE.
slouken@5201
    22
*/
slouken@5201
    23
slouken@5201
    24
#include "SDL_config.h"
slouken@5201
    25
slouken@5201
    26
#if SDL_VIDEO_RENDER_OGL_ES2
slouken@5201
    27
slouken@5201
    28
#ifdef __IPHONEOS__
slouken@5201
    29
#include <OpenGLES/ES2/gl.h>
slouken@5201
    30
#include <OpenGLES/ES2/glext.h>
slouken@5201
    31
#else
slouken@5201
    32
#include <GLES2/gl2.h>
slouken@5201
    33
#include <GLES2/gl2ext.h>
slouken@5201
    34
#endif
slouken@5201
    35
#include "SDL_video.h"
slouken@5201
    36
#include "SDL_shaders_gles2.h"
slouken@5201
    37
#include "SDL_stdinc.h"
slouken@5201
    38
slouken@5201
    39
/*************************************************************************************************
slouken@5201
    40
 * Vertex/fragment shader source                                                                 *
slouken@5201
    41
 *************************************************************************************************/
slouken@5201
    42
slouken@5201
    43
static const Uint8 GLES2_VertexSrc_Default_[] = " \
slouken@5201
    44
    uniform mat4 u_projection; \
slouken@5201
    45
    attribute vec4 a_position; \
slouken@5201
    46
    attribute vec2 a_texCoord; \
slouken@5201
    47
    varying vec2 v_texCoord; \
slouken@5201
    48
    \
slouken@5201
    49
    void main() \
slouken@5201
    50
    { \
slouken@5201
    51
        v_texCoord = a_texCoord; \
slouken@5201
    52
        gl_Position = u_projection * a_position; \
slouken@5201
    53
        gl_PointSize = 1.0; \
slouken@5201
    54
    } \
slouken@5201
    55
";
slouken@5201
    56
slouken@5201
    57
static const Uint8 GLES2_FragmentSrc_SolidSrc_[] = " \
slouken@5201
    58
    precision mediump float; \
slouken@5201
    59
    uniform vec4 u_color; \
slouken@5201
    60
    \
slouken@5201
    61
    void main() \
slouken@5201
    62
    { \
slouken@5201
    63
        gl_FragColor = u_color; \
slouken@5201
    64
    } \
slouken@5201
    65
";
slouken@5201
    66
slouken@5201
    67
static const Uint8 GLES2_FragmentSrc_TextureSrc_[] = " \
slouken@5201
    68
    precision mediump float; \
slouken@5201
    69
    uniform sampler2D u_texture; \
slouken@5201
    70
    uniform vec4 u_modulation; \
slouken@5201
    71
    varying vec2 v_texCoord; \
slouken@5201
    72
    \
slouken@5201
    73
    void main() \
slouken@5201
    74
    { \
slouken@5201
    75
        gl_FragColor = texture2D(u_texture, v_texCoord); \
slouken@5201
    76
        gl_FragColor *= u_modulation; \
slouken@5201
    77
    } \
slouken@5201
    78
";
slouken@5201
    79
slouken@5201
    80
static const GLES2_ShaderInstance GLES2_VertexSrc_Default = {
slouken@5201
    81
    GL_VERTEX_SHADER,
slouken@5201
    82
    GLES2_SOURCE_SHADER,
slouken@5201
    83
    sizeof(GLES2_VertexSrc_Default_),
slouken@5201
    84
    GLES2_VertexSrc_Default_
slouken@5201
    85
};
slouken@5201
    86
slouken@5201
    87
static const GLES2_ShaderInstance GLES2_FragmentSrc_SolidSrc = {
slouken@5201
    88
    GL_FRAGMENT_SHADER,
slouken@5201
    89
    GLES2_SOURCE_SHADER,
slouken@5201
    90
    sizeof(GLES2_FragmentSrc_SolidSrc_),
slouken@5201
    91
    GLES2_FragmentSrc_SolidSrc_
slouken@5201
    92
};
slouken@5201
    93
slouken@5201
    94
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureSrc = {
slouken@5201
    95
    GL_FRAGMENT_SHADER,
slouken@5201
    96
    GLES2_SOURCE_SHADER,
slouken@5201
    97
    sizeof(GLES2_FragmentSrc_TextureSrc_),
slouken@5201
    98
    GLES2_FragmentSrc_TextureSrc_
slouken@5201
    99
};
slouken@5201
   100
slouken@5201
   101
/*************************************************************************************************
slouken@5201
   102
 * Vertex/fragment shader binaries (NVIDIA Tegra 1/2)                                            *
slouken@5201
   103
 *************************************************************************************************/
slouken@5201
   104
slouken@5201
   105
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   106
slouken@5201
   107
#define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B
slouken@5201
   108
slouken@5201
   109
static const Uint8 GLES2_VertexTegra_Default_[] = {
slouken@5201
   110
    243, 193, 1, 142, 31, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   111
    0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 85, 0, 0, 0, 2, 0, 0, 0, 24, 0, 0, 0, 3, 0, 0, 0,
slouken@5201
   112
    91, 0, 0, 0, 1, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   113
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 95, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0,
slouken@5201
   114
    13, 0, 0, 0, 102, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   115
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   116
    0, 0, 0, 16, 0, 0, 0, 104, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 17, 0, 0, 0, 112, 0, 0, 0, 0, 0,
slouken@5201
   117
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 112, 0, 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 19, 0, 0, 0, 132, 0,
slouken@5201
   118
    0, 0, 104, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   119
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97,
slouken@5201
   120
    95, 112, 111, 115, 105, 116, 105, 111, 110, 0, 97, 95, 116, 101, 120, 67, 111, 111, 114, 100,
slouken@5201
   121
    0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 112, 114, 111, 106, 101, 99,
slouken@5201
   122
    116, 105, 111, 110, 0, 0, 0, 0, 0, 0, 0, 82, 139, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 80, 139, 0,
slouken@5201
   123
    0, 1, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 33, 0, 0, 0, 92, 139, 0, 0,
slouken@5201
   124
    1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 240, 0, 0, 0, 0, 0, 0, 1, 0,
slouken@5201
   125
    0, 0, 64, 0, 0, 0, 80, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 193, 0, 0, 0,
slouken@5201
   126
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   127
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   128
    0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 66, 24, 0, 6, 34, 108, 28,
slouken@5201
   129
    0, 0, 42, 16, 128, 0, 195, 192, 6, 129, 252, 255, 65, 96, 108, 28, 0, 0, 0, 0, 0, 1, 195, 192,
slouken@5201
   130
    6, 1, 252, 255, 33, 96, 108, 156, 31, 64, 8, 1, 64, 0, 131, 192, 6, 1, 156, 159, 65, 96, 108,
slouken@5201
   131
    28, 0, 0, 85, 32, 0, 1, 195, 192, 6, 1, 252, 255, 33, 96, 108, 156, 31, 64, 0, 64, 64, 0, 131,
slouken@5201
   132
    192, 134, 1, 152, 31, 65, 96, 108, 156, 31, 64, 127, 48, 0, 1, 195, 192, 6, 129, 129, 255, 33,
slouken@5201
   133
    96
slouken@5201
   134
};
slouken@5201
   135
slouken@5201
   136
static const Uint8 GLES2_FragmentTegra_None_SolidSrc_[] = {
slouken@5201
   137
    155, 191, 159, 1, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   138
    0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   139
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   140
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   141
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   142
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   143
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   144
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   145
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   146
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   147
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   148
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 0, 0, 0, 240, 0, 0,
slouken@5201
   149
    0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0,
slouken@5201
   150
    0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0,
slouken@5201
   151
    0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   152
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1,
slouken@5201
   153
    0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 0, 0, 0, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0, 0, 0,
slouken@5201
   154
    0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 0, 40, 0, 0, 0, 242, 65, 63,
slouken@5201
   155
    192, 200, 0, 0, 0, 242, 65, 63, 128, 168, 0, 0, 0, 242, 65, 63, 64, 72, 0, 0, 0, 242, 65, 63,
slouken@5201
   156
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   157
};
slouken@5201
   158
slouken@5201
   159
static const Uint8 GLES2_FragmentTegra_Alpha_SolidSrc_[] = {
slouken@5201
   160
    169, 153, 195, 28, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   161
    0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   162
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   163
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   164
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   165
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   166
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   167
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   168
    0, 220, 0, 0, 0, 220, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   169
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   170
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   171
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 118, 118, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   172
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   173
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   174
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   175
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   176
    1, 0, 0, 0, 3, 0, 0, 0, 3, 0, 65, 37, 8, 0, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 21, 0,
slouken@5201
   177
    0, 0, 0, 3, 0, 1, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 39, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   178
    0, 0, 0, 0, 0, 3, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0, 9, 0, 0, 0, 24, 0, 4, 40, 232, 231, 15,
slouken@5201
   179
    0, 0, 242, 65, 62, 194, 72, 1, 0, 0, 250, 65, 63, 194, 40, 1, 0, 0, 250, 65, 63, 192, 168, 1,
slouken@5201
   180
    0, 0, 242, 1, 64, 192, 168, 1, 0, 0, 242, 1, 68, 168, 32, 0, 0, 0, 50, 64, 0, 192, 168, 15,
slouken@5201
   181
    0, 0, 242, 1, 66, 168, 64, 0, 16, 0, 242, 65, 1, 232, 231, 15, 0, 0, 242, 65, 62, 168, 160,
slouken@5201
   182
    0, 0, 0, 50, 64, 2, 104, 192, 0, 0, 36, 48, 66, 4, 232, 231, 15, 0, 0, 242, 65, 62, 3, 0, 6,
slouken@5201
   183
    40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 41, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   184
};
slouken@5201
   185
slouken@5201
   186
static const Uint8 GLES2_FragmentTegra_Additive_SolidSrc_[] = {
slouken@5201
   187
    59, 71, 42, 17, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0, 0,
slouken@5201
   188
    0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   189
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   190
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   191
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   192
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   193
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   194
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   195
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   196
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   197
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   198
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 22, 22, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   199
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   200
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   201
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   202
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   203
    1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0,
slouken@5201
   204
    0, 0, 0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 192, 200, 0, 0, 0, 26,
slouken@5201
   205
    0, 70, 192, 40, 0, 0, 0, 2, 0, 64, 192, 72, 0, 0, 0, 10, 0, 66, 192, 168, 0, 0, 0, 18, 0, 68,
slouken@5201
   206
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   207
};
slouken@5201
   208
slouken@5201
   209
static const Uint8 GLES2_FragmentTegra_Modulated_SolidSrc_[] = {
slouken@5201
   210
    37, 191, 49, 17, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0, 0,
slouken@5201
   211
    0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   212
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   213
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   214
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   215
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   216
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   217
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   218
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   219
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   220
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   221
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 32, 32, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   222
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   223
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   224
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   225
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   226
    1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0,
slouken@5201
   227
    0, 0, 0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 104, 192, 0, 0, 0, 242,
slouken@5201
   228
    1, 70, 8, 32, 0, 0, 0, 242, 1, 64, 40, 64, 0, 0, 0, 242, 1, 66, 72, 160, 0, 0, 0, 242, 1, 68,
slouken@5201
   229
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   230
};
slouken@5201
   231
slouken@5201
   232
static const Uint8 GLES2_FragmentTegra_None_TextureSrc_[] = {
slouken@5201
   233
    220, 217, 41, 211, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   234
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   235
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   236
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   237
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   238
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   239
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   240
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   241
    0, 0, 0, 120, 0, 0, 0, 120, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   242
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   243
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   244
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   245
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   246
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   247
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   248
    0, 0, 1, 0, 0, 0, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   249
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 1, 0,
slouken@5201
   250
    0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   251
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   252
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 0, 0, 0, 0, 1, 0,
slouken@5201
   253
    0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 1, 0, 0, 0, 2, 0, 4, 38, 186, 81, 78, 16, 2, 1, 0, 0, 1, 0,
slouken@5201
   254
    1, 39, 0, 4, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 104, 192, 0, 0, 0, 242, 1, 70, 8, 32,
slouken@5201
   255
    0, 0, 0, 242, 1, 64, 40, 64, 0, 0, 0, 242, 1, 66, 72, 160, 0, 0, 0, 242, 1, 68, 1, 0, 6, 40,
slouken@5201
   256
    0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   257
};
slouken@5201
   258
slouken@5201
   259
static const Uint8 GLES2_FragmentTegra_Alpha_TextureSrc_[] = {
slouken@5201
   260
    71, 202, 114, 229, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   261
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   262
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   263
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   264
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   265
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   266
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   267
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   268
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   269
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   270
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   271
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   272
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   273
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   274
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   275
    0, 0, 1, 118, 118, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0,
slouken@5201
   276
    240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0,
slouken@5201
   277
    1, 0, 0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16,
slouken@5201
   278
    0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   279
    0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0,
slouken@5201
   280
    8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186,
slouken@5201
   281
    81, 78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0,
slouken@5201
   282
    0, 0, 16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 8, 192, 1, 0, 0, 242, 1, 64, 104, 32, 1, 0,
slouken@5201
   283
    0, 242, 1, 70, 72, 64, 1, 0, 0, 242, 1, 68, 154, 192, 0, 0, 37, 34, 64, 3, 8, 32, 0, 0, 5, 58,
slouken@5201
   284
    208, 4, 40, 64, 0, 0, 5, 50, 208, 4, 72, 160, 0, 0, 37, 42, 208, 4, 2, 0, 6, 40, 0, 0, 0, 0,
slouken@5201
   285
    0, 0, 0, 0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   286
};
slouken@5201
   287
slouken@5201
   288
static const Uint8 GLES2_FragmentTegra_Additive_TextureSrc_[] = {
slouken@5201
   289
    161, 234, 193, 234, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   290
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   291
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   292
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   293
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   294
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   295
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   296
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   297
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   298
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   299
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   300
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   301
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   302
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   303
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   304
    0, 0, 1, 22, 22, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   305
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0,
slouken@5201
   306
    0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   307
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   308
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0, 8, 0,
slouken@5201
   309
    129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186, 81,
slouken@5201
   310
    78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0,
slouken@5201
   311
    16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 104, 32, 1, 0, 0, 242, 1, 70, 8, 192, 1, 0, 0, 242,
slouken@5201
   312
    1, 64, 72, 64, 1, 0, 0, 242, 1, 68, 136, 192, 0, 0, 0, 26, 64, 4, 136, 32, 0, 0, 0, 2, 64, 7,
slouken@5201
   313
    136, 64, 0, 0, 0, 10, 64, 6, 136, 160, 0, 0, 0, 18, 64, 5, 2, 0, 6, 40, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   314
    0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   315
};
slouken@5201
   316
slouken@5201
   317
static const Uint8 GLES2_FragmentTegra_Modulated_TextureSrc_[] = {
slouken@5201
   318
    75, 132, 201, 227, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   319
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   320
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   321
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   322
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   323
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   324
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   325
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   326
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   327
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   328
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   329
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   330
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   331
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   332
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   333
    0, 0, 1, 32, 32, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   334
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0,
slouken@5201
   335
    0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   336
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   337
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0, 8, 0,
slouken@5201
   338
    129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186, 81,
slouken@5201
   339
    78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0,
slouken@5201
   340
    16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 8, 192, 1, 0, 0, 242, 1, 64, 104, 32, 1, 0, 0, 242,
slouken@5201
   341
    1, 70, 72, 64, 1, 0, 0, 242, 1, 68, 104, 192, 0, 0, 0, 242, 65, 4, 232, 32, 0, 0, 0, 242, 65,
slouken@5201
   342
    0, 40, 64, 0, 0, 0, 242, 65, 6, 72, 160, 0, 0, 0, 242, 65, 5, 2, 0, 6, 40, 0, 0, 0, 0, 0, 0,
slouken@5201
   343
    0, 0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   344
};
slouken@5201
   345
slouken@5201
   346
static const GLES2_ShaderInstance GLES2_VertexTegra_Default = {
slouken@5201
   347
    GL_VERTEX_SHADER,
slouken@5201
   348
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   349
    sizeof(GLES2_VertexTegra_Default_),
slouken@5201
   350
    GLES2_VertexTegra_Default_
slouken@5201
   351
};
slouken@5201
   352
slouken@5201
   353
static const GLES2_ShaderInstance GLES2_FragmentTegra_None_SolidSrc = {
slouken@5201
   354
    GL_FRAGMENT_SHADER,
slouken@5201
   355
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   356
    sizeof(GLES2_FragmentTegra_None_SolidSrc_),
slouken@5201
   357
    GLES2_FragmentTegra_None_SolidSrc_
slouken@5201
   358
};
slouken@5201
   359
slouken@5201
   360
static const GLES2_ShaderInstance GLES2_FragmentTegra_Alpha_SolidSrc = {
slouken@5201
   361
    GL_FRAGMENT_SHADER,
slouken@5201
   362
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   363
    sizeof(GLES2_FragmentTegra_Alpha_SolidSrc_),
slouken@5201
   364
    GLES2_FragmentTegra_Alpha_SolidSrc_
slouken@5201
   365
};
slouken@5201
   366
slouken@5201
   367
static const GLES2_ShaderInstance GLES2_FragmentTegra_Additive_SolidSrc = {
slouken@5201
   368
    GL_FRAGMENT_SHADER,
slouken@5201
   369
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   370
    sizeof(GLES2_FragmentTegra_Additive_SolidSrc_),
slouken@5201
   371
    GLES2_FragmentTegra_Additive_SolidSrc_
slouken@5201
   372
};
slouken@5201
   373
slouken@5201
   374
static const GLES2_ShaderInstance GLES2_FragmentTegra_Modulated_SolidSrc = {
slouken@5201
   375
    GL_FRAGMENT_SHADER,
slouken@5201
   376
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   377
    sizeof(GLES2_FragmentTegra_Modulated_SolidSrc_),
slouken@5201
   378
    GLES2_FragmentTegra_Modulated_SolidSrc_
slouken@5201
   379
};
slouken@5201
   380
slouken@5201
   381
static const GLES2_ShaderInstance GLES2_FragmentTegra_None_TextureSrc = {
slouken@5201
   382
    GL_FRAGMENT_SHADER,
slouken@5201
   383
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   384
    sizeof(GLES2_FragmentTegra_None_TextureSrc_),
slouken@5201
   385
    GLES2_FragmentTegra_None_TextureSrc_
slouken@5201
   386
};
slouken@5201
   387
slouken@5201
   388
static const GLES2_ShaderInstance GLES2_FragmentTegra_Alpha_TextureSrc = {
slouken@5201
   389
    GL_FRAGMENT_SHADER,
slouken@5201
   390
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   391
    sizeof(GLES2_FragmentTegra_Alpha_TextureSrc_),
slouken@5201
   392
    GLES2_FragmentTegra_Alpha_TextureSrc_
slouken@5201
   393
};
slouken@5201
   394
slouken@5201
   395
static const GLES2_ShaderInstance GLES2_FragmentTegra_Additive_TextureSrc = {
slouken@5201
   396
    GL_FRAGMENT_SHADER,
slouken@5201
   397
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   398
    sizeof(GLES2_FragmentTegra_Additive_TextureSrc_),
slouken@5201
   399
    GLES2_FragmentTegra_Additive_TextureSrc_
slouken@5201
   400
};
slouken@5201
   401
slouken@5201
   402
static const GLES2_ShaderInstance GLES2_FragmentTegra_Modulated_TextureSrc = {
slouken@5201
   403
    GL_FRAGMENT_SHADER,
slouken@5201
   404
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   405
    sizeof(GLES2_FragmentTegra_Modulated_TextureSrc_),
slouken@5201
   406
    GLES2_FragmentTegra_Modulated_TextureSrc_
slouken@5201
   407
};
slouken@5201
   408
slouken@5201
   409
#endif /* GLES2_INCLUDE_NVIDIA_SHADERS */
slouken@5201
   410
slouken@5201
   411
/*************************************************************************************************
slouken@5201
   412
 * Vertex/fragment shader definitions                                                            *
slouken@5201
   413
 *************************************************************************************************/
slouken@5201
   414
slouken@5201
   415
static GLES2_Shader GLES2_VertexShader_Default = {
slouken@5201
   416
    2,
slouken@5201
   417
    {
slouken@5201
   418
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   419
        &GLES2_VertexTegra_Default,
slouken@5201
   420
#endif
slouken@5201
   421
        &GLES2_VertexSrc_Default
slouken@5201
   422
    }
slouken@5201
   423
};
slouken@5201
   424
slouken@5201
   425
static GLES2_Shader GLES2_FragmentShader_None_SolidSrc = {
slouken@5201
   426
    2,
slouken@5201
   427
    {
slouken@5201
   428
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   429
        &GLES2_FragmentTegra_None_SolidSrc,
slouken@5201
   430
#endif
slouken@5201
   431
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   432
    }
slouken@5201
   433
};
slouken@5201
   434
slouken@5201
   435
static GLES2_Shader GLES2_FragmentShader_Alpha_SolidSrc = {
slouken@5201
   436
    2,
slouken@5201
   437
    {
slouken@5201
   438
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   439
        &GLES2_FragmentTegra_Alpha_SolidSrc,
slouken@5201
   440
#endif
slouken@5201
   441
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   442
    }
slouken@5201
   443
};
slouken@5201
   444
slouken@5201
   445
static GLES2_Shader GLES2_FragmentShader_Additive_SolidSrc = {
slouken@5201
   446
    2,
slouken@5201
   447
    {
slouken@5201
   448
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   449
        &GLES2_FragmentTegra_Additive_SolidSrc,
slouken@5201
   450
#endif
slouken@5201
   451
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   452
    }
slouken@5201
   453
};
slouken@5201
   454
slouken@5201
   455
static GLES2_Shader GLES2_FragmentShader_Modulated_SolidSrc = {
slouken@5201
   456
    2,
slouken@5201
   457
    {
slouken@5201
   458
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   459
        &GLES2_FragmentTegra_Modulated_SolidSrc,
slouken@5201
   460
#endif
slouken@5201
   461
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   462
    }
slouken@5201
   463
};
slouken@5201
   464
slouken@5201
   465
static GLES2_Shader GLES2_FragmentShader_None_TextureSrc = {
slouken@5201
   466
    2,
slouken@5201
   467
    {
slouken@5201
   468
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   469
        &GLES2_FragmentTegra_None_TextureSrc,
slouken@5201
   470
#endif
slouken@5201
   471
        &GLES2_FragmentSrc_TextureSrc
slouken@5201
   472
    }
slouken@5201
   473
};
slouken@5201
   474
slouken@5201
   475
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureSrc = {
slouken@5201
   476
    2,
slouken@5201
   477
    {
slouken@5201
   478
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   479
        &GLES2_FragmentTegra_Alpha_TextureSrc,
slouken@5201
   480
#endif
slouken@5201
   481
        &GLES2_FragmentSrc_TextureSrc
slouken@5201
   482
    }
slouken@5201
   483
};
slouken@5201
   484
slouken@5201
   485
static GLES2_Shader GLES2_FragmentShader_Additive_TextureSrc = {
slouken@5201
   486
    2,
slouken@5201
   487
    {
slouken@5201
   488
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   489
        &GLES2_FragmentTegra_Additive_TextureSrc,
slouken@5201
   490
#endif
slouken@5201
   491
        &GLES2_FragmentSrc_TextureSrc
slouken@5201
   492
    }
slouken@5201
   493
};
slouken@5201
   494
slouken@5201
   495
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureSrc = {
slouken@5201
   496
    2,
slouken@5201
   497
    {
slouken@5201
   498
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   499
        &GLES2_FragmentTegra_Modulated_TextureSrc,
slouken@5201
   500
#endif
slouken@5201
   501
        &GLES2_FragmentSrc_TextureSrc
slouken@5201
   502
    }
slouken@5201
   503
};
slouken@5201
   504
slouken@5201
   505
/*************************************************************************************************
slouken@5201
   506
 * Shader selector                                                                               *
slouken@5201
   507
 *************************************************************************************************/
slouken@5201
   508
slouken@5201
   509
const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMode)
slouken@5201
   510
{
slouken@5201
   511
    switch (type)
slouken@5201
   512
    {
slouken@5201
   513
    case GLES2_SHADER_VERTEX_DEFAULT:
slouken@5201
   514
        return &GLES2_VertexShader_Default;
slouken@5201
   515
    case GLES2_SHADER_FRAGMENT_SOLID_SRC:
slouken@5201
   516
        switch (blendMode)
slouken@5201
   517
        {
slouken@5201
   518
        case SDL_BLENDMODE_NONE:
slouken@5201
   519
            return &GLES2_FragmentShader_None_SolidSrc;
slouken@5201
   520
        case SDL_BLENDMODE_BLEND:
slouken@5201
   521
            return &GLES2_FragmentShader_Alpha_SolidSrc;
slouken@5201
   522
        case SDL_BLENDMODE_ADD:
slouken@5201
   523
            return &GLES2_FragmentShader_Additive_SolidSrc;
slouken@5201
   524
        case SDL_BLENDMODE_MOD:
slouken@5201
   525
            return &GLES2_FragmentShader_Modulated_SolidSrc;
slouken@5201
   526
        default:
slouken@5201
   527
            return NULL;
slouken@5201
   528
        }
slouken@5201
   529
    case GLES2_SHADER_FRAGMENT_TEXTURE_SRC:
slouken@5201
   530
        switch (blendMode)
slouken@5201
   531
        {
slouken@5201
   532
        case SDL_BLENDMODE_NONE:
slouken@5201
   533
            return &GLES2_FragmentShader_None_TextureSrc;
slouken@5201
   534
        case SDL_BLENDMODE_BLEND:
slouken@5201
   535
            return &GLES2_FragmentShader_Alpha_TextureSrc;
slouken@5201
   536
        case SDL_BLENDMODE_ADD:
slouken@5201
   537
            return &GLES2_FragmentShader_Additive_TextureSrc;
slouken@5201
   538
        case SDL_BLENDMODE_MOD:
slouken@5201
   539
            return &GLES2_FragmentShader_Modulated_TextureSrc;
slouken@5201
   540
        default:
slouken@5201
   541
            return NULL;
slouken@5201
   542
        }
slouken@5201
   543
    default:
slouken@5201
   544
        return NULL;
slouken@5201
   545
    }
slouken@5201
   546
}
slouken@5201
   547
slouken@5201
   548
#endif /* SDL_VIDEO_RENDER_OGL_ES2 */
slouken@5201
   549
slouken@5201
   550
/* vi: set ts=4 sw=4 expandtab: */