Skip to main content
gamedev.net
🔒 Locked

NV_REGISTER_COMBINERS Problem

Started by Corrail 1 reply 650+ views
Original Post
Corrail
Corrail
Hello! Just started working with NV_REGISTER_COMBINERS but I''ve a really big problem. I use 2 general combiners and the final combiner but the final combiner doesn''t work. It''s a simple Bump Mapping demo with specular lighting, using ARB_vertex_program designed for NV1X chipsets (only 2 combiners, only 2 texture units). Here''s my Source-Code (only the specular lighting, the diffuse works with texture_env_dot3, not with register combiners): glEnable(GL_REGISTER_COMBINERS_NV); glCombinerParameteriNV(GL_NUM_GENERAL_COMBINERS_NV, 2); glCombinerParameterfvNV(GL_CONSTANT_COLOR0_NV, MaterialSpec); glCombinerInputNV(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_A_NV, GL_TEXTURE0, GL_EXPAND_NORMAL_NV, GL_RGB); glCombinerInputNV(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_B_NV, GL_TEXTURE1, GL_EXPAND_NORMAL_NV, GL_RGB); glCombinerOutputNV(GL_COMBINER0_NV, GL_RGB, GL_SPARE0_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE, GL_TRUE, GL_FALSE, GL_FALSE); glCombinerInputNV(GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_A_NV, GL_SPARE0_NV, GL_SIGNED_IDENTITY_NV, GL_RGB); glCombinerInputNV(GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_B_NV, GL_SPARE0_NV, GL_SIGNED_IDENTITY_NV, GL_RGB); glCombinerOutputNV(GL_COMBINER1_NV, GL_RGB, GL_SPARE0_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE); glFinalCombinerInputNV(GL_VARIABLE_E_NV, GL_SPARE0_NV, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_F_NV, GL_SPARE0_NV, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_A_NV, GL_E_TIMES_F_NV, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_B_NV, GL_CONSTANT_COLOR0_NV, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_C_NV, GL_ZERO, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_D_NV, GL_ZERO, GL_SIGNED_IDENTITY_NV, GL_RGB); glDrawArrays(ToRender->PrimitveType, 0, ToRender->NumVertices); But if I use the following code for the final combiner the result is the same: glFinalCombinerInputNV(GL_VARIABLE_E_NV, GL_ZERO, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_F_NV, GL_ZERO, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_A_NV, GL_ZERO, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_B_NV, GL_ZERO, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_C_NV, GL_ZERO, GL_SIGNED_IDENTITY_NV, GL_RGB); glFinalCombinerInputNV(GL_VARIABLE_D_NV, GL_ZERO, GL_SIGNED_IDENTITY_NV, GL_RGB); I really don''t know what to do here! With the code above (using everywhere GL_ZERO) nothing should be drawn, but it seems that the final combiner uses VARIABLE_A_NV and VARIABLE_B_NV from the last general combiner (here SPARE0_NV for both). I really don''t know what''s going on here! Thanks a lot! Corrail corrail@gmx.at ICQ#59184081
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...
BGCJR
BGCJR
have you thought about switching to NVparse?

then use Cg compiler to make the NV_register_combiners in a NVparse file and use NVparse lib to load the file.



[edited by - BGCJR on July 13, 2003 12:20:01 PM]
Game Core
vincoof
vincoof
I''ve got one thing to say : check your code somewhere else. It looks like you''re not compiling the right source code file, or you''re not running to correct executable.
For instance, try disabling register combiners and see if the rendering is still the same.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.