Skip to content
Advertisement

Tag: libgdx

How to properly use open gl calls with libGDX

I am trying to render a terrain using my own shader and by using low level open gl methods. But other parts of the game use SpriteBatch and other GDXlib render classes. My openGL code for terrain renders correctly until I make a call to: or something similar like: After that call, my openGL code just not draw anymore. No

Java – Libgdx set the cursor to the hand pointer

I have been doing some research on libgdx and can’t find anything relating to this, you can set the pointer image but that isn’t what I’m wanting, I tried the set cursor with j frame and stuff but it wouldn’t work, what I want is for the default hand cursor to be set when it is called Answer There is

Rotate image continuously

I want to rotate the ring image constantly in anticlockwise direction here is my code Answer I guess the Actions are what you are looking for. An Action can be added to Actors (and subclasses) and they will be performed inside the act(delta) method, of the Actor. In your case you could use the Actions.rotateBy(float rotationAmount, float duration) and let

How to see if a texture is touched in libgdx?

pretty much i want my texture to move to a random position on the screen when its touched and when its missed i want to system.out(“missed”). I cant figure out how to see if its touched. right now i can only get if the screen is touch and it records about 10 touches for every one touch because it renders

How to increment time every second in Libgdx

I try to add time to my game that will increment every second. How to fix that? I add my code below as your note, delta is Gdx.graphics.getDeltaTime(). ‘time’ is string. but looks like the time increment slowly. means that when time already run about 1,5 sec, ‘time’ still increase 1. I divide by 100 because if not it will

LibGDX: Make all actors on a stage unchecked

I have a stage with multiple buttons on it that basically serves as a toolbox. I want the user to be able to select between the different items that are displayed; therefore when the user selects one item, all others have to be deselected. I thought of doing that with the checked property of libGDX buttons. However, I don’t know

Advertisement