example resize fixes
This commit is contained in:
parent
e4993c5557
commit
48f9c9c8ff
32 changed files with 323 additions and 234 deletions
|
@ -75,6 +75,8 @@ int main(void)
|
|||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
UnloadRenderTexture(target);
|
||||
target = LoadRenderTextureDepthTex(GetScreenWidth(), GetScreenHeight());
|
||||
// Draw into our custom render texture (framebuffer)
|
||||
BeginTextureMode(target);
|
||||
ClearBackground(WHITE);
|
||||
|
@ -94,7 +96,7 @@ int main(void)
|
|||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)GetScreenWidth(), (float)-GetScreenHeight() }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawFPS(10, 10);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -166,4 +168,4 @@ void UnloadRenderTextureDepthTex(RenderTexture2D target)
|
|||
// queried and deleted before deleting framebuffer
|
||||
rlUnloadFramebuffer(target.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue