Use GL_BGRA for Dreamcast GLdc fast path#15
Use GL_BGRA for Dreamcast GLdc fast path#15cypressru wants to merge 1 commit intoraylib4Consoles:raylib4Consolesfrom
Conversation
This puts raylib on GLdc's fast path, drastically reducing vertex overhead. Performance improvement: ~40 FPS -> ~59 FPS in example scenes.
|
Was meaning to comment here but hadn't gotten around to it and just want to make sure i dont forget, I wanted to mention this will result in R and B channel reversal for any mesh drawing that involves manual color management semantics contract: i.e. Because https://github.com/raylib4Consoles/raylib/blob/master/src/raylib.h#L247-L251
Here is a videos RGB on top and BGR on bottom of a painting tool that i use to test vertex colors for raylib4Consoles showing the difference of behavior, its the same mesh looking at the same model position, using the same brush color to paint on the meshes vertices etc etc): RGB.mp4BGR.mp4Im not sure what the correct solution would best be for this (especially if it really is something that should just be top level no fallbacks and we just reverse the Color struct semantics for all of DREAMCAST stuff if its optimal, that would be coolest imo if this is nontrivial gainz, otherwise this could be confusing, im sure GLdc has some convention for this though? Also im wondering @cypressru does this perf increase require you to account for a like preemptive R and B swizzle/(swap?) in your meshes? |
This puts raylib on GLdc's fast path, drastically reducing overhead. Performance improvement: ~40 FPS -> ~59 FPS in example scenes.