-
-
Notifications
You must be signed in to change notification settings - Fork 45
WIP: Drop cf apply mesh #403
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
base: master
Are you sure you want to change the base?
Conversation
Closes RandyGaul#286
This extra commit ensures that the demos work on macOS Same error as in RandyGaul#286
This change inlines cf_commit into cf_draw_elements so that it does not need to be called separately.
|
Perhaps: It still makes sense to have these two separated, as it’s common to render to the same canvas with different items (draw calls). Annoyance: We already have |
|
Another question is: What is the scope of states like scissor and viewport? Even in SDL_GPU, SDL_SetGPUScissor seems to imply that it affects the next draws onward until the pass is over but I haven't tested. I don't really use viewport but scissor is how GUI libraries implement scrolling containers. |
|
I know it’s a noob question, but what are scissors for? Is that for cropping some textures to only display parts of them?Sent from my iPhoneOn 15 Oct 2025, at 10:32, Bach Le ***@***.***> wrote:bullno1 left a comment (RandyGaul/cute_framework#403)
Another question is: What is the scope of states like scissor and viewport? Even in SDL_GPU, SDL_SetGPUScissor seems to imply that it affects the next draws onward until the pass is over but I haven't tested.
I don't really use viewport but scissor is how GUI libraries implement scrolling containers.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
|
Scissor limits what area of the screen can be drawn to. Anything outside will be clipped. This is the best graphical explanation: https://gamedev.stackexchange.com/a/167051. UI libraries tend to use it for scrolling elements because that's the most straightforward way to do things like: Draw half a sprite or half of a character due to scrolling. |
|
I'm not really sure if state persists (it probably doesn't in SDL_Gpu, but also who cares I suppose), I intended to implement as always setting the scissor for each draw call, same for viewport. It's simpler this way and probably more cross-platform. As in, the backend implementations always set those each draw call. |
This needs a refactor that introduces
cf_renderrather thancf_apply_shader.