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
1 answer

Trouble when drawing a 2nd object without texture

Im having trouble geting a 2nd box to render. So fare I have 1 object drawn with a texture and it seems to work fine but I have some code attached to it, so if I hold down the left mouse button ontop of it a 2nd box apears to its right. Instead the…
1
vote
1 answer

3d vertices LWJGL/OpenGL

I am trying out the LWJGL library, but I am a little confused. When I try to render a quad with 2d vertices: glVertex2f(0, 0); glVertex2f(0, 1000); glVertex2f(1000, 1000); glVertex2f(1000, 0);, then everything seems fine, but when I use the code…
Yatoom
  • 307
  • 1
  • 15
1
vote
1 answer

ant & "no lwjgl in java.library.path"

Within eclipse I try to get an ant task running which looks like this:
semTex
  • 343
  • 5
  • 16
1
vote
3 answers

OpenGL 2D Shape Issue

I'm trying to make shapes with OpenGL in LWJGL but every time I do it, it makes this triangle dent in it. The Code: //The Window Is 800 Wide And 600 Tall GL11.glBegin(GL11.GL_QUADS); GL11.glVertex2i(0, 0); GL11.glVertex2i(800, 0); GL11.glVertex2i(0,…
user1870398
1
vote
1 answer

Can LWJGL be used along side Graphics2D?

my game currently uses Graphics2D for a lot of the drawing and text rendering but I would like to use some of the functions available in LWJGL like GL11.glBegin(...) to make custom shapes and maybe use some of the cool texture functions as well. Is…
bigbass1997
  • 175
  • 1
  • 2
  • 10
1
vote
2 answers

Java collision detection not functioning as expected

With the following code, collisions are detected, but sides are incorrectly registered. public int checkBoxes(int aX, int aY, int aWidth, int aHeight, int bX, int bY, int bWidth, int bHeight){ /* * Returns int * 0 - No collisions …
Jack Wilsdon
  • 6,706
  • 11
  • 44
  • 87
1
vote
1 answer

OpenGL - white edges on cubes

In a minecraft-like game I'm making, I get white edges on my cubes: It is much more noticeable in darker textures. The textures are being setup like this: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,…
Luis Cruz
  • 187
  • 9
1
vote
1 answer

Determine mouse button release in LWJGL

I have a program in LWJGL where I have a series of buttons. I'm trying to use Mouse.getEventButton() and Mouse.getEventButtonState() in order to figure out when the mouse is released, but neither seem to be working. After adding a few print…
ApproachingDarknessFish
  • 14,133
  • 7
  • 40
  • 79
1
vote
1 answer

Space between 2 vertices on a heightmap

I am working on a infinite world generated with Perlin Noise, Java and LWJGL. But I am having a problem, it is kinda hard to explain, so I made a video: http://youtu.be/D_NUBJZ_5Kw Obviously the problem is the black spaces in between all the pieces…
Sietse
  • 707
  • 4
  • 10
1
vote
3 answers

LWJGL: gluLookAt that returns Matrix4f in opengl 3+?

I'm trying to write a little game with third-person-camera and I'm just wondering about gluLookAt function. It works with Opengl 1.1, but I'm using 3.2 one so I need something that can return Matrix4f to me, but I didn't find anything on the…
TomatoMato
  • 703
  • 2
  • 8
  • 19
1
vote
2 answers

How to make a simple screenshot method using LWJGL?

So basically I was messing about with LWJGL for a while now, and I came to a sudden stop with with annoyances surrounding glReadPixels(). And why it will only read from left-bottom -> top-right. So I am here to answer my own question since I figured…
Maarten
  • 635
  • 1
  • 9
  • 29
1
vote
2 answers

Rendering 10000+ dynamic cubes in opengl 2

How can i efficiently draw lots of movable cubes in opengl 2 (JOGL) ? do i have to construct a huge VBO/VAO that contains all cubes copies and draw in single call? or call glDraw for each instance of cube passing MVP matrix to be able to move…
1
vote
1 answer

Do I need to convert my java application to an applet to post it on a webpage?

Is it possible to post a java application on a website without converting it into an applet? I have worked hard on making a game and I want to share it. My game uses the Light Weight Java Game Library, so it is harder to convert to an applet. It is…
1
vote
1 answer

glDrawElements is not drawing the entire model

I don't understand what's going on! I have this mesh loader, and when I load small meshes with it, my program works fine, drawing the whole mesh. But now that I tested the program with a big mesh (upwards of 100,000 vertices) it only draws a tiny…
Tustin2121
  • 2,058
  • 2
  • 25
  • 38
1
vote
1 answer

LWJGL display and java swing

I have created a JFrame with a JSplitPane in it, which contains a canvas in the left and a JPanel in the right. The canvas contains LWJGL display, and the JPanel has few JTextFields in it. The problem is that when I press a mouse button on the…
Qualphey
  • 1,244
  • 1
  • 19
  • 44