-
Notifications
You must be signed in to change notification settings - Fork 0
📝 Add docstrings to tick_draw
#28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -114,6 +114,16 @@ void main() | |||||
| return SDL_APP_CONTINUE; | ||||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * @brief Advance the UI frame, present interactive editors for triangle vertices and shader source, and apply | ||||||
| * edits. | ||||||
| * | ||||||
| * Presents a NodeEditor with draggable 3D position editors for each vertex and a SourceEditor with a multiline | ||||||
| * shader text editor. If a vertex position is modified, the vertex buffer is updated with the new vertex data. | ||||||
| * If the shader source is modified, the pipeline's vertex shader source is updated. | ||||||
| * | ||||||
| * @return SDL_AppResult SDL_APP_CONTINUE to indicate the application should continue running. | ||||||
| */ | ||||||
| SDL_AppResult tick() | ||||||
| { | ||||||
| ImGui_ImplSDLGPU3_NewFrame(); | ||||||
|
|
@@ -151,6 +161,16 @@ void main() | |||||
| return SDL_APP_CONTINUE; | ||||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * @brief Render ImGui draw data and the application's triangle to the GPU, then present the swapchain texture. | ||||||
| * | ||||||
| * Prepares ImGui draw data, submits the graphics pipeline, acquires a GPU command buffer and the current | ||||||
| * swapchain texture, records rendering commands (including binding the pipeline and vertex buffer and issuing | ||||||
| * a draw call), executes ImGui rendering into the render pass, and submits the command buffer for presentation. | ||||||
| * If no swapchain texture is available the function still submits the command buffer and continues. | ||||||
| * | ||||||
| * @return SDL_AppResult `SDL_APP_CONTINUE` to continue the application main loop. | ||||||
| */ | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: method 'draw' can be made static [readability-convert-member-functions-to-static]
Suggested change
|
||||||
| SDL_AppResult draw() | ||||||
| { | ||||||
| ImGui::Render(); | ||||||
|
|
@@ -210,14 +230,12 @@ void main() | |||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * @brief Advance the application by one frame: update UI, apply vertex edits and live shader recompilation, render, | ||||||
| * and submit GPU work. | ||||||
| * @brief Advance the application one iteration by performing per-frame updates and rendering. | ||||||
| * | ||||||
| * Processes ImGui frames, uploads vertex data when edited, recompiles and replaces the vertex shader and graphics | ||||||
| * pipeline on shader edits, records a render pass that draws the triangle and ImGui draw lists, and submits the GPU | ||||||
| * command buffer for presentation. | ||||||
| * Performs per-frame UI and state updates; if those updates indicate continuation, executes rendering and submits | ||||||
| * GPU work for presentation. | ||||||
| * | ||||||
| * @return `SDL_APP_CONTINUE` to continue the main loop. | ||||||
| * @return `SDL_APP_CONTINUE` to continue the main loop, or another `SDL_AppResult` to terminate. | ||||||
| */ | ||||||
| virtual SDL_AppResult iterate() override | ||||||
| { | ||||||
|
|
||||||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: method 'tick' can be made static [readability-convert-member-functions-to-static]