-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stricter checks for FlxG.bitmap.maxTextureSize #3279
Changes from all commits
04ef08a
7f65c1d
bd024d4
d2d9e56
d7f9d6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ private enum HelperDefines | |
FLX_HEALTH; | ||
FLX_NO_TRACK_POOLS; | ||
FLX_NO_TRACK_GRAPHICS; | ||
FLX_OPENGL_AVAILABLE; | ||
} | ||
|
||
class FlxDefines | ||
|
@@ -251,6 +252,12 @@ class FlxDefines | |
|
||
if (defined(FLX_DEBUG)) | ||
define(FLX_TRACK_GRAPHICS); | ||
|
||
#if (lime_opengl || lime_opengles || lime_webgl) | ||
// FlxG.stage.window.context.attributes.hardware is not always defined during unit tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be better to check if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so. If it's not defined in any other context I want it to fail loudly, and I don't think we can really unit test gl stuff right now |
||
if (defined(FLX_NO_UNIT_TEST)) | ||
define(FLX_OPENGL_AVAILABLE); | ||
#end | ||
|
||
defineInversion(FLX_TRACK_GRAPHICS, FLX_NO_TRACK_GRAPHICS); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of rendering issues will happen? I'm debating whether this should be an error or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding OpenGL won't upload the texture to the GPU at all and any attempts to render the texture will be replaced with a fallback texture (usually just black or whatever), probably should be an error yeah