extensions: function pointers

Hi,

I downloaded new “glext.h” file (this one includes function prototypes for GL_ARB_vertex_object_buffer)

Now, how to use any function from this extension (glGenBuffers, glBindBuffer…) without using GLEW? (I really don’t like to use it)

How to set up this extension, and make the functions global for project? (to make them usable from different files, without redeclaration)

this post recals me something similar in recent other topics…

look at gl wiki or other documents on this site. glew seems well, many people talk good about it.

Originally posted by akuda:

Now, how to use any function from this extension (glGenBuffers, glBindBuffer…) without using GLEW? (I really don’t like to use it)

Why wouldn’t you like to use Glew? It’s so easy to use and saves you having to setup the extensions yourself - which is really just a waste of time.

The setup of extensions is NOT an advanced question. Look at the nehe tutorials and you’ll find out how to do it (if you’re really keen on reinventing the wheel).

You didn’t answer my question. I do not like to use GLEW, and the reasons of this decission are not the subject of this topic.

And yes, if after two topics I didn’t recieve any useful answers, I think it shows, that for some of us, it is pretty advanced.

And about reinventing the wheel - I’m sure it’s better, than copy it, without reservations, when it’s not fitting your project.

You can get the function pointer with wglGetProcAddress.

Store it in a global variable, so you can use it from the whole program. Since you’re convinced that your question is advanced, I assume you know how to do that.

Well, before posting this subject, I checked forum for existing answers. I used search function with “extension” keyword. 100% of results are in advanced section, so I guess, it is advanced topic. When you try to search for “extensions” on beginners forum, function returns NULL :slight_smile: . And yes, I do know how to make a variable global. Someone just had to tell me about “extern” keyword. Unfortunatley, noone did on this forum.

extern is something about the programming language not GL. And if you do it in some ways, extern is not an obligation.

And as I told you in my last post, it is now described in the GL wiki (I guess suffisantly enough to be understandable).

I would suggest pinning an explicide topic like “Read this before you post” and delete all topics like this one. This is really annoying :frowning:

Originally posted by akuda:
You didn’t answer my question. I do not like to use GLEW, and the reasons of this decission are not the subject of this topic.

That’s because it would be a waste of time to answer your question. And why should we waste our time, when you are too lazy to use googe ? The third entry in the list tells you everything you need to know.

Originally posted by akuda:
And yes, if after two topics I didn’t recieve any useful answers, I think it shows, that for some of us, it is pretty advanced.

Extensions have been around (AFAIK) since OpenGL 1.1. Most tutorials you find on the web will contain code for getting one or more extension pointers. It’s a noob question. You think it’s advanced because YOU don’t know how to do it. And you don’t know how to do it because you haven’t looked.

Originally posted by akuda:
And about reinventing the wheel - I’m sure it’s better, than copy it, without reservations, when it’s not fitting your project.

If you want to waste your time, then fine, just don’t waste ours. You are asking how to initialise a list of function pointers - how the F#$@ can you improve on that - especially when GLEW takes all of about two calls. But I suspect you haven’t really looked at it.