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
1answer
12 views

Are there any good techniques for reducing or smoothing stutter after a longer frame?

I've been using SDL2 with OpenGL to play around with some very basic game engine development. I'm running everything on a newer laptop with Linux and Intel integrated graphics. Regardless of whether ...
0
votes
0answers
15 views

Drawing outlines around 2D objects OpenGL

I am trying to draw an outline around any arbitrary object using OpenGL and shaders with a different color than the original object, while also retaining compatibility with alpha values <1. I am ...
0
votes
0answers
11 views

How to render in a imGui Window

I am learning OpenGL by glfw3 lib and I am using imgui to make a interesting application. However, I can not render what I want in a imgui window. I searched google and get below link: Render in a ...
0
votes
0answers
16 views

ECS as part of the rendering pipeline of an engine

I'm trying to integrate ECS design into my game engine. Currently I'm trying to mimic the components of unity (although not pure ECS) with MeshFilter (holds ...
0
votes
0answers
25 views

What information should be included in a render command?

I'm writing a 3D renderer for my engine and now that I'm working properly with a scenenode system, I've decided to implement render queues (command lists to some) and render commands. I wanted to know,...
0
votes
0answers
30 views

How to properly space characters for world-space text?

I'm following this very helpful tutorial to get text rendering. I've even fancied it up by caching all of my fonts to a single bitmap. Fun stuff. However, this tutorial assumes that text is going ...
0
votes
0answers
13 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
1answer
58 views

How to correctly reset vertex attributes after modification

I am trying to use the same vertex shader for two different use cases to preserve memory, but I am having issues where the modifications of one shader run are passed on to the next run, even after ...
0
votes
1answer
20 views

OpenGL stencil pipe

Is there a document describing 2D stencil pipe ? Static, no rotation etc. Something in more details then enable stencil (buffer) write stencil ( mask) to stencil buffer 1st pass write stencil ...
3
votes
1answer
110 views

How do open world game engines allocate memory?

My troubles I've been trying to create a game engine but since I am not well experienced in C++ I am having trouble deciding on how to load new scenes efficiently level by level or just an open world....
0
votes
0answers
50 views

OpenGL obj loader doesn't work

I made my own obj loader,i tried other's obj loader,but nothing works. Here's my obj loader: ...
1
vote
1answer
51 views

How do I initialise levels sequentially?

I have been learning opengl and I have made good progress over past few months. However I still struggle to understand game logic in C++, I am new to C++ too. Say I have this program. ...
0
votes
1answer
38 views

Debug in OpenGL & GLFW (version >= 4.3)

I try enable debug system in OpenGL with helps debug output in OpenGL version >= 4.3. My code: ...
0
votes
1answer
19 views

samplerCube for point light shadow map has dark corners relative to screen aspect ratio / size?

I almost have point light shadows working but the corner of the samplerCube that I use for the shadow map has corners that get darker depending on the main camera. Is this something to do with a ...
0
votes
0answers
20 views

Help with Minecraft-like AABB-AABB collision detection and resolution

I am currently working on a Minecraft like game with OpenGL and C++. I've gotten as far as abstracting a Camera object and setting up movement and even defining basic gravity like simulations, but I ...
0
votes
0answers
98 views

Terrain deformation via mouse in real time using OpenGL

The main problem I’m facing is how I can, given a spot on a terrain mesh (x and z coordinates) change the mesh so that the surrounding points also change height but will be less affected. What’s ...
0
votes
1answer
99 views

How to set the value of each index in a uniform array

I am currently implementing "instancing" into my game engine to allow the drawing of 1000 tree models following the tutorial found here: https://learnopengl.com/Advanced-OpenGL/Instancing. I have ...
0
votes
1answer
50 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
79 views

How should shader be structured? (GLSL)

I've been writing, deleting and rewriting OpenGL programs in C++ but usage of shaders confuse me. I don't know how it should be structured. Scenario A: (In a world we have a sun, the sun should ...
0
votes
1answer
52 views

Simplifying Camera Strafing

I have a camera that follows the position and direction of the player. These are updated using spin and velocity. The velocity is updated like so: ...
0
votes
1answer
90 views

Time to render each frame is proportional to the amount of models in the scene

This question is deliberately written in a "High-Level" manor to avoid screeds and screeds of code snippets, hopefully I can get my point across, I am using C++ and OpenGL. I have a game engine, and ...
1
vote
1answer
31 views

ASSIMP Skinning seems to be somewhat inverted

I'm currently implementing Skinning using Assimp as my asset importer. I've relied heavily on the following tutorial in order to skin meshes (http://ogldev.atspace.co.uk/www/tutorial38/tutorial38.html)...
0
votes
0answers
13 views

Using indices with UV texture coordinates [duplicate]

So I've been trying to make a simple 3d cube in OpenGL. Creating the vertices and indices was easy, but now I have to texture it. No matter how much I mess with the texture coordinates, some sides ...
0
votes
0answers
58 views

OpenGL viewport is stretched

For this project I am using GLFW, glad and glm. My window looks like this: The dimensions of the window are correct, but the viewport is stretched, making my square into a rectangle. How do I use a ...
2
votes
1answer
67 views

How to make shadows softer as distance increases?

I'm trying to make shadows become more blurry as the distance between the caster and receiver, so they look a little more realistic. What method can I use to achieve this?
0
votes
1answer
27 views

Close objects are only partially rendered - LWJGL [duplicate]

I'm working on a LWJGL project and I'm experiencing a weird problem: close objects stop being fully rendered as I move slightly away. I'm not very expert in OpenGL so I can't figure out what is ...
0
votes
0answers
33 views

Frustrum culling without per-mesh positions

I am trying to implement frustrum culling in a C++ renderer im writing but I feel like I hit a brick wall. The plan is to load the Sponza level and per mesh create a collision box using Bullet ...
0
votes
1answer
106 views

Is Windows window creation faster / more efficient than GLFW window creation?

Are there any benefits to using Windows window for OpenGL or Vulkan rendering, rather than using GLFW window? Is there any performance hits when using C++ Window creation over GLFW since it provides ...
0
votes
0answers
24 views

Rendering to framebuffer object not working

There is a problem when I am trying to render to texture from the framebuffer object. I get the message that the FrameBuffer Object is Complete but apparently all I get is a black texture. this is ...
1
vote
1answer
61 views

GLM conversion from euler angles to quaternion and back does not hold

I am trying to convert the orientation of an OpenVR controller that I have stored as a glm::vec3 of Euler angles into a ...
0
votes
0answers
46 views

Incorrect UV Sphere Mesh Generation

I am following the same algorithm to generate the mesh of a UV Sphere as described in this wiki: http://wiki.unity3d.com/index.php/ProceduralPrimitives#C.23_-_Sphere My implementation is in C++. I am ...
-1
votes
1answer
44 views

Render output difference cause

There are two 3D applications compared side by side: I'm looking for difference cause. These might be the cause, but I'm not sure: Color Lighting Shading code (GLSL) ? Can anybody help me with ...
1
vote
0answers
51 views

Is Loading Assets Before Game Start Necessary? [closed]

I am creating a relatively simple game engine that uses opengl. Do I need to create a system that loads all the 3d models / textures from files before the game starts, or is loading them during ...
0
votes
0answers
48 views

Tube model imported from Blender getting stretched vertically when rendering

I'm actually working on a 3D game engine with OpenGL 4 and C++. The problem is that, I don't know why, my geometry isn't well renderered except for primitives. At the right you can see a cube, it is ...
-2
votes
1answer
128 views

How to create GUI or Menu for games?

I've advanced quite well in OpenGL and in graphics. However I lack a lot of experiences. I have had this question in my mind since the beginning of my venture, how do I create UI or Menu for my game?...
0
votes
1answer
56 views

Confused about why my projection matrix works

My projection matrix was buggy, I'm not great at mathematics, but I checked it against the the songho tutorial, and the broken one seems correct to me but switching nearplane to farplane seems to ...
0
votes
1answer
32 views

Performance of Tristrip vs Indexed Triangles in OpenGL

Let's say that I want to take advantage of GPU transform cache and use tristrips for that purpose. In the first case we have three triangles: 012, 213, 234. In the second case we used tristrip ...
11
votes
2answers
5k views

Is it a good option to simultaneously work on a game and a game engine? [closed]

I'm considering this, now I work on 3d game but I want also to make in slow tempo, iteratively a game engine is it a good choice? The game what I working on is with non custom engine (Unity, Unreal ...
1
vote
1answer
63 views

How do rendering pipelines improve the performance of updating all the vertices every frame?

Let's say I am implementing a simple game engine, particularly the rendering part. From the high-level view we have some vertices which are copied to the graphics card alongside shader information etc....
2
votes
0answers
29 views

How to draw lines round selected objects and lights?

I need two things to draw in Modern OpenGL. Please see the image: Draw lines to represent light's position and direction Draw xyz axises at the origin of a selected objects How do I draw these? ...
1
vote
0answers
39 views

How to convert screen to world coordinates while using gluLookAt / gluPerspective or similar matrix transforms?

I am just starting an adventure in looking under the hood of graphics for a game project I've been working on for a while, and I could use some guidance. I am using Python/Kivy (though that is not ...
0
votes
0answers
33 views

How to code the effect where a 3d avatar is obscured behind an opaque object

So, in any Super Mario game since the Game Cube, I think that any time an opaque object is between Mario and the camera, Mario is rendered as a silhouette? How would you render something like that. ...
0
votes
0answers
39 views

What are the options when float textures aren't precise enough?

I am currently experimenting with rendering planetary scale terrain. I am generating the terrain on the GPU with noise, and to fix the 32 bit floating point precision problems, I generate the ...
0
votes
0answers
23 views

Calculating PBR Lighting returns weird results at (0, 0, 0) or lower positions

I'm writing a Physically Based Renderer with the help of this tutorial here https://learnopengl.com/PBR/Lighting The vertex shader they use can be found here: https://learnopengl.com/code_viewer_gh....
0
votes
0answers
22 views

Handling metallic roughness maps colour channels

I'm trying to use a metalness/roughness workflow and I'm not sure how to translate the colour channels into the different metalness and roughness attributes. I'm not sure if there's a standard on how ...
1
vote
1answer
160 views

The view matrix finally explained

I must say that I am really confused by how a view matrix is constructed and works. First, there are 3 terms: view matrix, lookat matrix, and camera transformation matrix. Are those 3 the same, or ...
0
votes
1answer
70 views

How do i writing timing function for lightning flash in C++?

I need to write a horror scene with lightning flash. Unfortunately I am new to both C++ and OpenGL and I am looking for efficient way to mimic lightning timing in C++/OpenGL? I don't need graphical ...
0
votes
0answers
20 views

Calculate normals given vertices and indices [duplicate]

Can I calculate normals given vertices and indices? Can't figure out the code. Any help appreciated. Edit: Could be it as simple as?: ...
0
votes
1answer
76 views

How to calculate normal from normal map in world space? (OpenGL)

I'm trying to do normal mapping in a deferred renderer and I'm stuck on how to implement normal maps. I have a bool that passes whether or not to use a normal mapped value and thus, whether to ...
0
votes
0answers
24 views

Wrong Bone deformations using assimp

Hi I'm trying to animate a skinned mesh in my game using assimp and OpenGL. this question is a follow up of this one : OpenGL Strange mesh when animating Assimp But I'm having diffuculty ...

1
2 3 4 5
80