on paper.. go gles2 too... that should work.. in theory. need to test.
SVN revision: 43659
This commit is contained in:
parent
fcc8e2ec47
commit
267c9bce6c
|
@ -309,10 +309,17 @@ evas_gl_common_context_target_surface_set(Evas_GL_Context *gc,
|
||||||
#else
|
#else
|
||||||
// FIXME: viewport goopies
|
// FIXME: viewport goopies
|
||||||
gc->change.size = 1;
|
gc->change.size = 1;
|
||||||
|
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||||
|
if (gc->shader.surface == gc->def_surface)
|
||||||
|
glBindFramebuffer(GL_FRAMEBUFFER_OES, 0);
|
||||||
|
else
|
||||||
|
glBindFramebuffer(GL_FRAMEBUFFER_OES, surface->tex->pt->fb);
|
||||||
|
#else
|
||||||
if (gc->shader.surface == gc->def_surface)
|
if (gc->shader.surface == gc->def_surface)
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
|
glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
|
||||||
else
|
else
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER_EXT, surface->tex->pt->fb);
|
glBindFramebuffer(GL_FRAMEBUFFER_EXT, surface->tex->pt->fb);
|
||||||
|
#endif
|
||||||
_evas_gl_common_viewport_set(gc);
|
_evas_gl_common_viewport_set(gc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,7 +269,18 @@ _pool_tex_render_new(Evas_GL_Context *gc, int w, int h, int intformat, int forma
|
||||||
pt->dataformat = GL_UNSIGNED_BYTE;
|
pt->dataformat = GL_UNSIGNED_BYTE;
|
||||||
pt->references = 0;
|
pt->references = 0;
|
||||||
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||||
// FIXME: XXX render-to-texture for gles2
|
glGenTextures(1, &(pt->texture));
|
||||||
|
glBindTexture(GL_TEXTURE_2D, pt->texture);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
|
_tex_2d(pt->intformat, w, h, pt->format, pt->dataformat);
|
||||||
|
glGenFramebuffers(1, &(pt->fb));
|
||||||
|
glBindFramebuffer(GL_FRAMEBUFFER_OES, pt->fb);
|
||||||
|
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_TEXTURE_2D, pt->texture, 0);
|
||||||
|
glBindFramebufferEXT(GL_FRAMEBUFFER_OES, 0);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, gc->shader.cur_tex);
|
||||||
#else
|
#else
|
||||||
glGenTextures(1, &(pt->texture));
|
glGenTextures(1, &(pt->texture));
|
||||||
glBindTexture(GL_TEXTURE_2D, pt->texture);
|
glBindTexture(GL_TEXTURE_2D, pt->texture);
|
||||||
|
|
Loading…
Reference in New Issue