View Full Version : register combiners in linux
03-26-2002, 08:07 PM
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'd really appreciate it.
Did you initialize the extension correctly?
03-26-2002, 09:50 PM
I believe so;
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 ;
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 ?
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).]
03-26-2002, 09:54 PM
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.
BTW, I don't bother with glXGetProcAddressARB
03-26-2002, 10:03 PM
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
Specifying glCombinerParameteriNV( GL_NUM_GENERAL_COMBINERS_NV, 0 ); creates an error. Set it to 1 even if you don't do anything there.
03-27-2002, 07:37 PM
I upgraded my nvidia drivers from 1541 to 2802 and everything runs smooth now.
Apparently some reg combiner extensions didn't work properly in 1541.
Should 've known.....
Thnx for the advice everyone.
Ps; kon ; i dont seem to have a problem when I specify 0 regcombiners....?
Maybe this is also driverrelated ?
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 http://www.opengl.org/discussion_boards/ubb/wink.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.