Tag Info

New answers tagged

1

You're not setting the projection matrix correctly. At the time you call glOrtho() you probably want to have the GL_PROJECTION matrix mode enabled. Something like that // set projection matrix GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0, 1920, 1080, 0, 1, -1); // set modelview matrix to identity ...


1

You get the black boxes because you have to enable blending in OpenGL: glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); This because the textures drawn by Slick have transparency.


0

Simply calculate UVs (0,0 point is left bottom, 1,1 point is right top) assuming you v got sprite texture dimensions sp in pixels just divide it by texture size: SpriteDimensions sp; //that you must know Vector2f[] UVList = new Vector2f[4]; UVList[0] = new Vector2f(sp.x / tex_width, sp.y / tex_height); // 0,0 UVList[1] = new Vector2f(sp.x / tex_width, ...


0

Looking at the slick-util documentation, it doesn't look like there's a way to just change the x, y, and z positions while a sound is playing. The following is a work-around I could think of off the top of my head, but I don't know how efficient this would be So, every time the camera position changes (or maybe only when the camera position has changed ...



Top 50 recent answers are included