I’m having some real issues getting my program
to work under linux. I’m using register combiners but am getting segmentation faults.
I’m quite sure its due to the use of glCombinerInputNV etc…
My code seems to be a-ok however. So I’m probably doing something wrong with the extensions in the headerfiles or something…
Does anyone of you know of a small demo with src that uses reg combiners and compiles without a glitch under linux gcc ?
i use an initglext.h i found in an NVIDIA demo.
In it ; typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); etc…
I also copied gl.h glext.h etc… from NVIDIA into my /usr/include/ which seemed to resolve my segfault problems (hurrah!)
For testing i start with a very simple reg combiner;
glFinalCombinerInputNV( GL_VARIABLE_A_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glFinalCombinerInputNV( GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glFinalCombinerInputNV( GL_VARIABLE_C_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glFinalCombinerInputNV( GL_VARIABLE_D_NV, GL_TEXTURE0_ARB, GL_UNSIGNED_IDENTITY_NV, GL_RGB );
glEnable( GL_REGISTER_COMBINERS_NV );
Then i draw a simple box alla ;
glBegin(GL_QUADS);
glActiveTextureARB(GL_TEXTURE0_ARB);
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0f, 1.0f);
I just get blank walls however. I’m probably overlooking something… ?
Is it just me or are all these different headerfiles from SGI/NVIDIA/MESA3/MESA4 etc… getting a big mess ?
Ps;
Yes I did load a texture into GL_TEXTURE0_ARB
and yes i did start with glCombinerParameteriNV( GL_NUM_GENERAL_COMBINERS_NV, 0 ); =)
[This message has been edited by musashi (edited 03-26-2002).]
I have large codes using register combiners under linux, including usage of glCombinerInputNV (of course), glCombinerParameter and glCombinerStageParameter (which is from the register_combiners2 extension)
This is with nVidia’s headers, with drivers since release 12.51 (23.13 , 28.02)
I don’t have a small piece of code, if you continue to have problems with this, I can extract something small.
I hate to ask, but you didn’t mention glEnable(GL_TEXTURE_2D)
And also (forgive me for mentioning this), you need of course different tex coordinates for the different vertices
BTW, I never tried register combiners with zero stages, but I don’t see why it shouldn’t work.
It is some mess with the headers, yes.
But not if you target only nVidia hardware. In In that case use always their headers
Well, just call glGetError() before and after the call to use 0 combiners and see if you get an error. It doesn’t have any influence to the final combiner but calling glGetError() at another place in your app and getting an error can take you some time to find the reason