c++ - Mixing fixed function pipeline and programmable pipeline in opengl -
okay, here problem. have framework used school visualizations, , i've been trying set 3d graphics. problem is, framework uses fixed function pipeline draw. without messing up, i've been trying work around old code still needs use fixed function pipeline, , have been setting facilities allow creation of shaders , shader programs. i've got simple color shader compile , i've made test vertex array (a green triangle).
now when tried render it, screen went black. before hand, there lot of 2d sprites , not moving screen, stepping through code added render function, found screen goes black moment call gluseprogram. if comment out gluseprogram, , parts set uniforms , draw, works normally. gluseprogram disable fixed function pipeline? if so, there anyway reactivate it, per se?
the moment use gluseprogram
fixed function pipeline replaced programmable pipeline. can't have fixed function + programmable pipeline @ same time. example suppose scene contains fog. if haven't taken care of in fragment shader wont see in final output.
though in render/draw function can this
draw { gluseprogram(program); // render stuff shader gluseprogram(0) // render stuff fixed pipeline }
Comments
Post a Comment