LWJGL & swing texture drawing

Hi,
i’m new both at LWJGL and swing, but i’ve programmed some things at college in java, so i’m going to program myself a little tool to position some textures on a map.

I’ve been taking a look at the APIs (not deeply enough yet) but they seem to able to do what i want.
Am I right? Should i use another API’s?

In any case i’ve seen that Slick utils have a texture class to load and bind the textures in OpenGL, but i still need to define quads and so on.
I’m thinking of programming a Texture2D class, but is there a need to do that or it’s already implemented elsewhere?

Thank you a lot :slight_smile:

Both Slick and LibGDX have classes that do that sort of thing.

They take care of defining a quad (Or quads) onto which you can draw various things, and then handle all (Or most in the case of LibGDX) the functions that would touch the actual OpenGL code. Both allow you to do so directly, but it’s far from required.

They also have a myriad of classes to help you perform graphics operations, including a specialized Sprite class (Texture with on-screen position) and animation classes, etc.

Both also have some good tutorials on how to go about using them (Slick’s even has a few ‘how to make X game’ ones).

However, if you’d really like to write your own, do it! Refine it, make it pretty and basic, then give it to others to use when they think they might need to use the same thing. :3

Thanks for the answer

The idea would be to spend the minimum time in this project (as it’s getting bigger by itself) so i want to reuse everything that i can and avoid creating stuff that’s already done. I’ll take a look at that Sprite class and find some examples.

Have you (or anyone :P) ever put a AWTGLCanvas into a swing application?
I would like some help with that aswell

Thanks!

See LwjglAWTCanvas (and LwjglCanvas) in libgdx.