mirror of
https://github.com/encounter/SDL.git
synced 2025-12-11 22:44:17 +00:00
Implemented more flexible blending modes for accelerated renderers
This fixes bug 2594 - Propose new blend mode, SDL_BLENDMODE_BLEND_DSTA blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD, SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_ADD); This fixes bug 2828 - Subtractive Blending blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT, SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT); This goes partway to fixing bug 3684 - Add support for a pre-multiplied alpha blending mode blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_ONE, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD, SDL_BLENDFACTOR_ONE, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD);
This commit is contained in:
@@ -23,6 +23,7 @@ SDL_PROC(void, glActiveTexture, (GLenum))
|
||||
SDL_PROC(void, glAttachShader, (GLuint, GLuint))
|
||||
SDL_PROC(void, glBindAttribLocation, (GLuint, GLuint, const char *))
|
||||
SDL_PROC(void, glBindTexture, (GLenum, GLuint))
|
||||
SDL_PROC(void, glBlendEquationSeparate, (GLenum, GLenum))
|
||||
SDL_PROC(void, glBlendFuncSeparate, (GLenum, GLenum, GLenum, GLenum))
|
||||
SDL_PROC(void, glClear, (GLbitfield))
|
||||
SDL_PROC(void, glClearColor, (GLclampf, GLclampf, GLclampf, GLclampf))
|
||||
|
||||
@@ -122,7 +122,6 @@ typedef struct GLES2_ShaderCache
|
||||
typedef struct GLES2_ProgramCacheEntry
|
||||
{
|
||||
GLuint id;
|
||||
SDL_BlendMode blend_mode;
|
||||
GLES2_ShaderCacheEntry *vertex_shader;
|
||||
GLES2_ShaderCacheEntry *fragment_shader;
|
||||
GLuint uniform_locations[16];
|
||||
@@ -177,7 +176,7 @@ typedef struct GLES2_DriverContext
|
||||
SDL_bool debug_enabled;
|
||||
|
||||
struct {
|
||||
int blendMode;
|
||||
SDL_BlendMode blendMode;
|
||||
SDL_bool tex_coords;
|
||||
} current;
|
||||
|
||||
@@ -372,6 +371,70 @@ GLES2_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static GLenum GetBlendFunc(SDL_BlendFactor factor)
|
||||
{
|
||||
switch (factor) {
|
||||
case SDL_BLENDFACTOR_ZERO:
|
||||
return GL_ZERO;
|
||||
case SDL_BLENDFACTOR_ONE:
|
||||
return GL_ONE;
|
||||
case SDL_BLENDFACTOR_SRC_COLOR:
|
||||
return GL_SRC_COLOR;
|
||||
case SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR:
|
||||
return GL_ONE_MINUS_SRC_COLOR;
|
||||
case SDL_BLENDFACTOR_SRC_ALPHA:
|
||||
return GL_SRC_ALPHA;
|
||||
case SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA:
|
||||
return GL_ONE_MINUS_SRC_ALPHA;
|
||||
case SDL_BLENDFACTOR_DST_COLOR:
|
||||
return GL_DST_COLOR;
|
||||
case SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR:
|
||||
return GL_ONE_MINUS_DST_COLOR;
|
||||
case SDL_BLENDFACTOR_DST_ALPHA:
|
||||
return GL_DST_ALPHA;
|
||||
case SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA:
|
||||
return GL_ONE_MINUS_DST_ALPHA;
|
||||
default:
|
||||
return GL_INVALID_ENUM;
|
||||
}
|
||||
}
|
||||
|
||||
static GLenum GetBlendEquation(SDL_BlendOperation operation)
|
||||
{
|
||||
switch (operation) {
|
||||
case SDL_BLENDOPERATION_ADD:
|
||||
return GL_FUNC_ADD;
|
||||
case SDL_BLENDOPERATION_SUBTRACT:
|
||||
return GL_FUNC_SUBTRACT;
|
||||
case SDL_BLENDOPERATION_REV_SUBTRACT:
|
||||
return GL_FUNC_REVERSE_SUBTRACT;
|
||||
default:
|
||||
return GL_INVALID_ENUM;
|
||||
}
|
||||
}
|
||||
|
||||
static SDL_bool
|
||||
GLES2_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
|
||||
{
|
||||
GLES2_DriverContext *data = (GLES2_DriverContext *) renderer->driverdata;
|
||||
SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode);
|
||||
SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode);
|
||||
SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode);
|
||||
SDL_BlendFactor dstColorFactor = SDL_GetBlendModeDstColorFactor(blendMode);
|
||||
SDL_BlendFactor dstAlphaFactor = SDL_GetBlendModeDstAlphaFactor(blendMode);
|
||||
SDL_BlendOperation alphaOperation = SDL_GetBlendModeAlphaOperation(blendMode);
|
||||
|
||||
if (GetBlendFunc(srcColorFactor) == GL_INVALID_ENUM ||
|
||||
GetBlendFunc(srcAlphaFactor) == GL_INVALID_ENUM ||
|
||||
GetBlendEquation(colorOperation) == GL_INVALID_ENUM ||
|
||||
GetBlendFunc(dstColorFactor) == GL_INVALID_ENUM ||
|
||||
GetBlendFunc(dstAlphaFactor) == GL_INVALID_ENUM ||
|
||||
GetBlendEquation(alphaOperation) == GL_INVALID_ENUM) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
GLES2_UpdateViewport(SDL_Renderer * renderer)
|
||||
{
|
||||
@@ -882,19 +945,16 @@ GLES2_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
* Shader management functions *
|
||||
*************************************************************************************************/
|
||||
|
||||
static GLES2_ShaderCacheEntry *GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type,
|
||||
SDL_BlendMode blendMode);
|
||||
static GLES2_ShaderCacheEntry *GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type);
|
||||
static void GLES2_EvictShader(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *entry);
|
||||
static GLES2_ProgramCacheEntry *GLES2_CacheProgram(SDL_Renderer *renderer,
|
||||
GLES2_ShaderCacheEntry *vertex,
|
||||
GLES2_ShaderCacheEntry *fragment,
|
||||
SDL_BlendMode blendMode);
|
||||
static int GLES2_SelectProgram(SDL_Renderer *renderer, GLES2_ImageSource source,
|
||||
SDL_BlendMode blendMode);
|
||||
GLES2_ShaderCacheEntry *fragment);
|
||||
static int GLES2_SelectProgram(SDL_Renderer *renderer, GLES2_ImageSource source);
|
||||
|
||||
static GLES2_ProgramCacheEntry *
|
||||
GLES2_CacheProgram(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *vertex,
|
||||
GLES2_ShaderCacheEntry *fragment, SDL_BlendMode blendMode)
|
||||
GLES2_ShaderCacheEntry *fragment)
|
||||
{
|
||||
GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
|
||||
GLES2_ProgramCacheEntry *entry;
|
||||
@@ -933,7 +993,6 @@ GLES2_CacheProgram(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *vertex,
|
||||
}
|
||||
entry->vertex_shader = vertex;
|
||||
entry->fragment_shader = fragment;
|
||||
entry->blend_mode = blendMode;
|
||||
|
||||
/* Create the program and link it */
|
||||
entry->id = data->glCreateProgram();
|
||||
@@ -1011,7 +1070,7 @@ GLES2_CacheProgram(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *vertex,
|
||||
}
|
||||
|
||||
static GLES2_ShaderCacheEntry *
|
||||
GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type, SDL_BlendMode blendMode)
|
||||
GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type)
|
||||
{
|
||||
GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
|
||||
const GLES2_Shader *shader;
|
||||
@@ -1021,7 +1080,7 @@ GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type, SDL_BlendMode b
|
||||
int i, j;
|
||||
|
||||
/* Find the corresponding shader */
|
||||
shader = GLES2_GetShader(type, blendMode);
|
||||
shader = GLES2_GetShader(type);
|
||||
if (!shader) {
|
||||
SDL_SetError("No shader matching the requested characteristics was found");
|
||||
return NULL;
|
||||
@@ -1130,7 +1189,7 @@ GLES2_EvictShader(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *entry)
|
||||
}
|
||||
|
||||
static int
|
||||
GLES2_SelectProgram(SDL_Renderer *renderer, GLES2_ImageSource source, SDL_BlendMode blendMode)
|
||||
GLES2_SelectProgram(SDL_Renderer *renderer, GLES2_ImageSource source)
|
||||
{
|
||||
GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
|
||||
GLES2_ShaderCacheEntry *vertex = NULL;
|
||||
@@ -1170,11 +1229,11 @@ GLES2_SelectProgram(SDL_Renderer *renderer, GLES2_ImageSource source, SDL_BlendM
|
||||
}
|
||||
|
||||
/* Load the requested shaders */
|
||||
vertex = GLES2_CacheShader(renderer, vtype, blendMode);
|
||||
vertex = GLES2_CacheShader(renderer, vtype);
|
||||
if (!vertex) {
|
||||
goto fault;
|
||||
}
|
||||
fragment = GLES2_CacheShader(renderer, ftype, blendMode);
|
||||
fragment = GLES2_CacheShader(renderer, ftype);
|
||||
if (!fragment) {
|
||||
goto fault;
|
||||
}
|
||||
@@ -1187,7 +1246,7 @@ GLES2_SelectProgram(SDL_Renderer *renderer, GLES2_ImageSource source, SDL_BlendM
|
||||
}
|
||||
|
||||
/* Generate a matching program */
|
||||
program = GLES2_CacheProgram(renderer, vertex, fragment, blendMode);
|
||||
program = GLES2_CacheProgram(renderer, vertex, fragment);
|
||||
if (!program) {
|
||||
goto fault;
|
||||
}
|
||||
@@ -1341,26 +1400,19 @@ GLES2_RenderClear(SDL_Renderer * renderer)
|
||||
}
|
||||
|
||||
static void
|
||||
GLES2_SetBlendMode(GLES2_DriverContext *data, int blendMode)
|
||||
GLES2_SetBlendMode(GLES2_DriverContext *data, SDL_BlendMode blendMode)
|
||||
{
|
||||
if (blendMode != data->current.blendMode) {
|
||||
switch (blendMode) {
|
||||
default:
|
||||
case SDL_BLENDMODE_NONE:
|
||||
if (blendMode == SDL_BLENDMODE_NONE) {
|
||||
data->glDisable(GL_BLEND);
|
||||
break;
|
||||
case SDL_BLENDMODE_BLEND:
|
||||
} else {
|
||||
data->glEnable(GL_BLEND);
|
||||
data->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
break;
|
||||
case SDL_BLENDMODE_ADD:
|
||||
data->glEnable(GL_BLEND);
|
||||
data->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ZERO, GL_ONE);
|
||||
break;
|
||||
case SDL_BLENDMODE_MOD:
|
||||
data->glEnable(GL_BLEND);
|
||||
data->glBlendFuncSeparate(GL_ZERO, GL_SRC_COLOR, GL_ZERO, GL_ONE);
|
||||
break;
|
||||
data->glBlendFuncSeparate(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blendMode)),
|
||||
GetBlendFunc(SDL_GetBlendModeDstColorFactor(blendMode)),
|
||||
GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blendMode)),
|
||||
GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blendMode)));
|
||||
data->glBlendEquationSeparate(GetBlendEquation(SDL_GetBlendModeColorOperation(blendMode)),
|
||||
GetBlendEquation(SDL_GetBlendModeAlphaOperation(blendMode)));
|
||||
}
|
||||
data->current.blendMode = blendMode;
|
||||
}
|
||||
@@ -1383,18 +1435,17 @@ static int
|
||||
GLES2_SetDrawingState(SDL_Renderer * renderer)
|
||||
{
|
||||
GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
|
||||
const int blendMode = renderer->blendMode;
|
||||
GLES2_ProgramCacheEntry *program;
|
||||
Uint8 r, g, b, a;
|
||||
|
||||
GLES2_ActivateRenderer(renderer);
|
||||
|
||||
GLES2_SetBlendMode(data, blendMode);
|
||||
GLES2_SetBlendMode(data, renderer->blendMode);
|
||||
|
||||
GLES2_SetTexCoords(data, SDL_FALSE);
|
||||
|
||||
/* Activate an appropriate shader and set the projection matrix */
|
||||
if (GLES2_SelectProgram(renderer, GLES2_IMAGESOURCE_SOLID, blendMode) < 0) {
|
||||
if (GLES2_SelectProgram(renderer, GLES2_IMAGESOURCE_SOLID) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1555,12 +1606,10 @@ GLES2_SetupCopy(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
|
||||
GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata;
|
||||
GLES2_ImageSource sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR;
|
||||
SDL_BlendMode blendMode;
|
||||
GLES2_ProgramCacheEntry *program;
|
||||
Uint8 r, g, b, a;
|
||||
|
||||
/* Activate an appropriate shader and set the projection matrix */
|
||||
blendMode = texture->blendMode;
|
||||
if (renderer->target) {
|
||||
/* Check if we need to do color mapping between the source and render target textures */
|
||||
if (renderer->target->format != texture->format) {
|
||||
@@ -1658,7 +1707,7 @@ GLES2_SetupCopy(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
}
|
||||
}
|
||||
|
||||
if (GLES2_SelectProgram(renderer, sourceType, blendMode) < 0) {
|
||||
if (GLES2_SelectProgram(renderer, sourceType) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1705,7 +1754,7 @@ GLES2_SetupCopy(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
}
|
||||
|
||||
/* Configure texture blending */
|
||||
GLES2_SetBlendMode(data, blendMode);
|
||||
GLES2_SetBlendMode(data, renderer->blendMode);
|
||||
|
||||
GLES2_SetTexCoords(data, SDL_TRUE);
|
||||
return 0;
|
||||
@@ -1938,7 +1987,7 @@ GLES2_ResetState(SDL_Renderer *renderer)
|
||||
GLES2_ActivateRenderer(renderer);
|
||||
}
|
||||
|
||||
data->current.blendMode = -1;
|
||||
data->current.blendMode = SDL_BLENDMODE_INVALID;
|
||||
data->current.tex_coords = SDL_FALSE;
|
||||
|
||||
data->glActiveTexture(GL_TEXTURE0);
|
||||
@@ -2091,28 +2140,29 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
data->window_framebuffer = (GLuint)window_framebuffer;
|
||||
|
||||
/* Populate the function pointers for the module */
|
||||
renderer->WindowEvent = &GLES2_WindowEvent;
|
||||
renderer->GetOutputSize = &GLES2_GetOutputSize;
|
||||
renderer->CreateTexture = &GLES2_CreateTexture;
|
||||
renderer->UpdateTexture = &GLES2_UpdateTexture;
|
||||
renderer->UpdateTextureYUV = &GLES2_UpdateTextureYUV;
|
||||
renderer->LockTexture = &GLES2_LockTexture;
|
||||
renderer->UnlockTexture = &GLES2_UnlockTexture;
|
||||
renderer->SetRenderTarget = &GLES2_SetRenderTarget;
|
||||
renderer->UpdateViewport = &GLES2_UpdateViewport;
|
||||
renderer->UpdateClipRect = &GLES2_UpdateClipRect;
|
||||
renderer->RenderClear = &GLES2_RenderClear;
|
||||
renderer->RenderDrawPoints = &GLES2_RenderDrawPoints;
|
||||
renderer->RenderDrawLines = &GLES2_RenderDrawLines;
|
||||
renderer->RenderFillRects = &GLES2_RenderFillRects;
|
||||
renderer->RenderCopy = &GLES2_RenderCopy;
|
||||
renderer->RenderCopyEx = &GLES2_RenderCopyEx;
|
||||
renderer->RenderReadPixels = &GLES2_RenderReadPixels;
|
||||
renderer->RenderPresent = &GLES2_RenderPresent;
|
||||
renderer->DestroyTexture = &GLES2_DestroyTexture;
|
||||
renderer->DestroyRenderer = &GLES2_DestroyRenderer;
|
||||
renderer->GL_BindTexture = &GLES2_BindTexture;
|
||||
renderer->GL_UnbindTexture = &GLES2_UnbindTexture;
|
||||
renderer->WindowEvent = GLES2_WindowEvent;
|
||||
renderer->GetOutputSize = GLES2_GetOutputSize;
|
||||
renderer->SupportsBlendMode = GLES2_SupportsBlendMode;
|
||||
renderer->CreateTexture = GLES2_CreateTexture;
|
||||
renderer->UpdateTexture = GLES2_UpdateTexture;
|
||||
renderer->UpdateTextureYUV = GLES2_UpdateTextureYUV;
|
||||
renderer->LockTexture = GLES2_LockTexture;
|
||||
renderer->UnlockTexture = GLES2_UnlockTexture;
|
||||
renderer->SetRenderTarget = GLES2_SetRenderTarget;
|
||||
renderer->UpdateViewport = GLES2_UpdateViewport;
|
||||
renderer->UpdateClipRect = GLES2_UpdateClipRect;
|
||||
renderer->RenderClear = GLES2_RenderClear;
|
||||
renderer->RenderDrawPoints = GLES2_RenderDrawPoints;
|
||||
renderer->RenderDrawLines = GLES2_RenderDrawLines;
|
||||
renderer->RenderFillRects = GLES2_RenderFillRects;
|
||||
renderer->RenderCopy = GLES2_RenderCopy;
|
||||
renderer->RenderCopyEx = GLES2_RenderCopyEx;
|
||||
renderer->RenderReadPixels = GLES2_RenderReadPixels;
|
||||
renderer->RenderPresent = GLES2_RenderPresent;
|
||||
renderer->DestroyTexture = GLES2_DestroyTexture;
|
||||
renderer->DestroyRenderer = GLES2_DestroyRenderer;
|
||||
renderer->GL_BindTexture = GLES2_BindTexture;
|
||||
renderer->GL_UnbindTexture = GLES2_UnbindTexture;
|
||||
|
||||
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12;
|
||||
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV;
|
||||
|
||||
@@ -258,524 +258,46 @@ static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureNV21Src = {
|
||||
};
|
||||
|
||||
|
||||
/*************************************************************************************************
|
||||
* Vertex/fragment shader binaries (NVIDIA Tegra 1/2) *
|
||||
*************************************************************************************************/
|
||||
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
|
||||
#define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B
|
||||
|
||||
static const Uint8 GLES2_VertexTegra_Default_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
95, 112, 111, 115, 105, 116, 105, 111, 110, 0, 97, 95, 116, 101, 120, 67, 111, 111, 114, 100,
|
||||
0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 112, 114, 111, 106, 101, 99,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 42, 16, 128, 0, 195, 192, 6, 129, 252, 255, 65, 96, 108, 28, 0, 0, 0, 0, 0, 1, 195, 192,
|
||||
6, 1, 252, 255, 33, 96, 108, 156, 31, 64, 8, 1, 64, 0, 131, 192, 6, 1, 156, 159, 65, 96, 108,
|
||||
28, 0, 0, 85, 32, 0, 1, 195, 192, 6, 1, 252, 255, 33, 96, 108, 156, 31, 64, 0, 64, 64, 0, 131,
|
||||
192, 134, 1, 152, 31, 65, 96, 108, 156, 31, 64, 127, 48, 0, 1, 195, 192, 6, 129, 129, 255, 33,
|
||||
96
|
||||
};
|
||||
|
||||
static const Uint8 GLES2_FragmentTegra_None_SolidSrc_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
192, 200, 0, 0, 0, 242, 65, 63, 128, 168, 0, 0, 0, 242, 65, 63, 64, 72, 0, 0, 0, 242, 65, 63,
|
||||
1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
|
||||
};
|
||||
|
||||
static const Uint8 GLES2_FragmentTegra_Alpha_SolidSrc_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 242, 65, 62, 194, 72, 1, 0, 0, 250, 65, 63, 194, 40, 1, 0, 0, 250, 65, 63, 192, 168, 1,
|
||||
0, 0, 242, 1, 64, 192, 168, 1, 0, 0, 242, 1, 68, 168, 32, 0, 0, 0, 50, 64, 0, 192, 168, 15,
|
||||
0, 0, 242, 1, 66, 168, 64, 0, 16, 0, 242, 65, 1, 232, 231, 15, 0, 0, 242, 65, 62, 168, 160,
|
||||
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,
|
||||
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
|
||||
};
|
||||
|
||||
static const Uint8 GLES2_FragmentTegra_Additive_SolidSrc_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
|
||||
};
|
||||
|
||||
static const Uint8 GLES2_FragmentTegra_Modulated_SolidSrc_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
|
||||
};
|
||||
|
||||
static const Uint8 GLES2_FragmentTegra_None_TextureSrc_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
|
||||
97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
|
||||
};
|
||||
|
||||
static const Uint8 GLES2_FragmentTegra_Alpha_TextureSrc_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
|
||||
97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 0, 0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
|
||||
};
|
||||
|
||||
static const Uint8 GLES2_FragmentTegra_Additive_TextureSrc_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
|
||||
97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
|
||||
};
|
||||
|
||||
static const Uint8 GLES2_FragmentTegra_Modulated_TextureSrc_[] = {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
|
||||
97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0, 0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_VertexTegra_Default = {
|
||||
GL_VERTEX_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_VertexTegra_Default_),
|
||||
GLES2_VertexTegra_Default_
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_FragmentTegra_None_SolidSrc = {
|
||||
GL_FRAGMENT_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_FragmentTegra_None_SolidSrc_),
|
||||
GLES2_FragmentTegra_None_SolidSrc_
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_FragmentTegra_Alpha_SolidSrc = {
|
||||
GL_FRAGMENT_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_FragmentTegra_Alpha_SolidSrc_),
|
||||
GLES2_FragmentTegra_Alpha_SolidSrc_
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_FragmentTegra_Additive_SolidSrc = {
|
||||
GL_FRAGMENT_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_FragmentTegra_Additive_SolidSrc_),
|
||||
GLES2_FragmentTegra_Additive_SolidSrc_
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_FragmentTegra_Modulated_SolidSrc = {
|
||||
GL_FRAGMENT_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_FragmentTegra_Modulated_SolidSrc_),
|
||||
GLES2_FragmentTegra_Modulated_SolidSrc_
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_FragmentTegra_None_TextureSrc = {
|
||||
GL_FRAGMENT_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_FragmentTegra_None_TextureSrc_),
|
||||
GLES2_FragmentTegra_None_TextureSrc_
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_FragmentTegra_Alpha_TextureSrc = {
|
||||
GL_FRAGMENT_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_FragmentTegra_Alpha_TextureSrc_),
|
||||
GLES2_FragmentTegra_Alpha_TextureSrc_
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_FragmentTegra_Additive_TextureSrc = {
|
||||
GL_FRAGMENT_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_FragmentTegra_Additive_TextureSrc_),
|
||||
GLES2_FragmentTegra_Additive_TextureSrc_
|
||||
};
|
||||
|
||||
static const GLES2_ShaderInstance GLES2_FragmentTegra_Modulated_TextureSrc = {
|
||||
GL_FRAGMENT_SHADER,
|
||||
GL_NVIDIA_PLATFORM_BINARY_NV,
|
||||
sizeof(GLES2_FragmentTegra_Modulated_TextureSrc_),
|
||||
GLES2_FragmentTegra_Modulated_TextureSrc_
|
||||
};
|
||||
|
||||
#endif /* GLES2_INCLUDE_NVIDIA_SHADERS */
|
||||
|
||||
/*************************************************************************************************
|
||||
* Vertex/fragment shader definitions *
|
||||
*************************************************************************************************/
|
||||
|
||||
static GLES2_Shader GLES2_VertexShader_Default = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_VertexTegra_Default,
|
||||
#endif
|
||||
&GLES2_VertexSrc_Default
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_None_SolidSrc = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
static GLES2_Shader GLES2_FragmentShader_SolidSrc = {
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_FragmentTegra_None_SolidSrc,
|
||||
#endif
|
||||
&GLES2_FragmentSrc_SolidSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Alpha_SolidSrc = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
static GLES2_Shader GLES2_FragmentShader_TextureABGRSrc = {
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_FragmentTegra_Alpha_SolidSrc,
|
||||
#endif
|
||||
&GLES2_FragmentSrc_SolidSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Additive_SolidSrc = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_FragmentTegra_Additive_SolidSrc,
|
||||
#endif
|
||||
&GLES2_FragmentSrc_SolidSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Modulated_SolidSrc = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_FragmentTegra_Modulated_SolidSrc,
|
||||
#endif
|
||||
&GLES2_FragmentSrc_SolidSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_None_TextureABGRSrc = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_FragmentTegra_None_TextureSrc,
|
||||
#endif
|
||||
&GLES2_FragmentSrc_TextureABGRSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureABGRSrc = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_FragmentTegra_Alpha_TextureSrc,
|
||||
#endif
|
||||
&GLES2_FragmentSrc_TextureABGRSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Additive_TextureABGRSrc = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_FragmentTegra_Additive_TextureSrc,
|
||||
#endif
|
||||
&GLES2_FragmentSrc_TextureABGRSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureABGRSrc = {
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
2,
|
||||
#else
|
||||
1,
|
||||
#endif
|
||||
{
|
||||
#if GLES2_INCLUDE_NVIDIA_SHADERS
|
||||
&GLES2_FragmentTegra_Modulated_TextureSrc,
|
||||
#endif
|
||||
&GLES2_FragmentSrc_TextureABGRSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_None_TextureARGBSrc = {
|
||||
static GLES2_Shader GLES2_FragmentShader_TextureARGBSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureARGBSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureARGBSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureARGBSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Additive_TextureARGBSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureARGBSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureARGBSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureARGBSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_None_TextureRGBSrc = {
|
||||
static GLES2_Shader GLES2_FragmentShader_TextureRGBSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureRGBSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureRGBSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureRGBSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Additive_TextureRGBSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureRGBSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureRGBSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureRGBSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_None_TextureBGRSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureBGRSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureBGRSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureBGRSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Additive_TextureBGRSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureBGRSrc
|
||||
}
|
||||
};
|
||||
|
||||
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureBGRSrc = {
|
||||
static GLES2_Shader GLES2_FragmentShader_TextureBGRSrc = {
|
||||
1,
|
||||
{
|
||||
&GLES2_FragmentSrc_TextureBGRSrc
|
||||
@@ -808,94 +330,27 @@ static GLES2_Shader GLES2_FragmentShader_TextureNV21Src = {
|
||||
* Shader selector *
|
||||
*************************************************************************************************/
|
||||
|
||||
const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMode)
|
||||
const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type)
|
||||
{
|
||||
switch (type) {
|
||||
case GLES2_SHADER_VERTEX_DEFAULT:
|
||||
return &GLES2_VertexShader_Default;
|
||||
case GLES2_SHADER_FRAGMENT_SOLID_SRC:
|
||||
switch (blendMode) {
|
||||
case SDL_BLENDMODE_NONE:
|
||||
return &GLES2_FragmentShader_None_SolidSrc;
|
||||
case SDL_BLENDMODE_BLEND:
|
||||
return &GLES2_FragmentShader_Alpha_SolidSrc;
|
||||
case SDL_BLENDMODE_ADD:
|
||||
return &GLES2_FragmentShader_Additive_SolidSrc;
|
||||
case SDL_BLENDMODE_MOD:
|
||||
return &GLES2_FragmentShader_Modulated_SolidSrc;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
return &GLES2_FragmentShader_SolidSrc;
|
||||
case GLES2_SHADER_FRAGMENT_TEXTURE_ABGR_SRC:
|
||||
switch (blendMode) {
|
||||
case SDL_BLENDMODE_NONE:
|
||||
return &GLES2_FragmentShader_None_TextureABGRSrc;
|
||||
case SDL_BLENDMODE_BLEND:
|
||||
return &GLES2_FragmentShader_Alpha_TextureABGRSrc;
|
||||
case SDL_BLENDMODE_ADD:
|
||||
return &GLES2_FragmentShader_Additive_TextureABGRSrc;
|
||||
case SDL_BLENDMODE_MOD:
|
||||
return &GLES2_FragmentShader_Modulated_TextureABGRSrc;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
return &GLES2_FragmentShader_TextureABGRSrc;
|
||||
case GLES2_SHADER_FRAGMENT_TEXTURE_ARGB_SRC:
|
||||
switch (blendMode) {
|
||||
case SDL_BLENDMODE_NONE:
|
||||
return &GLES2_FragmentShader_None_TextureARGBSrc;
|
||||
case SDL_BLENDMODE_BLEND:
|
||||
return &GLES2_FragmentShader_Alpha_TextureARGBSrc;
|
||||
case SDL_BLENDMODE_ADD:
|
||||
return &GLES2_FragmentShader_Additive_TextureARGBSrc;
|
||||
case SDL_BLENDMODE_MOD:
|
||||
return &GLES2_FragmentShader_Modulated_TextureARGBSrc;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &GLES2_FragmentShader_TextureARGBSrc;
|
||||
case GLES2_SHADER_FRAGMENT_TEXTURE_RGB_SRC:
|
||||
switch (blendMode) {
|
||||
case SDL_BLENDMODE_NONE:
|
||||
return &GLES2_FragmentShader_None_TextureRGBSrc;
|
||||
case SDL_BLENDMODE_BLEND:
|
||||
return &GLES2_FragmentShader_Alpha_TextureRGBSrc;
|
||||
case SDL_BLENDMODE_ADD:
|
||||
return &GLES2_FragmentShader_Additive_TextureRGBSrc;
|
||||
case SDL_BLENDMODE_MOD:
|
||||
return &GLES2_FragmentShader_Modulated_TextureRGBSrc;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &GLES2_FragmentShader_TextureRGBSrc;
|
||||
case GLES2_SHADER_FRAGMENT_TEXTURE_BGR_SRC:
|
||||
switch (blendMode) {
|
||||
case SDL_BLENDMODE_NONE:
|
||||
return &GLES2_FragmentShader_None_TextureBGRSrc;
|
||||
case SDL_BLENDMODE_BLEND:
|
||||
return &GLES2_FragmentShader_Alpha_TextureBGRSrc;
|
||||
case SDL_BLENDMODE_ADD:
|
||||
return &GLES2_FragmentShader_Additive_TextureBGRSrc;
|
||||
case SDL_BLENDMODE_MOD:
|
||||
return &GLES2_FragmentShader_Modulated_TextureBGRSrc;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &GLES2_FragmentShader_TextureBGRSrc;
|
||||
case GLES2_SHADER_FRAGMENT_TEXTURE_YUV_SRC:
|
||||
{
|
||||
return &GLES2_FragmentShader_TextureYUVSrc;
|
||||
}
|
||||
|
||||
case GLES2_SHADER_FRAGMENT_TEXTURE_NV12_SRC:
|
||||
{
|
||||
return &GLES2_FragmentShader_TextureNV12Src;
|
||||
}
|
||||
|
||||
case GLES2_SHADER_FRAGMENT_TEXTURE_NV21_SRC:
|
||||
{
|
||||
return &GLES2_FragmentShader_TextureNV21Src;
|
||||
}
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef enum
|
||||
|
||||
#define GLES2_SOURCE_SHADER (GLenum)-1
|
||||
|
||||
const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMode);
|
||||
const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type);
|
||||
|
||||
#endif /* SDL_shaders_gles2_h_ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user