Questions tagged [lwjgl3]

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

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

Why does object not show?

I would like to tell about my home made exercising step to step with LWJGL and Java. But I don't understand why does matrix shut up? Transformation.java: ackage Example; ...
user avatar
1 vote
0 answers
85 views

Java/LWJGL 3 Optimization and Render error

(I asked the same question on StackOverflow but didn't got an answer. It's the first time I post here so idk if this is not allowed or anything, so if it is please tell me) I was following ThinMatrix'...
user avatar
0 votes
2 answers
91 views

Vertexes passed to OpenGL becoming zero

I've got two methods of test code. The first uses a single VBO with the vertices and texture coordinates interwoven to draw a square to the window. The second uses an array of three VBOs to define the ...
user avatar
0 votes
0 answers
41 views

Problems arise when using a VBO compared to a uniform for mat4

I've been learning LWJGL and was originally using instancing and using a uniform to send all the mat4 data to the shader for the individual positions. I'm trying to switch to using a VBO for this ...
user avatar
0 votes
1 answer
158 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....
user avatar
0 votes
1 answer
116 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: ...
user avatar
0 votes
0 answers
89 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 ...
user avatar
0 votes
1 answer
351 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 ...
user avatar
2 votes
1 answer
101 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 ...
user avatar
1 vote
1 answer
489 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 ...
user avatar
0 votes
1 answer
35 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 ...
user avatar
1 vote
1 answer
317 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 ...
user avatar
  • 11
1 vote
1 answer
288 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 ...
user avatar
0 votes
1 answer
527 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 ...
user avatar
1 vote
0 answers
58 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 ...
user avatar
0 votes
1 answer
43 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 ...
user avatar
  • 101
0 votes
1 answer
510 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 ...
user avatar
0 votes
1 answer
263 views

Coordinate system not working properly! OpenGL

I am learning opengl and tried to add texture to a rectangle using ...
user avatar
0 votes
1 answer
2k 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, ...
user avatar
1 vote
0 answers
511 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 ...
user avatar
  • 1,962
1 vote
0 answers
271 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. ...
user avatar
1 vote
0 answers
71 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 ...
user avatar
1 vote
1 answer
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 ...
user avatar
  • 125
1 vote
2 answers
711 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 ...
user avatar
  • 125
-1 votes
1 answer
1k 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.
user avatar
  • 133
0 votes
1 answer
1k 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 ...
user avatar
2 votes
1 answer
953 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 ...
user avatar
1 vote
1 answer
271 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 ...
user avatar
3 votes
3 answers
730 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 ...
user avatar
  • 143
0 votes
2 answers
244 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 ...
user avatar
  • 101
0 votes
2 answers
247 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 "...
user avatar
0 votes
1 answer
420 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: ...
user avatar
0 votes
1 answer
227 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: ...
user avatar
0 votes
1 answer
897 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: ...
user avatar
0 votes
1 answer
282 views

Mac OSX GLFW Fullscreen Crash

Whenever I run my code to make a fullscreen GLFW window, it crashes. Here is the code: ...
user avatar
  • 1
2 votes
1 answer
1k 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.
user avatar
  • 165
0 votes
2 answers
835 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: ...
user avatar
  • 275
0 votes
2 answers
22k 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 - ...
user avatar
  • 11
0 votes
1 answer
779 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 ...
user avatar
  • 3
1 vote
1 answer
122 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 ...
user avatar
  • 11
0 votes
2 answers
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 ...
user avatar
  • 1,106