horde3d / Horde3D

Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.
http://horde3d.org/
1.55k stars 308 forks source link

C Language binding #214

Closed gwald closed 1 year ago

gwald commented 1 year ago

I created a C Language header, it works well with TinyCC and mingw gcc. http://horde3d.org/forums/viewtopic.php?f=1&t=2328&p=10420#p10421

It's very hacky, I just put the enum name before the enum item. I'm happy to clean it up and submit it with a cmake file as a C binding.

Is it worth doing? if so any advice or feedback before I do?

algts commented 1 year ago

I think its ok, you can also make something like:

enum H3DRenderDevice
{
    H3D_RENDERDEVICE_OPENGL2 = 2,
    H3D_RENDERDEVICE_OPENGL4 = 4,
    H3D_RENDERDEVICE_OPENGLES3 = 8
};

enum H3DOptions
{
    H3D_OPTIONS_...,
};

So, imho, this approach is a tiny bit cleaner...

algts commented 1 year ago

Closing as pull request #215 is merged. Reopen if problems arise.