What libraries are available that abstract the creation of 2d shapes? (lwjgl2.9)

Started by JamesYeoman, November 15, 2016, 08:44:25

Previous topic - Next topic

JamesYeoman

I am doing an A-level Comp Sci project and I will be using LWJGL for it. However, I am working really inefficiently as I am trying to implement my own shape API through LWJGL to abstract and simplify the creation of the shapes that I will be rendering. I am behind in my work and need some sort of library that provides classes that implement shapes with their respective properties (using LWJGL rather than a C library so that I don't have to include more binaries with the project). Is there a library that provides this functionality? It must be free and would be preferable if it is open source but not a necessity.

I am using LWJGL 2.9


Cornix

There is also LibGDX which does a lot of things for you. It really depends on exactly how much you want the library to take care of.

JamesYeoman

Quote from: Kai on November 15, 2016, 09:39:32
LWJGL3 with nanovg is definitely a decent solution.

That is a C/C++ library. I'm not sure how to go about getting that to work with LWJGL...

JamesYeoman

Quote from: Cornix on November 15, 2016, 10:33:27
There is also LibGDX which does a lot of things for you. It really depends on exactly how much you want the library to take care of.

That isn't built upon LWJGL...

Kai

Quote from: JamesYeoman on November 15, 2016, 10:39:36
That is a C/C++ library. I'm not sure how to go about getting that to work with LWJGL...
OpenGL is _also_ a C/native library. Just look at LWJGL 3..... it _provides_ bindings to C/native libraries.

JamesYeoman

Quote from: Kai on November 15, 2016, 10:45:28
Quote from: JamesYeoman on November 15, 2016, 10:39:36
That is a C/C++ library. I'm not sure how to go about getting that to work with LWJGL...
OpenGL is _also_ a C/native library. Just look at LWJGL 3..... it _provides_ bindings to C/native libraries.

The main issue is that it would require packaging MORE natives binaries along with it. Something that is implemented using the LWJGL library is what I'm looking for. I am currently on my mobile so when I get back to a computer, I will modify the question to add this detail. But, just to reiterate, a library that has LWJGL as a dependency so that I can easily interface to it rather than having to botch the interactions. Almost like a Utility extension library.

===EDIT===
I have edited the question. It should be clearer now as to what it is that I am looking for. Thanks for the responses so far.

Kai

Why does it matter whether your added dependency is Java or a native library?
Either way you gonna have to bundle an additional dependency.

JamesYeoman

Quote from: Kai on November 15, 2016, 13:02:02
Why does it matter whether your added dependency is Java or a native library?
Either way you gonna have to bundle an additional dependency.

I am using LWJGL so that is going to be bundled anyway. Native libraries require having the binaries bundled with the application which means more than one file is bundled as there are multiple OSs. This is why I decided to go with Java rather than C/C++. Trust me, I would rather code in C++ but it just isn't practical enough for the project.

abcdef

JamesYeoman

You are missing the point on many fronts here.

1) LWJGL already contains OS specific binary files for running the opengl subsystem
2) Those same binaries also contain os specific binaries for other api's, one of which has been mentioned already and another is parshapes
3) When you distribute LWJGL you are also distributing some of these other api's. The new build tool for the latest version of LWJGL lets you choose what is bundled.
4) Libgdx uses LWJGL as its back end, you really should do some research before blindly crying that it doesn't.

Cornix

Quote from: JamesYeoman on November 15, 2016, 10:41:24
Quote from: Cornix on November 15, 2016, 10:33:27
There is also LibGDX which does a lot of things for you. It really depends on exactly how much you want the library to take care of.

That isn't built upon LWJGL...
Why do you think that? Do you have a source for that claim?
Last time I checked LibGDX uses LWJGL as one of its main implementations. They also have alternative OpenGL bindings, for iOS or Android they use something different as far as I know but for the Desktop implementation LWJGL is used. (Or was used the last time I looked it up, if you tell me they changed that then okay)

JamesYeoman

Quote from: abcdef on November 15, 2016, 13:36:33
JamesYeoman

You are missing the point on many fronts here.

1) LWJGL already contains OS specific binary files for running the opengl subsystem
2) Those same binaries also contain os specific binaries for other api's, one of which has been mentioned already and another is parshapes
3) When you distribute LWJGL you are also distributing some of these other api's. The new build tool for the latest version of LWJGL lets you choose what is bundled.
4) Libgdx uses LWJGL as its back end, you really should do some research before blindly crying that it doesn't.

Ah... Sorry. I didn't fully research about LibGDX. I went to it's website and saw HTML5 and then made costly assumptions. I am in college at the moment so I am forced to use my mobile data which isn't unlimited so in an effort to avoid wastage... I cut some corners. It seems like LibGDX is the kind of thing I am looking for then. Thanks everyone.