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

0
votes
0answers
41 views

Trouble with Raycast Selection using OpenGL

I am currently having trouble with a custom model editor in which I want to implement model selection (eventually featuring face selection to have something like "click-and-drag" to extend the cubes). ...
0
votes
0answers
16 views

Lwjgl terrain generation [closed]

I am currently making a game and am wondering how one would go about making a terrain generator. Currently I have a mesh class to load all of the vertices and indices into, but how do I generate those ...
0
votes
1answer
48 views

What is the difference between .obj files and Collada files? [on hold]

I am currently making a game in java using LWJGL 2.9 and I am wondering what the difference between the .obj format and .dae format is. Currently I can load .obj files and would like to load .dae ...
0
votes
0answers
13 views

Stack matrix affecting shooting mechanics

I attempted to make a scroller game using parallax scrolling in LWJGL. Everything is fine but I'm having trouble with the matrix stack and the bullets. So basically when I shoot the bullet it moves ...
0
votes
1answer
52 views

How can I split up a large model into an octree codewise?

For collision detection, I am attempting to split up a large model into an octree. If we take this black thing thing to be the ship (104,000 vertices): Then I would like to split up the faces I ...
0
votes
0answers
20 views

LWJGL: getDisplayModes() on Linux with two monitors

When calling getDisplayModes() on a Linux machine with two monitors I only get one single resolution, that is, the current resolution set on the main monitor. However, calling xrandr directly gives me ...
5
votes
2answers
258 views

How does glRotate affect the axes of the global coordinate system?

I am currently playing around with 3D transformations applied on a 2D context in LWJGL, to later be implemented in my game. So I managed to set up LWJGL well enough (scaling, translating, scaling and ...
0
votes
1answer
17 views

Slick2D crashes on Image.getGraphics() on some machines

On some machines, creating a new Image and calling getGraphics() on it causes lwjgl to enter into some kind of faulty state that crashes when swapping buffers. Any idea what causes this and how to ...
1
vote
1answer
63 views

How to distort graphics in a wave-like way?

I saw a certain graphics distortion effect on multiple games over time and am interested in doing it in 2D. It is like a wave-like texture distortion, I am not entirely sure what it is called ...
0
votes
1answer
95 views

FBO and VBO for performance

I discovered VBO's recently and changed my code to use them instead of immediate mode. Now I'm rendering 25000 squares and it's really slowing down my FPS. If I drew all the squares VBO's to an FBO, ...
1
vote
1answer
43 views

OpenGL/GLSL/LWJGL return value from shader

I'm trying to do some bone animation. I don't want the whole skeleton to be loaded to the GLSL shader every time, even tough it's not needed, because one vertex is parented to one bone, not more. My ...
0
votes
0answers
12 views

How can I implement a “horizontal desynced colors” effect in LWJGL? [duplicate]

My plan is to achieve analog video effects like RGB channel desynchronisation. I'd like to have something like this (I hope you get the idea): Left: White dot; Right: The same dot, but mind the ...
0
votes
0answers
19 views

How to setup States in NIftyGUI and LWJGL

I think this is a simple question but I just cannot figure it out. I have a main menu that is using nifty gui and then my game which is rendered using OpenGL Code (LWJGL) I cannot figure out how to ...
-2
votes
1answer
96 views

How can I get “Good enough” collision for entities? [closed]

I am developing a Pirate ship fighting game. It's a great concept: Ships firing cannonballs, sinking each other, having to work as a team to complete the mission... But.. I've tested it with about ...
0
votes
0answers
26 views

VBO - Update Vertex data

My game will be a 2D Sidescroller and I'm working on moving objects around. Since I want to animate and move my sprites around, how do I update the vertex data? This is my current class for GUI ...
0
votes
0answers
29 views

Lwjgl Textures Overriding true type font

I am making a game in java but I recently came across a problem when I bound my textures, my true type fonts would start copying the texture and i would just see a wall of color where my words had ...
0
votes
1answer
86 views

Java JBullet Mesh collsion problem

I have a problem with JBullet mesh collsion. Everything works fine when I create a mesh from my object without scaling, but the problem starts when I want to scale the object. I also tried scaling in ...
0
votes
1answer
82 views

Java LWJGL - How can I add water to my 3d world? [closed]

The title says it all, how can I implement a simplistic water system into my game? I am using Java LWJGL and OpenGL glsl shaders. I am still fairly new to game programming, and a complete noob in the ...
0
votes
1answer
85 views

Java LWJGL - Monster follow script not working properly

I have written a script to be set off whenever a player is within a distance of the monster. The script checks if the x position is greater than or less than the players x, and same for the z. (y is ...
0
votes
2answers
98 views

How does rendering with Swing compare to rendering with openGL?

[summary: Is the performance of Swing at least in the same dimension as openGL [through LWJGL]? If yes, what percentage would you give it? What possible other problems can I expect from Swing in the ...
0
votes
1answer
81 views

Java LWJGL - How can I click to interact with objects?

I want to be able to click on a monster to walk to him and start attacking him. The part that doesnt make sense to me is the conversion between the mouse position, and the actual terrain position. ...
1
vote
1answer
114 views

VBO -> How should it be done?

I'm very new to OpenGL/LWJGL. I'm reading a lot of VBOs. I'm sorry if I can't concretise my concern, but i'll try it: Why should I use VBOs? Whats the difference between using VBOs and glBegin() ...
0
votes
1answer
41 views

Edit VBO data or create a new one?

I have a question: if I have a VBO, and I have to change all the data inside it (because of resizing, ...), would it be more efficient to delete the old one and create a new one (and reallocate the ...
0
votes
2answers
197 views

Resizing a Framebuffer Object (ie: its attachments) on Screen Resize

I have been experimenting with some post-processing effects and I have been using FBOs to store stuff. The problem is, I attempt to resize them when I change resolution. I get no errors, however the ...
0
votes
1answer
32 views

Slick2D Graphics Misaligned

I'm working through a game in Slick2D and am now focusing on a lot of the graphical end. It's going pretty well other than a couple of issues with alignment. An image illustrating both of these issues ...
2
votes
2answers
48 views

How do find the right GLxx object for a given function in LWJGL?

I'm just starting to learn the fundamentals of OpenGL via LWJGL. Every OpenGL function is implemented as a method on a GLxx class. The xx corresponds to the version of the spec when that function was ...
0
votes
1answer
34 views

LWJGL Stencil shadow problem

I've a problem with shadow (Stencil). So when i draw the shadow they looks good, but when the object to draw is underground his shadow is wrongly rendered. My game is do with LWJGL/GL11. Normal ...
0
votes
2answers
73 views

How to setup glOrtho and Viewport [duplicate]

When setting up a window I set 6 variables in my render class int windowWidth; // the width of the window int windowHeight; //the height of the window int dimL; // the coordinate of ...
1
vote
1answer
87 views

Why would OpenGL ignore GL_DEPTH_TEST setting?

I cannot figure out why some of my objects are being rendered on top of each other. I have Depth testing on. glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); Do I need to draw by order of what is ...
0
votes
0answers
35 views

LWJGL 3 crashing on nglDrawArrays

I have 2 classes I'm trying to use to render a triangle, and it's crashing on nglDrawArrays, the error is in the native code, and the only information I'm getting from the JVM is a native error ...
-1
votes
1answer
89 views

Why Is My AABB Collision Detection Not Working

I am going to be making a 3D game and I need to be able to test for accurate collision. I was able to get bounding sphere collision working (too inaccurate to be used for the whole game), but AABB ...
0
votes
3answers
346 views

Calculating Projectile Movement

I'm having some trouble putting together a method that will constantly move a "bullet" in the same direction accurately. Here is what I have so far public Vector3f moveFromPosition(Vector3f location, ...
0
votes
0answers
17 views

Projectile Motion in lwjgl with java [duplicate]

I was trying to make a game with a bow and arrow using lwjgl but I couldent get the arch right. I have a function called projectile that is updated once a frame for each arrow. my frame cap is at 60 ...
1
vote
2answers
320 views

How do I ensure my skybox is always in the background, with OpenGL?

I created a skybox in OpenGL (through LWJGL), but the only way I found to render it behind all objects was to make it very big. This leads to ugly edges between the 6 skybox planes. Optimally, I ...
0
votes
1answer
131 views

Fade into splash screen on game load

I'm using Slick2D and LWJGL for my StateBasedGame and I was wondering if there was a way to enter into my splashscreen on application load using a transition? I tried using: this.enterState(SPLASH, ...
0
votes
2answers
91 views

LWJGL Framebuffer Texture Problem

I am trying to get a terrain rendering system I wrote a while ago with LWJGL. This terrain rendering system is quite simple: a quad mesh is split as the camera moves closer to it, each time a new quad ...
3
votes
2answers
280 views

How could I implement 3D player collision with rotation in LWJGL?

I have a problem with my current collision implementation. Currently for player collision, I just use an AABB where I check if another AABB is in the way of the player, as shown in this code. (The ...
0
votes
1answer
176 views

NiftyGUI - Text isn't rendering

I am trying to create a gui with nifty on top of lwjgl. I've already had some problems during the Nifty setup, however now Nifty is set up and running correctly but for text rendering. Here is my xml ...
0
votes
0answers
169 views

Proper way to load pixel art textures for 2D graphics

I am working on developing a game using LWJGL which is the java bindings for OpenGl. I have just finished the code for loading and animating sprite sheets using a png and xml file. When the texture ...
0
votes
1answer
324 views

lwjgl and slick util text over textured quad

So, I load a TrueTypeFont like this: private TrueTypeFont trueTypeFont; try { InputStream inputStream = ResourceLoader.getResourceAsStream("assets/fonts/main.ttf"); Font ...
0
votes
1answer
106 views

Loading non-square textures, from a 256x256 spritesheet in lwjgl(JAVA)

so I'm doing lwjgl, so far I have the loading of 16x16 textures from a 256x256 spritesheet all working, using this code to get the location of the textures: public Vector2f[] calculateUVMapping(int ...
0
votes
0answers
131 views

JBullet quaternion to Euler angle conversion causes strange flipping behavior

I am making a game using JBullet (a Java port of C++'s Bullet library) for the physics and LWJGL for the graphics. However, JBullet measures angles in quaternions and LWJGL uses Euler or ...
0
votes
1answer
92 views

How can I make an soundsystem with slick?

My Question would be , how can I develop an easy-to-use Soundsystem under slick-util? Under the function a.playAsSoundEffect(1, 1, true, x, y, z); it allready works to create a static ...
2
votes
2answers
73 views

Add Objects in LWJGL without using glTranslationf function

It is possible to add an object in LWJGL without using translation function (glTranslatef) ? and if it is possible does this improve somehow performance ?
0
votes
1answer
84 views

When and how to apply affine translations to vertices of a mesh with LWJGL

So, I have a rigid body class, containing a list of vertices and a 4x4 transformation matrix. At the moment, I'm applying the transformation matrix to each vertex individually, and am unable to revert ...
0
votes
0answers
69 views

Slick2D changing image's color with drawFlash and using alpha

I have an image, where I have a round soft white feathered ball in the center of it. I plan to use it for my lighting in my 2D game. I could not find any proper way to drawing lighting with many ...
0
votes
0answers
156 views

Slick2D/LWJGL Drawing coloured lights problem

I am using the Slick2D engine. I've followed this snippet for creating light sources. I have followed step step, added what is actually important for me, and tested it and the lighting effects ...
0
votes
0answers
96 views

How to render multiple VBOs in LWJGL

I'm still trying to grasp the understanding of VBOs. When you create the floatbuffer, I was told if you keep adding to the put, you would get more points for a shape with more points. My problem is, I ...
1
vote
1answer
198 views

Collision between player and heightmap

Im programming a small project, an opengl height map. It is build of triangles, which points are fit to the right y position (read out of an image). The player is represanted by a cuboid. (p1, p2, ...
0
votes
0answers
96 views

Using VBOs for the begginer

I've spent the past 10 hours trying to understand this and couldn't get any good help. I whatched a youtube video on VBOs and have whatched it many times and tried many things, but I STILL DON'T GET ...