Questions tagged [lwjgl3]

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

Filter by
Sorted by
Tagged with
3
votes
3answers
591 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 ...
2
votes
1answer
925 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.
2
votes
1answer
65 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
2k 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
498 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
vote
1answer
229 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
206 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 ...
1
vote
1answer
205 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 ...
1
vote
1answer
677 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
60 views

LWJGL 3 HelloWorld example crashing

I'm trying to start LWJGL 3 development and I am having an issue with getting things working. I have created a new Gradle project and successfully built the HelloWorld example from https://www.lwjgl....
1
vote
1answer
286 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 ...
1
vote
0answers
55 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 ...
1
vote
0answers
422 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
188 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
67 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
121 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
2k 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
61 views

Faster way to load VBOs in LWJGL

I'm currently working on a Minecraft clone for a university project and I'm having some trouble loading a lot of chunks at the same time without reducing performances. What I'm currently doing is: ...
0
votes
1answer
122 views

Coordinate system not working properly! OpenGL

I am learning opengl and tried to add texture to a rectangle using ...
0
votes
1answer
738 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
2answers
19k 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
1k 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, ...
0
votes
2answers
194 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
1answer
335 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
172 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
246 views

Mac OSX GLFW Fullscreen Crash

Whenever I run my code to make a fullscreen GLFW window, it crashes. Here is the code: ...
0
votes
2answers
722 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
1answer
716 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 ...
0
votes
0answers
26 views

Rendering a quad using VAOs and VBOs in LWJGL 3 doesn't work

So, I just started learning LWJGL 3 and I used a mixture of a couple of tutorials and example code to make something that should render a rectangle to a magenta screen using VAOs and VBOs. There are ...
0
votes
0answers
28 views

Confusion about updating and rendering camera in different threads

So basically my problem is that the camera is stuttering and seems to just completely stop updating when moving. It's not exactly a stutter because the camera slows and and also stops for split ...
0
votes
0answers
57 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
1answer
144 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 ...
0
votes
1answer
29 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 ...
0
votes
1answer
332 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 ...
0
votes
1answer
38 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
407 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
952 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 ...
0
votes
2answers
198 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 "...
-1
votes
1answer
978 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.