Skip to content

Commit

Permalink
EvasGL: Adding MSAA for depth_24_stencil_8 format that was missing
Browse files Browse the repository at this point in the history
from the previous commit. 


git-svn-id: http://svn.enlightenment.org/svn/e/trunk@72970 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
  • Loading branch information
sung committed Jun 28, 2012
1 parent 0d855f1 commit 7a17f09
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions evas/src/modules/engines/gl_x11/evas_engine.c
Expand Up @@ -3367,7 +3367,10 @@ _attach_fbo_surface(Render_Engine *data __UNUSED__,

// Attach texture to FBO
if (sfc->rt_msaa_samples)
glsym_glFramebufferTexture2DMultisample(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, sfc->rt_tex, 0, sfc->rt_msaa_samples);
glsym_glFramebufferTexture2DMultisample(GL_FRAMEBUFFER,
GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D, sfc->rt_tex,
0, sfc->rt_msaa_samples);
else
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D, sfc->rt_tex, 0);
Expand All @@ -3387,10 +3390,26 @@ _attach_fbo_surface(Render_Engine *data __UNUSED__,
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL_OES, sfc->w, sfc->h,
0, GL_DEPTH_STENCIL_OES, GL_UNSIGNED_INT_24_8_OES, NULL);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_TEXTURE_2D, sfc->rb_depth_stencil, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
GL_TEXTURE_2D, sfc->rb_depth_stencil, 0);
if (sfc->rt_msaa_samples)
{
glsym_glFramebufferTexture2DMultisample(GL_FRAMEBUFFER,
GL_DEPTH_ATTACHMENT,
GL_TEXTURE_2D,
sfc->rb_depth_stencil,
0, sfc->rt_msaa_samples);
glsym_glFramebufferTexture2DMultisample(GL_FRAMEBUFFER,
GL_STENCIL_ATTACHMENT,
GL_TEXTURE_2D,
sfc->rb_depth_stencil,
0, sfc->rt_msaa_samples);
}
else
{
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_TEXTURE_2D, sfc->rb_depth_stencil, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
GL_TEXTURE_2D, sfc->rb_depth_stencil, 0);
}
glBindTexture(GL_TEXTURE_2D, curr_tex);

#else
Expand Down

0 comments on commit 7a17f09

Please sign in to comment.