Advertisement

Extention paths

Started by January 23, 2003 08:33 AM
10 comments, last by Juicy 22 years, 1 month ago
Hawkeye3: for the example of compiled vertex arrays, it''s ok. But in general you can''t just write "if function pointer exists then use it otherwise forget it". The extension path concept looks like "if feature is supported then write a bunch of lines otherwise write another bunch of lines".

In the first case, each function pointer is checked one after the other whereas in the second it''s the whole feature that is checked.

For instance, with multitexture I wouldn''t like to write :

if (glActiveTextureARB) glActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, first_texture);
if (glActiveTextureARB) glActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, second_texture);

But according to your post, that''s what I should be writing !
No offense intended, just to clarify some points as usual.


RipTorn: if he buys a GeForce or a Redeon, either way he will have to deal with extension path so the topic is still useful anyway
Ah I get what you are saying. Thanks for clarifying . I''ll be sure to keep that in mind when using groups of related extensions.

I''m still a novice at this you know , sorry if I say naive things at times.

This topic is closed to new replies.

Advertisement