From: Jason M. <ko...@gm...> - 2008-09-27 23:00:03
|
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. > Then they should be changed. The OpenGL Specification is very clear on this matter: [spec] The VERSION and SHADING LANGUAGE VERSION strings are laid out as follows: <version number><space><vendor-specific information> The version number is either of the form major number.minor number or major number.minor number.release number, where the numbers all have one or more digits. The release number and vendor specific information are optional. However, if present, then they pertain to the server and their format and contents are implementation dependent. GetString returns the version number (in the VERSION string) and the extension names (in the EXTENSIONS string) that can be supported by the current GL context. Thus, if the client and server support different versions and/or extensions, a compatible version and list of extensions is returned. [/spec] If they aren't following that, then that's a problem with most Linux drivers. > > > gleLoadFunctions(GLint majorVersion, GLint minorVersion); > > > This will load all functions and extensions up to the given GL version. > > What about non-core functions? Things like ARB, EXT, etc. > "will load all functions and extensions". That includes extensions. > > > > 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. > That's not a terrible idea, but I would be hesitant to make GLE dependent on GLFW. Even in that small way. It would be better to bring the glfwGetAddress function into GLE itself. |