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
0 votes
1 answer
26 views

store GL_TEXTURE_CUBE_MAP_ARRAY data to CPU

I have a GL_TEXTURE_CUBE_MAP_ARRAY texture of 8 cube maps (countLayers). Now I am trying to transfer the pixels to CPU. Currently I am using this code: ...
user avatar
  • 519
1 vote
1 answer
64 views

Why is there a straight line between my bezier paths?

I have created a bezier curve tool and each time I draw a bezier curve segment I get a straight line between each mouse click. I don't understand why this is happening and was wondering if someone ...
user avatar
  • 2,415
0 votes
0 answers
20 views

The Definitive Computer Graphics Book guide? [migrated]

There are quite a lot of online resources and videos available to learn OpenGL / DirectX or computer graphics in general. However, I often struggle to get my mind around a topic when sources are given ...
user avatar
0 votes
1 answer
54 views

3D head mesh morphing from one mesh into another using coding

I have 2 3D head images and want to morph one into the other (animation) without using blender etc. I want to do it using coding preferably using C++, C# or python(libraries are ok). I have done 2D ...
user avatar
0 votes
1 answer
30 views

How to detect when left mouse button is released in GLUT after being held in motion?

I am trying to detect when my left mouse button is released to store the result in a boolean variable in OpenGL GLUT. Currently, I am using the motion() function in ...
user avatar
  • 2,415
0 votes
1 answer
32 views

Lines not disappearing after being drawn in OpenGL

I am creating a Bezier curve tool in OpenGL and every time my program draws something in motion with cursor coordinates I see the previously drawn lines on the screen for a second or two before they ...
user avatar
  • 2,415
0 votes
0 answers
13 views

Bind shader storage buffer object for vertex input

I'm trying to learn about compute shaders, and as such decided to give it a go at implementing the particle system described in these slides: https://www.khronos.org/assets/uploads/developers/library/...
user avatar
0 votes
0 answers
29 views

geometry is invisible when culling front faces

I am trying to implement shadow mapping. Therefore I am trying to render the back faces of the geometry to reduce the shadow acne. When culling back faces everything works (the geometry will be ...
user avatar
  • 519
0 votes
2 answers
46 views

How to get coordinates of opposite direction from mouse release point relative to a point?

I am trying to implement the pen tool from Adobe Illustrator in OpenGL. I am trying to get the coordinates of the reverse tangent upon mouse release. I tried negating the coordinates I got upon mouse ...
user avatar
  • 2,415
0 votes
1 answer
54 views

How to get coordinates of mouse after left mouse button is released after drag in OpenGL?

I want to get the coordinates of my mouse after the left mouse button is released after being dragged in OpenGL? I am new to this and wanted to know how I can implement it.
user avatar
  • 2,415
1 vote
0 answers
29 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 ...
user avatar
  • 519
0 votes
1 answer
29 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:...
user avatar
  • 101
2 votes
1 answer
81 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 ...
user avatar
  • 131
2 votes
2 answers
50 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 ...
user avatar
  • 131
1 vote
0 answers
15 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 ...
user avatar
1 vote
1 answer
36 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 ...
user avatar
  • 131
0 votes
0 answers
48 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 ...
user avatar
3 votes
1 answer
31 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 ...
user avatar
  • 519
-1 votes
1 answer
58 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? ...
user avatar
0 votes
0 answers
49 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?
user avatar
1 vote
0 answers
64 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), ...
user avatar
  • 111
1 vote
1 answer
54 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 ...
user avatar
  • 519
0 votes
0 answers
48 views

OpenGL Compute Shader Vector Subtraction Not Working As Expected

all. I am currently working on a compute shader in GLSL intended to simulate visualizations of general relativity by ray tracing in the Schwarzchild spacetime geometry. I'm about halfway through ...
user avatar
0 votes
0 answers
53 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 ...
user avatar
3 votes
1 answer
35 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, ...
user avatar
  • 519
0 votes
0 answers
37 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 ...
user avatar
  • 519
1 vote
0 answers
63 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. ...
user avatar
  • 11
0 votes
1 answer
66 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. ...
user avatar
1 vote
1 answer
162 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 ...
user avatar
  • 519
0 votes
0 answers
56 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 ...
user avatar
  • 519
3 votes
1 answer
133 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 ...
user avatar
  • 131
2 votes
1 answer
65 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 ...
user avatar
  • 177
2 votes
0 answers
160 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 ...
user avatar
  • 519
0 votes
1 answer
38 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? ...
user avatar
0 votes
0 answers
26 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 ...
user avatar
  • 519
2 votes
1 answer
81 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 ...
user avatar
  • 177
1 vote
1 answer
62 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 ...
user avatar
0 votes
1 answer
42 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....
user avatar
3 votes
0 answers
101 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 ...
user avatar
5 votes
1 answer
55 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 ...
user avatar
0 votes
1 answer
436 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 ...
user avatar
  • 3
1 vote
0 answers
64 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 ...
user avatar
0 votes
1 answer
103 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 ...
user avatar
  • 279
3 votes
1 answer
192 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 ...
user avatar
0 votes
1 answer
37 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 ...
user avatar
-1 votes
1 answer
56 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 ...
user avatar
1 vote
2 answers
282 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 ...
user avatar
0 votes
2 answers
99 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 ...
user avatar
  • 519
0 votes
1 answer
54 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 ...
user avatar
  • 519
1 vote
1 answer
86 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 ...
user avatar
  • 45

1
2 3 4 5
14