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

-1
votes
0answers
17 views

Lwjgl unsatisfied link error intelliJ

I recently wanted to update one of my games to a recent (stable) LWJGL 3 version. I changed everything I needed to change, like instead of GLContext.createFormCurrent() I did GL.createCapabilities(), ...
0
votes
2answers
28 views

LWJGL shader loading problem [closed]

I tried to load shaders in lwjgl but it never works. it shows me a weird error which i can not discover please help. here goes the code:- ShaderProgram.java package Shaders; import ...
0
votes
0answers
27 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
14 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 ...
0
votes
1answer
79 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
64 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
22 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
0answers
17 views

Rendering text using STL in LWJGL 3

I'm working on one project and I want to render text in the window. I'm using LWJGL 3 and I found that rendering text should be done using bindings to STL. However I found these examples: ...
1
vote
1answer
47 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
21 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
55 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: ...
0
votes
1answer
19 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 ; ...
0
votes
0answers
15 views

How to hook up mouse listener in Slick2D

I'm trying to code a "Button"-class in java using the Slick2D-GameEngine. Does anyone who is familiar with this engine know where and how exactly to hook up this class to the GameContainer's ...
0
votes
0answers
30 views

OpenGL program not rendering

I tried to create a program that would display a square, but then it didn't. Display.java import org.lwjgl.glfw.GLFWErrorCallback; import org.lwjgl.opengl.GL; import org.lwjgl.system.MemoryUtil; ...
0
votes
0answers
33 views

Passing TexChoords to Shader via VAO/VBO isn't working

Simply put, I'm trying to move away from deprecated methods in my code. Currently I'm trying to get shaders to handle translating, rotating, and texturing my models. I'm only having problems with ...
0
votes
0answers
32 views

LWJGL Using wrong openGL version

I am trying to make a game in java using the LibGDX library witch is an extension of LWJGL. LWJGL is claiming that I need at least OpenGL 2.0 with the FBO extension but I only have version 1.1.0. So I ...
-1
votes
1answer
52 views

How to pitch, yaw, roll, an object like a flight simulator in OpenGL?

I'm working on a college Graphics project using LWJGL (OpenGL in Java). I've done most of the scene but I got a problem in figuring out the jet's orientation. Here's how I tried it at the very ...
0
votes
1answer
8 views

ARBShaderObjects.glDeleteObjectARB vs GL20.glDeleteShader to remove shader?

I've created a shader object using ARBShaderObjects.glCreateShaderObjectARBand I'm wondering exactly how I'm suppose to remove said shader. It seems both ARBShaderObjects.glDeleteObjectARB and ...
0
votes
1answer
23 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.
0
votes
1answer
47 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 ...
3
votes
1answer
76 views

VBO rendering crashed with glDrawArrays

I'm playing around in LWJGL3 and I'm experiencing an issue regarding glDrawArrays. At glDrawArrays the JVM crashes. I'm using modern OpenGL and therefore I have my own shaders and matrix ...
2
votes
1answer
127 views

How can I optimize block rendering in an OpenGL game?

I am working on a game with blocky graphics -- similar to Minecraft. My world generation algorithm is similar to the Diamond-Square algorithm. The terrain was initially too rough and uneven, so I ...
0
votes
0answers
43 views

Framebuffer texture shows as blank white when rendered after TrueTypeFont

I have a working framebuffer class. However, when I render out the framebuffer after rendering text with Slick2D's true type font class, it is completely white. Below is all of the classes that are ...
1
vote
1answer
26 views

How can I move the camera directly under a certain plane?

I am attempting to render a "reflection" of a scene for water: To create this illusion, I need to render the scene from below, and then ignore all geometry below the water line. As such, I need ...
0
votes
0answers
14 views

LWJGL Applet Security Exception

I created small game in Java using LWJGL 2.9.3 and would like to add it to webpage as Java applet. I have followed this tutorial and have used this app loader. All the Java code works and I can tun ...
0
votes
1answer
36 views

Strange Rotation in LWJGL

What I am trying to do is to create a Rubik's Cube game using LWJGL in Java. I have a lot of it done already, the only problem is the rotating. It just isn't working. I've tried multiple ways of ...
1
vote
2answers
57 views

opengl z index changing does not zoom in

I am making a simple opengl application where I have a cube and I want to move forward to it with the glTranslate3d function, where I change the z index. One would expect the object to get bigger ...
1
vote
1answer
93 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 ...
3
votes
0answers
43 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 ...
1
vote
1answer
63 views

Java heart based health mechanic

so I've made a basic game in java w/ LWJGL 2 and Slick. Right now Im working on the hud and health system. I'm kindof trying to get a minecraft like health system, 15 hearts for health,but I want the ...
0
votes
0answers
50 views

OpenGL model rendering issue

Currently my game will not display models properly on my PC but they load right on a pc that supports openGL 3.0, and as my laptop only supports 2.1 the last model rendered will show properly but the ...
1
vote
1answer
117 views

How to fix texture edge artefacts?

This issue has been annoying me for a long time now and even after reading a lot of articles about it, I am still unable to fix the issue. First, to my setup. I'm using LWJGL for a 2D project, ...
3
votes
1answer
55 views

GLSL uniforms are returning -1, but they are being used in output

I have looked this up, and found some answers and people said that if uniforms aren't important to the final output than they get thrown away by the compiler. However, in my case they are being used ...
2
votes
1answer
75 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
1answer
42 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
63 views

How do I pack my game LWJGL game into a single executable JAR with Maven?

I am trying to use Maven to manage building my LWJGL projects. The entire project needs to be packed into a single executable jar, dependencies, natives and resources included, so that can be easily ...
1
vote
1answer
81 views

Java LWJGL inventory using ArrayList

I'm making a game in Java with LWJGL 2.9.3 and Slick2D, and I'm working on creating an inventory. I managed to set it up almost completely, but I ran into a problem. When I'm rendering the slots, only ...
1
vote
0answers
34 views

lwjgl Move 2D projectile in direction from coordinate pair

So I am having issues getting my projectile to move properly at all, the help I have found have only made this worse and have not actually given any heading as to what I am doing wrong. Can anyone ...
1
vote
1answer
38 views

Java delaying commands in a method with time (Sys.getTime)

LWJGL 2.9.3 and Slick2D Hello, so Im making this game and its going quite well, but I cant figure this out: Ive got a 2d tile based map (wich is stored in a 2d array) and each tile has a coresponding ...
1
vote
1answer
80 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, ...
3
votes
2answers
99 views

Algorithm for triangle picking?

So i found out that i need a triangle picking algorithm, i need to see if my mouse is over the triangle. I've heard what color picking is, but it would pretty much just drop the performance twice ...
1
vote
2answers
105 views

Random white lines appearing while translating rendering slick 2d images

Hmm I'm getting this weird problem that i think may be a bug with slick but when ever i translate an image in slick 2d for some reason a weird white line appears on the left side of every image like ...
0
votes
0answers
31 views

Java LWJGL and Slick2D collision with 2d array based map

So I've been making this game recently in java w/ LWJGL (2) and Slick2d. I've done some stuff like the map; it's a simple 2d array it goes through it and based on what id it is its gonna draw that ...
0
votes
0answers
63 views

How to get set up with java, eclipse, and slick 2d?

I have some experience in Java and other languages. I want to make games in java, and through my digging around it seems the LWJGL library is the way to go. I am trying to use Slick2D ...
0
votes
1answer
146 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 ...
3
votes
3answers
246 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
0answers
52 views

Converting glsl shaders

I need to convert these shaders from #version 400 core to #version 130 successfully but for some reason when I do it my models are not rendering properly when I load more then one type and I cant find ...
0
votes
0answers
28 views

How to use shader in order to render FBO lwjgl

I am making a 2D game and I want to make a light mask. So far i made a Frame Buffer where i hold my mask but I cannot apply the shader on it. When I don't use the shader the light map is drawn ...
0
votes
0answers
44 views

Offscreen frame buffer lwjgl

I want to create simple 2d lighting. So my idea is to render everything on the default buffer and then apply light mask. For the light mask i want to use frame buffer which later i will apply on the ...
0
votes
1answer
40 views

Modify Element of Struct Array

I have this struct array in GLSL. struct Test { vec2 value1; vec3 value2; float value3; } uniform Test u_test[5]; How can I modify the elements of this array one at a time? I know that ...