[Mesa-dev] Mesa as part of OpenGL-on-OpenGL ES 2.0 (/WebGL)?
Michel Dänzer
michel at daenzer.net
Wed Mar 7 08:14:48 PST 2012
On Die, 2012-03-06 at 08:19 -0800, Benoit Jacob wrote:
> ----- Original Message -----
> > On Mon, 5 Mar 2012 19:41:14 -0800 (PST), Benoit Jacob
> > <bjacob at mozilla.com> wrote:
> >
> > > - glShadeModel(GL_FLAT) (this one seems really hard to do with
> > > OpenGL
> > > ES2, a real capability regression from OpenGL [ES] 1 it seems!)
> >
> > Ouch. I keep trying to come up with workarounds for this, but I'm
> > ending up with things that use even later GL functionality. Rewrite
> > your VBOs, I guess, but that gets really awful in the case of vertex
> > shading.
>
> About glShadeModel(GL_FLAT), rewriting VBOs if of course what I would
> like to avoid; the biggest hope I've had was from this page,
> suggesting implementing it using OES_standard_derivatives (which is
> already widely available as a WebGL extension):
> http://athile.net/library/blog/?p=970
>
> I would like to understand: when Mesa uses Gallium3D, at what level is
> glShadeModel(GL_FLAT) handled? Is the VBO rewritten before it hits
> Gallium3D, or does Gallium3D accept flat shading (which would mean
> that implementing a Gallium3D driver targeting WebGL would require us
> to handle glShadeModel(GL_FLAT) ourselves)?
The latter. However, Gallium3D offers several options for implementing a
workaround, either in the driver only or with the help of auxiliary
functions and/or the OpenGL API state tracker.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
More information about the mesa-dev
mailing list