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

Why does gluProject not give the correct screen space coordinates with LWJGL

So I'm using gluProject to take the 3d coordinates and tell me where on the screen they rendered. The problem is I don't get the same coordinates with gluProject and where they actually ended up rendering. The weird part is that if the difference…
1
vote
1 answer

How to verify Java version on my program launch?

My java application requires users to have Java 7 installed. However, if they don't, nothing is displayed or returned to the user unless they started the application from the console. The app simply terminates. How would I generate a popup…
Bit Fracture
  • 651
  • 1
  • 9
  • 24
1
vote
1 answer

LWJGL glTranslate doing weird things

this is a big problem I have been running into. I am trying to render multiple tiles using glTranslate but when I call my draw function with the x, y coordinates the tiles are spaced weirdly(I don't want spaces). Here is what happens. here is my…
grantperry
  • 139
  • 4
  • 18
1
vote
1 answer

I want to rotate a sprite around its center in LWJGL

No question here has been able to help. I want to rotate a sprite, a quad with a texture, around its center in LWJGL. Here's my code, currently, it rotates around some other center. public void draw(int x, int y, int rot) { // store the current…
Connor O'Hara
  • 139
  • 2
  • 10
1
vote
1 answer

OpenGL Image Drawing

I already have my game loading up at the correct dimensions, displaying a background and playing some background music, this is supposed to be a log-in screen, I've never messed with graphics before, although I know how to write most of the…
1
vote
1 answer

How do I draw multiple glQuads contained in a list?

I made a little lwjgl progrm in which I can create boxes by pressing a button. However, I don't seem to be able to draw multiple quads within a for loop. Here's my code: I have a box class so that I can deal with many boxes package…
pipsqueaker117
  • 2,280
  • 9
  • 35
  • 47
1
vote
1 answer

Rendering lighting

I have a small block engine similar to a very early version of Minecraft using LWJGL. I now want to actually implement lighting. I understand how it works I'm just confused as to how I'm supposed to render lighting. Am I supposed to change the…
user1650305
1
vote
0 answers

java.lang.RuntimeException: No OpenGL context found in the current thread

im trying to create a applet for a little game i created. when i run the game normally (no applet) it works just fine but when im trying to run it as an applet it gives me the following error. im using lwjgl 2.8.4…
mschuurmans
  • 1,088
  • 1
  • 12
  • 24
1
vote
1 answer

How to increase performance in LWJGL?

I'm new to LWJGL. When I try to make a level comprised of 100*100 cubes (I use QUADS to create it) I get about 8 fps on my laptop. When I delete 5 sides of the cube and leave only to render the top, I get 10fps. How can this be? When I was deleting…
Kristupas A.
  • 304
  • 5
  • 15
1
vote
2 answers

Display Lists and VBO OpenGL/LWJGL

I have recently figured out how to render 3D cubes using LWJGL and OpenGL and I was so excited, I rendered 2000 and effectively froze my computer. I've heard of things such as Display Lists and VBO but even after googling, I have no idea how to use…
user1887053
  • 13
  • 1
  • 5
1
vote
1 answer

Adding javadoc in existing library

I it possible to adding java comment of pre compile library jar file? I am currently experimenting with lwgjl but it lacks of documenting opengl function. I would like to adding comments on functions and properties of the library along the way i…
varuog
  • 3,031
  • 5
  • 28
  • 56
1
vote
0 answers

OpenGL Mipmap Texture_2D

I am very new in openGL and I use LWJGL. I do not know how to see if "Mipmaps are working" This is how I load a Image (64x64) : private int loadPNGTexture(String filename) { ByteBuffer buf = null; int tWidth = 0; int tHeight = 0; …
kinaesthesia
  • 703
  • 6
  • 27
1
vote
1 answer

Making a player move to my mouse when clicked?

How can I get my player to move to the mouse when it is clicked (like in Warcraft)? So far I have tried: if (Mouse.isButtonDown(0)) { if (X < Mouse.getX()) { X += Speed; } if (X > Mouse.getX()) { X -= Speed; } if…
user2023876
1
vote
2 answers

OpenGL: Rendering thousands of cubes with Vertex Arrays, not working too well

I am attempting to use vertex arrays to render about 2097152 cubes with LWJGL (no not all of them at once). I have implemented numerous types of polygon culling to enhance my performance from around 2 FPS to about 60 FPS. Throughout this project,…
CoderTheTyler
  • 839
  • 2
  • 11
  • 30
1
vote
1 answer

Deferred Rendering Pipeline Not Working On Laptop Graphics Cards, and Odd "Model Ghosting" Problems (glBlendFunc)

EDIT: Changing the fragment shader so only one light per-run was possible solved my first problem. My second problem still stands. thanks in advance for any help you can offer. I have been working on a deferred shading pipeline for my LWJGL…
Spaceman1701
  • 413
  • 5
  • 13