Skip to content

fix: enforce OpenGL 3.3 Core profile, initialize global VAO, and corr…#14

Open
kasinadhsarma1 wants to merge 1 commit intomakehumancommunity:mainfrom
kasinadhsarma1:main
Open

fix: enforce OpenGL 3.3 Core profile, initialize global VAO, and corr…#14
kasinadhsarma1 wants to merge 1 commit intomakehumancommunity:mainfrom
kasinadhsarma1:main

Conversation

@kasinadhsarma1
Copy link
Copy Markdown

This pull request focuses on improving OpenGL initialization and compatibility across platforms, particularly for Linux/Mesa systems. The main changes ensure that the application consistently requests an OpenGL 3.3 Core Profile context with appropriate depth and stencil buffers, and also address requirements for VAO (Vertex Array Object) usage in Core Profile. There is also a minor bug fix in camera rotation handling.

OpenGL context and format initialization:

  • In gui/application.py, the QSurfaceFormat is now explicitly configured for OpenGL 3.3 Core Profile with a depth buffer, stencil buffer, double buffering, and multisampling if available. The format is set before the QApplication is created to ensure all widgets use the correct context.
  • In opengl/main.py, the OpenGL widget (QOpenGLWidget) explicitly applies the default surface format on initialization, ensuring the correct context is used regardless of Qt’s internal handling order.
  • The necessary imports for QSurfaceFormat and QOpenGLVertexArrayObject are added to opengl/main.py.

OpenGL Core Profile VAO requirement:

  • In opengl/main.py, a single QOpenGLVertexArrayObject (VAO) is created, bound during initialization, and destroyed during cleanup. This ensures compliance with OpenGL 3.3 Core Profile, which requires a VAO to be bound before making vertex attribute calls. [1] [2] [3]

Bug fix:

  • In opengl/camera.py, the last mouse position is updated in arcBallRotation, fixing potential issues with rotation state.

@kasinadhsarma1 kasinadhsarma1 force-pushed the main branch 2 times, most recently from 31e03ee to a1751d8 Compare April 14, 2026 18:14
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