Tag Info

Hot answers tagged

4

Java defaults to using GDI (AWT, Swing). JavaFX supposedly will be able to make use of OpenGL in future. Java + LWJGL (an OpenGL wrapper that accesses native opengl32.dll via JNI) provides more direct hardware-accelerated support for Java. Flash Player 11 onward made use of OpenGL via Stage3D. Without using Stage3D, it is using a software renderer built to ...


3

Nick already gave a more specific answer, but I get the sense from your question that you'd benefit from a more generic answer. Different platforms have various ways of getting pixels to the screen. Software is written in layers. You can implement OpenGL on top of D3D (like Microsoft has done), or even on top of GDI as software rendering (like Microsoft ...


1

You need to change OpenGL's projection matrix so that it will change the area of the world that is drawn within your window. The projection matrix is what OpenGL uses to determine how the world will be projected onto the screen. Most likely, you're setting this in the beginning of your program to say "draw the area of the world from (0,0) to (800,600)." ...


1

First, when are you calling the jump() method? Make sure it really gets called, maybe by using a log message. Second, instead of body.setLinearVelocity(new Vector2(body.getLinearVelocity().x, 12)); you should do body.setApplyForce(new Vector2(0, 120)); Setting a velocity directly is frowned upon and should be done only in a few exceptional cases such ...


1

Collision callbacks are explained in http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Collision_Callbacks_and_Triggers. This translates quite straightforward to JBullet. However if you have already tried and failed to follow that, I'll just provide the code I have been using myself. First set-up a callback that is called on every physics ...



Only top voted, non community-wiki answers of a minimum length are eligible