WIP fix rendering of drawCache's texture

This commit is contained in:
Stephen Seo 2021-03-29 17:19:39 +09:00
parent 2919be2aff
commit df4e2bf029

View file

@ -293,7 +293,18 @@ void Tri::State::draw() {
// draw cache initialized // draw cache initialized
check_draw_cache(); check_draw_cache();
BeginDrawing(); BeginDrawing();
DrawTexture(drawCache.texture, 0, 0, WHITE); // hack to flip in the y direction, since RenderTexture2D's texture
// is flipped
DrawTextureRec(
drawCache.texture,
{
0.0f,
0.0f,
(float)drawCache.texture.width,
(float)-drawCache.texture.height
},
{0.0f, 0.0f},
WHITE);
} else { } else {
BeginDrawing(); BeginDrawing();
draw_to_target(nullptr); draw_to_target(nullptr);