Closed Bug 905282 Opened 12 years ago Closed 12 years ago

Add OpenGL constant prefixed by MOZ_GL_, next to the LOCAL_GL_ for incremental transition.

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: guillaume.abadie, Assigned: guillaume.abadie)

References

Details

In the rendering meeting of Monday August 12th, we have decided to replace the LOCAL_GL_ prefix for OpenGL constants name by MOZ_GL_. Tow patches are planed: - One modifying gfx/gl/GLParseregistryXML.py to export constants prefixed by MOZ_GL_ next to ones prefixed by LOCAL_GL_* - Second will be the new generated GLConsts.h We keep LOCAL_GL_* for now, to incrementally switch code.
Oh... I didn't attend that meeting (I think it was the one on Tuesday) but my recollection from bug 900199 was that there was more people (Jeff Muizelaar, Vlad, and me at least) in favor of GL_ than any other option. After all, GL_ is what pretty much else --- including official GL headers, Android code that we import in B2G, and ANGLE code that we import in Gecko, and Chromium code --- seems to be using, and the reason /not/ to use GL_ didn't seem very fundamental --- after all, if these other projects are able to use GL_, why can't we, with some #ifdef / #undef manual labor to work around the few conflicts?
Yes, what bjacob said. If we can use GL_ that would be far better. I mean our gl function calls are already cx->fFoo() so it's hard to cut and paste code, but...
We could rename the GL functions to gl prefixes too, while we're at it; that'd be the easier part, with fewer conflicts.
(In reply to Benoit Jacob [:bjacob] from comment #1) > I think it was the one on Tuesday Oh, you said the _rendering_ meeting, my bad. Anyway, I didn't attend that one either (was 2:30 AM my time).
(In reply to Benoit Jacob [:bjacob] from comment #3) > We could rename the GL functions to gl prefixes too, while we're at it; > that'd be the easier part, with fewer conflicts. gl prefix for function is not necessary since they are not in specifications... Most of GLContext pointers is named gl, so we would have gl->glClear() which is redundant and as painful as gl::GLContext. But the 'f' prefix could be remove in an other patch.
I'd be quite OK with gl->Clear() as it's visually very close to glClear and mimics what we already have in WebGL (gl.Clear()).
(In reply to Benoit Jacob [:bjacob] from comment #6) > I'd be quite OK with gl->Clear() as it's visually very close to glClear and > mimics what we already have in WebGL (gl.Clear()). We could generate symbols from the XML registry to, but maybe after the GLContext refactoring. Elsewhere, we don't have any python script to do like with constants.
(In reply to Benoit Jacob [:bjacob] from comment #1) > Oh... I didn't attend that meeting (I think it was the one on Tuesday) but > my recollection from bug 900199 was that there was more people (Jeff > Muizelaar, Vlad, and me at least) in favor of GL_ than any other option. > After all, GL_ is what pretty much else --- including official GL headers, > Android code that we import in B2G, and ANGLE code that we import in Gecko, > and Chromium code --- seems to be using, and the reason /not/ to use GL_ > didn't seem very fundamental --- after all, if these other projects are able > to use GL_, why can't we, with some #ifdef / #undef manual labor to work > around the few conflicts? I'm not going to write the patches if everyone are not agree anymore.
(In reply to Guillaume Abadie from comment #0) > In the rendering meeting of Monday August 12th, we have decided to replace > the LOCAL_GL_ prefix for OpenGL constants name by MOZ_GL_. We actually decided to keep the LOCAL_GL prefix. If we were to do it over again we would perhaps choose MOZ_GL, but we decided that the gain wasn't worth the churn.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #9) > (In reply to Guillaume Abadie from comment #0) > > In the rendering meeting of Monday August 12th, we have decided to replace > > the LOCAL_GL_ prefix for OpenGL constants name by MOZ_GL_. > > We actually decided to keep the LOCAL_GL prefix. If we were to do it over > again we would perhaps choose MOZ_GL, but we decided that the gain wasn't > worth the churn. Oh... Oups... I didn't understand that. Sorry
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.