PDA

View Full Version : Multitexture problem!



Malfatti
05-04-2006, 06:32 PM
I think that this message is indicated to this topic, bcse I am beggining!

Here I am! Trying to compile an example code that come with the "OpenGL Game Programming Book"!

My problem is a program that uses multitexturing, but it dontĀ“t work.

This error happenĀ“s when I try to compile:

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: 'PFNGLMULTITEXCOORD2FARBPROC' : missing storage-class or type specifiers


c:\Documents and Settings\multipassex\main.cpp(50): error C2501: 'PFNGLMULTITEXCOORD2FARBPROC' : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(52): error C2501: 'PFNGLCLIENTACTIVETEXTUREARBPROC' : missing storage-class or type specifiers


The compiler not recognize the pointer to extended funcions of opengl.

I am including in my project the headers

#include <gl/gl.h> // standard OpenGL include
#include <gl/glu.h> // OpenGL utilties
#include "glext.h"
// OpenGL extension

and the libs:

opengl32.lib and glu32.lib

Any idea that what is my problem?

Thank you!!!

dorbie
05-05-2006, 12:24 AM
Please do not crosspost.

These are function pinter typedefs declared in glext.h so you can fill them in with wglgetprocaddress and still use them with argument checking.

I suspect you have an old glext.h file or something is wrong with including it. Are you sure these are the first errors?

Check the typedefs carefully and your use of these function pointer types.

You can also use void function pointers and/or your own declaratiosn with casts but that's just an interim suggestion if you're feeling adventurous.

Malfatti
05-05-2006, 08:36 AM
I did two tests. At firs I try to compile my program on Windows XP. And it works.

But in my machine that runs windows NT. it donĀ“t works..Any idea?

Here is my code:

http://www.inf.pucrs.br/lfraga/OpenGl%20Project.zip

Thank you!

jide
05-05-2006, 11:59 AM
Sometimes, beeing clear allows other not forcing themselves to guess what the problem could be...

What does not work ?? The compilation ? The linking ? The execution ? Did you install your card drivers ? Did you ensure you have everything intended for things to run ?

Malfatti
05-05-2006, 04:01 PM
If you read the message that I was send before..

I describe my problem in details:

The problem happens when I compile the code.

This error happenĀ“s when I try to compile:

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: 'PFNGLMULTITEXCOORD2FARBPROC' : missing storage-class or type specifiers


c:\Documents and Settings\multipassex\main.cpp(50): error C2501: 'PFNGLMULTITEXCOORD2FARBPROC' : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(52): error C2501: 'PFNGLCLIENTACTIVETEXTUREARBPROC' : missing storage-class or type specifiers


Here is my code:


http://www.inf.pucrs.br/lfraga/OpenGl%20Project.zip

jide
05-05-2006, 05:36 PM
Indeed, that's what you said in your first post, but not in the second:



But in my machine that runs windows NT. it donĀ“t works..Any idea?
Am I expecting it is the same error than the previous ??

Try to see if your GL libraries and headers are up to date. I can't see any other things.

Malfatti
05-06-2006, 11:26 AM
Yes! The error that I describe in the first message is the same and occurs only on Windows NT. My GL libraries and headers are up date.
I put the libraries in my gl folder of my Visual Studion .Net.

But to me it is a mistery! Why my program works on Windows XP and donĀ“t works on Windows NT?

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: 'PFNGLMULTITEXCOORD2FARBPROC' : missing storage-class or type specifiers


c:\Documents and Settings\multipassex\main.cpp(50): error C2501: 'PFNGLMULTITEXCOORD2FARBPROC' : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(52): error C2501: 'PFNGLCLIENTACTIVETEXTUREARBPROC' : missing storage-class or type specifiers

jide
05-06-2006, 01:48 PM
What version of GL do you have on NT ? (glGetString (GL_VERSION))

Overmind
05-07-2006, 04:58 AM
That doesn't have anything to do with the error...

You said you copied the newest headers in your GL directory. Then you should #include <GL/glext.h>, instead of #include "glext.h".

Just to be sure, download the latest glext.h from the extension registry.

Btw. multitexture is in GL core since version 1.2. You should use the core functions, not the ARB ones...

Malfatti
05-08-2006, 07:37 AM
I know it! Firt I test using <gl/glext.h>

How my program donĀ“t work, I put the newest glext.h into my program directory.

Again donĀ“t work. I think that is a problem with the windows 2000. Because I test the same program in another machine with windows XP and compiled normaly.

So, I donĀ“t understand Why?

Any, environment variable is missing?

jide
05-08-2006, 10:37 AM
If it is Windows 2000 it has to run. I knew some had problems with NT 4 at that time but there's absolutely no problem with W2K.