Skip to main content
gamedev.net
🔒 Locked

Simple question about multitexturing

Started by shadow12345 2 replies 300+ views
Original Post
shadow12345
shadow12345
Do I absolutely have to give my multitexturing functions these names: PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL; PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL; I would think that I would be able to give it any name that I want because I am just creating an instance of something, but when I give them my own names they fail
Why don't alcoholics make good calculus teachers?Because they don't know their limits!Oh come on, Newton wasn't THAT smart...
Prosper/LOADED
Prosper/LOADED
quote:

I would think that I would be able to give it any name that I want because I am just creating an instance of something, but when I give them my own names they fail


But why would you want to to this ? The result would be code that others may have a hard time understanding. Moreover, you wouldn''t be able to use other people''s code as easily, since you would have to change functions names.

Yes, it should work, but unless you have an excellent reason to do so, stay as far as possible from such a heretic thing.

Believe me, some went to hell for less than that.
blizzard999
blizzard999
As you know extensions (functions not enumarants) are accessible via pointers to function so you can call these pointer functions as you want...but you must define the pointer function type in the right mode (and you should not because they are defined in glext.h).
The name of the (pointer function) variables also can be anything...

Try to not use the prefix gl(Function) in your function because it can be a global function with the same name somewhere (implemented extension?)...use at least the prefix pgl to indicate a pointer!


[edited by - blizzard999 on April 25, 2003 8:27:03 AM]
blizzard999
blizzard999
quote:
Original post by me

Try to not use the prefix gl(Function) in your function because it can be a global function with the same name somewhere (implemented extension?)...use at least the prefix pgl to indicate a pointer!

[edited by - blizzard999 on April 25, 2003 8:27:03 AM]


In fact! I''ve just run ''Find Files'' and I found glMultiTexCoord2fARB in glext.h -> the extension is not more an extension but it is promoted as an API function!



Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.