Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lwjgl]

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.

0
votes
0answers
24 views

Adding drop shadow to text in Minecraft

I would like to know how to take a text object rendered using the default Minecraft font renderer and add a drop shadow behind it. I believe what I need to do is make a copy of the text object, ...
0
votes
1answer
26 views

FBO lack of 3D Precision

I am trying to do some post processing on my 3d scene. When I render directly to the screen edges are sharp, however when I render my scene to an offscreen FBO then render that to a texture that is ...
1
vote
2answers
29 views

Meshes exported from blender as .obj does not map correctly

I am having some problems with developing my game in OpenGL with java (Using LWJGL3). I have been following a guide for the more complex steps of the process, like loading meshes. When using the ...
0
votes
0answers
11 views

IllegalStateException while rendering font via slick-util TrueTypeFont

I tried to load a font via Font awtFont = new Font("Times New Roman", Font.BOLD, 24); TrueTypeFont font = new TrueTypeFont(awtFont, true); and then call ...
0
votes
0answers
71 views

How can I fix this MineCraft Forge OpenGl error?

I am making a MineCraft Forge 1.12 gun mod. The gun works but I only need to add some animations for reload and aim. So I have tried something but I gives me an error every time. ...
0
votes
1answer
93 views

Migrating 2D game from immediate mode to VBOs

I am in the process of migrating away from legacy OpenGL calls in my 2D LWJGL game. Previously I would render each sprite using immediate mode, which was dead easy - bind the texture, add the vertices,...
0
votes
1answer
18 views

moving object while being snapped to another one lwjgl

hi now I want to move an object(cube) while being snapped to the surface of another one (sphere) with the same surface of the cube how can i achieve this in lwjgl here is a diagram. to describe my ...
1
vote
0answers
123 views

How is terrain editing implemented like a sculpt tool?

Some creativity/sandbox games have a terrain editing feature. When thinking of a terrain, I'm thinking of a grid of vertices. The elevation of each vertex is then determined by a heightmap (image). ...
1
vote
0answers
34 views

OpenAL listener position for isometric camera

I have an isometric camera for an RTS that looks like this: Basically, I don't know how to set the listener's position in OpenAL because I represent the camera's position with only two coordinates. ...
1
vote
1answer
117 views

Unexpected lighting on cube

I am following a tutorial for 3D game development in Java, using LWJGL. I have completed all chapters up to chapter 14 - Terrain, inclusive. The tutorial is in Java, but I'm using Scala. My full code ...
0
votes
0answers
158 views

Drawing 2D text over 3D scene OpenGL3.3

I got a question regarding rendering a 2D text over the 3D scene in OpenGL 3.3. I followed this tutorial about how to render text in OpenGL. Although the tutorial is for C++ i ported it to Java (...
2
votes
1answer
84 views

OpenGL Outlining Cubes in a Greedy Meshed Mesh

So I've managed to get myself a greedy meshing algorithm implemented for a little voxel game I'm developing to teach myself LWJGL/OpenGL, and it's going great. The thing is, I don't plan on using ...
0
votes
1answer
187 views

Using multiple shaders in OpenGL3.3

guys, I got a question on how to use multiple shaders in my app. The app is simple: I have a 3D scene, say, simple game and I want to show some 2D GUI in the scene. I was following this tutorial on ...
0
votes
1answer
144 views

How do I split my screen to include a JFrame and a lwjgl screen

I a making a game and I'm going to make a little side GUI to create game items. How can I have a window both include a Canvas element and an lwjgl window.
0
votes
0answers
32 views

GLSL shader 2d light follow my view around the world

I'm new to GLSL and I try to make a light shader, my current problem is that the light i created follows me around the world when I move the camera around so I would like to know how to fix the ...
0
votes
1answer
15 views

JME3 Fragment/Shader not compiling

Here is the fragment shader code (MyShaders/Shader1.frag): void main(){ gl_FragColor = vec4(1.0,1.0,1.0,1.0); } And the vertex shader code (MyShaders/Shader1....
0
votes
1answer
23 views

OpenGL Bind all objects at once or single objects at a time

So if I have a bunch of objects, I do: glBegin(); renderThing1(); glEnd(); glBegin(); renderThing2(); glEnd(); glBegin(); renderThing3(); glEnd(); Is this more ...
1
vote
1answer
84 views

LWJGL 2 GUI/Text

I'm currently developing a 3D plane simulator for my bachelor thesis. We've written the engine in LWJGL. We have to provide a GUI, to display some info about the plane that is flying. Like speed, ...
0
votes
1answer
81 views

Issues with Marching Cubes

so I'm trying to write a marching cubes class for my game, at the moment I have it close (I think). Right now I'm focusing on vertexes and indices. So I'm getting triangles to appear where I want them ...
0
votes
0answers
32 views

Java LWJGL Slick2D Font rendering bug

Im using a UnicodeFontRenderer Class from here which uses slicks Unicodefont to draw ttf fonts in Minecraft. Everything works expect that sometimes the font gets rendered Incorretly. It looks like ...
0
votes
1answer
58 views

LWJGL Thin Matrix tutorials GUI

I have a question about the GUI implemented by Thinmatrix. For positions we have to use values between [-1, 1]. This is probably because the origin of the screen is the center and then we have a 1 by ...
0
votes
1answer
78 views

My sweep and prune is giving false positives

My code is just giving false positives. Every frame it reports an imaginary collision. Here is my code Sweep And Prune: ...
-1
votes
3answers
244 views

How do I get min/max on a mesh

I am trying to create an AABB but I need to know how to store min/max from a mesh. Here is my code(I got it from thin matrix) : ...
0
votes
0answers
73 views

LWJGL - OpenGL BufferStorage no performance boost at all

I tried to implement a persistent mapped buffer instead of using glBufferData and glBufferSubData. Everything works and is ...
0
votes
1answer
103 views

Issue with OpenGL texture rendering

I am developing a game in Java using LWJGL2 and Slick, and I am encountering an issue when rendering a graphic. Instead of filling the quad with the texture, it appears to be partly repeating it. The ...
0
votes
1answer
98 views

lwjgl licence and requirements for commercial use

is it completely legal to use light weight java game library in a commercial 2 dimension game engine like drag and drop not straight code?if yes what are their requirements?if not what are my options?...
0
votes
2answers
180 views

Access violation when using shaders in LWJGL 3

I've successfully used LWJGL 2.9.3 in the past and am now giving LWJGL 3.15 a shot in Kotlin. I had a quad rendering nicely but now I'm using shaders it seems that openGL isn't initialized and I'm ...
1
vote
1answer
190 views

UnsupportedOperationException: Unsupported format for this image

So.. I'm learning lwjgl currently and I stumbled on this weird error caused by slick-util which seems to be incorrectly displayed. ERROR : ...
0
votes
1answer
141 views

2D Screen Coordinates to 2D World Coordinates in LWJGL

I'm making a 2d top down game with lwjgl and am having trouble converting my 2d screen coordinates to 2d world coordinates. Here's what I have so far ...
-1
votes
1answer
122 views

OpenGL object loader

I'm following a tutorial on Youtube for OpenGL with LWJGL 3 game development by ThinMatrix. Got to loading custom .obj files. I can only run the provided stall and dragon object. Cannot run my own ...
0
votes
2answers
34 views

LWJGL/OpenGL - Textured squares not displayed behind other transparent textured squares

I've a MapView class that contains many tiles (MapTile class, a tile can be in the background), vertex array object and vertex buffer object for rendering of the map. I also have a function that ...
0
votes
1answer
87 views

Textures problem in LWJGL VBO`s

I`m working at VBO terrain renderer. Now i have two troubles: While try to render 100x100 terrain I have a 50x200 terrain Textures is not rendering. I spent really much time about it, and I have ...
0
votes
1answer
196 views

Poor performance with LWJGL VBO triangles

I'm new to OpenGL and LWJGL & I have a question about rendering using VBOs. I rendering 50*50 objects using VBOs. Each object has its own render method where binding of the position, rotation. ...
1
vote
1answer
188 views

Should I switch to a game development library?

I'm making an RPG-like 2D game from scratch with Java. By now I'm in a pretty advanced stage with my game, but I encountered a problem- my game using too much CPU. I know it's because my game loop ...
0
votes
1answer
95 views

What are the different attributes of a vertex array object (VAO)?

What are the 16 attributes of a VAO? 0. vertex position 1. vertex colours 2. normal vector 3. texture coords 4. ??? 5. ??? 6. ??? 7. ??? 8. ??? 9. ??? 10. ??? 11. ??? 12. ??? 13. ??? 14. ??? 15. ???
0
votes
1answer
219 views

Rendering to framebuffer / multiple rendering in a frame makes geometry black

I'm trying to adapt the shadow-mapping process given on this microbasic guide into my game, it's made with LibGDX. I've run into a blocking point with the creation of the shadow buffer via rendering ...
0
votes
1answer
452 views

LWJGL—How to Animate and Render Characters Using a Sprite Sheet

I'm making an RPG similar to Super Nintendo RPGs in the early '90s. I'm handling movement much like Squaresoft's Final Fantasy IV. Notice that the player never actually changes his x and y positions ...
1
vote
2answers
207 views

Why is my sliding AABB collision acting strange?

I'm working on a Minecraft like game engine and recently I've been trying to add good collision response which I have kind of. The collision response is perfect when I try and go through the right ...
1
vote
1answer
131 views

LWJGL—How to Animate Sprites from a Sprite Sheet Using Certain Keys? [duplicate]

I'm talking here about walking animations and such for a 16-bit RPG. I have a simple sprite sheet that contains walking animations for all directions (up, left, down, and right), but I'm having ...
0
votes
1answer
371 views

OpenGL glTexImage3D not working?

I'm trying to use arrax textures with opengl 3.3 since this the target version for my application. So I have to use the glTexImage3D() method instead of ...
1
vote
0answers
81 views

Why is the texture all wrong on my model?

Why is this happening? If possible I'd like to know what this particular problem is called. The model is a simple cube made in blender and exported with normals and MTL. Texture is the cube unwrapped ...
1
vote
0answers
32 views

Creating a playlist with LWJGL and OpenAL

I'd like to know how to create a playlist for the music in my games. I use LWJGL, and know a bit of OpenAL, however I can't figure out how to test for when a song is over. I want to be able to play ...
0
votes
1answer
82 views

Rotate LWJGL 2 Vector4f by an angle around an axis

There is a method in LWJGL 2 to get the rotation Matrix around an axis with a certain angle- ...
1
vote
1answer
826 views

LWJGL 3 how to convert screen coordinate to world coordinate?

I'm trying to convert screen coordinate to world coordinate on mouse click event. For LWJGL 3 there's not GLU utility class is available whereas LWJGL 2 has. I'm using JOML math classes and wrote ...
0
votes
1answer
51 views

Float array not connecting with OpenGL Shader

I first tried using a float[][] to get the height of a particular area but OpenGL didn't want to and it was much simpler to just use a flat multi-dimensional array instead. However, that array is not ...
0
votes
0answers
36 views

Cube not being textured correctly

I am trying to make a cube be textured, however the texture is being stretched and does not line up very well. I've heard some say it was a problem with the texture coords - is this so and how would I ...
1
vote
3answers
322 views

How to render multiple triangles using single VBO in OpenGL (LWJGL)?

I'm new to OpenGL and trying to render multiple triangles using single VBO in using LWJGL3. I've followed demos and read some books and wrote following code, but its not drawing my shape. I use vertex ...
0
votes
2answers
225 views

How to increase render distance?

I've been trying to find the source of why my render distance is so low (I'm new at using LWJGL and don't know the complete basics yet) and I believe it falls down into this code. My idea for my game (...
0
votes
0answers
43 views

DuDv Map has seams

I've made a dudvMap to give my water a ripple effect, however it is giving it a repeated look and I can see the areas where two textures on the water meet It's a little hard to see here, but if you ...
0
votes
0answers
25 views

xLight seems to have natural attenuation? - LWJGL

I've been trying to fix what I thought to be a shading issue for most of today and I have now found that the problem is that the light(Sun in this case) becomes dimmer the farther from the source it ...