Skip to content

Conversation

@irov
Copy link
Owner

@irov irov commented Aug 28, 2025

Summary

  • define new RP_METAL render platform
  • add stub MetalRenderSystem and environment
  • switch iOS build scripts to use the Metal renderer
  • implement MetalRenderSystem directly from RenderSystemInterface with basic Metal device setup
  • implement buffer state tracking and simple Metal vertex/index buffers
  • implement basic Metal shader and program resources
  • implement rendering state management, resource creation, and frame operations for Metal
  • remove unnecessary platform guards so Metal renderer always builds on iOS/macOS
  • move texture stage defaults from the MetalRenderSystem header into the implementation file
  • split Metal renderer helper classes into individual header/implementation pairs and update build config
  • add ////////////////////////////////////////////////////////////////////////// separators between Metal function implementations
  • add constructors and destructors for Metal render classes and implement MetalRenderProgramVariable storage logic
  • provide data upload for Metal vertex/index buffers and implement texture locking and readback helpers

Testing

  • cmake ../cmake/Unix -DCMAKE_BUILD_TYPE=Debug (fails: miss MENGINE_DEPENDENCIES_PROJECT)

https://chatgpt.com/codex/tasks/task_e_68b068b84ed883209599ca7a5c9a28f3


Note

Introduce a functional Metal render system and switch iOS to Metal, alongside broad platform, file I/O, analytics, sound, Box2D, HTTP, and iOS plugin updates.

  • Render/Platform (iOS/macOS):
    • Add full RP_METAL renderer (buffers, shaders/programs, textures, targets, state, frame ops) and Metal extension hook; migrate iOS windowing to SDL Metal.
    • Refactor iOS platform loop: separate tick/render, add freeze controls (tick/render/sound), and render gating; handle drawable size per Metal/GL.
  • Player/Camera:
    • Use default camera/viewport implementations; wire Metal-compatible resolution/view setup.
  • File I/O API:
    • Unify close methods to void; add debug file-path tracking; numerous platform streams (Win32/Apple/Android/SDL2) updated; temp-file move on close.
  • Analytics:
    • Add event categories, builder updates, size_t parameter counts; iOS analytics provider category routing.
  • Sound:
    • Fix state machine (INIT/STOP/END), robust pause/resume/stop, buffer worker lifecycle; amplifier listener now receives play.
  • Physics (Box2D):
    • Update to new API (constants, material, rot/inertia funcs) and index/shape creation.
  • HTTP:
    • Improve Win32 requests (path/query handling, auth, body send); Android JNI env usage normalized.
  • iOS Plugins:
    • Add AdMob, Amplitude, UserMessagingPlatform; enhance AppLovin; extend Apple analytics/logging/remote-config; SKAdNetwork event tweaks.
  • Misc:
    • Update services (UpdateService API to raw ptrs, Provider spinlocks, Logger defaults), OpenGL target reset/restore, Zip memory stream, Resource validators/decoders prepare signature changes.

Written by Cursor Bugbot for commit cec40b6. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

} catch (IOException ignored) {
// ignore
}
}
Copy link

Choose a reason for hiding this comment

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

Bug: File logger missing newline between log entries

The writeLine method writes log entries to the file without appending a newline character. This causes all log messages and exceptions to be concatenated on a single line in the log file, making the file unreadable. The method should append \n or use System.lineSeparator() after writing each line to properly separate log entries.

Fix in Cursor Fix in Web

}

return true;
}
Copy link

Choose a reason for hiding this comment

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

Bug: Missing null check causes NullPointerException in ad service

The newly added methods isShowingRewarded() and isShowingInterstitial() call methods on m_adProvider without first checking if it's null. Every other method in MengineAdService that uses m_adProvider includes a null check (e.g., hasBanner(), hasInterstitial(), hasRewarded(), showBanner()). When m_adProvider is null (before an ad provider is set), calling these methods will throw a NullPointerException.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants