forked from enlightenment/efl
Evas (gl_common): Merge Tizen changes to upstream EFL.
SVN revision: 73201
This commit is contained in:
parent
0219f765be
commit
d856a2f067
|
@ -933,6 +933,15 @@ _evas_gl_common_shader_program_binary_init(Evas_GL_Program *p,
|
|||
|
||||
p->prog = glCreateProgram();
|
||||
|
||||
#if 1
|
||||
// TODO: invalid rendering error occurs when attempting to use a
|
||||
// glProgramBinary. in order to render correctly we should create a dummy
|
||||
// vertex shader.
|
||||
p->vert = glCreateShader(GL_VERTEX_SHADER);
|
||||
glAttachShader(p->prog, p->vert);
|
||||
p->frag = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
glAttachShader(p->prog, p->frag);
|
||||
#endif
|
||||
glsym_glProgramBinary(p->prog, formats[0], data, length);
|
||||
|
||||
glBindAttribLocation(p->prog, SHAD_VERTEX, "vertex");
|
||||
|
|
|
@ -116,12 +116,19 @@ _tex_2d(int intfmt, int w, int h, int fmt, int type)
|
|||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||
#ifdef GL_TEXTURE_INTERNAL_FORMAT
|
||||
// this is not in opengles!!! hrrrm
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0,
|
||||
GL_TEXTURE_INTERNAL_FORMAT, &intfmtret);
|
||||
if (intfmtret != intfmt)
|
||||
if (glGetTexLevelParameteriv)
|
||||
{
|
||||
ERR("Fail tex alloc %ix%i", w, h);
|
||||
// XXX send async err to evas
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0,
|
||||
GL_TEXTURE_INTERNAL_FORMAT, &intfmtret);
|
||||
if (intfmtret != intfmt)
|
||||
{
|
||||
ERR("Fail tex alloc %ix%i", w, h);
|
||||
// XXX send async err to evas
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR("GL_TEXTURE_INTERNAL_FORMAT defined but no symbol loaded.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue