Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions flixel/FlxG.hx
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ class FlxG
FlxG.height = height;

initRenderMethod();
#if FLX_OPENGL_AVAILABLE
// Query once when window is created and cache for later
bitmap.get_maxTextureSize();
#end

FlxG.initialWidth = width;
FlxG.initialHeight = height;
Expand Down
2 changes: 2 additions & 0 deletions flixel/system/frontEnds/BitmapFrontEnd.hx
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ class BitmapFrontEnd

#if FLX_OPENGL_AVAILABLE
static var _maxTextureSize = -1;

@:allow(flixel.FlxG)
function get_maxTextureSize():Int
{
if (_maxTextureSize < 0 && FlxG.stage.window.context.attributes.hardware)
Expand Down