lots more shaders!

SVN revision: 46266
This commit is contained in:
Carsten Haitzler 2010-02-18 07:10:28 +00:00
parent 5777eee064
commit c7695857f7
54 changed files with 1280 additions and 188 deletions

View File

@ -16,6 +16,12 @@ evas_gl_private.h \
evas_gl_common.h \
evas_gl_context.c \
evas_gl_shader.c \
evas_gl_rectangle.c \
evas_gl_texture.c \
evas_gl_image.c \
evas_gl_font.c \
evas_gl_polygon.c \
evas_gl_line.c \
shader/font_frag.h \
shader/font_frag_bin_s3c6410.h \
shader/font_vert.h \
@ -24,6 +30,34 @@ shader/img_frag.h \
shader/img_frag_bin_s3c6410.h \
shader/img_vert.h \
shader/img_vert_bin_s3c6410.h \
shader/img_nomul_frag.h \
shader/img_nomul_frag_bin_s3c6410.h \
shader/img_nomul_vert.h \
shader/img_nomul_vert_bin_s3c6410.h \
shader/img_solid_frag.h \
shader/img_solid_frag_bin_s3c6410.h \
shader/img_solid_vert.h \
shader/img_solid_vert_bin_s3c6410.h \
shader/img_solid_nomul_frag.h \
shader/img_solid_nomul_frag_bin_s3c6410.h \
shader/img_solid_nomul_vert.h \
shader/img_solid_nomul_vert_bin_s3c6410.h \
shader/img_bgra_frag.h \
shader/img_bgra_frag_bin_s3c6410.h \
shader/img_bgra_vert.h \
shader/img_bgra_vert_bin_s3c6410.h \
shader/img_bgra_nomul_frag.h \
shader/img_bgra_nomul_frag_bin_s3c6410.h \
shader/img_bgra_nomul_vert.h \
shader/img_bgra_nomul_vert_bin_s3c6410.h \
shader/img_bgra_solid_frag.h \
shader/img_bgra_solid_frag_bin_s3c6410.h \
shader/img_bgra_solid_vert.h \
shader/img_bgra_solid_vert_bin_s3c6410.h \
shader/img_bgra_solid_nomul_frag.h \
shader/img_bgra_solid_nomul_frag_bin_s3c6410.h \
shader/img_bgra_solid_nomul_vert.h \
shader/img_bgra_solid_nomul_vert_bin_s3c6410.h \
shader/rect_frag.h \
shader/rect_frag_bin_s3c6410.h \
shader/rect_vert.h \
@ -35,13 +69,7 @@ shader/yuv_vert_bin_s3c6410.h \
shader/tex_frag.h \
shader/tex_frag_bin_s3c6410.h \
shader/tex_vert.h \
shader/tex_vert_bin_s3c6410.h \
evas_gl_rectangle.c \
evas_gl_texture.c \
evas_gl_image.c \
evas_gl_font.c \
evas_gl_polygon.c \
evas_gl_line.c
shader/tex_vert_bin_s3c6410.h
libevas_engine_gl_common_la_LIBADD = @EINA_LIBS@ @evas_engine_gl_common_libs@ @dlopen_libs@
endif
@ -54,6 +82,21 @@ shader/make-c-str.sh \
shader/img_frag.shd \
shader/img_frag_s3c6410.asm \
shader/img_vert.shd \
shader/img_nomul_frag.shd \
shader/img_nomul_vert.shd \
shader/img_solid_frag.shd \
shader/img_solid_vert.shd \
shader/img_solid_nomul_frag.shd \
shader/img_solid_nomul_vert.shd \
shader/img_bgra_vert.shd \
shader/img_bgra_frag.shd \
shader/img_bgra_vert.shd \
shader/img_bgra_nomul_frag.shd \
shader/img_bgra_nomul_vert.shd \
shader/img_bgra_solid_frag.shd \
shader/img_bgra_solid_vert.shd \
shader/img_bgra_solid_nomul_frag.shd \
shader/img_bgra_solid_nomul_vert.shd \
shader/rect_frag.shd \
shader/rect_frag_s3c6410.asm \
shader/rect_vert.shd \

View File

@ -47,7 +47,9 @@
#ifndef GL_TEXTURE_RECTANGLE_NV
#define GL_TEXTURE_RECTANGLE_NV 0x84F5
#endif
#ifndef GL_BGRA
#define GL_BGRA 0x80E1
#endif
#define SHAD_VERTEX 0
#define SHAD_COLOR 1
@ -89,6 +91,8 @@ struct _Evas_GL_Shared
GLint max_texture_units;
GLint max_texture_size;
GLfloat anisotropic;
Eina_Bool rgb : 1;
Eina_Bool bgra : 1;
Eina_Bool tex_npo2 : 1;
Eina_Bool tex_rect : 1;
} info;
@ -99,7 +103,17 @@ struct _Evas_GL_Shared
} tex;
struct {
Evas_GL_Program rect, img, font, yuv, tex;
// ADD: tex_nomul, tex_solid, tex_solid_nomul, yuv_nomul
Evas_GL_Program img, img_nomul;
Evas_GL_Program img_solid, img_solid_nomul;
Evas_GL_Program img_bgra, img_bgra_nomul;
Evas_GL_Program img_bgra_solid, img_bgra_solid_nomul;
Evas_GL_Program rect;
Evas_GL_Program font;
Evas_GL_Program yuv;
Evas_GL_Program tex;
} shader;
int references;
int w, h;
@ -247,15 +261,35 @@ struct _Evas_GL_Gradient
extern Evas_GL_Program_Source shader_rect_frag_src;
extern Evas_GL_Program_Source shader_rect_vert_src;
extern Evas_GL_Program_Source shader_img_frag_src;
extern Evas_GL_Program_Source shader_img_vert_src;
extern Evas_GL_Program_Source shader_font_frag_src;
extern Evas_GL_Program_Source shader_font_vert_src;
extern Evas_GL_Program_Source shader_yuv_frag_src;
extern Evas_GL_Program_Source shader_yuv_vert_src;
extern Evas_GL_Program_Source shader_img_frag_src;
extern Evas_GL_Program_Source shader_img_vert_src;
extern Evas_GL_Program_Source shader_img_nomul_frag_src;
extern Evas_GL_Program_Source shader_img_nomul_vert_src;
extern Evas_GL_Program_Source shader_img_solid_frag_src;
extern Evas_GL_Program_Source shader_img_solid_vert_src;
extern Evas_GL_Program_Source shader_img_solid_nomul_frag_src;
extern Evas_GL_Program_Source shader_img_solid_nomul_vert_src;
extern Evas_GL_Program_Source shader_img_bgra_frag_src;
extern Evas_GL_Program_Source shader_img_bgra_vert_src;
extern Evas_GL_Program_Source shader_img_bgra_nomul_frag_src;
extern Evas_GL_Program_Source shader_img_bgra_nomul_vert_src;
extern Evas_GL_Program_Source shader_img_bgra_solid_frag_src;
extern Evas_GL_Program_Source shader_img_bgra_solid_vert_src;
extern Evas_GL_Program_Source shader_img_bgra_solid_nomul_frag_src;
extern Evas_GL_Program_Source shader_img_bgra_solid_nomul_vert_src;
// fixme: more yuv shaders
extern Evas_GL_Program_Source shader_tex_frag_src;
extern Evas_GL_Program_Source shader_tex_vert_src;
// fixme: more tex shaders
//
void glerr(int err, const char *file, const char *func, int line, const char *op);
Evas_GL_Context *evas_gl_common_context_new(void);
@ -341,7 +375,7 @@ void (*glsym_glBindFramebuffer) (GLenum a, GLuint b);
void (*glsym_glFramebufferTexture2D) (GLenum a, GLenum b, GLenum c, GLuint d, GLint e);
void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b);
//#define GL_ERRORS 1
#define GL_ERRORS 1
#ifdef GL_ERRORS
# define GLERR(fn, fl, ln, op) \

View File

@ -144,11 +144,6 @@ _evas_gl_common_viewport_set(Evas_GL_Context *gc)
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.rect.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.font.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.font.prog, "mvp"), 1,
@ -164,6 +159,49 @@ _evas_gl_common_viewport_set(Evas_GL_Context *gc)
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.tex.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img_nomul.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_nomul.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img_solid.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_solid.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img_solid_nomul.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_solid_nomul.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img_bgra.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_bgra.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img_bgra_nomul.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_bgra_nomul.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img_bgra_solid.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_bgra_solid.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shared->shader.img_bgra_solid_nomul.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_bgra_solid_nomul.prog, "mvp"), 1,
GL_FALSE, proj);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUseProgram(gc->shader.cur_prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
}
@ -206,16 +244,17 @@ evas_gl_common_context_new(void)
shared->info.tex_npo2 = 1;
if ((strstr((char*) ext, "GL_NV_texture_rectangle")) ||
(strstr((char*) ext, "GL_EXT_texture_rectangle")) ||
(strstr((char*) ext, "GL_ARB_texture_rectangle"))
)
(strstr((char*) ext, "GL_ARB_texture_rectangle")))
shared->info.tex_rect = 1;
#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT
if ((strstr((char*) ext, "GL_EXT_texture_filter_anisotropic")))
{
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
&(shared->info.anisotropic));
printf("max aniso: %3.3f\n", shared->info.anisotropic);
}
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
&(shared->info.anisotropic));
#endif
#ifdef GL_BGRA
if ((strstr((char*) ext, "GL_EXT_bgra")) ||
(strstr((char*) ext, "GL_EXT_texture_format_BGRA8888")))
shared->info.bgra = 1;
#endif
}
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS,
@ -227,11 +266,15 @@ evas_gl_common_context_new(void)
"max units %i\n"
"non-power-2 tex %i\n"
"rect tex %i\n"
"bgra : %i\n"
"max ansiotropic filtering: %3.3f\n"
,
shared->info.max_texture_size, shared->info.max_texture_size,
shared->info.max_texture_units,
(int)shared->info.tex_npo2,
(int)shared->info.tex_rect
(int)shared->info.tex_rect,
(int)shared->info.bgra,
(double)shared->info.anisotropic
);
glDisable(GL_DEPTH_TEST);
@ -269,26 +312,57 @@ evas_gl_common_context_new(void)
glEnableVertexAttribArray(SHAD_COLOR);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
evas_gl_common_shader_program_init(&(shared->shader.rect),
&(shader_rect_vert_src),
&(shader_rect_frag_src),
"rect");
evas_gl_common_shader_program_init(&(shared->shader.img),
&(shader_img_vert_src),
&(shader_img_frag_src),
"img");
evas_gl_common_shader_program_init(&(shared->shader.img_nomul),
&(shader_img_nomul_vert_src),
&(shader_img_nomul_frag_src),
"img_nomul");
evas_gl_common_shader_program_init(&(shared->shader.img_solid),
&(shader_img_solid_vert_src),
&(shader_img_solid_frag_src),
"img_solid");
evas_gl_common_shader_program_init(&(shared->shader.img_solid_nomul),
&(shader_img_solid_nomul_vert_src),
&(shader_img_solid_nomul_frag_src),
"img_solid_nomul");
evas_gl_common_shader_program_init(&(shared->shader.img_bgra),
&(shader_img_bgra_vert_src),
&(shader_img_bgra_frag_src),
"img_bgra");
evas_gl_common_shader_program_init(&(shared->shader.img_bgra_nomul),
&(shader_img_bgra_nomul_vert_src),
&(shader_img_bgra_nomul_frag_src),
"img_bgra_nomul");
evas_gl_common_shader_program_init(&(shared->shader.img_bgra_solid),
&(shader_img_bgra_solid_vert_src),
&(shader_img_bgra_solid_frag_src),
"img_bgra_solid");
evas_gl_common_shader_program_init(&(shared->shader.img_bgra_solid_nomul),
&(shader_img_bgra_solid_nomul_vert_src),
&(shader_img_bgra_solid_nomul_frag_src),
"img_bgra_solid_nomul");
evas_gl_common_shader_program_init(&(shared->shader.rect),
&(shader_rect_vert_src),
&(shader_rect_frag_src),
"rect");
evas_gl_common_shader_program_init(&(shared->shader.font),
&(shader_font_vert_src),
&(shader_font_frag_src),
"font");
evas_gl_common_shader_program_init(&(shared->shader.yuv),
&(shader_yuv_vert_src),
&(shader_yuv_frag_src),
"yuv");
evas_gl_common_shader_program_init(&(shared->shader.tex),
&(shader_tex_vert_src),
&(shader_tex_frag_src),
"tex");
evas_gl_common_shader_program_init(&(shared->shader.yuv),
&(shader_yuv_vert_src),
&(shader_yuv_frag_src),
"yuv");
glUseProgram(shared->shader.yuv.prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glUniform1i(glGetUniformLocation(shared->shader.yuv.prog, "tex"), 0);
@ -460,14 +534,15 @@ evas_gl_common_context_line_push(Evas_GL_Context *gc,
{
int pnum, nv, nc, nu, nt, i;
Eina_Bool blend = 0;
GLuint prog = gc->shared->shader.rect.prog;
shader_array_flush(gc);
if (a < 255) blend = 1;
if (gc->dc->render_op == EVAS_RENDER_COPY) blend = 0;
gc->shader.cur_tex = 0;
gc->shader.cur_prog = gc->shared->shader.rect.prog;
gc->shader.blend = 1;
gc->shader.cur_prog = prog;
gc->shader.blend = blend;
gc->shader.render_op = gc->dc->render_op;
gc->shader.clip = clip;
gc->shader.cx = cx;
@ -510,13 +585,14 @@ evas_gl_common_context_rectangle_push(Evas_GL_Context *gc,
int r, int g, int b, int a)
{
int pnum, nv, nc, nu, nt, i;
Eina_Bool blend = 1;
Eina_Bool blend = 0;
GLuint prog = gc->shared->shader.rect.prog;
// if (a < 255) blend = 1;
if (a < 255) blend = 1;
if (gc->dc->render_op == EVAS_RENDER_COPY) blend = 0;
if ((gc->shader.cur_tex != 0)
|| (gc->shader.cur_prog != gc->shared->shader.rect.prog)
|| (gc->shader.cur_prog != prog)
|| (gc->shader.blend != blend)
|| (gc->shader.render_op != gc->dc->render_op)
|| (gc->shader.clip != 0)
@ -524,7 +600,7 @@ evas_gl_common_context_rectangle_push(Evas_GL_Context *gc,
{
shader_array_flush(gc);
gc->shader.cur_tex = 0;
gc->shader.cur_prog = gc->shared->shader.rect.prog;
gc->shader.cur_prog = prog;
gc->shader.blend = blend;
gc->shader.render_op = gc->dc->render_op;
gc->shader.clip = 0;
@ -568,29 +644,49 @@ evas_gl_common_context_image_push(Evas_GL_Context *gc,
GLfloat tx1, tx2, ty1, ty2;
GLfloat bl = 1.0;
Eina_Bool blend = 1;
GLuint prog = gc->shared->shader.img.prog;
if (tex->pt->format == GL_RGB) blend = 0;
// if (a < 255) blend = 1;
gc->shader.blend = 1;
if (!tex->alpha) blend = 0;
if (a < 255) blend = 1;
if (tex_only)
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
prog = gc->shared->shader.tex.prog; // fixme: nomul
else
prog = gc->shared->shader.tex.prog;
}
else
{
if (tex->gc->shared->info.bgra)
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
prog = gc->shared->shader.img_bgra_nomul.prog;
else
prog = gc->shared->shader.img_bgra.prog;
}
else
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
prog = gc->shared->shader.img_nomul.prog;
else
prog = gc->shared->shader.img.prog;
}
}
if ((gc->shader.cur_tex != tex->pt->texture)
|| ((tex_only) && (gc->shader.cur_prog != gc->shared->shader.tex.prog))
|| ((!tex_only) && (gc->shader.cur_prog != gc->shared->shader.img.prog))
|| (gc->shader.cur_prog != prog)
|| (gc->shader.smooth != smooth)
// || (gc->shader.blend != blend)
|| (gc->shader.blend != blend)
|| (gc->shader.render_op != gc->dc->render_op)
|| (gc->shader.clip != 0)
)
{
shader_array_flush(gc);
gc->shader.cur_tex = tex->pt->texture;
if (tex_only)
gc->shader.cur_prog = gc->shared->shader.tex.prog;
else
gc->shader.cur_prog =gc->shared->shader.img.prog;
gc->shader.cur_prog = prog;
gc->shader.smooth = smooth;
gc->shader.blend = 1;
gc->shader.blend = blend;
gc->shader.render_op = gc->dc->render_op;
gc->shader.clip = 0;
}
@ -605,8 +701,10 @@ evas_gl_common_context_image_push(Evas_GL_Context *gc,
gc->array.line = 0;
gc->array.use_vertex = 1;
// if nomul... dont need this
gc->array.use_color = 1;
gc->array.use_texuv = 1;
// if not solid, don't need this
gc->array.use_texuv2 = 1;
gc->array.use_texuv3 = 0;
@ -616,7 +714,6 @@ evas_gl_common_context_image_push(Evas_GL_Context *gc,
gc->array.num += 6;
_evas_gl_common_context_array_alloc(gc);
// yinvert!
if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert))
{
tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w;
@ -656,7 +753,8 @@ evas_gl_common_context_image_push(Evas_GL_Context *gc,
PUSH_TEXUV2(bl, 0.0);
PUSH_TEXUV2(bl, 0.0);
PUSH_TEXUV2(bl, 0.0);
// if nomul... dont need this
for (i = 0; i < 6; i++)
{
PUSH_COLOR(r, g, b, a);
@ -673,12 +771,10 @@ evas_gl_common_context_font_push(Evas_GL_Context *gc,
int pnum, nv, nc, nu, nt, i;
GLfloat tx1, tx2, ty1, ty2;
gc->shader.blend = 1;
if ((gc->shader.cur_tex != tex->pt->texture)
|| (gc->shader.cur_prog != gc->shared->shader.font.prog)
|| (gc->shader.smooth != 0)
// || (gc->shader.blend != 1)
|| (gc->shader.blend != 1)
|| (gc->shader.render_op != gc->dc->render_op)
|| (gc->shader.clip != 0)
)
@ -754,12 +850,10 @@ evas_gl_common_context_yuv_push(Evas_GL_Context *gc,
if (a < 255) blend = 1;
gc->shader.blend = 1;
if ((gc->shader.cur_tex != tex->pt->texture)
|| (gc->shader.cur_prog != gc->shared->shader.yuv.prog)
|| (gc->shader.smooth != smooth)
// || (gc->shader.blend != blend)
|| (gc->shader.blend != blend)
|| (gc->shader.render_op != gc->dc->render_op)
|| (gc->shader.clip != 0)
)
@ -770,7 +864,7 @@ evas_gl_common_context_yuv_push(Evas_GL_Context *gc,
gc->shader.cur_texv = tex->ptv->texture;
gc->shader.cur_prog = gc->shared->shader.yuv.prog;
gc->shader.smooth = smooth;
gc->shader.blend = 1;
gc->shader.blend = blend;
gc->shader.render_op = gc->dc->render_op;
gc->shader.clip = 0;
}
@ -850,17 +944,40 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
Eina_Bool blend = 1;
RGBA_Map_Point *pt;
DATA32 cmul;
GLuint prog = gc->shared->shader.img.prog;
gc->shader.blend = 1;
if (!tex->alpha) blend = 0;
if (a < 255) blend = 1;
if (tex->pt->format == GL_RGB) blend = 0;
// if (a < 255) blend = 1;
if (tex_only)
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
prog = gc->shared->shader.tex.prog; // fixme: nomul
else
prog = gc->shared->shader.tex.prog;
}
else
{
if (tex->gc->shared->info.bgra)
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
prog = gc->shared->shader.img_bgra_nomul.prog;
else
prog = gc->shared->shader.img_bgra.prog;
}
else
{
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
prog = gc->shared->shader.img_nomul.prog;
else
prog = gc->shared->shader.img.prog;
}
}
if ((gc->shader.cur_tex != tex->pt->texture)
|| ((tex_only) && (gc->shader.cur_prog != gc->shared->shader.tex.prog))
|| ((!tex_only) && (gc->shader.cur_prog != gc->shared->shader.img.prog))
|| (gc->shader.cur_prog != prog)
|| (gc->shader.smooth != smooth)
// || (gc->shader.blend != blend)
|| (gc->shader.blend != blend)
|| (gc->shader.render_op != gc->dc->render_op)
|| (gc->shader.clip != clip)
|| (gc->shader.cx != cx)
@ -871,12 +988,9 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
{
shader_array_flush(gc);
gc->shader.cur_tex = tex->pt->texture;
if (tex_only)
gc->shader.cur_prog = gc->shared->shader.tex.prog;
else
gc->shader.cur_prog =gc->shared->shader.img.prog;
gc->shader.cur_prog = prog;
gc->shader.smooth = smooth;
gc->shader.blend = 1;
gc->shader.blend = blend;
gc->shader.render_op = gc->dc->render_op;
gc->shader.clip = clip;
gc->shader.cx = cx;
@ -1176,12 +1290,6 @@ shader_array_flush(Evas_GL_Context *gc)
gc->array.im);
}
gc->array.im = NULL;
/*
gc->shader.cur_tex = 0;
glBindTexture(GL_TEXTURE_2D, gc->shader.cur_tex);
if (gc->shader.cur_tex) glEnable(GL_TEXTURE_2D);
else glDisable(GL_TEXTURE_2D);
*/
}
gc->shader.current.cur_prog = gc->shader.cur_prog;

View File

@ -40,46 +40,6 @@ Evas_GL_Program_Source shader_rect_vert_src =
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_frag_bin[] =
{
# include "shader/img_frag_bin_s3c6410.h"
};
#endif
const char img_frag_glsl[] =
#include "shader/img_frag.h"
;
Evas_GL_Program_Source shader_img_frag_src =
{
img_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_frag_bin, sizeof(img_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_vert_bin[] =
{
# include "shader/img_vert_bin_s3c6410.h"
};
#endif
const char img_vert_glsl[] =
#include "shader/img_vert.h"
;
Evas_GL_Program_Source shader_img_vert_src =
{
img_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_vert_bin, sizeof(img_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int font_frag_bin[] =
@ -206,6 +166,339 @@ Evas_GL_Program_Source shader_tex_vert_src =
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_frag_bin[] =
{
# include "shader/img_frag_bin_s3c6410.h"
};
#endif
const char img_frag_glsl[] =
#include "shader/img_frag.h"
;
Evas_GL_Program_Source shader_img_frag_src =
{
img_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_frag_bin, sizeof(img_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_vert_bin[] =
{
# include "shader/img_vert_bin_s3c6410.h"
};
#endif
const char img_vert_glsl[] =
#include "shader/img_vert.h"
;
Evas_GL_Program_Source shader_img_vert_src =
{
img_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_vert_bin, sizeof(img_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_nomul_frag_bin[] =
{
# include "shader/img_nomul_frag_bin_s3c6410.h"
};
#endif
const char img_nomul_frag_glsl[] =
#include "shader/img_nomul_frag.h"
;
Evas_GL_Program_Source shader_img_nomul_frag_src =
{
img_nomul_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_nomul_frag_bin, sizeof(img_nomul_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_nomul_vert_bin[] =
{
# include "shader/img_nomul_vert_bin_s3c6410.h"
};
#endif
const char img_nomul_vert_glsl[] =
#include "shader/img_nomul_vert.h"
;
Evas_GL_Program_Source shader_img_nomul_vert_src =
{
img_nomul_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_nomul_vert_bin, sizeof(img_nomul_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_solid_frag_bin[] =
{
# include "shader/img_solid_frag_bin_s3c6410.h"
};
#endif
const char img_solid_frag_glsl[] =
#include "shader/img_solid_frag.h"
;
Evas_GL_Program_Source shader_img_solid_frag_src =
{
img_solid_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_solid_frag_bin, sizeof(img_solid_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_solid_vert_bin[] =
{
# include "shader/img_solid_vert_bin_s3c6410.h"
};
#endif
const char img_solid_vert_glsl[] =
#include "shader/img_solid_vert.h"
;
Evas_GL_Program_Source shader_img_solid_vert_src =
{
img_solid_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_solid_vert_bin, sizeof(img_solid_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_solid_nomul_frag_bin[] =
{
# include "shader/img_solid_nomul_frag_bin_s3c6410.h"
};
#endif
const char img_solid_nomul_frag_glsl[] =
#include "shader/img_solid_nomul_frag.h"
;
Evas_GL_Program_Source shader_img_solid_nomul_frag_src =
{
img_solid_nomul_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_solid_nomul_frag_bin, sizeof(img_solid_nomul_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_solid_nomul_vert_bin[] =
{
# include "shader/img_solid_nomul_vert_bin_s3c6410.h"
};
#endif
const char img_solid_nomul_vert_glsl[] =
#include "shader/img_solid_nomul_vert.h"
;
Evas_GL_Program_Source shader_img_solid_nomul_vert_src =
{
img_solid_nomul_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_solid_nomul_vert_bin, sizeof(img_solid_nomul_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_bgra_frag_bin[] =
{
# include "shader/img_bgra_frag_bin_s3c6410.h"
};
#endif
const char img_bgra_frag_glsl[] =
#include "shader/img_bgra_frag.h"
;
Evas_GL_Program_Source shader_img_bgra_frag_src =
{
img_bgra_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_bgra_frag_bin, sizeof(img_bgra_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_bgra_vert_bin[] =
{
# include "shader/img_bgra_vert_bin_s3c6410.h"
};
#endif
const char img_bgra_vert_glsl[] =
#include "shader/img_bgra_vert.h"
;
Evas_GL_Program_Source shader_img_bgra_vert_src =
{
img_bgra_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_bgra_vert_bin, sizeof(img_bgra_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_bgra_nomul_frag_bin[] =
{
# include "shader/img_bgra_nomul_frag_bin_s3c6410.h"
};
#endif
const char img_bgra_nomul_frag_glsl[] =
#include "shader/img_bgra_nomul_frag.h"
;
Evas_GL_Program_Source shader_img_bgra_nomul_frag_src =
{
img_bgra_nomul_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_bgra_nomul_frag_bin, sizeof(img_bgra_nomul_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_bgra_nomul_vert_bin[] =
{
# include "shader/img_bgra_nomul_vert_bin_s3c6410.h"
};
#endif
const char img_bgra_nomul_vert_glsl[] =
#include "shader/img_bgra_nomul_vert.h"
;
Evas_GL_Program_Source shader_img_bgra_nomul_vert_src =
{
img_bgra_nomul_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_bgra_nomul_vert_bin, sizeof(img_bgra_nomul_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_bgra_solid_frag_bin[] =
{
# include "shader/img_bgra_solid_frag_bin_s3c6410.h"
};
#endif
const char img_bgra_solid_frag_glsl[] =
#include "shader/img_bgra_solid_frag.h"
;
Evas_GL_Program_Source shader_img_bgra_solid_frag_src =
{
img_bgra_solid_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_bgra_solid_frag_bin, sizeof(img_bgra_solid_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_bgra_solid_vert_bin[] =
{
# include "shader/img_bgra_solid_vert_bin_s3c6410.h"
};
#endif
const char img_bgra_solid_vert_glsl[] =
#include "shader/img_bgra_solid_vert.h"
;
Evas_GL_Program_Source shader_img_bgra_solid_vert_src =
{
img_bgra_solid_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_bgra_solid_vert_bin, sizeof(img_bgra_solid_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_bgra_solid_nomul_frag_bin[] =
{
# include "shader/img_bgra_solid_nomul_frag_bin_s3c6410.h"
};
#endif
const char img_bgra_solid_nomul_frag_glsl[] =
#include "shader/img_bgra_solid_nomul_frag.h"
;
Evas_GL_Program_Source shader_img_bgra_solid_nomul_frag_src =
{
img_bgra_solid_nomul_frag_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_bgra_solid_nomul_frag_bin, sizeof(img_bgra_solid_nomul_frag_bin)
#else
NULL, 0
#endif
};
#if defined (GLES_VARIETY_S3C6410)
const unsigned int img_bgra_solid_nomul_vert_bin[] =
{
# include "shader/img_bgra_solid_nomul_vert_bin_s3c6410.h"
};
#endif
const char img_bgra_solid_nomul_vert_glsl[] =
#include "shader/img_bgra_solid_nomul_vert.h"
;
Evas_GL_Program_Source shader_img_bgra_solid_nomul_vert_src =
{
img_bgra_solid_nomul_vert_glsl,
#if defined (GLES_VARIETY_S3C6410)
img_bgra_solid_nomul_vert_bin, sizeof(img_bgra_solid_nomul_vert_bin)
#else
NULL, 0
#endif
};
/////////////////////////////////////////////
static void
gl_compile_link_error(GLuint target, const char *action)
@ -274,9 +567,9 @@ evas_gl_common_shader_program_init(Evas_GL_Program *p,
glBindAttribLocation(p->prog, SHAD_VERTEX, "vertex");
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glBindAttribLocation(p->prog, SHAD_COLOR, "color");
glBindAttribLocation(p->prog, SHAD_COLOR, "color");
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glBindAttribLocation(p->prog, SHAD_TEXUV, "tex_coord");
glBindAttribLocation(p->prog, SHAD_TEXUV, "tex_coord");
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2");
GLERR(__FUNCTION__, __FILE__, __LINE__, "");

View File

@ -1,29 +1,24 @@
#include "evas_gl_private.h"
#if 1
static const GLenum rgba_fmt = GL_RGBA;
static const GLenum rgba_ifmt = GL_RGBA;
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
//#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
//static const GLenum rgb_fmt = GL_RGBA;
//static const GLenum rgb_ifmt = GL_RGBA;
//#else
static const GLenum rgb_fmt = GL_RGBA;
static const GLenum rgb_ifmt = GL_RGBA;
#else
static const GLenum rgb_fmt = GL_RGB;
static const GLenum rgb_ifmt = GL_RGB;
//#endif
#ifdef GL_BGRA
static const GLenum bgra_fmt = GL_BGRA;
static const GLenum bgra_ifmt = GL_RGBA;
static const GLenum bgr_fmt = GL_BGRA;
static const GLenum bgr_ifmt = GL_RGB;
#endif
static const GLenum alpha_fmt = GL_ALPHA;
static const GLenum alpha_ifmt = GL_ALPHA;
static const GLenum lum_fmt = GL_LUMINANCE;
static const GLenum lum_ifmt = GL_LUMINANCE;
#else
static const GLenum rgba_fmt = GL_RGBA;
static const GLenum rgba_ifmt = GL_COMPRESSED_RGBA;
static const GLenum rgb_fmt = GL_RGBA;
static const GLenum rgb_ifmt = GL_COMPRESSED_RGBA;
static const GLenum alpha_fmt = GL_ALPHA;
static const GLenum alpha_ifmt = GL_COMPRESSED_ALPHA;
static const GLenum lum_fmt = GL_LUMINANCE;
static const GLenum lum_ifmt = GL_COMPRESSED_LUMINANCE;
#endif
static int
_nearest_pow2(int num)
@ -62,27 +57,18 @@ _tex_format_index(GLuint format)
switch (format)
{
case GL_RGBA:
#ifdef GL_COMPRESSED_RGBA
case GL_COMPRESSED_RGBA:
#ifdef GL_BGRA
case GL_BGRA:
#endif
return 0;
case GL_RGB:
#ifdef GL_COMPRESSED_RGB
case GL_COMPRESSED_RGB:
#endif
return 1;
case GL_ALPHA:
#ifdef GL_COMPRESSED_ALPHA
case GL_COMPRESSED_ALPHA:
#endif
return 2;
case GL_LUMINANCE:
#ifdef GL_COMPRESSED_LUMINANCE
case GL_COMPRESSED_LUMINANCE:
#endif
return 3;
default:
break;
return 0;
}
return 0;
}
@ -203,7 +189,7 @@ _pool_tex_find(Evas_GL_Context *gc, int w, int h,
}
th = _tex_round_slot(gc, h);
th2 = _tex_format_index(format);
th2 = _tex_format_index(intformat);
EINA_LIST_FOREACH(gc->shared->tex.atlas[th][th2], l, pt)
{
if (_pool_tex_alloc(pt, w, h, u, v, l_after))
@ -241,15 +227,27 @@ evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im)
if (im->cache_entry.flags.alpha)
{
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2,
im->cache_entry.h + 1, rgba_ifmt, rgba_fmt,
&u, &v, &l_after, 1024);
if (gc->shared->info.bgra)
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2,
im->cache_entry.h + 1, bgra_ifmt, bgra_fmt,
&u, &v, &l_after, 1024);
else
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2,
im->cache_entry.h + 1, rgba_ifmt, rgba_fmt,
&u, &v, &l_after, 1024);
tex->alpha = 1;
}
else
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3,
im->cache_entry.h + 1, rgb_ifmt, rgb_fmt,
&u, &v, &l_after, 1024);
{
if (gc->shared->info.bgra)
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3,
im->cache_entry.h + 1, bgr_ifmt, bgr_fmt,
&u, &v, &l_after, 1024);
else
tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3,
im->cache_entry.h + 1, rgb_ifmt, rgb_fmt,
&u, &v, &l_after, 1024);
}
if (!tex->pt)
{
memset(tex, 0x11, sizeof(Evas_GL_Texture)); // mark as freed
@ -424,9 +422,19 @@ evas_gl_common_texture_native_new(Evas_GL_Context *gc, int w, int h, int alpha,
tex->references = 1;
tex->alpha = alpha;
if (alpha)
tex->pt = _pool_tex_native_new(gc, w, h, rgba_ifmt, rgba_fmt, im);
{
if (gc->shared->info.bgra)
tex->pt = _pool_tex_native_new(gc, w, h, rgba_ifmt, rgba_fmt, im);
else
tex->pt = _pool_tex_native_new(gc, w, h, rgba_ifmt, rgba_fmt, im);
}
else
tex->pt = _pool_tex_native_new(gc, w, h, rgb_ifmt, rgb_fmt, im);
{
if (gc->shared->info.bgra)
tex->pt = _pool_tex_native_new(gc, w, h, rgb_ifmt, rgb_fmt, im);
else
tex->pt = _pool_tex_native_new(gc, w, h, rgb_ifmt, rgb_fmt, im);
}
if (!tex->pt)
{
memset(tex, 0x33, sizeof(Evas_GL_Texture)); // mark as freed
@ -455,9 +463,19 @@ evas_gl_common_texture_render_new(Evas_GL_Context *gc, int w, int h, int alpha)
tex->references = 1;
tex->alpha = alpha;
if (alpha)
tex->pt = _pool_tex_render_new(gc, w, h, rgba_ifmt, rgba_fmt);
{
if (gc->shared->info.bgra)
tex->pt = _pool_tex_render_new(gc, w, h, rgba_ifmt, rgba_fmt);
else
tex->pt = _pool_tex_render_new(gc, w, h, rgba_ifmt, rgba_fmt);
}
else
tex->pt = _pool_tex_render_new(gc, w, h, rgb_ifmt, rgb_fmt);
{
if (gc->shared->info.bgra)
tex->pt = _pool_tex_render_new(gc, w, h, rgb_ifmt, rgb_fmt);
else
tex->pt = _pool_tex_render_new(gc, w, h, rgb_ifmt, rgb_fmt);
}
if (!tex->pt)
{
memset(tex, 0x44, sizeof(Evas_GL_Texture)); // mark as freed
@ -475,17 +493,30 @@ evas_gl_common_texture_render_new(Evas_GL_Context *gc, int w, int h, int alpha)
void
evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
{
GLuint fmt;
if (tex->alpha != im->cache_entry.flags.alpha)
{
tex->pt->allocations = eina_list_remove(tex->pt->allocations, tex);
pt_unref(tex->pt);
tex->alpha = im->cache_entry.flags.alpha;
if (tex->alpha)
tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, rgba_ifmt, rgba_fmt);
{
if (tex->gc->shared->info.bgra)
tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, bgra_ifmt, bgra_fmt);
else
tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, rgba_ifmt, rgba_fmt);
}
else
tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, rgb_ifmt, rgb_fmt);
{
if (tex->gc->shared->info.bgra)
tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, bgr_ifmt, bgr_fmt);
else
tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, rgb_ifmt, rgb_fmt);
}
}
if (!tex->pt) return;
fmt = tex->pt->format;
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
#ifdef GL_UNPACK_ROW_LENGTH
@ -500,48 +531,42 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
//
_tex_sub_2d(tex->x, tex->y,
im->cache_entry.w, im->cache_entry.h,
// tex->pt->format, tex->pt->dataformat,
rgba_fmt, tex->pt->dataformat,
fmt, tex->pt->dataformat,
im->image.data);
// |xxx
// |xxx
//
_tex_sub_2d(tex->x - 1, tex->y,
1, im->cache_entry.h,
// tex->pt->format, tex->pt->dataformat,
rgba_fmt, tex->pt->dataformat,
fmt, tex->pt->dataformat,
im->image.data);
// xxx|
// xxx|
//
_tex_sub_2d(tex->x + im->cache_entry.w, tex->y,
1, im->cache_entry.h,
// tex->pt->format, tex->pt->dataformat,
rgba_fmt, tex->pt->dataformat,
fmt, tex->pt->dataformat,
im->image.data + (im->cache_entry.w - 1));
// xxx
// xxx
// ---
_tex_sub_2d(tex->x, tex->y + im->cache_entry.h,
im->cache_entry.w, 1,
// tex->pt->format, tex->pt->dataformat,
rgba_fmt, tex->pt->dataformat,
fmt, tex->pt->dataformat,
im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w));
// xxx
// xxx
// o
_tex_sub_2d(tex->x - 1, tex->y + im->cache_entry.h,
1, 1,
// tex->pt->format, tex->pt->dataformat,
rgba_fmt, tex->pt->dataformat,
fmt, tex->pt->dataformat,
im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w));
// xxx
// xxx
// o
_tex_sub_2d(tex->x + im->cache_entry.w, tex->y + im->cache_entry.h,
1, 1,
// tex->pt->format, tex->pt->dataformat,
rgba_fmt, tex->pt->dataformat,
fmt, tex->pt->dataformat,
im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w) + (im->cache_entry.w - 1));
if (tex->pt->texture != tex->gc->shader.cur_tex)
{

View File

@ -1,5 +1,5 @@
#!/bin/sh
ORIONEXE=/home/raster/samsung/build/x1/tools/orion/orion.exe
ORIONEXE=/home/raster/Data/orion/orion.exe
OPTS="-O --nolodcalc -lp"
function compile()
@ -31,6 +31,13 @@ function compile()
compile rect
compile img
compile img_nomul
compile img_solid
compile img_solid_nomul
compile img_bgra
compile img_bgra_nomul
compile img_bgra_solid
compile img_bgra_solid_nomul
compile font
compile yuv
compile tex

View File

@ -9,6 +9,13 @@ function compile()
compile rect
compile img
compile img_nomul
compile img_solid
compile img_solid_nomul
compile img_bgra
compile img_bgra_nomul
compile img_bgra_solid
compile img_bgra_solid_nomul
compile font
compile yuv
compile tex

View File

@ -0,0 +1,10 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_FragColor = texture2D(tex, tex_c.xy) * col;\n"
"}\n"

View File

@ -0,0 +1,10 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
gl_FragColor = texture2D(tex, tex_c.xy) * col;
}

View File

@ -0,0 +1,11 @@
0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000004, 0x00000003,
0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000,
0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407,
0x307820e4, 0x00000000, 0x01000000, 0x0100e400, 0x237a10e4, 0x00000000,
0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000003,
0x00000009, 0x00000000, 0x00000004, 0x00000008, 0x00000005, 0x00000003,
0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x0000000f, 0x00030005,
0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, 0x00000063,

View File

@ -0,0 +1,9 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_FragColor = texture2D(tex, tex_c.xy);\n"
"}\n"

View File

@ -0,0 +1,9 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec2 tex_c;
void main()
{
gl_FragColor = texture2D(tex, tex_c.xy);
}

View File

@ -0,0 +1,10 @@
0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000003,
0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x00000000,
0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407,
0x307a10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
0x00000004, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
0x00000003, 0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x5f786574,
0x00000063,

View File

@ -0,0 +1,12 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
"}\n"

View File

@ -0,0 +1,12 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
uniform mat4 mvp;
varying vec2 tex_c;
void main()
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
}

View File

@ -0,0 +1,17 @@
0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006,
0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000027, 0x00000000,
0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500,
0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000,
0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000,
0x20980154, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013,
0x00000009, 0x00000003, 0x00000000, 0x00000004, 0x00000000, 0x0000000b,
0x00000009, 0x00010004, 0x00000000, 0x00000021, 0x00000005, 0x00000003,
0x00010004, 0x00000004, 0x0000001d, 0x00000003, 0x0000000e, 0x00020001,
0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x74007865,
0x635f7865, 0x64726f6f, 0x70766d00, 0x78657400, 0x0000635f,

View File

@ -0,0 +1,12 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" vec4 t = texture2D(tex, tex_c.xy);\n"
" gl_FragColor = vec4(t.r, t.g, t.b, t.a + tex_c2.x) * col;\n"
"}\n"

View File

@ -0,0 +1,12 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
vec4 t = texture2D(tex, tex_c.xy);
gl_FragColor = vec4(t.r, t.g, t.b, t.a + tex_c2.x) * col;
}

View File

@ -0,0 +1,14 @@
0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000003,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000015, 0x00000000,
0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407,
0x307820e4, 0x00000000, 0x00000000, 0x01000000, 0x20b821a4, 0x00000000,
0x01000000, 0x01000000, 0x220822ff, 0x00000000, 0x00000000, 0x01020000,
0x20c02100, 0x00000000, 0x02000000, 0x0101e400, 0x237a10e4, 0x00000000,
0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000003,
0x00000009, 0x00000000, 0x00000008, 0x00000008, 0x00000005, 0x00000003,
0x00000000, 0x00000000, 0x0000000e, 0x00000006, 0x00000003, 0x00000000,
0x00000004, 0x00000000, 0x00000003, 0x0000000f, 0x00030005, 0x00000000,
0x00786574, 0x006c6f63, 0x5f786574, 0x65740063, 0x32635f78, 0x00000000,

View File

@ -0,0 +1,11 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" vec4 t = texture2D(tex, tex_c.xy);\n"
" gl_FragColor = vec4(t.r, t.g, t.b, t.a + tex_c2.x);\n"
"}\n"

View File

@ -0,0 +1,11 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
vec4 t = texture2D(tex, tex_c.xy);
gl_FragColor = vec4(t.r, t.g, t.b, t.a + tex_c2.x);
}

View File

@ -0,0 +1,13 @@
0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000003,
0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000011, 0x00000000,
0x00000000, 0x02025400, 0x23782150, 0x00000000, 0x00000000, 0x0101e407,
0x307821e4, 0x00000000, 0x00000000, 0x01010000, 0x20b820a4, 0x00000000,
0x01000000, 0x01010000, 0x220822ff, 0x00000000, 0x00000000, 0x01020000,
0x20c02000, 0x00000000, 0x00000000, 0x01000000, 0x20fa10e4, 0x00000000,
0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000005,
0x00000003, 0x00000000, 0x00000000, 0x0000000a, 0x00000006, 0x00000003,
0x00000000, 0x00000004, 0x00000000, 0x00000003, 0x0000000f, 0x00030005,
0x00000000, 0x00786574, 0x5f786574, 0x65740063, 0x32635f78, 0x00000000,

View File

@ -0,0 +1,15 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
"attribute vec2 tex_coord2;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
" tex_c2 = tex_coord2;\n"
"}\n"

View File

@ -0,0 +1,15 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
attribute vec2 tex_coord2;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
tex_c2 = tex_coord2;
}

View File

@ -0,0 +1,20 @@
0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006,
0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000039, 0x00000000,
0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500,
0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000,
0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000,
0x20980154, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000,
0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006,
0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000009, 0x00000003,
0x00000000, 0x00000004, 0x0000001d, 0x0000000a, 0x00000003, 0x00000000,
0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000,
0x0000002c, 0x00000005, 0x00000003, 0x00010004, 0x00000004, 0x00000032,
0x00000006, 0x00000003, 0x00010004, 0x00000008, 0x00000028, 0x00000003,
0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69,
0x74726576, 0x74007865, 0x635f7865, 0x64726f6f, 0x78657400, 0x6f6f635f,
0x00326472, 0x0070766d, 0x5f786574, 0x65740063, 0x32635f78, 0x00000000,

View File

@ -0,0 +1,18 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
"attribute vec2 tex_coord2;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
" tex_c2 = tex_coord2;\n"
"}\n"

View File

@ -0,0 +1,18 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
attribute vec2 tex_coord2;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
tex_c2 = tex_coord2;
}

View File

@ -0,0 +1,23 @@
0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000008, 0x00000006,
0x00000000, 0x00000000, 0x00000004, 0x00000004, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000000,
0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500,
0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000,
0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000,
0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000,
0x00000000, 0x00030000, 0x20980354, 0x00000000, 0x00000000, 0x00000000,
0x1e000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x0000000c, 0x00000006, 0x00000009, 0x00000000,
0x00000000, 0x00000013, 0x00000005, 0x00000009, 0x00000000, 0x00000004,
0x00000019, 0x00000009, 0x00000003, 0x00000000, 0x00000008, 0x00000023,
0x0000000a, 0x00000003, 0x00000000, 0x0000000c, 0x00000000, 0x0000000b,
0x00000009, 0x00010004, 0x00000000, 0x00000032, 0x00000003, 0x00000009,
0x00010004, 0x00000004, 0x00000036, 0x00000005, 0x00000003, 0x00010004,
0x00000008, 0x0000003c, 0x00000006, 0x00000003, 0x00010004, 0x0000000c,
0x0000002e, 0x00000003, 0x0000000e, 0x00020001, 0x00000008, 0x505f6c67,
0x7469736f, 0x006e6f69, 0x74726576, 0x63007865, 0x726f6c6f, 0x78657400,
0x6f6f635f, 0x74006472, 0x635f7865, 0x64726f6f, 0x766d0032, 0x6f630070,
0x6574006c, 0x00635f78, 0x5f786574, 0x00003263,

View File

@ -0,0 +1,15 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
"}\n"

View File

@ -0,0 +1,15 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
void main()
{
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
}

View File

@ -0,0 +1,20 @@
0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006,
0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000,
0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500,
0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000,
0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000,
0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000,
0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006,
0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009,
0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000,
0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000,
0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b,
0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003,
0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69,
0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472,
0x63007076, 0x74006c6f, 0x635f7865, 0x00000000,

View File

@ -4,10 +4,7 @@
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" vec4 t = texture2D(tex, tex_c.xy).bgra;\n"
" vec4 c = vec4(t.r, t.g, t.b, t.a + tex_c2.x);\n"
" gl_FragColor = c * col;\n"
" gl_FragColor = texture2D(tex, tex_c.xy).bgra * col;\n"
"}\n"

View File

@ -4,10 +4,7 @@ precision mediump float;
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
vec4 t = texture2D(tex, tex_c.xy).bgra;
vec4 c = vec4(t.r, t.g, t.b, t.a + tex_c2.x);
gl_FragColor = c * col;
gl_FragColor = texture2D(tex, tex_c.xy).bgra * col;
}

View File

@ -0,0 +1,9 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_FragColor = texture2D(tex, tex_c.xy).bgra;\n"
"}\n"

View File

@ -0,0 +1,9 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec2 tex_c;
void main()
{
gl_FragColor = texture2D(tex, tex_c.xy).bgra;
}

View File

@ -0,0 +1,10 @@
0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000003,
0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x00000000,
0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407,
0x307a10c6, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
0x00000004, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
0x00000003, 0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x5f786574,
0x00000063,

View File

@ -0,0 +1,12 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
"}\n"

View File

@ -0,0 +1,12 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
uniform mat4 mvp;
varying vec2 tex_c;
void main()
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
}

View File

@ -0,0 +1,17 @@
0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006,
0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000027, 0x00000000,
0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500,
0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000,
0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000,
0x20980154, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013,
0x00000009, 0x00000003, 0x00000000, 0x00000004, 0x00000000, 0x0000000b,
0x00000009, 0x00010004, 0x00000000, 0x00000021, 0x00000005, 0x00000003,
0x00010004, 0x00000004, 0x0000001d, 0x00000003, 0x0000000e, 0x00020001,
0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x74007865,
0x635f7865, 0x64726f6f, 0x70766d00, 0x78657400, 0x0000635f,

View File

@ -0,0 +1,12 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" vec4 t = texture2D(tex, tex_c.xy).bgra;\n"
" gl_FragColor = vec4(t.r, t.g, t.b, t.a + tex_c2.x) * col;\n"
"}\n"

View File

@ -0,0 +1,12 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
vec4 t = texture2D(tex, tex_c.xy).bgra;
gl_FragColor = vec4(t.r, t.g, t.b, t.a + tex_c2.x) * col;
}

View File

@ -0,0 +1,14 @@
0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000003,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000015, 0x00000000,
0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407,
0x307820e4, 0x00000000, 0x00000000, 0x01000000, 0x20b82106, 0x00000000,
0x01000000, 0x01000000, 0x220822ff, 0x00000000, 0x00000000, 0x01020000,
0x20c02100, 0x00000000, 0x02000000, 0x0101e400, 0x237a10e4, 0x00000000,
0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000003,
0x00000009, 0x00000000, 0x00000008, 0x00000008, 0x00000005, 0x00000003,
0x00000000, 0x00000000, 0x0000000e, 0x00000006, 0x00000003, 0x00000000,
0x00000004, 0x00000000, 0x00000003, 0x0000000f, 0x00030005, 0x00000000,
0x00786574, 0x006c6f63, 0x5f786574, 0x65740063, 0x32635f78, 0x00000000,

View File

@ -0,0 +1,11 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" vec4 t = texture2D(tex, tex_c.xy).bgra;\n"
" gl_FragColor = vec4(t.r, t.g, t.b, t.a + tex_c2.x);\n"
"}\n"

View File

@ -0,0 +1,11 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
vec4 t = texture2D(tex, tex_c.xy).bgra;
gl_FragColor = vec4(t.r, t.g, t.b, t.a + tex_c2.x);
}

View File

@ -0,0 +1,13 @@
0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000003,
0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000011, 0x00000000,
0x00000000, 0x02025400, 0x23782150, 0x00000000, 0x00000000, 0x0101e407,
0x307821e4, 0x00000000, 0x00000000, 0x01010000, 0x20b82006, 0x00000000,
0x01000000, 0x01010000, 0x220822ff, 0x00000000, 0x00000000, 0x01020000,
0x20c02000, 0x00000000, 0x00000000, 0x01000000, 0x20fa10e4, 0x00000000,
0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000005,
0x00000003, 0x00000000, 0x00000000, 0x0000000a, 0x00000006, 0x00000003,
0x00000000, 0x00000004, 0x00000000, 0x00000003, 0x0000000f, 0x00030005,
0x00000000, 0x00786574, 0x5f786574, 0x65740063, 0x32635f78, 0x00000000,

View File

@ -0,0 +1,15 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
"attribute vec2 tex_coord2;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
" tex_c2 = tex_coord2;\n"
"}\n"

View File

@ -0,0 +1,15 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
attribute vec2 tex_coord2;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
tex_c2 = tex_coord2;
}

View File

@ -0,0 +1,20 @@
0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006,
0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000039, 0x00000000,
0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500,
0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000,
0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000,
0x20980154, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000,
0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006,
0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000009, 0x00000003,
0x00000000, 0x00000004, 0x0000001d, 0x0000000a, 0x00000003, 0x00000000,
0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000,
0x0000002c, 0x00000005, 0x00000003, 0x00010004, 0x00000004, 0x00000032,
0x00000006, 0x00000003, 0x00010004, 0x00000008, 0x00000028, 0x00000003,
0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69,
0x74726576, 0x74007865, 0x635f7865, 0x64726f6f, 0x78657400, 0x6f6f635f,
0x00326472, 0x0070766d, 0x5f786574, 0x65740063, 0x32635f78, 0x00000000,

View File

@ -0,0 +1,18 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
"attribute vec2 tex_coord2;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
" tex_c2 = tex_coord2;\n"
"}\n"

View File

@ -0,0 +1,18 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
attribute vec2 tex_coord2;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
tex_c2 = tex_coord2;
}

View File

@ -0,0 +1,23 @@
0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000008, 0x00000006,
0x00000000, 0x00000000, 0x00000004, 0x00000004, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000000,
0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500,
0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000,
0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000,
0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000,
0x00000000, 0x00030000, 0x20980354, 0x00000000, 0x00000000, 0x00000000,
0x1e000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x0000000c, 0x00000006, 0x00000009, 0x00000000,
0x00000000, 0x00000013, 0x00000005, 0x00000009, 0x00000000, 0x00000004,
0x00000019, 0x00000009, 0x00000003, 0x00000000, 0x00000008, 0x00000023,
0x0000000a, 0x00000003, 0x00000000, 0x0000000c, 0x00000000, 0x0000000b,
0x00000009, 0x00010004, 0x00000000, 0x00000032, 0x00000003, 0x00000009,
0x00010004, 0x00000004, 0x00000036, 0x00000005, 0x00000003, 0x00010004,
0x00000008, 0x0000003c, 0x00000006, 0x00000003, 0x00010004, 0x0000000c,
0x0000002e, 0x00000003, 0x0000000e, 0x00020001, 0x00000008, 0x505f6c67,
0x7469736f, 0x006e6f69, 0x74726576, 0x63007865, 0x726f6c6f, 0x78657400,
0x6f6f635f, 0x74006472, 0x635f7865, 0x64726f6f, 0x766d0032, 0x6f630070,
0x6574006c, 0x00635f78, 0x5f786574, 0x00003263,

View File

@ -4,15 +4,12 @@
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
"attribute vec2 tex_coord2;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_c2;\n"
"void main()\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
" tex_c2 = tex_coord2;\n"
"}\n"

View File

@ -4,15 +4,12 @@ precision mediump float;
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
attribute vec2 tex_coord2;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
varying vec2 tex_c2;
void main()
{
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
tex_c2 = tex_coord2;
}

View File

@ -796,7 +796,11 @@ eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *i
(p[2].u == (im->cache_entry.w << FP)) &&
(p[2].v == (im->cache_entry.h << FP)) &&
(p[3].u == 0) &&
(p[3].v == (im->cache_entry.h << FP)))
(p[3].v == (im->cache_entry.h << FP)) &&
(p[0].col == 0xffffffff) &&
(p[1].col == 0xffffffff) &&
(p[2].col == 0xffffffff) &&
(p[3].col == 0xffffffff))
{
int dx, dy, dw, dh;