The Lightweight Java Game Library (LWJGL) provides access to high performance, cross-platform libraries OpenGL and OpenAL. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks.

learn more… | top users | synonyms

3
votes
2answers
429 views

Setting Window Icon Using GLFW (LWJGL 3)

What's the best, cross platform, way of setting the window icon using LWJGL 3? I have a PNG image and would like to set it to the icon present in my dock (OS X) or the application bar (Linux).
0
votes
1answer
72 views

LWJGL3 Input for single press of keyboard

I am making a game with lwjgl and GLFW and am having a hard time figuring out how to check for a single press on the keyboard.
4
votes
1answer
99 views

Creating a custom mouse cursor with LWJGL2 in Java

I have been trying to create a custom mouse cursor in my LWJGL2 application running under Linux and I am almost there. I have implemented the following method that I call right after creating the game ...
1
vote
1answer
38 views

How to “port” Java2D code to LWJGL

I've been following some game tutorials on youtube and developed a custom engine using Java (Graphics2D, BufferStrategy and such). I have a class "Surface", which represents any 2D object (image, ...
3
votes
3answers
402 views

Fastest 3D bounding box algorithm

I am at the point in my game where I need to add a collision system. I tried jBullet, and while it did work, it wasn't what I was looking for. I just want a simple way to test if two oriented bounding ...
1
vote
1answer
339 views

Structure gameobjects and call events

I'm working on a 2D tile based game in which the player interacts with other game objects (chests, AI, Doors, Houses etc...). The entire map will be stored in a file which I can read. When loading the ...
1
vote
1answer
43 views

How do I move my camera in LWJGL?

I am making a game in LWJGL (2) and slick-util (I think). I am trying to move my map (It is a double int array that uses numbers to get the textures), but my code only moves the first texture to be ...
1
vote
1answer
56 views

Camera view/projection issue

I made a simple OpenGL program but I can figure out why the camera is not working, here it's a little fragment of the Camera class: public Matrix4f getView() { // initializes the view matrix ...
1
vote
2answers
148 views

Getting the tile over wich the mouse cursor is

Im making a tilebased game, I have the rendering, the main engine, everything setup nicely (btw Im using LWJGL and Slick). Now this is more of a math question. How do I get the tile the mouse is on, ...
1
vote
0answers
22 views

Creation of block mesh for minecraft like chunk

Problem: I'm trying to build a naive mesh for a "chunk" of 2x2x2 blocks. But the "mesh" i create is 3x3x3 blocks (i don't understand why?) and the "extra cubes" are not like i intendet them to be (...
1
vote
0answers
44 views

Rendering blocks in lwjgl, problems with VAO & VBO

//EDIT: Found the solution: had to use GL11.glDrawElements instead of DrawArrays. I'm working on a "voxel based world" engine. At the moment my approach follows these steps: Creation of a Mesh: ...
1
vote
2answers
411 views

LWJGL: Camera distance from image plane?

Let me paste some code before I ask the question... public static void createWindow(int[] args) { try { Display.setFullscreen(false); DisplayMode d[] = Display....
0
votes
0answers
19 views

2D Camera in LWJGL 3

I am trying to implement a simple 2D camera in LWJGL3. The camera has an orthographic projection and can move in 2D space. This is run once at game start-up: GL11.glMatrixMode(GL11.GL_PROJECTION)...
0
votes
1answer
17 views

LWJGL version problems

Is it possible to create VAO's while my computer doesn't support openGL 3.0 or higher? I managed to create a vertex buffer object and draw a rectangle. But then I changed my lwjgl libraries to the ...
1
vote
2answers
92 views

Render terrains depending of the player position (Chunks)

Well, I have an array with all the terrains. How do I render them? I just add them to a List of terrains that are sent to the Renderer. There, every terrain of the list is rendered. The problem is ...
0
votes
1answer
21 views

LWJGL Sys.getTimerResolution() value

Tutorials wrote Sys.getTimerResolution() for LWJGL time method. public long getTime() { return (Sys.getTime() * 1000) / Sys.getTimerResolution(); } I thought Sys.getTimerResolution() is just ...
-1
votes
1answer
186 views

Java - LWJGL OBJ Loader with Materials not rendering

So I successfully loading my obj file but I obviously want to get materials on it. I added the vt(texture) to the OBJLoader and the Model.render but still rendering textureless. I have exported the ...
0
votes
0answers
31 views

LWJGL Not Rotating Properly

I am trying to make a Rubik's Cube in LWJGL but the specific pieces don't seem to be rotating correctly. The original without any rotation is fine. After one rotation: This is also correct but the ...
1
vote
1answer
71 views

Java game LWJGL input doesnt work properly

Im making a game in LWJGL 2 and Slick2d. Im trying to add an item to my inventory by releasing a key (the inventory system works properly, the part where I have to see if the button was RELEASED is ...
5
votes
2answers
981 views

Are display lists faster than VBOs?

I'm making a voxel rendering engine. My "chunks" are 32 * 32 * 256 blocks and I can render a 16 * 16 square of them (which corresponds to Minecraft's maximal render distance). I'm using VBOs holding ...
4
votes
1answer
497 views

Drawing fonts with LWJGL3 with OpenGL

I'm very sorry if this question has already been answered, but since I've been struggling with this for many days I thought I'd give it a shot here. My goal is to somehow render some text on the ...
0
votes
0answers
19 views

How To Mesh Models Together

I have been recently using my game engine created on LWJGL 3 to create a voxel game. Just a brief overview on how the voxels work, there are a list of block types that hold a model and bounding info, ...
0
votes
0answers
21 views

Why does my STB Vorbis decoder occasionally cause an EXCEPTION_ACCESS_VIOLATION?

I wrote an stbVorbis based decoder to load .oggs mostly using this tutorial. However, my code consistently causes an EXCEPTION_ACCESS_VIOLATION upon calling stb_vorbis_get_samples_short_interleaved(...
0
votes
1answer
51 views

How to export slick2d game into a jar with the res and native folder

I am a beginner in Slick2D. I use jarsplice to output Slick2D game. But it is export all thing into one jar. I want to export one jar with the res and native folder .... So I can easily modify ...
0
votes
1answer
45 views

TliedMap render use 15%cpu

I am a beginner in Slick2D. I used TiledMap render in my game,but I do not know why it use 15%cpu and how to fix it. I used map is 1024*768. This is a part of my code. Thanks for any help public ...
0
votes
1answer
50 views

Slick & LWJGL Flickering Problem

I have an flickering problem with rendering tiles. Rendering Method. int tileSize = TileManager.tileSize; for(int y = 0 ; y < mapHeight ; y++){ for(int x = 0 ; x < mapWidth ; x+...
0
votes
1answer
49 views

GLSL - Only draw arond point / flashlight effect

I'm currently trying to achieve a sort of flashlight effect in GLSL. I only want to draw textures within a certain distance of a specified point (the mouse position, for example). Here's a quick ...
2
votes
3answers
6k views

Where can I find tutorials for LWJGL? [closed]

I don't know if this is against the FAQ so if you close this, it'll be no surprise. I have done research but all the tutorials I have seen have been to hard to follow; I reckon there are better ones ...
0
votes
1answer
692 views

Break a learning barrier with Java + LWJGL [closed]

I have been coding with Java and LWJGL for some time. I mainly use thebennybox's tutorials, but I can't always remember the 3D rendering. But even when I have a 3D rendering models, planes, cubes, etc....
1
vote
1answer
541 views

How to use LWJGL Vertex Buffer Objects?

I have been learning how to make a game with LWJGL for a while now by following YouTube tutorials online but I've recently been having a problem understanding Vertex Buffer Objects. I've looked at ...
0
votes
1answer
79 views

AABBs in lwjgl 2.9.3

I think I have succeeded in making an aabb out of 6 quads in opengGL but how would i get it to stay with its centre-point at the centre-point of all objects. I know it is easy for one object how would ...
0
votes
0answers
32 views

How could I add XBox 360 Controller handling support to my game?

The title says it all. I'm making a 3D Open World game with OpenGL and LWJGL in Java, and I really need to move in several angles to fully feel inside the game. The problem is that I couldn't find any ...
0
votes
0answers
52 views

3D Voxel Chunks On Round Planets

So I have recently started a 3D voxel game in LWJGL that will focus on procedricly generated planets around a solar system. I currently have blocks and chunks where a chunk contains 32x32x32 blocks ...
1
vote
2answers
57 views

OpenGL [LWJGL3] - Matrix4x4 not rotating correctly

I tried today to make my own matrix4f class because of that LWJGL 3 does not include a class for it. So I arrived at rotation and it does not seem to work. I tried using the old util from LWJGL 2 and ...
1
vote
1answer
54 views

OpenGL is box blur this slow?

I've never tried blur until recently, and by that i've noticed fps drop when doing box blur. My fps will go down from 4000-5000 fps to 1000-1500 fps. Currently rendering at 853x480 frame buffer and ...
1
vote
0answers
57 views

Slick2D fails to load small textures

I'm trying to load a small 32x32 png texture using Slick2D, however it doesn't seem to render correctly. What's odd is that larger textures do load correctly. The 32x32 texture I'm trying to load: ...
0
votes
0answers
21 views

LWJGL + Slick2D

Okay, so I know collision detection. I have made plenty of games in Java (without LWJGL or Slick2D) that use Side-Scrolling Tile Maps and collision detection, but the player seems to be glitching ...
0
votes
0answers
37 views

LwJGL 2.9.3 2D Camera

So I've been messing around with cameras in 2d. But I came across a weird bug and I was wondering if anyone could help me figure it out? public static void createDisplay(String title, int width, int ...
0
votes
0answers
25 views

LWJGL use only a part of a (blend-Map)

I have the following problem in my game: I created my terrain by an heightmap and a blendMap (for the color). The problem is, that now, when i made the terrain really big, i have a big performance ...
0
votes
2answers
218 views

SDL or SFML: which is the best option if I only want to use OpenGL for my graphics? [closed]

I've read a lot about creating graphics with OpenGL in SDL and SFML over the past few days, and I want to know which one I should pick. As mentioned in most of the things that I've read, both allow ...
0
votes
1answer
111 views

dual contouring concept and term translations

I am working on a 3D sandbox mmo with destructible terrain, using Java and LWJGL. I looked at most options to achieve this and found that dual contouring would probably be the best option for me. I've ...
0
votes
2answers
50 views

Hide building roof & Hide faces/vertices depending on world location

I'm currently developing a small game for my own enjoyment and I've ran into a problem. As you probably know many third person games (such as Runescape and XCOM, for example) hide the roofs when you ...
0
votes
2answers
158 views

Optimising Voxel World Rendering

There are a couple of questions like this already. This one is different because it is specifically about rendering, as opposed to navigation and generation. I've implemented suggestions from here ...
0
votes
1answer
173 views

deformable terrain

I'm currently working on a 3d sandbox mmo and would like to know what would be the best way to store the terrain of the world. I was thinking about making some kind of mesh, like the kind you would ...
0
votes
0answers
40 views

Multithread OpenGL to Upload Meshes

My game is rendered in dynamically generated chunks, each of which has its own mesh. Every time I generate a chunk and upload its mesh, there is a huge lag spike. Is there a good way of eliminating ...
-1
votes
1answer
130 views

C++: from LWJGL to C++ with OpenGL

I've been trying my best on porting my 3D game from Java to C++, but to no avail. I use only LWJGL with OpenGL but I cannot find any other library in C++ that supports as much as LWJGL does for Java. ...
0
votes
1answer
47 views

Tile collision detection

Right. So I was making this simple game. The player is two tiles wide, and four tiles high. My current code is really buggy (it was better before my rewrite) Here it is: float newx = position.x +...
1
vote
1answer
239 views

Delta time not accurate enough

In my game i have a delta timer based almost exactly on the page from here http://wiki.lwjgl.org/index.php?title=LWJGL_Basics_4_%28Timing%29 But if the the main loop is fast enough, my delta time ...
-1
votes
1answer
43 views

Scrolling is going too fast

I used delta based off the LWJGL tutorials and it works (I get 16 or 17 delta) but everything is scrolling nonstop. Here's how I render things: public class Game { int camX; int camY; ...
2
votes
1answer
132 views

Java LWJGL Windows 10 native files

Hello I made a simple game and I want to share it to my friend but he cant run it. I'm assuming it's because he has windows 10 and the LWJGL 2 native files don't support that (I've asumed that based ...