Questions tagged [lwjgl3]

LWJGL is an open-source cross-platform library in Java for game developers.

Filter by
Sorted by
Tagged with
0
votes
0answers
38 views

Depth Test Problems with LWJGL3 (GLFW)

I know: similar questions have been asked - but I didn't find a solution. So at first the basic problem: It seems that convex Models (currently I load them from .obj files) render fine, but concave ...
0
votes
0answers
36 views

LWJGL 3 - problem with flickering when rendering terrain with colors

For while now I m trying to built a terrain generator for my game engine and again I'm stuck with problem. I'm trying to generate a terrain using colors, so no textures. In short my problem is ...
0
votes
0answers
34 views

I need help debugging this Spotlight implementation

I'm hoping someone can help me debug this wacky implementation of a Spotlight done in Java LWJGL that I found online. Basically, I found the bug, but I cannot figure out how to fix it so that the math ...
0
votes
1answer
47 views

Rendering multiple textures on same image for terrain with index buffers (LWJGL 3)

I have started with LWJGL3 and trying to built game engine. I'm stuck on generating terrains and this is my second big problem and I'm exhausted so I need some advice on how to solve my problem. What ...
2
votes
1answer
35 views

Problem with rendering multiple textures from same image (LWJGL 3)

I have started with LWJGL3 and trying to built game engine. I'm stuck on generating terrains. I have one image that contains two textures. So now for example I want to generate terrain with only ...
1
vote
1answer
152 views

LWJGL3 shader code doesn't work

So I made a program to draw a simple cube with colors at each vertex. The program worked fine until I added shaders. It was using vbos and indicies and it did draw a colored cube like it should. So ...
0
votes
1answer
27 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
1answer
185 views

I don't understand code that builds 3D sphere

I'm trying to learn some lwjgl and opengl, and I was trying to make a 3d sphere etc, I found a code to do that, but I don't 100% understand the code and the math behind it and would like to get some ...
1
vote
1answer
146 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
1answer
222 views

How to rotate a sprite in 2D with LWJGL3 and GLSL

I have all the basic rendering already set up, with translation, scaling etc. What matrix(s) and/or vector(s) do I need to multiply/add with my existing code to rotate an object. Preferably around a ...
1
vote
0answers
54 views

Missing any kind of lights?

I am trying to make my first 3D game in OpenGL with Shaders (LWJGL3) I read and follow a lot of tutorials but can't figure it out what kind of light I am missing here? The wall doesn't get any effect ...
0
votes
1answer
32 views

OpenGL (Java) FrameBuffer DepthTexture doesn't works

I have written a Java class for a FrameBuffer and the DepthTexture is simply black or white depending on the order of the creation of the DepthTexture and DepthRenderbuffer. If the ...
0
votes
1answer
280 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 ...
0
votes
1answer
98 views

Coordinate system not working properly! OpenGL

I am learning opengl and tried to add texture to a rectangle using ...
0
votes
1answer
909 views

How to use quaternions with JOML and LWJGL3

I'm implementing a space fps game (there is no up or down in space!) using LWJGL3 and JOML (math library). Entities in my game have a rotation based on the Forward, Up and Right vectors. I use pitch, ...
1
vote
0answers
359 views

How to load data from stbi allocated memory into java managed memory?

LWJGL3 provides me with simple wrappers around nothings' stb libraries. In order to load images I thus make use of the stb_image wrapper. My issue is that when I use this wrapper library, all I get ...
1
vote
0answers
137 views

Loading WAV and MP3 files with LWJGL 3?

Whenever I research audio in LWJGL 3, they always use STB which can only load Ogg files. All of my audio files are in either WAV or MP3 format, and it would be annoying to have to convert all of them. ...
1
vote
0answers
66 views

When should I use auto-managed buffers in LWJGL 3?

LWJGL3 has two methods of creating buffers that I know of: Auto-managed buffers that clean up the buffers automatically using the MemoryStack class, and manually managed buffers that must be manually ...
1
vote
1answer
1k 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 ...
1
vote
3answers
386 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 ...
-1
votes
1answer
692 views

LWJGL3 key released and pressed

How to make a method in LWJGL 3 that when you press a key it tells you when its pressed and when its released only one time.
0
votes
1answer
711 views

OpenGL drawing multiple polygons with different colors with VBOs

I'm trying to change my program to use VBOs instead of immediate rendering for performance reason. The rendering consists of thousands of hexagons, all of the same size/shape. Each hexagon has a ...
1
vote
1answer
565 views

How do I get antialiasing in LibGDX with the LWJGL3 backend?

Updated to the LWJGL3 backend for LibGDX to for controller connect / disconnect functionality and access to geometry shaders and I'd rather not go back. There used to be a "samples" field in the ...
1
vote
1answer
154 views

Does GLSL support multitexturing?

I am using LWJGL libraries to code myself a game. I want to be able to import a project from blender to my game. I have the wavefront .obj reader and it works perfectly for my needs. Although because ...
3
votes
3answers
472 views

glDrawElements/Arrays not working

Given the following OpenGL call stack. According to my knowlegde, the calls to glDrawElements/Arrays are ok.(?) But, they do not draw anything. (There is no triangle) The calls to glBegin() and ...
0
votes
2answers
167 views

Is Orthogonal in LWJGL 2D or 3D?

I'm attempting to develop an orthogonal game with lwjgl 3 and OpenGL in Eclipse, but I can't find an answer for rendering objects in 2D or 3D. Are both applicable? And if so what are the advantages of ...
0
votes
2answers
159 views

LWJGL - My glsl code somehow does not work

I am following the tutorial "3D Game Development with LWJGL3" using LWJGL 3.0.2(stable) https://www.gitbook.com/book/lwjglgamedev/3d-game-development-with-lwjgl/details I am following the chapter "...
0
votes
1answer
298 views

Lwjgl on android

How do I compile a lwjgl program written in java with openGL and glfw to run on android. I Should use openGL es for android..But how to create context for gles and input for touch screen. Update: ...
0
votes
1answer
138 views

Heightmap vertex list to vertex + index list

Right now I'm trying to load a heightmap into my LWJGL application. I load it like that into a float[][] array and I can read the height value at a given x and z position in the map: ...
0
votes
1answer
610 views

LWJGL 3.0.0 glMapBuffer

I am currently working on a project and usually in C++ I use the function. ByteBuffer glMapBuffer(int target, int access) usage: ...
0
votes
1answer
192 views

Mac OSX GLFW Fullscreen Crash

Whenever I run my code to make a fullscreen GLFW window, it crashes. Here is the code: ...
2
votes
1answer
752 views

Setting up a custom cursor image in LWJGL 3

How can I load a custom cursor image with LWJGL3? It took me a while to figure this out. Here is how it is done for version 3.0.1. Hope this helps.
0
votes
2answers
559 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: ...
0
votes
2answers
15k views

How is it possible to call abstract methods from another class? [closed]

Im creating a game using LWJGL and just as a bit of organising I made an Abstract class called Game so I could extend Game in my main class The game class is like so - ...
0
votes
1answer
644 views

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

I am a beginner in Slick2D. I use jarspliceJarSplice to output Slick2D game. But, but it is export all thingexports everything into one jar. I want to export one jar with the res andand native ...
1
vote
1answer
120 views

TiledMap render uses 15% of my 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 ...
0
votes
2answers
1k 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 ...