Login  Register

Creating objects with simple drawing methods of JOGL

Posted by Lawa on Dec 30, 2015; 4:49pm
URL: https://forum.jogamp.org/Creating-objects-with-simple-drawing-methods-of-JOGL-tp4035938.html

Hello ,
I'm trying to create a simple 2D game with JOGL and use a physics engine (dyn4j) with the components that I'm drawing using JOGL with the simple methods of (glRecti , glBegin(GL2.GL_POLYGON) and so on .. ) , but apparently the methods that I'm using for drawing the shapes are all void (not objects) and can't be used to add physics to it in dyn4j , so my question is there any possible way to add physics to the shapes that are being drawn with those methods?

I was thinking about creating a class with those methods inside (init , display) and then create an object from it in another class and use that object to add physics to, but that doesn't seem possible..

I appreciate any help with this matter , and I know the way im trying to do things is wrong but this is for my project which MUST use those simple methods and I can't figure out how to measure collision except of using a physics engine which doesn't seem possible in my case ..

Thanks in advance