Skip to content

Commit

Permalink
Set RenderTexture content size (axmolengine#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
rh101 authored and xfbird committed Sep 18, 2024
1 parent 65f1410 commit 5e33268
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/2d/RenderTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ bool RenderTexture::initWithWidthAndHeight(int w,
h = (int)(h * AX_CONTENT_SCALE_FACTOR());
_fullviewPort = Rect(0, 0, w, h);

setContentSize(Vec2(static_cast<float>(w), static_cast<float>(h)));

// textures must be power of two squared
int powW = 0;
int powH = 0;
Expand Down

0 comments on commit 5e33268

Please sign in to comment.