5
\$\begingroup\$

Are all OpenGL calls in 3.3 Core and GLSL 330 core shaders valid and functionally equivalent in OpenGL 4.0 through 4.5 core?

I can't seem to find a clear and definitive answer; both in specification and the real world, is code written for 3.3 core going to function in a 4.5 core context? I've currently kept all of my OpenGL renderer code strictly to 3.3 core profile, but I'd like to take advantage of some features that are only available in 4.0+ and 4.4+ if the user's environment supports those contexts. The change-logs of OpenGL seem fairly simple and it doesn't look like anything in 3.3 core has been deprecated in 4.

Are there new requirements OpenGL 4.0 or 4.4 that makes 3.3 core code used in conjunction with new features like tessellation shaders incompatible?

\$\endgroup\$
2
\$\begingroup\$

Code written for core 3.3 should be fully compatible with a 4.5 core profile. This can be seen from the OpenGL 4.1 and 4.5 specifications, which note features deprecated in each version (see appendices J and K in the first, and appendices E through H in the second). The only features which have been deprecated since the 3.3 specification are "the pixel pack parameters UNPACK_LSB_FIRST and PACK_LSB_FIRST" (deprecated in OpenGL 4.3). However, these calls are still available as of 4.5 and therefore compatibility is maintained.

As to whether there are quirks with switching the target GL version not obvious from the specification, I can't say. Strictly speaking though, you shouldn't encounter any issues.

For reference, all OpenGL specifications are available via the OpenGL Registry.

\$\endgroup\$
2
  • \$\begingroup\$ By "deprecated or removed" do you mean a call that was deprecated before 3.3 Core? I'm not using any libraries of indirection to OpenGL, I'm talking about an entire codebase of calls strictly complying to OpenGL 3.3 Core specification, I'm asking if all valid OpenGL 3.3 Core code is directly valid in OpenGL 4.0 and 4.4 Core by specification and in real-world driver implementations from Nvidia, AMD, and Intel. \$\endgroup\$ – user5665 Jul 6 '16 at 15:49
  • \$\begingroup\$ I've rewritten my answer - it should answer your question a bit better now. \$\endgroup\$ – caseif Jul 6 '16 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy