Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BradDaBug

ARB extensions problem

This topic is 5395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to add the ARB multitexturing extensions to my landscape engine. I'm following NeHe's tutorial. So when I add these lines:
PFNGLMULTITEXCOORD1FARBPROC	glMultiTexCoord1fARB	= NULL;
PFNGLMULTITEXCOORD2FARBPROC	glMultiTexCoord2fARB	= NULL;
PFNGLMULTITEXCOORD3FARBPROC	glMultiTexCoord3fARB	= NULL;
PFNGLMULTITEXCOORD4FARBPROC	glMultiTexCoord4fARB	= NULL;
PFNGLACTIVETEXTUREARBPROC	glActiveTextureARB	= NULL;
PFNGLCLIENTACTIVETEXTUREARBPROC	glClientActiveTextureARB= NULL;   
I get these errors:
c:\code\landscape-0.1\src\graphics.cpp(29) : error C2146: syntax error : missing ';' before identifier 'glMultiTexCoord1fARB'
c:\code\landscape-0.1\src\graphics.cpp(29) : error C2501: 'PFNGLMULTITEXCOORD1FARBPROC' : missing storage-class or type specifiers
c:\code\landscape-0.1\src\graphics.cpp(29) : fatal error C1004: unexpected end of file found   
I'm including glext.h and the extension names (PFNGLMULTITEXCOORD1FARBPROC, etc) are in glext.h but it's still like the compiler thinks they're undefined! What's going on? [edited by - BradDaBug on August 16, 2003 4:16:57 PM]

Share this post


Link to post
Share on other sites
Advertisement
Strange. I'll take a couple of random guesses:

Make sure you include glext.h before the functions.

If you're using multiple files then you need to declare the function pointers in a header file as externs as well as in the CPP file.
ie
extern PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1fARB;

Include glext.h from that file.

[edited by - benjamin bunny on August 16, 2003 7:54:09 PM]

Share this post


Link to post
Share on other sites
I dunno if this'd help any or not, but I just downloaded the Visual C++ project for Lesson 22 at NeHe's site and tried to build it but I'm getting the same error.

Edit: I just noticed I seem to be using the Mesa gl.h file instead of Microsoft's gl.h file. Could that have something to do with it?

Edit: Woo hoo! That was it! But I feel wierd replacing headers created in 2002 with headers created in 1998. Well, at least it works!

[edited by - BradDaBug on August 17, 2003 6:50:23 PM]

Share this post


Link to post
Share on other sites
multitexturing is included in OpenGL since version 1.2.1. why bother with extensions and not simply use a newer opengl version?

(no idea where to get new opengl headers/libraries for windows)

Share this post


Link to post
Share on other sites
quote:
Original post by thomas001
multitexturing is included in OpenGL since version 1.2.1. why bother with extensions and not simply use a newer opengl version?

(no idea where to get new opengl headers/libraries for windows)

Since there are no newer libraries for Windows, you will have to load the function pointers anyways. The only difference is that there''s less typing; no "ARB" at the end.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!