5

I'm interested in converting to Haxe as my primary programming language, and it's been awesome so far, however one of my requirements is that I can use OpenGL 3.3 with the C++ target for some 3D game work.

However, this seems to be an odd thing to do as I can find very little info online about using OpenGL in Haxe. I've found some libraries, especially hx-ogl and foo3d (abstracted ogl-like) but they're all unmaintained and I can't get them to work. I've also found some 3D engines but I'd like to use pure OpenGL. Also, I only need to target C++ so cross-platformness isn't required.

Has anyone successfully got OpenGL working with Haxe C++?

Gama11
  • 31,714
  • 9
  • 78
  • 100
toficofi
  • 583
  • 6
  • 24

1 Answers1

2

Haxe guys work on OpenGL wrapper continuously but at the moment Haxe (NME) supports the OpenGL ES 2.0 API for both desktop and mobile, which means you can use a programmable shader pipeline on both desktop and mobile. You can see a code example here.

But if you say:

I only need to target C++ so cross-platformness isn't required

Then why won't you use just C++ with whatever OpenGL version you want?

Gama11
  • 31,714
  • 9
  • 78
  • 100
Michael IV
  • 11,016
  • 12
  • 92
  • 223
  • 1
    Hm, okay, thanks for the answer, and I want to use Haxe because I like Haxe more than C++! I want to go low level when it comes to graphics but I prefer to keep the rest of the language high level. – toficofi May 15 '13 at 07:42
  • In such a case you have modern OpenGL wrappers for Java ,C# ...Haxe -you gonna stuck with the old OpenGL implementation for now. – Michael IV May 15 '13 at 07:45
  • Which part of your 3d application you want to keep high-level? Usually, you really need max performance throughout, and therefore c/c++, in the 3d app - whether it's a game or some visualization task etc. Also you have to try opengl 4.x and use the tessellation stages. – dinony May 15 '13 at 10:48
  • @MichaelIV, actually NME's implementation targets OpenGL ES 2.0, which means that it supports shader pipelines (see https://github.com/haxenme/NME/blob/master/native/gl/GL.hx#L538). Can you edit your answer? – Waneck May 15 '13 at 13:32
  • 2
    Also, @Jishaxe, if you're feeling experimental, you can try https://github.com/deltaluca/hx-ogl – Waneck May 15 '13 at 13:33