Repository navigation
feat: implement sprite renderer component - #38
Merged
Merged
Conversation
Nowik11
reviewed
Oct 18, 2026
Nowik11
left a comment
Member
There was a problem hiding this comment.
In my opinion there is no reason to change signature of proto file just to rename a field.
Images are now decoded once per scene into an ImageLibrary owned by Scene, however many sprites show the same file. The library uploads every image when the render target is ready and keeps the decoded pixels, so textures can be rebuilt after the GPU loses them.
MichalSzandar
force-pushed
the
feat/sprite-renderer
branch
from
October 20, 2026 08:54
454e5df to
22ee874
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sprite rendering
SpriteRenderercomponent, registered for the proto'srendererentry. It drawsimg_pathstretched over the object's Transform, rotated clockwise about its centre.img_pathis allowed and draws nothing. An image path that can't be loaded fails the parse.Image loading and upload
ImageandImageLibraryclasses. Each scene loads each image file once while parsing, and sprites showing the same file share it.onRenderTargetReadyhook on components and the scene. TheRendererconstructor calls it to upload images to the GPU before the first frame.SDL_RENDER_DEVICE_RESET. The newRenderer::pollEvents()handles this, andRuntimealso uses it while waiting for the EEG stream.SDL_Rendereralive.Asset paths
ComponentBuildContext. Relative paths resolve against the folder holding the.neuroz; absolute paths are used as they are.Parser::parseStream(stream, assetRoot)takes the asset folder. The Blink and MarkerEmitter creators take the new parameter but don't use it.Window
Runtimeshows it only after the scene is uploaded. A failed upload never shows a window to the participant.Build and CI
runtime_corenow links the whole static library (runtime_core_archive). Otherwise the linker drops the code that registers components (REGISTER_COMPONENT).Proto
texture_pathstays, and the runtime reads onlyimg_path.Tests
sprite_renderer_testimage_library_testsprite_scene_testcomponent_build_context_testtemp_dir_testregistration_tests, a separate executable that checks every component is linked inRendererTestandruntime_test:tests/utils/:SdlTestUtils.hpp(software renderer, reading pixels, writing a PNG) andTempDir.hpp. Both existing test suites now use them instead of their own copies.Docs
registration_tests.