https://bugzilla.redhat.com/show_bug.cgi?id=2437502



--- Comment #222 from Nicola Taibi <[email protected]> ---
Subject: Refactor: Migration of Tactical 3D Viewer from FreeGLUT to GLFW for
Native Wayland Support

Hi Fabio,

  Description:

  This update performs a comprehensive migration of the spacegl_3dview
component from the legacy FreeGLUT framework to GLFW. This change was
necessitated by
  significant performance degradation observed under XWayland on Fedora 44 and
the requirement for native Wayland protocol support.

  Key Technical Changes:

   1. Framework Migration (FreeGLUT → GLFW):
       * Replaced the legacy glutMainLoop with a managed GLFW window loop for
better event handling and frame-pacing control.
       * Integrated native Wayland support via GLFW, removing the previous
software-level block for Wayland sessions.
       * Updated CMakeLists.txt to transition dependencies from GLUT to GLFW
and GLU.

   2. Implementation of glut_compat Layer:
       * Developed a custom compatibility layer (src/glut_compat.h/c) to
replicate missing GLUT primitives (glutSolidSphere, glutSolidCube,
glutSolidTorus,
         etc.) using OpenGL/GLU.
       * Implemented a complete 8x8 ASCII bitmap font engine to replace
glutBitmapCharacter, ensuring UI continuity.

   3. Performance & Rendering Optimizations:
       * Native VSync: Replaced manual usleep timing with glfwSwapInterval(1),
ensuring smooth 60 FPS synchronization with the display refresh rate.
       * Hardware Culling: Enabled GL_CULL_FACE to optimize GPU throughput by
discarding non-visible internal polygons.
       * Context Stability: Refactored initialization to explicitly request an
OpenGL 3.0 Compatibility Profile, resolving GLEW initialization "Unknown
         Errors" specific to Wayland drivers.

   4. Critical Bug Fixes:
       * Font Corruption: Fixed text rendering artifacts by setting
GL_UNPACK_ALIGNMENT to 1, ensuring correct byte-alignment for 1-byte bitmap
glyphs.
       * Syntax Bug: Resolved a subtle line-continuation bug in the font
definition file (a backslash in a comment was causing the compiler to skip the
         closing bracket glyph definition).
       * Skybox Visibility: Corrected a culling artifact where the background
Skybox was being culled due to the camera being positioned inside the sphere.

  Verification:
   * Build Status: Clean compilation on GCC (Fedora 44).
   * Performance: Verified stable 60 FPS on Wayland native session.
   * Visual Integrity: Confirmed correct rendering of PBR shaders, procedural
geometry, and tactical HUD text.

  Request for Review:
  Please pay particular attention to the glut_compat implementation and the
logic for the new main loop in spacegl_3dview.c.

Fedora 44:
  Spec URL: 
https://download.copr.fedorainfracloud.org/results/ntaibi/space-gl/fedora-44-x86_64/10416259-spacegl/spacegl.spec

  SRPM URL: 
https://download.copr.fedorainfracloud.org/results/ntaibi/space-gl/fedora-44-x86_64/10416259-spacegl/spacegl-2026.05.01.04-1.fc44.src.rpm


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2437502

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202437502%23c222

-- 
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to