diff --git a/src/main.c b/src/main.c index 9ed5661..6421ad6 100644 --- a/src/main.c +++ b/src/main.c @@ -56,16 +56,12 @@ int main(void) // keep mouse scaled to virtual space (good to set each frame) SetMouseScale((float)g.virtualWidth/g.renderWidth, (float)g.virtualHeight/g.renderHeight); - - //---------------------------------------------------------------------------------- // Draw //---------------------------------------------------------------------------------- // Here we draw to our virtual screen "target" BeginTextureMode(target); ClearBackground(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); - - EndTextureMode(); //this is where we take what we drew to the virutal screen and actually render it on the real screen. @@ -91,6 +87,6 @@ void Virtual_Screen_To_Renderer(RenderTexture2D target, struct Master* g) // Source is the texture size // note: Y is inverted for render textures (when drawing we go from the top left corner, but in textures they are drawing from the bottom left.) Rectangle src = { 0, 0, (float)target.texture.width, -(float)target.texture.height}; - Rectangle dst = { 0, 0, (float)g->renderWidth, (float)g->renderHeight }; // scale to full screen (2×) + Rectangle dst = { 0, 0, (float)g->renderWidth, (float)g->renderHeight }; // scale to full screen (2x) DrawTexturePro(target.texture, src, dst, (Vector2){0,0}, 0.0f, WHITE); }