Tag Info

New answers tagged

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 ...


0

glTranslatef doesn't add objects in LWJGL but translates OpenGL's built-in modelViewProjection matrix. Based on the fact that you're using glTranslatef I would say that you're using legacy OpenGL where this is the only way of matrix translations and these calls are not hardware accelerated. Possibly the best way to improve your performance is to switch to ...


0

glTranslate is deprecated and slow, so you shouldn't use that function anyway and rather use the matrix operations, like Matrix4f.translate(modelPos, modelMatrix, modelMatrix); to transform your models. see: http://lwjgl.org/wiki/index.php?title=The_Quad_with_Projection,_View_and_Model_matrices and feed a complete Model-View-Projection matrix to the shader ...


0

Seeing as you want to keep the state of the matrix before the translation, I'd suggest using a matrixstack, this openGL tutorial explains it quite well: http://www.arcsynthesis.org/gltut/Positioning/Tut06%20Fun%20with%20Matrices.html However, for this method I assume you perform your matrix multiplication with the vertices in GLSL. If that's not the case ...


1

I'd like to help but your code is working fine for me. public static void main(String[] args) throws Exception { DisplayMode displayMode = new DisplayMode(640, 480); Display.setDisplayMode(displayMode); Display.setTitle("Input test"); Display.create(); System.out.println("OpenGL version: " + GL11.glGetString(GL11.GL_VERSION)); ...



Top 50 recent answers are included