My goal is to draw and animate 2D UI elements on the screen. The problem is, I’m not exactly sure how I can animate it without taking up a lot of space doing so. This is what my method would look like to draw a red rectangle at 0, 0 with a width and height of 50 Now, what I
Tag: opengl
Trying to implement model batching for opengl not sure why it’s not showing anything
I am trying to implement model and sprite batching for a game engine I am working on, trying to test it on GUI Renderer but can’t get any results, errors or anything drawing to the screen am I doing something wrong I will link the Github page for the full code but here is the code for MeshBatch class and
OpenGL (LWJGL 3) culling terrain vertices/triangles that are not in the view frustum
I am trying to implement frustum culling in my 3D Game currently and it has worked efficiently with the entities because they have a bounding box (AABB) and its easier to check a box against the frustum. On saying that, how would I cull the terrain? (it physically cannot have a AABB or sphere) The frustum class (I use the
Lwjgl window not opening
So I trying out lwjgl but I’m having a problem, when I try to create a window I get an error I just can’t figure out why. I have tried to lower my java version from java 16 to 14 but that didn’t work. Main Class: when I run my main class I get this error (on java jdk 16):
How to retrieve a GL2 instance?
I am currently writting a game with the JOGL bindings to use OpenGL but I am so struggling on this. I need to initialize my vaos and vbos (for each component) using the GL2 variable that I collected in the init method in the class that implements GLEventListener. Like so, But this variable is null when I want to use
LWJGL: glMapBuffer/Range what is the use of old buffer?
It prints out all zero’s but the new buffer contains the correct data which is fine. And if i specify null as parameter for the old buffer it works fine too. So is there any optimization/memory saving being done behind the scenes when using an non null old buffer? The output is the same for LWJGL 2.9.3 and 3.1.3 Answer
ERROR: 0:3: error(#279) Invalid layout qualifier ‘location’
i am trying to follow a tutorial and when i try to compile the vertex shader he made i get this output: I use GLSL 3.2.9232 and my code : Answer Input layout locations qualifiers (see Vertex shader attribute index) are introduced in in GLSL 3.30 and cannot be used in GLSL 1.50. Compare OpenGL Shading Language 3.30 Specification and
How to fix compatibility issues between GLSL version 1.5 and version 3.0 ES
I’ve recently come back to working on an old passion project of mine (I last worked on this 2 years ago for the last time) which uses GLSL shaders. The project uses a whole bunch of shader files like this: I get the following error when running the program using this file: I’m assuming that in the last 2 years
How to properly use open gl calls with libGDX
I am trying to render a terrain using my own shader and by using low level open gl methods. But other parts of the game use SpriteBatch and other GDXlib render classes. My openGL code for terrain renders correctly until I make a call to: or something similar like: After that call, my openGL code just not draw anymore. No
Why does java app crash in gdb but runs normally in real life?
Attempting to run java app from gdb results in segfault, yet running app alone does not. This app is a .JAR which uses JOGL and a bit of memory-mapping to talk to the GPU. Stacktrace below hints at …