From 2f4a81825f7008d53618214502b48b4136f94ea3 Mon Sep 17 00:00:00 2001 From: RH Date: Fri, 30 Aug 2024 16:00:54 +1000 Subject: [PATCH] Set RenderTexture content size --- core/2d/RenderTexture.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/2d/RenderTexture.cpp b/core/2d/RenderTexture.cpp index d42305691ec0..f86ea2147107 100644 --- a/core/2d/RenderTexture.cpp +++ b/core/2d/RenderTexture.cpp @@ -166,6 +166,8 @@ bool RenderTexture::initWithWidthAndHeight(int w, h = (int)(h * AX_CONTENT_SCALE_FACTOR()); _fullviewPort = Rect(0, 0, w, h); + setContentSize(Vec2(static_cast(w), static_cast(h))); + // textures must be power of two squared int powW = 0; int powH = 0;