Questions tagged [opengl]

OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. Currently, OpenGL is used for applications like CAD software and computer games. It is also cross-platform. The OpenGL standard is controlled by the Khronos group, which also controls OpenGL ES.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 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 ...
3
votes
1answer
215 views

GLSL shader algorithm to render a sprite map with a single draw call (on a single sprite mesh)

I'm trying to render a tile map world on a single sprite mesh (instead of one sprite per tile.) This significantly reduces the array vertex bus labor for extremely large worlds: In order to do this, ...
0
votes
0answers
51 views

What does the keyword “interface” mean in GLSL?

interface vs_out { vec3 get_color(); }; struct vs_out_impl : vs_out { vec3 get_color() { return vec3(1,0,0); } } Where is this behavior defined? ...
0
votes
1answer
57 views

I can't make the cube map to use shadow mapping - or it seems so

Basically, I'm following tutorials as I'm very new to OpenGL. I managed to perform shadow mapping towards just one direction, meaning I created 2D texture depth map. Now with omnidirectional shadow ...
0
votes
0answers
44 views

Rendering up close, OpenGL performance issues

I have been developing a massive RTS during the past 18 months, which is comming together nicely! Now i have an issue i can't really wrap my head around. If i render 100 models from a distance ...
0
votes
0answers
22 views

OpenGL 2D Batch Rendering: Textures mixing when having multiple active textures

This is what happens when I draw switching from the black texture to the lime green one in a simple for loop Here's a simplified version of how my renderer works Init(): Create my VAO and attrib ...
0
votes
1answer
40 views

What should the Z coordinate be after transformed by the projection matrix?

I'm working on an OpenGL 1.x implementation for the Sega Dreamcast. Because the Dreamcast didn't have any hardware T&L the entire vertex transformation pipeline has to be done in software. What ...
0
votes
1answer
23 views

Opengl the light position always on the origin point therefore the diffuse and specular does not work

I am newbie of opengl, so I did the tutorial by learnopengl. I have a strange problem when I was trying to do the light effect (ambient, diffuse and specular). For the diffuse, the effect appears on ...
0
votes
2answers
762 views

Nvidia RTX ray tracing OpenGL extension

I can't seem to find any OpenGL headers for the RTX ray tracing extension, seems like they only want you to use Vulkan and optix with RTX
1
vote
1answer
53 views

OpenGL strange depth test behavior

I have a simple OpenGL program that renders terrain with a texture. It exhibits some strange behaviors (see video) that look similar to depth test issues. However, I have already enabled depth test. ...
0
votes
0answers
34 views

Weird behaviour with glsl shaders

Dear people from the forum, I am trying to develop a game prototype which uses OpenGL and I am designing the entire graphic engine. My game requires some tricks with the shaders, and therefore I had ...
4
votes
1answer
608 views

How to make Volume Heat Distortion effect in OpenGL?

I'm working on adding volume effects to an existent, open-source game engine. At the moment, the engine only supports two dimensional "thruster" bitmaps with a planar heat distortion drawn over the ...
0
votes
1answer
34 views

Model gets distorted when rotating the camera

I'm currently developing my own 3d graphics engine and I'm having a hard time figuring out why my 3D models gets distorted when rotating the camera around. This is my projection matrix. I'm following ...
0
votes
1answer
51 views
0
votes
1answer
84 views

Animate some tiles of tile map

I have a game where each "tile" of the terrain is a triangle (Settlers 2). Those are placed next to each other and in way creating an infinite world (right/bottom jumps back to left/top). There is a ...
9
votes
3answers
647 views

How to hide a post-processed mesh outline when/where the mesh is hidden

I'm working on setting up an active outline in my 3d engine, a highlight effect for selected 3d characters or scenery in the screen. After working with the stencil buffer and getting some ...
1
vote
1answer
227 views

Show only some parts of a point cloud. OpenGl4

I am developing an opengl 4.0 app which is showing a point cloud. In the other hand, I have an array "pos" where I have some x,y,z positions: ...
0
votes
1answer
525 views

LibGDX - Draw multiple textures with different positions with one shader?

currently I'm optimizing my render calls by drawing multiple textures with one shader. The background textures who all share the same position are no problem. But now I want to draw some Textures with ...
2
votes
2answers
304 views

draw two models changing the MVP matrix (android opengl)

I'm newbie with opengl2 in android, and I'm making an app in which I'm testing some things. Now I was trying to duplicate a sphere object with a texture, so I thought it was enough to change my MVP ...
0
votes
1answer
51 views

How to deal with VBO and obj files for physics simulation?

I'm having a hard time struggling with obj files and clothing simulations. I first made the obj file processor class that deals with the typical obj file problem: having multiple indices for vertex ...
0
votes
1answer
121 views

How can I access an OpenGl buffer from within a GLSL 330 shader?

I am currently attempting to create a simulation using OpenGl's GPU acceleration for both the simulation computations and rendering. The rendering portion of my simulation is complete and working, but ...
2
votes
1answer
500 views

Specular Light not working (Phong Lighting)

There seems to be a problem with my current Phong Shading implementation. I have been using the per fragment approach. The specular highlight aspect of the technique is not rendering as it should, as ...
2
votes
1answer
129 views

How can I create a pixellated, limited-palette appearance in modern OpenGL?

I wanna get some old art style (256 color, dithering, etc) in modern OpenGL in an effective way. Maybe using a low resolution (320x240) rendered at a bigger space so that the pixels looks "bigger?" I'...
4
votes
1answer
2k views

Drawing fonts with LWJGL3 with OpenGL

I'm very sorry if this question has already been answered, but since I've been struggling with this for many days I thought I'd give it a shot here. My goal is to somehow render some text on the ...
2
votes
0answers
29 views

Strange normal mapping artifacts - OpenGL / GLSL

I have been following a few tutorials to learn some graphics programming with OpenGL, and recently implemented Normal Mapping. It works well for the most part, especially for objects with normal-...
0
votes
2answers
236 views
0
votes
1answer
150 views

OpenGL Parallax Displacement Mapping Not Working

I am attempting to implement parallax displacement mapping into my OpenGL code but it is not working as it should. https://imgur.com/a/9yIQL As I move around, double-lines moves around and if I am ...
0
votes
1answer
24 views

Graphic render speed in libgdx using many sprite sheets

I am currently working on a customizable Player-character for my top down view 2D pixel game. I am using libgdx and aiming for android devices as well as desktop applications. I am wondering about an ...
0
votes
0answers
18 views

Understanding ticksPerSecond and duration with skeletal animations

That's my first question here so i hope to do all correctly. From various weeks i started surfing the net about Skeletal animation aiming to add a simple animation controller into my small game engine....
3
votes
1answer
778 views

Why is my model rotating opposite direction around the Y axis?

I have a simple scenario. I have a simple scene, and in it I'm drawing a grid and a model, with some axis for orientation. I noticed when I rotate the model about it's local Y axis, if I rotate the ...
3
votes
1answer
620 views

Render Stutter - OpenGL or loop timing?

For some time now i have no been able to pinpoint the nature of the rendering stutter shown above(by not clearing the screen, not using SwapBuffers and drawing only to the front buffer). See the big ...
0
votes
1answer
183 views

Offset on camera following object that accelerates

I have camera a that is actively following an object (a plane) from behind. This object can accelerate or decelerate. I would like to have a camera offset when I move the plane, so it doesn't look so ...
2
votes
1answer
42 views

Flat Shading does not work correctly (openGL)

So currently I'm trying to implement flat shading into my engine using glsl's flat qualifier, and I have encounterd a really weird bug. Somehow the lightning on terrain isn't spread correctly, I want ...
1
vote
3answers
307 views

Where did I lose vertex binding?

I make OpenGL render framework for my bachelor graduate work. I created simple Model and Shader classes. But when I tried to render some vertices, they do not render. I saw with an OpenGL profiler, ...
2
votes
1answer
841 views

How can I draw multiple lines connected via “nodes” in libgdx Scene2D?

I have two Vectors which indicate the ending points of each line. I am trying to draw similar lines to football formation lines like these: My main problem using ShapeRenderer is: ShapeRenderer ...
0
votes
2answers
188 views

How can I represent a 2d UI?

So, I wanted to start building a desktop application, which is of course with an interface, and I thought that OpenGL would be best. The problem is, once I started following TheChernoProject's ...
4
votes
1answer
269 views

How to generate a multiplier map for radiosity

I am following this tutorial: here I am at the part where you are creating a hemicube. I have got the code to render the scene into a texture and therfore an array. Now how can I generate a so-called ...
1
vote
1answer
131 views

Frame Buffer Object (FBO) is not working. What is the right way to use?

I am trying to use FBO but i am living some problems. I will show you my steps but first i will show my running screen ,so we can compare them. Like before fbo after fbo. My running screen and Draw() ...
0
votes
1answer
38 views

How to properly scale from natural coordinates to screen coordinate system in OpenGL?

I am working on a Physics Engine, and I have been using opengl to visualize what it's doing. I think I have a scaling issue when going from natural coordinate system to the opengl screen coordinate ...
2
votes
0answers
27 views

issue with Compute Shader macbeth chart

I'm trying to generate a macbeth chart using the compute shader, but there seems to be an issue with the output image. here is the glsl code: ...
0
votes
1answer
304 views

Adjusting view matrix when glViewPort & resizing

I have an issue when my window resizes. I have a simple MVP shader like this gl_Position = projection * view * model * vec4(in_Position, 1.0); to render a map ...
3
votes
2answers
1k views

OpenGL GLSL using projection,view and transformation

I have been trying to get a simple triangle to render on the screen. I am using Projection, View and Transformation matrices but am unable to get anything to the screen. Main loop ...
0
votes
1answer
94 views

C++ Mouse picking for ray to plane intersection

I'm making a C++/OpenGL application (decidedly without GLM), and I'd like to understand how to create a ray from the camera eye to the mouse pointer, as well as detect an intersection point from the ...
0
votes
1answer
44 views

Synchronizing with monitor refreshes without vsync

What is the preferred way of synchronizing with monitor refreshes, when vsync is not an option? We enable vsync, however, some users disable it in driver settings, and those override app preferences. ...
0
votes
1answer
34 views
0
votes
1answer
61 views

Strange GLSL performance problems

I'm having weird performance problems with a GLSL shader I'm working on. This small example fragment shader: ...
0
votes
1answer
192 views

Create a white background for the texture and then blend using GLSL

I have a transparent png texture and I'd like to create a white background and then blend this on top of that. Is this possible using just GLSL? I can't multiply, add or mix colors because I don't ...
0
votes
1answer
72 views

Can I use glTranslate and glRotate when my GLSL Version over (#version 120)?

I was using "GLSL Version #120". But now i am trying to do one tutorial and it is using "gl_ClipDistance[0]" inside of vertex shader. And "GLSL Version #120" doesn't support "gl_ClipDistance[0]". Now ...
0
votes
1answer
138 views

Billboard quad in same draw call?

I am currently drawing a isometric world in 3D, meaning the floors and walls are all quads aligned to the original axis in the world and using a rotated orthogonal camera to "distort" the images into ...
1
vote
1answer
769 views

Depth texture white in shader

I am trying to implement shadow mapping into my project and am stuck at this problem: If I'm reading the shadow map values with glReadPixels and linearize those ...