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
1answer
444 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
11 views

no lwjgl in java.library.path - however as far as I can see, everything is linked correctly! [on hold]

I am very new to java but have been really enjoying it so far. Progress has been fast and I almost have a little demo game fully working. However when I export it (I'm using Eclipse) the .jar won't ...
0
votes
0answers
37 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
50 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 ...
0
votes
1answer
55 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.
3
votes
3answers
352 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 ...
0
votes
1answer
29 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 ...
0
votes
1answer
43 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 ...
0
votes
1answer
43 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
1answer
312 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 ...
0
votes
1answer
39 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 ; ...
1
vote
1answer
392 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[] = ...
0
votes
2answers
64 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 ...
1
vote
1answer
115 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, ...
0
votes
1answer
110 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 ...
1
vote
0answers
52 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
1answer
77 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
18 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 ...
-1
votes
0answers
34 views

How to make character selection in slick2D?

I am trying to make the player able to select between two characters in slick2D, but I cant get the map class to use the variable holding which ever character the player selects. Map Class: package ...
0
votes
0answers
34 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 ...
1
vote
1answer
60 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 ...
0
votes
0answers
18 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
153 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
63 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
47 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
142 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
170 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
38 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
78 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
43 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
234 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
112 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 ...
1
vote
2answers
2k views

Can't get Depth testing to work (cube faces shine through)

I'm making my first steps with OpenGL with LWJGL. I am currenlty constructing a... wait for it... CUBE. Quite creative... Up to now i made it to three of its faces and thats where the Problems began. ...
3
votes
0answers
80 views

Is it possible to use OpenCL in libgdx?

Been looking for a way to implement some OpenCL stuff in my libgdx project. It's possible via LWJGL which libgdx is based on, but it's only for the Desktop environment. Would like to have it cross ...
0
votes
0answers
33 views

How do I implement a LWJGL orthogonal matrix?

As seen on the official LWJGL page, I tried. But failed. All the things I've found on SO and other sites didn't answer anything that had to do with this specifically. I've been on this for weeks. It's ...
0
votes
3answers
81 views

Get pressed character in LWJGL (Ignoring modifier keys)

I have a basic text field setup in LWJGL, however pressing any modifier keys (Shift, F1-19, Page Up, etc.) inputs a space into the text field. How would I ignore those characters? Here's some code so ...
0
votes
3answers
81 views

OpenGL Colour Issues

I am using a single VBO to store vertices in the follow format: v1X, v1Y, v1Z, v1R, v1G, v1B, v2A, v2X, ... Vertex positioning is fine, shapes show up where expected, however instead of using the ...
-4
votes
4answers
2k views

LWJGL vs Slick2D vs OpenGL. What is the difference?

I was wondering what the difference was between LWJGL, Slick2D, and OpenGL. If I'm not mistaken LWJGL is a library and it has the methods and such, but what are the other two for and how do they use ...
0
votes
0answers
54 views

Java lwjgl 3D custom terrain shape

I have a Terrain class that generates a terrain with 2 nested for loops, one for vertices, and one for indices. for(int i = 0;i < WIDTH;i++){ for(int j = 0;j < HEIGHT;j++){ ...
0
votes
0answers
17 views

Why does LWJGL's CLPlatforms interface return null, and how can I change this?

I'm running Jeff Heaton's OpenCL example from https://github.com/jeffheaton/opencl-hello-world ; in hopes of using the information for terrain generation for another Java program later. I'm also ...
1
vote
1answer
107 views

How can I make terrain texturing look detailed both close-up and far away?

I attempting to make my game have very detailed textures, and in general look pretty. However, I'm having some issues with that. Let's take a look at a rock texture close up: Picture. As you can ...
0
votes
1answer
109 views

How could we use trigonometry for moving around a 3D World?

Well I have a question about geometry and 3-Dimensional player movement in general. I'm using Java, OpenGL and LWJGL. This is basically what I got: currentFrontSpeed: Is a float that contains the ...
0
votes
1answer
68 views

Image rendering with additional space around it

When I try to display an image that is 400 pixels wide and 800 pixels high, it is not displayed this way. Instead it is diplayed like this: Instead it is displayed like this You can see at the bottom ...
0
votes
0answers
31 views

LWJGL 3 GLSL normal problem

I have a pretty strange problem today. I started to make a 2d game yesterday, and everything was right until now. I wanted to make a lighting system, wich required me to send the vertexnormal from ...
-1
votes
3answers
473 views

Tile Based Collision Checking In Java?

I have my map stored in 2 arrays: Tiles : Tile names TileTypes : SOLID or BASIC I want to be able to walk through BASIC Tiles (Like ground tiles). But not the SOLID Tiles (Like wall tiles). I ...
1
vote
1answer
50 views

How can I fade in 3D foliage smoothly?

Take a look at this picture: This is a picture of me diving down from a high height. As you can see, the world is a simple world with grass, snow, trees, etc. The problem here is the 3D foliage. If ...
0
votes
1answer
37 views

OpenGL color overlay

I want to create a pause menu where everything in the background gets darker. I've looked up a bunch of possible solutions (even the second page on google) but it doesn't seem to work. I do already ...
3
votes
1answer
67 views

Frustum Culling: How to calculate if an angle is between another two angles

I am trying to implement frustum culling but got stuck on how to determine if the angle that the object is from the player is in the FOV of the player. So basically I have the following information: ...
2
votes
1answer
696 views

LWJGL SlickUtil Texture Binding

I am making a 3D game using LWJGL and I have a texture class with static variables so that I only need to load textures once, even if I need to use them more than once. I am using Slick Util for this. ...