May 24, 2017, 04:37:38 PM

Author Topic: Using 3D in Haxepunk  (Read 1740 times)

EliasRenko

  • Newbie
  • *
  • Posts: 13
    • View Profile
Using 3D in Haxepunk
« on: February 15, 2015, 04:56:01 PM »
Is it possible to achieve it? Do i need another library for that, or it can be done with opengl? Does the hardware acceleration works like Starling on flash, by creating a mesh with a sprite on it?

ibilon

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 581
    • View Profile
    • My website
Re: Using 3D in Haxepunk
« Reply #1 on: February 16, 2015, 03:28:13 AM »
In haxepunk no you can't, it's a 2D engine, but next version (3.0) will be a step in that direction, you'll be able to do 2D games with 3D objects. And hopefully by haxepunk 4 you'll be able to do 3D games with it. But it's not for tomorrow, it's really early in development, it'll take months.

With openfl you have access to opengl which translate to opengl es for mobile and webgl for html5, no flash, but using opengl is really low level and very far from an engine like haxepunk.

Openfl also has stage3D support and there's a haxe version of away3D that works on it.

Openfl doesn't have support for starling but you could use it with haxe, though that would be flash only and would require a lot of work to write an extern if there isn't one yet.

EliasRenko

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Using 3D in Haxepunk
« Reply #2 on: February 16, 2015, 07:30:12 AM »
Thanks for answering. Any tutorial or examples on how to access openGl in openFl?

ibilon

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 581
    • View Profile
    • My website
Re: Using 3D in Haxepunk
« Reply #3 on: February 18, 2015, 02:02:01 AM »
Check out this sample
Code: [Select]
openfl create SimpleOpenGLView then it's normal opengl.