0
\$\begingroup\$

I have a “FPS” game I have programmed in Fixed Function Pipleline and one made in Programmable pipeline OpenGL. While the programmable pipeline has lots of weird things that you can edit, it does not have glLoadIdentity that I need for the gun to be attached to the camera. There is little to no information on this subject and most of the information that I can find is in the fixed function pipeline rather than the programmable one. Keep in mind that with the fixed function pipeline, I can just use the glloadidentity function and attach it then move on to another thing. On the programmable one, I don’t know how to do this, so I have spent a whole week looking up how I can do it.

Should I just use the fixed function pipeline one and abandon the programmable pipeline?

What shall I do?

Thanks!

\$\endgroup\$
2
  • \$\begingroup\$ As long as it works for you, use fixed function pipeline. Use whatever you like and what works for you. Just keep in mind that fixed function pipeline is outdated and might be gone in 10 years from now. \$\endgroup\$
    – tkausl
    Mar 3, 2019 at 8:30
  • 3
    \$\begingroup\$ "I don't know how to do this common thing" is probably not a good reason to drive your decision of tech stack to use, especially when hundreds of games demonstrate it can be accomplished in any tech stack. Your other question, asking how to solve this problem, looks to me like a more constructive direction. \$\endgroup\$
    – DMGregory
    Mar 3, 2019 at 14:11

1 Answer 1

1
\$\begingroup\$

In OpenGL terms, "programmable pipeline" can actually mean a lot of things. For example, it might mean one of:

  • OpenGL 1.5 with the GL_ARB_vertex_program and GL_ARB_fragment_program extensions.
  • OpenGL 2.0 or 2.1 with the earliest versions of GLSL.
  • Modern OpenGL (3.x or higher) with a compatibility context.
  • Modern OpenGL (3.x or higher) with a core context.
  • Some other GL version with vendor-specific extensions.

On the other hand, glLoadIdentity is actually nothing whatsoever to do with the programmable pipeline. Instead, it's part of the OpenGL matrix stack, and absolutely is available in many cases when using the programmable pipeline.

In fact, the only case where the matrix stack is not available is in modern OpenGL with a core context. In every other case, so long as you access the built-in matrix uniforms in your shaders, you absolutely can combine the matrix stack with the programmable pipeline.

\$\endgroup\$
1
  • \$\begingroup\$ As far as I know, I am pretty sure my shaders are using the core because it says “#version 330 core” at the top of each one... does this mean it is unusable, because I am pretty sure it isdeprecated. \$\endgroup\$ Mar 3, 2019 at 16:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .