OpenGL extension vs OpenGL core

Posted by user209347 on Programmers See other posts from Programmers or by user209347
Published on 2013-10-18T14:25:12Z Indexed on 2013/10/18 16:11 UTC
Read the original article Hit count: 1051

Filed under:

I was doubting: I'm writing a cross-platform engine OpenGL C++, I figured out windows forces the developers to access OpenGL features above 1.1 through extensions.

Now the thing is, on Linux, I know that I can directly access functions if the version supports it through glext.h and opengl version. The problem is that if on Linux, the core doesn't support it, is it possible there is an extensions that supports the same functionality, in my case vertex buffer objects?

I'm doing something like this:

(hashdeck) define glFunction functionpointer_to_the_extension (apparently the layout changes font size if I use #)

Since glext already defined glFunction, I can write in client code glFunction, and compile it both on Windows AND Linux without changing a single line in my client code using the engine (my goal).

Now the thing is, I saw a tutorial use only the extension on Linux, and not checking for the opengl implementation version. If the functionality is available in the core, is it also available as extension (VBO's e.g.)? Or is an extension something you never know is available?

I want to write an engine that gets all the possibilities on hardware, so I need to check (on Linux) for extensions as well as core version for possible functionality implementation.

© Programmers or respective owner

Related posts about opengl