Skip to content
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

VertexArrayObject fix for gl 3.3 #118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

orperel
Copy link
Collaborator

@orperel orperel commented Feb 7, 2023

WispApp uses glumpy with a glfw_imgui backend, which defaults to OpenGL 2.1 context. However, imgui expects an OpenGL 3.3+ context, which causes errors on some envs.

  1. This MR creates the window with glumpy.app.configuration.get_default(), which effectively takes the correct GL version we put in the WispState config (the previous MR used app.configuration.Configuration(), this is not enough).
  2. OpenGL 3.3 requires a VertexArrayObject to be bound to initiate a draw call, otherwise sparking some GL errors. WispApp now ensures there is a default VAO in place.

See also: glumpy/glumpy#310

In addition, the following changes add some extra robustness:
3. World grid gizmo try-except extended to catch more errors in case GL_TEXTURE_MAX_ANISOTROPY is missing from the feature set.
4. _register_cugl_shared_texture will now fallback to blitdevice2device=False (WSL mode) if cugl registration failed.

Signed-off-by: operel [email protected]

@orperel orperel self-assigned this Feb 7, 2023
Signed-off-by: operel <[email protected]>

Extra robustness to missing gl / cugl features

Signed-off-by: operel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant