Questions tagged [opengl]

OpenGL (Open Graphics Library) is a graphics standard and API which is platform-independent and available for desktop, workstation and mobile devices. It is designed to provide hardware-accelerated rendering, and hence gives greatly improved performance over traditional software rendering. OpenGL is used for applications like CAD software and computer games. The OpenGL standard, as well as OpenGL ES, is controlled by the Khronos group.

Filter by
Sorted by
Tagged with
1 vote
0 answers
50 views

Variance Shadow Mapping (Shadow occurs when normal vector is close to light direction)

I am implementing Variance Shadow Mapping from Nvidia GPU Gems 3 Chapter 8: Summed-Area Variance Shadow Maps There they are talking about clamping the minimum variance to a very small value. I did ...
Thomas's user avatar
  • 1,198
0 votes
1 answer
110 views

Is it possible to convert Polar to Cartesian coordinates and map result to an image using opengl?

Is it possible to convert Polar to Cartesian coordinates and map result to an image? I want to get the output same as the distort depolar 0 from image magick. https:...
code0x00's user avatar
  • 101
1 vote
1 answer
271 views

How Anisotropic filtering works

I would like to understand how anisotripic filtering works in gpu. Specifically what is the minimum state in which the texture needs to be in for anisotropic filtering to work. by state of the texture ...
VersesDev's user avatar
  • 129
1 vote
2 answers
341 views

what is the output from rasterizer

what exactly does the rasterizer outputs as per my knowlage it outputs primitives rasterized as fragments which seems correct as the next step in vulkan/opengl is fragment shader but dx confuses me ...
VersesDev's user avatar
  • 129
3 votes
1 answer
157 views

GLFW: create embeddable opengl child window and set parent on Mac?

Is this possible with GLFW? AFAIK you can't use GLFW to create a child window per se, so the question probably boils down on how to turn a GLFW created, opengl enabled window into a child window and ...
user1050755's user avatar
2 votes
1 answer
752 views

mipmap selection process

I wished to understand which mip map in the chain of mips is selected upon sampling a texture.Which factors it depends on.I know that it depends on the area of the texture visible. I tried a simple ...
VersesDev's user avatar
  • 129
0 votes
0 answers
236 views

Vulkan abstraction similar to OpenGL?

Because OpenGL is deprecating, I was wondering where to position myself to keep on learning graphics programming in the years to come on the same level of abstraction as OpenGL ? I don't want to go ...
user1511956's user avatar
2 votes
1 answer
127 views

using parts of GL_TEXTURE_2D_ARRAY as GL_TEXTURE_CUBEMAP_ARRAY

I am using layered rendering for all my light sources to avoid rendering multiple times. I have lightSourceCount many point lights and one sun, which is implemented ...
Thomas's user avatar
  • 1,198
-1 votes
1 answer
449 views

How to deform an object in glsl? (processing)

I am a beginner in glsl and processing. I have a cube, can I know how to deform it using mathematical or progammatical functions? ...
Tragend's user avatar
0 votes
0 answers
117 views

Inter-Process communication in compute shaders

How do I write a code to facilitate common shared memory for communication between multiple shaders as well as processes within them in python?
Ravindra's user avatar
1 vote
0 answers
395 views

Generating cheap perfect outlines for meshes in WebGL

I am tasked with creating an outline shader in WebGL (i'm using WASM/Emscripten, so an OpenGL solution will work too) for meshes that the user can upload into our software (be it .obj, .fbx, .3ds), ...
yosmo78's user avatar
  • 111
0 votes
1 answer
276 views

Combining multiple textures within Framebuffer to use them in layered rendering

I have a scenario with several cameras. Each hold its own color and depth texture. Because the geometry of the environment is expansively procedural generated, I would like to combine cameras with ...
Thomas's user avatar
  • 1,198
0 votes
0 answers
69 views

Mathematical foundations of Signed Distance Fields in computer graphics

I have come across Signed Distance Field usage in Computer Graphics in construction of vector shapes, glyphs and 3D surfaces. However I can not find much of the background mathematical theory as to ...
Deepak Sharma's user avatar
2 votes
1 answer
137 views

enable / disable transform feedback within glsl for specific primitives

I am using the tessellation shader stage to increase the density of triangles close to camera. Thereby when the camera is too close to a triangle, so that the maximum tessellation is not high enough, ...
Thomas's user avatar
  • 1,198
0 votes
0 answers
138 views

OpenGL: storing several textures to texture2dArray and exchange them continuesly

I try to render extreme large landscapes, which are deformed by height-maps. Each area has several level of detail height-maps. Other textures are structured like the height-maps as well, so that all ...
Thomas's user avatar
  • 1,198
0 votes
1 answer
412 views

OpenGL ignores glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);

I'm learning OpenGL for a personal project. I need to draw a triangle mesh as a wireframe. From what I've read, I can do this using glPolygonMode. However, the program always draws my polygons filled. ...
ahoffer's user avatar
-1 votes
1 answer
162 views

How do I view my vertex colors that I specified through the texture I've applied on my objec [OpenGL]?

I thought that if I used an image with a transparent background, I would still be able to see the colors I had specified in my vertex attribute buffer. ...
Selfish Stoic's user avatar
1 vote
2 answers
2k views

Opengl GLSL binding locations confusion

The background of this question is that I am trying to write an automatic binding system, where for each uniform variable I want to declare in my GLSL code, I call a method ...
Thomas's user avatar
  • 1,198
0 votes
0 answers
85 views

Precision problems when rendering whole planets

I'm trying to implement a camera, which is able to go very close to a planet/moon surface, without flickering surface. The problem: Right now the position of a planet / moon is saved at the center of ...
Thomas's user avatar
  • 1,198
2 votes
3 answers
2k views

vulkan perspective matrix vs opengl perspective matrix

Hi I have a slight confusion in using the opengl perspective matrix in vulkan. glm's perspective matrix works directly in vulkan just by multiplying the "[1,1 term by -1 but when I compared the ...
VersesDev's user avatar
  • 129
1 vote
1 answer
86 views

OpenGL in CodeBlocks with GNU GCC compiler not recognising some constants

I am writing basic code to; draw triangles, lines etc; to translate and orient them, and to project them in perspective, solving the occlusion problem using the depth buffer. Having had success with a ...
Simon's user avatar
  • 163
6 votes
1 answer
1k views

OpenGL: read texture mipmap level 0 and render to same texture mipmap level 1

I am trying to generate mipmaps, which are based on depthbuffer values. To generate the next mipmap level, I am trying to read in the 4 pixels of the upper mipmap level per pixel. Unlike the usual ...
Thomas's user avatar
  • 1,198
0 votes
1 answer
107 views

Question about using glVertexAttribArray

After defining an attribute pointer, why can't I just reuse it? I have a VAO bound so shouldn't it just accept the AttributePointer I defined with the last VAO? ...
R34P3R76's user avatar
0 votes
0 answers
40 views

split Depthbuffer values to distance

My scenario is a Solar system with satellites. Therefor objects can be very close to the camera while a planet for example is in background far away. This setup causes problems with the depthbuffer ...
Thomas's user avatar
  • 1,198
1 vote
1 answer
299 views

How to use maximum resolution (pixel density) with OpenGL in MS Windows

CodeBlocks offers an example program in C, that uses OpenGL. It draws a single multicoloured rotating triangle. I have been building on this example. I am a novice in C and in OpenGL. I believe that I ...
Simon's user avatar
  • 163
1 vote
1 answer
233 views

SSAO with reconstructed depths yields strip artifacts

I wrote an ssao algorithm with compute shaders and view-position-reconstruction from the depth buffer. It works great for objects near by but results in strip or banding artifacts for large planes ...
Sprinklerkopf's user avatar
0 votes
1 answer
218 views

If a GPU supports OpenGL ES 3.2, does it also support OpenGl 3.0?

At the moment I am looking for a tablet to use the bike simulator app "BKOOL". The Samsung Galaxy Tab S6 Lite is my current favorite and it meets almost all app requirements (https://www....
CherryBlossom1878's user avatar
3 votes
0 answers
348 views

Renderdoc reports incorrect OpenGL API usage, can't figure out why

I'm rendering some UI using an immediate-mode UI library, so each frame it produces some meshes, which I then load into buffers and render, only to get some strange errors from Renderdoc: You can see ...
Ivan Ivanov's user avatar
4 votes
1 answer
104 views

How to Achieve Radial Rendering

I'm making a POV fan and would like to display some simple graphics in real-time on it. I have a working naive solution with OpenGL, but I'm maxing out at 7 fps rending a simple cube on a raspberry pi ...
Alex Charters's user avatar
0 votes
1 answer
2k views

How to render fog in OpenGL

I have a simple question just because I can’t find any good example in the internet. How to create fog without using particles? How to make for with different density on different locations and in ...
Mike F's user avatar
  • 103
1 vote
0 answers
148 views

"Interleaved rendering" in fragment shader

Intro I'm trying to render multi-channel images (more than 4 channels, for the purposes of feeding it to a Neural Network). Since OpenGL doesn't support it natively, I have multiple 4-channel render ...
Alexey S. Larionov's user avatar
0 votes
1 answer
176 views

Trying to understand how to render a volumetric point light

My goal is to render a volumetric point light as explained in this book's chapter 10: FGED Rendering The book explains the math pretty well, but I'm not sure I understand what is the required setup ...
mbl's user avatar
  • 291
3 votes
1 answer
883 views

Compute Shader shared average value

Short Question: How can i integrate a buffer variable in a compute shader over each pixel i.e. how can i ensure memory coherence in such a case? Long Question: I've written a deferred renderer with ...
Sprinklerkopf's user avatar
0 votes
1 answer
117 views

How OpenGL handles assigning the same state multiple times in a row

I wonder what happens when functions that change OpenGL states, ex glBindVertexArray or glBindTexture are called with the same ...
Lenny White's user avatar
0 votes
1 answer
150 views

Passing non-interleaved data to glBufferStorage without using glBufferSubData

I would like to use glBufferStorage to load data once into the vertex buffer. However sometimes I want to pass non-interleaved data from separate arrays like shown ...
Lenny White's user avatar
1 vote
2 answers
1k views

OpenGL transparency - object behind is not rendered

I'm trying to implement voxel world using OpenGL (Core 3.3). I've come across a problem with transparency. It looks like sometimes GPU decides to not render stuff that would be important. Can you help ...
Paweł Pomierski's user avatar
0 votes
2 answers
509 views

glsl passing data array from vertex to tessellation control shader

I am trying to pass a vec3 array from vertex shader to tessellation shader. passing just one value works fine, but how to pass an array? Vertex shader ...
Thomas's user avatar
  • 1,198
0 votes
1 answer
218 views

optional geometry shader

I am looking for an easy solution for passing information between shader stages when adding additional shader stages. Right now I am using the "out" keyword to pass data from for example ...
Thomas's user avatar
  • 1,198
1 vote
1 answer
96 views

Stripping unnecessary data from C++ data structures before sending to GPU

I've recently been working on a particle system in my renderer and I've encountered a situation where my particle class on the C++ side has data I need to maintain my particle on that end, but that I ...
JHall's user avatar
  • 57
1 vote
1 answer
292 views

Mesh-Shader and layered rendering

In the usual pipeline (vertex, tessellation, geometry and fragment shaders) the geometry can be deformed and in the geometry shader it is possible to copy the generated and deformed geometry in order ...
Thomas's user avatar
  • 1,198
0 votes
2 answers
299 views

Is BSP the right tool for my game?

I am brushing up on the fundamentals of OpenGL. Things are going great. I am looking at BSP for maps/levels. I understand that Doom uses BSP, but I worry. Can BSP be used with complete 3D world and ...
user2877551's user avatar
1 vote
1 answer
2k views

What is the Viewport?

Can someone please explain to me what the Viewport is. I've read the OpenGL wiki and doc.gl but they give me a definition that I don't understand at all. The definition they gave me is "...
Nathan's user avatar
  • 11
0 votes
1 answer
728 views

OpenGL state management

I am working on a software with lots of different shaders, which require different states in OpenGL. My problem is the following: The different models with different shaders are not rendered in the ...
Thomas's user avatar
  • 1,198
0 votes
1 answer
73 views

Unexpected INVALID_OPERATION on glClearNamedBufferData

Under OpenGL 4.5 on AMD RENOIR (DRM 3.40.0, 5.10.56-1-lts, LLVM 12.0.1), running ...
Tau's user avatar
  • 121
0 votes
1 answer
298 views

Opengl geometry shader input point to output point doesn't show any ouput

I am trying a simple passthrough just to get a feel for the geometry shader. I am taking in a single point and trying to output that point from the geometry shader, it works with the vertex and ...
Ryan McCauley's user avatar
0 votes
0 answers
103 views

Dark line artifact along edges of the shaded mesh

I have implemented an algorithm to calculate vertex normals by taking the normalized average of all its adjacent triangles. I have subdivided a cube two times with catmull clark and checked the ...
Lenny White's user avatar
0 votes
1 answer
514 views

OpenGL on mac gives me an error when calling glGenVertexArrays

I have been developing a c++, openg, glfw3 and GLEW project on ubuntu and everything has worked so far. Recently I moved to a mac computer (chip M1 if it's important) and things stopped working. I ...
Facundo Pedro Astiz Meyer's user avatar
1 vote
1 answer
233 views

is doing transform feedback while rendering vertices not possible?

I've written a program that uses OpenGL and GLFW to display some simple geometric shapes. I'm now trying to add some transform feedback capability to it and I find that as soon as I do so, the program ...
user256552's user avatar
2 votes
1 answer
424 views

why is reported screen size smaller than display size with GLFW full screen window

I'm using GLFW to create a full screen GL application. I'm running it on my Ubuntu 20.04 laptop that has a typical 1920:1080 display, at least that's the screen resolution reported under Settings->...
user256552's user avatar
2 votes
1 answer
178 views

Techniques to implement a glow that encompasses a volume

I have an old renderer from years ago written with OpenGL immediate mode. I've decided to learn Vulkan and I'm converting my old project as a way to learn the new concepts. One of the things my old ...
BinaryGuy's user avatar
  • 123

1 2
3
4 5
15