On May 2, 2013 4:28 PM, "Cory Fields" <notifications@github.com> wrote:
>
> In xbmc/rendering/gl/RenderSystemGL.cpp:
>
> > +
> > +  if(g_Windowing.UseLimitedColor())
> > +    range = 235 - 16;
> > +  else
> > +    range = 255 -  0;
> > +
> > +  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
> > +  glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
> > +
> > +  glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
> > +  glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR);
> > +  glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_MODULATE);
> > +  glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_TEXTURE0);
> > +  glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA);
> > +  glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA, GL_PRIMARY_COLOR);
> > +  glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA, GL_SRC_ALPHA);
>
> Well, now is a good time to decide how to handle these subtle
differences. We can start down the inheritance path, which we always seem
to end up undoing at some point. Or we can do a proper factory with calls
into the current renderer. Or we can just flat-out copy/paste.
>
> It's largely irrelevant until we can change renderers on the fly, but
it's worth putting some thought into it now.
>

I can do some investigation on this. In compiz a large part of the GLES /
GL code is combined.

See also "OpenGL Insights" - there's a chapter in there about that.

> —
> Reply to this email directly or view it on GitHub.