From: StApostol <sta...@gm...> - 2008-09-28 21:23:45
|
On Sun, Sep 28, 2008 at 3:43 PM, Camilla Berglund < cam...@gm...> wrote: > StApostol wrote: > >> I suppose we can determine the version automatically, by checking what > the > >> context says. > > > > Note that this can be somewhat tricky. For example, most Linux drivers > > report versions like "1.4 (Mesa 2.1)" - first is GLX, followed by OpenGL. > > Actually, the first is OpenGL and the second is the Mesa library, > analogous to other platforms. If some distro does it otherwise, it's > violating the GL spec (section 6.1.11, "Pointer and String Queries"). I stand corrected. Just checked Mesa and the version string is "2.1 Mesa 7.0.3". I am positive that Mesa 6.x returned a string in a different format (because I had to fix my naive parser), but I don't have a distro at hand to check. > > > >> > By the way, why not layer GLE on top of GLFW? > > > >> What exactly do you mean by layering GLE on top of GLFW? Do you mean > that > >> GLE should be called by GLFW? I don't think that's such a good idea. > > > > The other way round: have GLE call glfwGetAddress to simplify things. > Note > > that this should work even if the context was *not* created through GLFW. > > No, it won't. GLFW doesn't allow that call unless it owns the context. Really? All I can think is why was it implemented like this? As long as [wgl/glx/agl]GetCurrentContext returns something, [wgl/glx/agl]GetAddress should be safe to call. Ah, anyway, glfwGetAddress should be simple enough to reimplement. |