Skip to content
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

iOS Build Error / No graphics displayed on iOS #575

Open
TheSpydog opened this issue Mar 8, 2018 · 6 comments
Open

iOS Build Error / No graphics displayed on iOS #575

TheSpydog opened this issue Mar 8, 2018 · 6 comments

Comments

@TheSpydog
Copy link
Contributor

  • HaxePunk version: 4.0.1
  • Target(s): iOS
  • Haxe version: 3.4.4
  • OpenFL/Lime or NME version: 7.1.2/6.2.0

When trying to build an iOS app from the generated Xcode project, I get this error:
/usr/local/lib/haxe/lib/HaxePunk/4,0,1/haxepunk/graphics/hardware/HardwareRenderer.hx:74: characters 23-93 : lime.graphics.opengl.GLFramebuffer does not have a constructor

Maybe this caused by an OpenFL API change?

@bendmorris
Copy link
Member

bendmorris commented Mar 8, 2018

If you're able to test on ios, could you try replacing HardwareRenderer.hx:74 with this:

		defaultFramebuffer = GL.createFramebuffer();

@TheSpydog
Copy link
Contributor Author

The error went away, so it seems to work? I can't verify for sure though. I'm having trouble building to iOS currently due to unrelated issues with hxcpp. If I get them sorted out, I'll report my findings.

@TheSpydog
Copy link
Contributor Author

Got it to build. The game now runs but nothing is drawn to the screen.

@TheSpydog TheSpydog changed the title lime.graphics.opengl.GLFramebuffer does not have a constructor iOS Build Error / No graphics displayed on iOS Mar 15, 2018
@cjmxp
Copy link

cjmxp commented Mar 17, 2018

I have the same problem.

@cjmxp
Copy link

cjmxp commented Mar 17, 2018

GLUtils.hx:35: GL Error found at HardwareRenderer.hx:155: 1286 INVALID_FRAMEBUFFER_OPERATION

@bendmorris
Copy link
Member

bendmorris commented Mar 20, 2018

I don't know what's the issue here but obviously it's a big deal. I don't have a handy iOS device atm so I'd appreciate any help figuring this out.

iOS as a target is unique because they don't provide a default frame buffer (which technically is not specified, but everyone else does it) so you have to create your own and render to that. On older versions of Lime this approach was working fine, but it looks like Lime changed their GL API, and since around then it's no longer working.

Hopefully the fix is as simple as finding a current working example from other projects using Lime and copying it.

cjmxp added a commit to cjmxp/HaxePunk that referenced this issue Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants