Questions tagged [lwjgl]

The Lightweight Java Game Library (LWJGL) allows access to high performance crossplatform libraries such as OpenGL, OpenCL and OpenAL to write state of the art 2D and 3D applications with Java.

The Lightweight Java Game Library (LWJGL) is an open source Java software library for computer game developers. In particular, it provides an interface for accessing OpenGL, OpenCL, OpenAL and GLFW functionality.

3245 questions
1
vote
2 answers

Nifty GUI control prevents the rest of my application from rendering

I've been trying to add some basic gui elements to a openGl (via LWJGL) application using nifty gui, and while I've been successful in rendering panels and static text on top of the the applications graphics, using the built-in nifty controls (e.g.…
zergylord
  • 4,368
  • 5
  • 38
  • 60
1
vote
2 answers

How do I get Nifty GUI to use my coordinate system?

For various reasons, I like having openGL to use coordinates other than pixels, which is easily set via: Display.setDisplayMode(new DisplayMode(800, 600)); GLU.gluOrtho2D(0f,32f,0f,24f); However, now that I've begun trying to integrate Nifty GUI…
zergylord
  • 4,368
  • 5
  • 38
  • 60
1
vote
1 answer

lwjgl colors all items on screen

I have a several quads which are successfully being displayed on the screen, however when I try to set the colour of one of them it sets the color of all of them. GL11.glColor3f(red,green,blue); xh = getXsize() / 2; yh = getYsize() / 2; …
user1814893
1
vote
2 answers

LWJGL Display.update() automatically capping FPS to 60

I am trying to get my game's FPS to go to e.g. 100 and even though I correctly call Display.sync(100); The FPS is 60.. Main loop looks like this: int delta = this.getDelta(); this.update(delta); this.drawGL(); this.updateFPS(); Display.update();…
Matej
  • 9,548
  • 8
  • 49
  • 66
1
vote
1 answer

Java & OpenGL; Rendering Artifacts when using delta to calculate frame independent movement

So, I've been making a small demo program in java using opengl just as an exercise. All was going well until I implemented getTime(); and getDelta(); functions to calculate how much time each frame takes. I then applied it to all my movement…
Harha
  • 15
  • 4
1
vote
2 answers

Flickering black and white stripes on display

I have imported lwjgl in Eclipse. The teacher gave us a BaseWindow application to import in Eclipse, too. The application should display a 1024x768 black window. But instead of black window I get black and white stripes flickering on the display.…
jurebajt
  • 23
  • 2
1
vote
2 answers

Making a cubemap in lwjgl

This is my attempt at making a cube map. glDisable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_CUBE_MAP); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,…
Coupon22
  • 395
  • 8
  • 24
1
vote
1 answer

Flickering when using GL_TEXTURE_RECTANGLE_ARB for spritesheet with the LWJGL

I'm having some odd flickering problems as I'm trying to develop a game with the LWJGL. I'm attempting to use GL_TEXTURE_RECTANGLE_ARB as suggested in this tutorial: http://youtu.be/Xj_qZ3Cw08Q. Here is a short video of the problem:…
1
vote
1 answer

Rendering javax.swing.JButton in a lwjgl window

Is it possible to render a javax.swing.JButton and other swing elements in a lwjgl window (with openGL)? If not, what can you recomend for in game GUI in lwjgl? Note: i tried Nifty-GUI and TWL, but i dont like the XML part, and the documentation was…
Qualphey
  • 1,244
  • 1
  • 19
  • 44
1
vote
1 answer

OpenGL: GL_CLAMP causing Invalid Enum error

I'm using the LWJGL, and the following OpenGL call causes an Invalid Enum error when checked with Util.checkGLError() GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP); I've narrowed it down to the GL_CLAMP, since…
1
vote
1 answer

LWJGL Mouse scroll wheel getDWheel() Method

I use the getDWheel method in my game like so: public void checkMouseWheel() { if (highLight != null) { if (Mouse.getDWheel() < 0) { System.out.println("DOWN"); } if (Mouse.getDWheel() > 0){ System.out.println("UP"); …
MxR
  • 150
  • 3
  • 10
1
vote
0 answers

How to debug a bus error in Java?

I recently started getting a bus error in some code that I haven't run in a while, and I'm not sure what changed, but I'd like to be able to pin down the cause. Unfortunately, I'm used to debugging errors in the Eclipse debugger, but that won't help…
Talin
  • 1,397
  • 2
  • 15
  • 30
1
vote
2 answers

Using LWJGL version 2.8.4, added lwjgl_util to project cant find import?

I have been racking my brain all morning with this. I am using Eclipse and trying to import this 'org.lwjgl.opengl.glu.Sphere;' to my class. but Eclipse can't find this class. I have been informed in my research that this class resides in…
1
vote
0 answers

PNG Error when exporting Jar for OSX

I am using LWJGL, and Slick to load in my Images. I exported my jar and created a fat jar using JarSplice with the dependencies for Windows and OSX. The jar runs perfectly on windows however on OSX I am getting the following error referring to my…
Daniel Messias
  • 2,623
  • 2
  • 18
  • 21
1
vote
1 answer

OpenGL textured quads and untextured quads

How would I go about having both textured quads and untextured quads both being rendered. The issue is if I have textured quads drawn the untextured quads do not show if the textured one is drawn after, and vice versa. I'm using LWJGL.
Malii
  • 448
  • 6
  • 17