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

Add nanovg bindings #99

Closed
Spasi opened this issue Oct 8, 2015 · 7 comments
Closed

Add nanovg bindings #99

Spasi opened this issue Oct 8, 2015 · 7 comments

Comments

@Spasi
Copy link
Member

Spasi commented Oct 8, 2015

https://github.com/memononen/nanovg

@dustContributor
Copy link

Ohhh, core OpenGL backend. Nice.

@Spasi
Copy link
Member Author

Spasi commented Nov 30, 2015

I had a better look at nanovg and even though the code is very clean and sensible (for a C project), it basically requires something like GLEW for the OpenGL backends to work. There's also no support for selecting the exact OpenGL version at runtime, it must be a (native-)compile-time decision.

I don't see a viable approach, other than porting nanovg_gl.h to Java/LWJGL. It doesn't look particularly hard, but I'm not looking forward to it either.

Please post here if you're interested, I'd like to decide whether I should do this before the 3.0.0 release or postpone it.

@kappaOne
Copy link
Member

kappaOne commented Dec 2, 2015

I'd recommend focusing on getting the 3.0 release done first, once the core and basic bindings (GLFW, OpenGL and OpenAL) are done/released then the rest can be added in later releases (like in 3.1). I'd go with a release early, release often, approach.

@dustContributor
Copy link

I'm with kappa.

EDIT: Not physically 😝

@Spasi
Copy link
Member Author

Spasi commented Dec 3, 2015

I've actually started work on this. NanoVG has several structs, both in the public and the internal API (for the rendering backend) and I decided it is a great opportunity to validate LWJGL's struct API. I'm happy with its current state, but I haven't had experience with how it "feels" in a complex environment and implementing the NanoVG backend is complex enough.

I've done a few fixes and improvements that will be pushed soon, so this is useful already.

@Spasi Spasi closed this as completed in ce86fc8 Dec 9, 2015
Spasi added a commit that referenced this issue Dec 9, 2015
@Spasi
Copy link
Member Author

Spasi commented Dec 9, 2015

I had a working Java back-end for this, but it was too slow (30-40% slower than the native implementation) due to C-to-Java callback overhead. It wasn't all for nothing though, LWJGL got improved in the process.

The implementation that got committed uses the native back-end, but with important changes (which is a first for LWJGL). The good news is that it's fast and will probably require less maintenance than the Java solution.

@kappaOne
Copy link
Member

kappaOne commented Dec 9, 2015

really nice work, looks awesome especially for game gui's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants