Page MenuHome

Option to build with OpenGL core
AbandonedPublic

Authored by Dalai Felinto (dfelinto) on Apr 5 2017, 9:48 PM.

Details

Summary

This introduces a new CMake option - WITH_LEGACY_OPENGL. Without this option things may not draw perfectly, however, we should soon be able to build with OpenGL core profile.

There are still a few calls missing for the patch, but the core is here (ignoring code outside //source/blender for now).

Also, the matrix-related api calls are (still) not handled here (glTranslate, ...).

Diff Detail

Repository
rB Blender
Branch
temp-opengl-core
Build Status
Buildable 522
Build 522: arc lint + arc unit

Event Timeline

(sorry for negativity, I just don't think this the right approach)

My approach to the OpenGL upgrade has always been to get all the code ready, then switch to core profile. I don't understand the desire to use core profile before we're ready, or how this helps us get closer.

Some of the files that need this change the most are obsolete (derived mesh, basic shader, gpu buffer). I strongly prefer to stop using these instead of preparing them for core profile.

Updating all existing code to new OpenGL is not really good investment of time. Derived mesh will be replaced with something else, with changed draw code and other circumstances.

The benefits i see with this patch:

  • Get it much sooner to a working non-crashing state of core profile on all platforms. Surely, some areas will not be working, but those are the areas which needs porting. If nothing is displayed for them it's even beneficial because people can see what they can work on. And then have huge satisfaction when something missing is brought back.
  • Unlock any possible bottlenecks, or at least help with.

Downsides of the the patch:

Don't really see any.

  • Build without legacy OpenGL by default
  • Fix a few stubs
  • From review: handle core profile differently - cleaning
  • From review: handle core profile in a non-intrusive way

Much less intrusive. Nice!

suggested changes:

  • rename it "simulate core profile" since it removes some but not all legacy
  • disable by default (as discussed in IRC)