Skip to main content

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
1 vote
1 answer
835 views

I want to create an orbit camera with zooming, panning, and rotation. I used the following examples to create cameras: https://stackoverflow.com/questions/54400422/how-to-implement-altmmb-camera-...
Wusiki Jeronii's user avatar
1 vote
1 answer
1k views

I tried asking this on reddit but I didn't get any answers so I might as well try here So I'm making a program to generate some terrain and it's not giving me the results I expected. It's drawing ...
Chillzy's user avatar
  • 47
0 votes
1 answer
1k views

Instead of using a vector of floats, i want to use a struct, so that it can store different types and is easier. ...
ihsan's user avatar
  • 73
1 vote
1 answer
337 views

I'm rendering a cube with a texture mapped to all sides of it and somehow the alpha channel from the texture isn't being applied on one side of the cube. all other sides are rendered properly (...
Johan Lindfors's user avatar
3 votes
1 answer
870 views

I got simple hp bar container from open game art, rendered the texture and now I am wondering how to fill it and change the amount of filling. I decided to render red rectangle over the container and ...
Steyrix's user avatar
  • 279
2 votes
1 answer
982 views

I read the khronos docs on Vertex Array Objects, and it says that VAOs do not copy any data but refer to VBOs and EBOs/IBOs. So i created an abstraction class vbo which creates a vertex buffer from a ...
ihsan's user avatar
  • 73
0 votes
1 answer
732 views

In Unity, whenever I rotate an object, it also performs a translation. If I simply try to draw a quad with the quaternion used in Unity, it appears off because of that missing translation unity ...
hexley's user avatar
  • 5
0 votes
0 answers
160 views

I am using C++ glew/glfw to make a game, and I currently have different areas of the map and different entity classes using their own VBO's. So far this decision has been informed from a large part of ...
Jack Freeth's user avatar
1 vote
1 answer
571 views

I have a very simple shader here: ...
Liyuu_'s user avatar
  • 31
1 vote
0 answers
82 views

My team and I released our game on Steam last year for Windows, Mac, and Linux. The game is written in C++ and uses SDL2, including SDL2_image, SDL2_ttf, and OpenGL for graphics. Around the middle of ...
Nicolas Ford's user avatar
-1 votes
1 answer
422 views

I'm working on a batch renderer. I'm limited to using one shader per batch (one draw call for everything). I want to use a TBN matrix for my lighting. To calculate the TBN matrix for each object I ...
J. Doe's user avatar
  • 101
0 votes
1 answer
3k views

I am trying to implement collision detection system in opengl and c++ and I have a few qustions about best directions. I will just explain my ideas. So, I have a cube and a sphere as a basic collision ...
Žarko Tomičić's user avatar
0 votes
1 answer
160 views

I have followed the learnopengl.com tutorial on skeletal animation, but it does not apply shadow on the animated model. Here is the vertex shader that is used to display the character. I suspect that <...
HenriV's user avatar
  • 67
0 votes
1 answer
143 views

We have implemented a glow map into our renderer. It basically uses a blur filter on the glow map pass. But, I cannot figure out how to do tracers in OpenGL. Someone suggested using a couple of ...
shawn_halayka's user avatar
0 votes
1 answer
452 views

I am implementing depth of field. My fragment shader has the following code in it: ...
shawn_halayka's user avatar
0 votes
1 answer
270 views

I'm having trouble with hidden line removal in OpenGL 4. I use a vertex/geometry/fragment shader to draw the lines. I call glDepthRange(0.01, 1.0); before I draw ...
shawn_halayka's user avatar
0 votes
0 answers
133 views

I cannot work out why my blur shader based on this example affects only what's inside the illuminated sphere. Below is the loop I'm using to blur an HDR framebuffer 5 times horizontally and vertically ...
Sina Dasht's user avatar
0 votes
1 answer
543 views

I am writing simple tiled map based game using LWJGL and Kotlin. I am testing out different collision detection algorithms and avoid using out of box solutions for personal reasons. I figured out that ...
Steyrix's user avatar
  • 279
0 votes
1 answer
135 views

I'm trying to implement the gimbal lock fix described in this question, but I end up getting weird behavior where when I rotate on the X axis (or try to at least) it rotates on both the X and Y axis ...
CaptainLupa's user avatar
0 votes
0 answers
63 views

I have a class that manipulates a model matrix in opengl: ...
Aziz Hakberdiev's user avatar
0 votes
1 answer
500 views

I want to render multiple colored quads, with one solid color per quad, using WebGL 2.0 and Javascript. However, this question is probably generalisable to other OpenGL implementations as well. The ...
Anders's user avatar
  • 243
0 votes
0 answers
75 views

I'm trying to make a voxel game while learning about OpenGL. The world is made up of many chunks of voxels. Therefore there is a Chunk class, containing an array of ...
Will Mungas's user avatar
2 votes
1 answer
1k views

I have spent three weeks struggling with the quaternion camera! Now I have two Implementations. One has some kind of gimbal lock issue or something like that. Another one is totally anti-human ( I ...
potter john's user avatar
2 votes
1 answer
910 views

I am creating a voxel game with OpenGL, and I would like to implement water. My voxel world is divided into chunks of 16x256x16 cubes (or voxels). Each chunk has its own VAO with two VBOs, the first ...
Vincent's user avatar
  • 73
0 votes
0 answers
219 views

I am making a game from scratch using OpenGl and GLFW. Since my motivation is to learn computer graphics, I am using my own explicit math functions for rotation and translation. My current rotation ...
Anmol Chauhan's user avatar
0 votes
0 answers
431 views

I haven't used OpenGL for a long time and have trouble setting up a 2D screen where the upper left window coordinates are (0,0) and the width and height of the ...
stuv_2028's user avatar
0 votes
1 answer
143 views

As the title suggests, I'm battling with getting the legs of my model here to rotate properly. They rotate in the middle instead of at the top where the knee joint would be. So far I've tried ...
Fenrir Gaming's user avatar
0 votes
1 answer
360 views

I am trying to implement following: What are the l r b t units? I understood that r-l= is just ...
Denis's user avatar
  • 131
0 votes
1 answer
266 views

I am practically pretty new to OpenGL development and right now doing some research in Java with LWJGL. But it's really not a question about Java or C++ (GLFW, etc.). It is about OpenGL > 3 api. ...
Edgar Alloro's user avatar
0 votes
1 answer
99 views

I'm trying to make a basic snake game with OpenGL. I hold all the game object locations in a matrix called MAP. And when i render them, i operate the location info ...
anbvy's user avatar
  • 5
0 votes
1 answer
509 views

I am programming the editor for a RTS game and I have created the following: I am trying to modify the terrain so that it is not completely grassy. I am intending to add functionality so that I can ...
rjhwinner03's user avatar
0 votes
0 answers
156 views

I'm trying to render a simple scene I exported from unreal engine. I exported it as gltf, and it appears ok in blender and windows preview. but while loading this model in my code, I have no idea how ...
Joao Pincho's user avatar
0 votes
2 answers
1k views

I have been using OpenGL and Directx11 extensively for my engine. The thing is, when I wanted to support DX12 or Vulkan, I realized that they collect all the state data in one place, removing the ...
Barış Üçkardeş's user avatar
0 votes
1 answer
352 views

I'm following a tutorial and I want to clamp all position values of a triangle between 0 and 1 then output them as a color this is the code for my vertex shader: ...
ViperTheGuy's user avatar
0 votes
1 answer
486 views

For my game engine, I would like to be able to load all of the matrices (i.e. mvp, model, etc.) once per frame to save a bit of time, and have a set of uniforms that any shader can access by using ...
hoZer's user avatar
  • 1
0 votes
0 answers
631 views

I am in the process of writing a 2D game in Rust, and decided to use glium for the graphics part. So far I'm doing fine, able to render textures and shapes ...
AndroGR's user avatar
1 vote
1 answer
1k views

Using the definition of quaternion rotation given here: So the equivalent code in GLM of the above formula would be like this: ...
peter's user avatar
  • 21
1 vote
1 answer
262 views

I am programming a Real Time Strategy game, and I was wondering how I could retexture one part of a terrain quad to change a texture in the position where I click at. For example, if I clicked in the ...
rjhwinner03's user avatar
-1 votes
1 answer
339 views

I am trying to make a terrain editor for my Empire Earth OpenGL clone engine. Are there any articles of how to generate terrains in real time? It would be cool if it had pseudocode, even cooler if it ...
rjhwinner03's user avatar
0 votes
1 answer
195 views

I have the following vertex and fragment shaders, adapted from this shader on shadertoy. Vertex: ...
NeomerArcana's user avatar
0 votes
2 answers
356 views

I have a question. I am following ThinMatrix's tutorial on YouTube which is about making a 3d game with lwjgl. He uses OpenGL v3.0 and higher. However, my built-in graphic card supports only OpenGL ...
Yuri's user avatar
  • 3
0 votes
0 answers
263 views

I am developing a game and using OpenGL for graphics API and NVidia PhysX for the game's physics. Recently I implemented skeletal animation from this site. The objects are read using assimp which ...
Mike F's user avatar
  • 103
0 votes
1 answer
4k views

I have an example from a LearnOpenGL tutorial which loads the animations. Now, I want to use that to render FBX animation, but the result is totally wrong. What I want is simply to load an FBX ...
Nicholas Jela's user avatar
0 votes
1 answer
339 views

So I have a problem, I am calling some opengl frame buffer functions in my code but for some reason I get the error from the title. I am also calling many other opengl functions without any problems ...
Žarko Tomičić's user avatar
0 votes
1 answer
277 views

I'm writing an OpenGL/DX11 Windows/Linux "engine" and I've encountered a confusing behavior in DX, specifically. For math, I'm using GLM, which means all of my HLSL ...
pdm's user avatar
  • 103
0 votes
1 answer
472 views

I wanted to write small software renderer that will follow almost the same flow as OpenGL does, but got stuck with understanding of the rendering pipeline. After reading tons of info across the ...
Yurii B's user avatar
1 vote
1 answer
358 views

I try to implement screen space reflections in my graphics engine using ray marching algorithm. After a lot of trying I got this result: https://youtu.be/yzkgpcliBVQ As you can see, the reflections ...
Алексей Карамбович's user avatar
0 votes
0 answers
149 views

How would I make it so that rather on the game screen the GUI is on the side of the screen and puts the game screen in its own little area so that its not covering part of the screen because right now ...
Zwei's user avatar
  • 1
0 votes
0 answers
129 views

I'm trying to set a look_at with the input of a view matrix, is there a way to do it? Because I know you can do the opposite (I think) where you set a look at and ...
Meyer Buaharon's user avatar

1 2 3
4
5
87