Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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 ...

-1
votes
0answers
12 views

OpenGL 3.x: How to make smooth transition between lo-res and hi-res tiles?

So, I have some tails (his position and texture) and I want to make effect like smooth transition (seems like animation) of this tiles, so, when I'm zooming I want to new tiles didn't load with a ...
0
votes
1answer
25 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 ...
0
votes
0answers
14 views

openGL resource utilization pipeline [on hold]

How does openGL rendering pipeline works from RAM/VRAM, CPU/GPU communication point of view ? ps I've tried to search on web, but nothing concrete there so far....
0
votes
1answer
37 views

How Frustum Culling and Sky Box Working Together ? The skybox appears where it should not appear

When i did frustum culling, far parts of land not rendering. It is good like i want. But after I see sky box instead of these parts. My question is, is this normal ? Or what i need to see or what i ...
0
votes
0answers
18 views

nvidia SSAO visible errors

I am trying to add ssao effect to a visualization application but there are errors in resulting image. I am using code from https://github.com/nvpro-samples/gl_ssao . Errors occur in rapidly changing ...
0
votes
1answer
8 views

Transparency problem, phong model

It's the first time I'm trying to implement the Phong lighting model. I'm pretty sure everything is working fine. I was experimenting using different materials, meaning I played with Kd,Ks,Ka and Ns ...
-1
votes
0answers
28 views

All meshes I'm rendering seem to start at the same point

I'm learning OpenGL via LearnOpenGL.com I'm stuck at the model renderer. I'm writing everything from scratch in C, and this is what I have: I feel like I'm missing a flag or something and this ...
1
vote
1answer
50 views

OpenGL draw functions and multi-threading. How they work together?

I want to apply multi-thread in a simple way to control and draw 4000 objects. I am using SDL and OpenGL. control : locations, collisions, calculations ... etc draw : OpenGL draw functions ...
0
votes
0answers
13 views

LWJGL 2D Raycasting issues

I'm currently working on 2D game using LWJGL, and recently i've been trying to implement 2D raycasting/picking, and for some reason it doesn't work, i've tried everything I personally can think of to ...
0
votes
1answer
25 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
0
votes
1answer
29 views

Help finding coordinate for left of screen in this frustum

I have a frustum with l=-2, r=2, n=0.5, f=10, ...
0
votes
1answer
35 views

Which part of the frustum sits at the eye position?

In Java I create a frustum projection matrix via Matrix.frustumM(projMatrix, 0, left, right, bottom top, near, far); and a view matrix via ...
0
votes
1answer
36 views

How to generate or smooth really large procedural terrain?

I'm currently trying to generate a really large procedural terrain in WebGL. I use a quadtree for LOD and plan to generate 1 heightmap for each quadtree node (terrain patch). The heightmaps are ...
0
votes
1answer
28 views

How can I tell in code if vsync is disabled on desktop PC?

My game needs to behave differently to get the best performance if the user disables vsync globally (basically, I need to change the scheduling on my housekeeping operations). Is there a graphics ...
-1
votes
0answers
21 views

How can I find “gl_NormalMatrix” to use higher “GLSL version #120”? [on hold]

I did something with GLM but i am not sure. Is it right way ? ...
0
votes
2answers
62 views

Moving an object at an angle based on quaternion rotation matrix (c++)

I have been trying to figure this out for a while now, and can't seem to get a working method. I am building a space ship movement with the following movement keys: P = accelerate (move forward) A = ...
1
vote
1answer
22 views

Trying to translate object

I'm trying to tranlate a matrix by xy but the result is strange. can someone help me translate and rotate the matrix properly? ...
0
votes
1answer
27 views

Problem with rotation a camera with the mouse OPENGL GLFW

I am trying to move my camera with my mouse, I can translate it juste by changing the current position of my camera, but when I want to move my forward vector and my up vector of my camera it doesnt ...
0
votes
2answers
72 views

glDrawElements draws nothing

As the title says…. :( nothing is drawn on screen… is there something I'm missing? ...
0
votes
0answers
24 views

can i use smooth normals and normal mapping together?

I am trying to use smooth normal and normal mapping together. And I made a test. In this test I draw a cube and man. They are using same vertex shader and fragment. I load them same md5loader ...
0
votes
0answers
20 views

Picking object using ray tracer in opengl using inverses

I have a scene with many objects and I'd like to be able to pick them out using ray tracing. I used to have just model transformations happening in the vertex shader and I was able to pick out the ...
1
vote
0answers
33 views

Is there a library like ImGui with the ability to customize frames, buttons, sliders, etc. in the windows for OpenGL [closed]

I'm trying to write a game on OpenGL using C++. From third-party libraries for creating windows (widgets?) Inside OpenGL, I was able to add ImGui to my project, create a window and attach some ...
0
votes
2answers
83 views

Game assets are images or 3D models

I am new to game development and I have created simple games with javascript and SFML. Those games are 2D and there I used images as my gaming assets. I was trying to be familiar with OpenGL like 3D ...
0
votes
1answer
57 views

Perspective Matrix doesn't work OpenGL 4

I tried to implement my own perspective matrix and it doesn't work. I don't understand why. With just with my view matrix (without Perspective Matrix) I can see my mesh. Here my view matrix : ...
-2
votes
0answers
57 views

collision sprites [on hold]

well I have a odd problem. when I set the screen variable to 0.0f I only get a static collision sprite. However when I set the screen variable to 0.0001f I get the animated sprite to work in the ...
1
vote
0answers
33 views

How can switch GLSL “version #120” to “version #330”?

I am using GLSL "version #120" and i want to change it with "version #330". I added "GLM" library for this purpose. But i have some problems. Therefore i will ask you what is equal to this setting ? ...
0
votes
1answer
32 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
37 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
37 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 ...
0
votes
0answers
19 views

How can I add vertex normal support to MD5 model animation?

I am trying to add skeletal animation to my project. I followed one tutorial, but it did not include vertex normals. Therefore I can't perform lighting, bump mapping, etc. How can I add support for ...
0
votes
1answer
35 views

Unresolved external symbol _glad_XXX

I am relatively new to C++ but I have a few years of java experience. I decided to try to make a game with C++, In contrast with the handful of games i have written in Java with lwjgl. I am having a ...
0
votes
0answers
46 views

How to correctly implement the ray intersections with blocks as in minecraft with lossless performance?

I am doing minecraft like game. We need an algorithm to find the intersection of the beam emanating from the camera with the block that first intersects and select the distance at which to check as a ...
0
votes
0answers
33 views

Explanation Morgan's McGuire Screen Space Ray Tracing method

I tried to implement the Morgan's McGuire method, but my attempts failed. He described his method here: Screen Space Ray Tracing. Below is my code and screenshot. SSLR fragment shader: ...
1
vote
0answers
35 views

Artefacts in SSAO Shader

I am having trouble with my Screen Space Ambient Occlusion shader. The objects in the game have the correct occlusion applied to them, however the occlusion flips depending on the angle of the camera:...
0
votes
0answers
52 views

Is the GPU's texture memory cache cleared when reading from multiple textures?

I have been reading lately about the memory layout of graphics cards and the issue with dependent texture reads. I am worried about the efficiency of the way I use framebuffer textures. Initially I ...
1
vote
1answer
34 views

Noise when using SSLR (Screen Space Local Reflections)

When I tried to apply reflections to my scene, I ran into the problem of noise: My fragment shader code: ...
0
votes
0answers
26 views

Extracting and Rendering the camera frustum

So my conquest on plotting the camera's frustum starting because my AABB testing against the frustum is not that accurate and I decided to plot it in order to have a visual indication of what the f*** ...
1
vote
0answers
55 views

Grass swing/shake effect in 2D game

I want to make the grass swing/shake whenever the player walk through it. Like shown in this gif Grass Swing Effect from this article. I know I have to move the x coordinates of the vertices factored ...
12
votes
4answers
2k views

Difference between “buffer” and “array” in OpenGL?

When I read doc on webGL or OpenGL there can be seen some patterns in how names of functions and objects are used. But I can't understand the difference between buffer object and an array. There are ...
0
votes
0answers
15 views

Inverse kinematics with end effector orientation?

I'm trying to implement an inverse kinematics solver, but this time even with the end effector's orientation. I succeeded with the case when the end effector only requires the position. I learned ...
0
votes
0answers
38 views

How can I use bump map and fog in a shader at the same time?

I've been following a tutorial from someone named "thecplusplusguy" on YouTube. He showed how you can use shaders to emulate fog with OpenGL but when I tried to incorporate what he did in my bump ...
0
votes
1answer
78 views

How can I reduce the amount of GLSL code written?

I am writing a game engine for Linux. It has a sufficiently large number of effects that can be turned on / off. Effects are defined before compiling with #ifdef. ...
3
votes
1answer
42 views

Fixing T-Junction artifacts in a BSP Editor

I'm starting a little BSP engine, and have begun implementing Brush CSG. Currently I represent my brushes as the enclosed volume of surface planes (like old idTech 3 maps), with a cache for each face ...
0
votes
2answers
128 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 ...
1
vote
1answer
62 views

Drawing many separate lines using mouse OpenGL(GLFW/glad)

So, in order to draw a line, I track the coordinates of the mouse, then I add them to the array and capture it as GL_LINE_STRIP_ADJACENCY. However, for example, I completed drawing a line1 at P1 and ...
2
votes
1answer
126 views

How to implement a pixelated screen transition shader?

I am interested in creating a screen transition seen in a lot of retro games. The transition is just a kind of pixelated distortion that increases or decreases in granularity over time. The effect is ...
2
votes
1answer
25 views

OpenGL different sized textures for the same framebuffer?

With OpenGL 3.3, is it allowed/okay to bind different sized textures to a frame buffer? I.e. ...
0
votes
0answers
14 views

Issues Rotating 3rd Person Camera Following an Object's Orientation

I've developing a flight simulation in openGL with GLM in C++ and I am having issues rotating the camera around as the plane pitch, yaws, and rolls. It's also my first time using quaternions, ...
0
votes
0answers
39 views

Solve SlowRendering issue with OpenGL

We have been seeing reports of slow rendering of frames in google play vitals. When trying to debug better, it was recommended to use adb shell dumpsys gfxinfo to get more information. Our game uses ...
0
votes
1answer
70 views

OpenGL scene performance optimization

I am writing my 3D engine for Linux, and I ran into a performance problem. What was included at the time of testing: Bloom DOF (Depth Of Field) Soft shadows Point light source 1k, 2k textures (...