Skip to content

macOS main-thread rendering support and project docs - #18

Open
TechnoMechno wants to merge 1 commit into
vi3itor:masterfrom
TechnoMechno:macos-main-thread-rendering
Open

macOS main-thread rendering support and project docs#18
TechnoMechno wants to merge 1 commit into
vi3itor:masterfrom
TechnoMechno:macos-main-thread-rendering

Conversation

@TechnoMechno

Copy link
Copy Markdown
  • Remove Boost::system dependency from CMakeLists (not needed)
  • Add Apple RPATH so dylibs resolve correctly from the build dir
  • Add GraphicsSystem::RunMainLoop() and IRenderer3D::RunLoop() to drive the SDL event pump and OpenGL pipeline on the process main thread, working around the macOS Cocoa requirement
  • Update shaders and main.cpp for the new main-thread render path
  • Add CLAUDE.md with build instructions and architecture overview

- Remove Boost::system dependency from CMakeLists (not needed)
- Add Apple RPATH so dylibs resolve correctly from the build dir
- Add GraphicsSystem::RunMainLoop() and IRenderer3D::RunLoop() to drive
  the SDL event pump and OpenGL pipeline on the process main thread,
  working around the macOS Cocoa requirement
- Update shaders and main.cpp for the new main-thread render path
- Add CLAUDE.md with build instructions and architecture overview

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@VOM7HC VOM7HC left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you vibe code for this PR, I also think you should add vcpkg or conan to modernize the build library too

@Churikov0112

Copy link
Copy Markdown
  • Remove Boost::system dependency from CMakeLists (not needed)
  • Add Apple RPATH so dylibs resolve correctly from the build dir
  • Add GraphicsSystem::RunMainLoop() and IRenderer3D::RunLoop() to drive the SDL event pump and OpenGL pipeline on the process main thread, working around the macOS Cocoa requirement
  • Update shaders and main.cpp for the new main-thread render path
  • Add CLAUDE.md with build instructions and architecture overview

Hello! I’ve also been working on modernizing the game’s technology stack lately. Maybe we could join forces, become a team? You can take a look at my repository to see what I’ve managed to accomplish. In short:

Modern build: CMake 3.16+, C++17, a single static blunted2 engine library, sources.cmake removed.
SDL2 → SDL3 (SDL3_image/SDL3_ttf; SDL_gfx dropped).

Renderer migrated to OpenGL 3.2 core profile: legacy fixed-function pipeline (glBegin/glEnd, glLightfv, matrix stack) removed; rendering runs through the shader pipeline (#version 150, VAO/VBO). This is a prerequisite for future OpenGL ES (mobile) support.

Builds and runs on Windows (MSVC + vcpkg), Linux (gcc) and macOS (verified on MacBook Air M2, 2026-08-13; rendering runs on the main thread as AppKit requires, the scheduler on a helper thread).

Gamepad input reworked (SDL3 SDL_Gamepad): semantic SDL_GAMEPAD_BUTTON_/AXIS_ indices instead of raw joystick numbers (this fixes Xbox Series and any modern controller), PES/FIFA layout presets switched on the controller-select screen (LB/RB), menu navigation from stick and D-pad, and hot-plug (plug/unplug mid-match pauses and opens controller select).

Determinism tooling: tools/determinism runs the match headless and fingerprints the simulation (SHA-1) to catch unintended gameplay changes. The mechanism — EnvState serialization, fixed 10 ms timestep, seeded RNG, mock renderer/audio — is ported from Google Research Football (the google-brain branch, GRF v2.10.1) without importing its gameplay changes. Platform references live in tools/determinism/.

Project documentation lives in the wiki: docs/wiki/index.md.

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.

3 participants