-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port old GL code in actors to work with OpenGL 3.2+ core profiles #267
Comments
Reserving this post to track the changes required.
|
@kaixiong this matches the OpenGL related compile warnings we saw on macOS 👍 Btw you can add checkboxes to the status table about using |
@hartwork thanks for the suggestion but I couldn't get it to work even with the bullet point. In the end I resorted to Unicode. For this porting, we will probably need to bring in GLEW or glad and introduce a few support functions for doing the following:
The actors that use the fixed function pipeline to light and shade their geometries will need to do so using GLSL vertex and fragment shaders |
You can write them by typing
|
@kaixiong let's see if this works (EDIT: it does not, or not 100%). If it does, the two key ideas are
Glad does not seem to be widely available, but no concerns about GLEW.
To be sure I understand correctly, are you saying that lv_gltest will have to use shaders? |
@hartwork, Glad has OpenGL ES and Vulkan support and seems to be the more actively maintained of the two.
Yes. The entire fixed function pipeline is replaced by programmable shaders (vertex, fragment, geometry). lv_gltest will need a vertex shader to perform camera transformations on the geometry. The projection and modelview matrices will also have to be computed/constructed manually (easier than it sounds) and applied in the vertex shader. The matrix formulas are well documented. |
@kaixiong that is nice but it's not widely available, even less than that: https://repology.org/project/glad/versions .
That sounds surprising. Let me double check this before moving existing plugins to shaders please. |
@hartwork, here's a great site to learn about modern OpenGL. The section Transformations has example code on this (scroll all the way down). They use GLM for the standard matrices and matrix multiplications but we don't really need it. |
The OpenGL code in Libvisual's collection uses API functions that are deprecated in OpenGL 3.0 and removed from OpenGL 3.2 Core Profile. Most notably, the fixed function pipeline has been removed, so no more
glVertex()
and matrix functions. They can be found under the Compatibility Profile but the OpenGL implementation is not required to support it.If we want to make use of OpenGL 3.2+ core functionality without using extensions, we will need to port the plugins.
Note that OpenGL ES and WebGL both do not implement the fixed function pipeline. Porting the GL actors will also mean they can work on mobile devices.
The text was updated successfully, but these errors were encountered: