Hello,
I have the following odd problem…
(NVidia drivers installed + GF2 GTS; Linux)
This works fine:
typedef void (*glActiveTextureARB_ptr)(GLenum texture);
glActiveTextureARB_ptr glDummyFunc;
glDummyFunc=(glActiveTextureARB_ptr)SDL_GL_GetProcAddress(“glActiveTextureARB”);
glDummyFunc(GL_TEXTURE0_ARB);
This segfaults horribly (on the last line):
typedef void (*glCombinerInputNV_ptr)(GLenum state, GLenum portion, GLenum
variable, GLenum input, GLenum mapping, GLenum componentUsage);
glCombinerInputNV_ptr glDummyFunc2;
glDummyFunc2=(glCombinerInputNV_ptr)SDL_GL_GetProcAddress(“glCombinerInputNV”);
glDummyFunc2(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_A_NV, GL_TEXTURE0_ARB,
GL_SIGNED_IDENTITY_NV, GL_RGB);
What am I doing wrong?
Thanks in advance,
Florian
Florian Schanda wrote:
This segfaults horribly (on the last line):
typedef void (*glCombinerInputNV_ptr)(GLenum state, GLenum portion, GLenum
variable, GLenum input, GLenum mapping, GLenum componentUsage);
glCombinerInputNV_ptr glDummyFunc2;
glDummyFunc2=(glCombinerInputNV_ptr)SDL_GL_GetProcAddress(“glCombinerInputNV”);
glDummyFunc2(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_A_NV, GL_TEXTURE0_ARB,
GL_SIGNED_IDENTITY_NV, GL_RGB);
What am I doing wrong?
Thanks in advance,
Florian
you aren’t testing to see if glDummyFunc2 is not NULL…for one thing…–
-==-
Jon Atkins
http://jcatki.2y.net/
Florian Schanda wrote:
This segfaults horribly (on the last line):
typedef void (*glCombinerInputNV_ptr)(GLenum state, GLenum portion, GLenum
variable, GLenum input, GLenum mapping, GLenum componentUsage);
glCombinerInputNV_ptr glDummyFunc2;
glDummyFunc2=(glCombinerInputNV_ptr)SDL_GL_GetProcAddress(“glCombinerInputNV”);
glDummyFunc2(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_A_NV, GL_TEXTURE0_ARB,
GL_SIGNED_IDENTITY_NV, GL_RGB);
What am I doing wrong?
Thanks in advance,
Florian
you aren’t testing to see if glDummyFunc2 is not NULL…for one thing…
and if it’s not null, try to add _stdcall, _cdecl or st like that to
the function typedef - maybe the compiler pushes arguments in wrong
order(the first function has 1 arg so the order makes no difference).
LadaOn 29 May 2002, wrote:
Reklama:
Hledani lidi a jejich e-mailu: http://www.lide.cz
Thanks,
Its not NULL, I checked that…
Good idea with _cdecl, i’ll try that. But what wonders me, is that since the
arguments are all of the same type (unsigned int) why does it matter? OpenGL
should just generate GL_INVALID_OP or something and not segfault…
FlorianOn Wednesday 29 May 2002 06:46, Ladislav Heythum wrote:
On 29 May 2002, wrote:
Florian Schanda wrote:
This segfaults horribly (on the last line):
typedef void (*glCombinerInputNV_ptr)(GLenum state, GLenum portion,
GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
glCombinerInputNV_ptr glDummyFunc2;
glDummyFunc2=(glCombinerInputNV_ptr)SDL_GL_GetProcAddress(“glCombinerInp
utNV”); glDummyFunc2(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_A_NV,
GL_TEXTURE0_ARB, GL_SIGNED_IDENTITY_NV, GL_RGB);
What am I doing wrong?
Thanks in advance,
Florian
you aren’t testing to see if glDummyFunc2 is not NULL…for one thing…
and if it’s not null, try to add _stdcall, _cdecl or st like that to
the function typedef - maybe the compiler pushes arguments in wrong
order(the first function has 1 arg so the order makes no difference).