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
28 views

How do I convert pathtraced distance to value that is usable by OpenGL's depthbuffer?

I was hoping someone could check my understanding. I've got a pipeline that does some path tracing, and then draws some debugging rays using standard rasterization. I'm trying to get depth to work ...
user avatar
  • 101
1 vote
0 answers
42 views

efficient way to get min/max distance during rendering

I want to improve my shadow mapping depth precision by getting the minimum and maximum depth value within my shadow map. When having both values I would convert the depth map to convolution shadow map ...
user avatar
  • 499
0 votes
0 answers
31 views

Implement Shadow Mapping in Legacy OpenGL

I'm trying to implement shadow mapping in Legacy OpenGL by following this tutorial, but texture projection doesn't seem to work. All I get is a thin black line instead of a shadow. I have a (optional) ...
user avatar
  • 13
1 vote
0 answers
25 views

AO Denoise Filter

I'm trying to implement a filter to denoise ambient occlusion data. What kind of filter do you suggest for the purpose? The techniques I've come across are the following: Gaussian filter (doesn't ...
user avatar
0 votes
0 answers
22 views

void main{vec4 rgba;} wont work on OpenGL

I´m very newbie in OpenGL and I'm trying to tweak a triangle example on Android. I got this ...
user avatar
  • 101
4 votes
1 answer
108 views

Artifacts while rendering sponza scene

I'm trying to render the Sponza scene using the Cook-Torrance BRDF Model Plugged with the GGX Normal Distribution, Gemoetry Schlick and fresnel Schlick approximation and a punctual point light. When ...
user avatar
0 votes
1 answer
102 views

Convert one triangle to another in matrix4x4?

The context openGL instances learning. I want to transform a reference triangle to another one. So final goal is to have one triangle and the instance being a transformation of that initial triangle. ...
user avatar
  • 101
0 votes
0 answers
22 views

OpenGL texture format equally distributed for better bit usage

I am drawing my depth values into the red color channel of a texture. the depth² + 0.25 * (dx * dx + dy * dy) value goes into ...
user avatar
  • 499
1 vote
1 answer
47 views

Why must texture samplers be uniform variables in GLSL?

To use a texture in an OpenGL shader, I have to write the Texture Unit to be used into a uniform variable: source.c: ...
user avatar
  • 13
1 vote
1 answer
72 views

Rendering multiple camera transforms of the same geometry at once

Currently I have a basic (OpenGL 3.3) rendering scheme using a simple depth vertex shader to generate shadow maps for a scene. I don't care about having a large number of lights in the scene so it is ...
user avatar
  • 111
-1 votes
1 answer
92 views

Hosting OpenGL C++ Window in C# WPF

I am following this tutorial on how to host Win32 OpenGL windows in WPF. There is also a Microsoft walkthrough on how to Host a Win32 Control in WPF that is useful aswell. The original project is from ...
user avatar
  • 2,423
0 votes
1 answer
57 views

How to rotate and move group of objects in OpenGL?

What do I have now? I have a cube consisting of 6 planes. All these planes I generate in XY coordinates and then place them by matrix transformations. I need to rotate my cube along the global axis ...
user avatar
0 votes
1 answer
34 views

Understanding gluUnProject

I was studying how the OpenGL's gluUnProject works. There is one thing I don't understand: is there any benefit of returning a ray instead of 3D point? One can use this function to get a ray not a 3D ...
user avatar
0 votes
1 answer
60 views

How to give C++ GLUT project an Editor/UI?

I want to render my OpenGL GLUT project to a window/control in C# WPF. I have read articles online from Microsoft on how to do it but I am very confused. Does anyone have any experience with this? ...
user avatar
  • 2,423
2 votes
1 answer
61 views

Calculating maximum number of mipmap levels for OpenGL automatic mipmap storage generation

Using glTexStorage2D(GL_TEXTURE_2D, num_mipmaps, GL_RGBA8, width, height); followed by ...
user avatar
  • 169
1 vote
1 answer
47 views

What is view transformation and model transformation respectively? How do I implement each transformation in simple opengl program?

I want to know what is view transformation, and what is model transformation respectively, and what methods/functions in opengl could be applied to implement each transformation. Just simple ways to ...
user avatar
  • 23
0 votes
1 answer
93 views

Bump mapping WITH precomputed tangents?

Most bump mapping (meaning black and white height map) uses Tangents/Bitangents computed from Position using dFdx/y. And they also compute the offsets/derivatives of the height map using dFdx/y. The ...
user avatar
  • 51
0 votes
1 answer
62 views

Understanding orthographic projection matrix clip coordinates

I'm confused about what orthographic projection matrix outputs. Based on what I know so far, orthographic projection matrix converts vertexes in eye coordinates into clip coordinates. But what exactly ...
user avatar
0 votes
1 answer
37 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
  • 499
1 vote
2 answers
97 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,423
0 votes
1 answer
75 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
71 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,423
0 votes
1 answer
45 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,423
0 votes
0 answers
65 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
33 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
  • 499
0 votes
2 answers
57 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,423
0 votes
1 answer
62 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,423
1 vote
0 answers
33 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
  • 499
0 votes
1 answer
39 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
1 vote
1 answer
109 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
1 vote
2 answers
73 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
2 votes
0 answers
29 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
0 votes
1 answer
44 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
0 votes
0 answers
82 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
2 votes
1 answer
37 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
  • 499
-1 votes
1 answer
74 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
62 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
113 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
0 votes
1 answer
114 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
  • 499
0 votes
0 answers
75 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
57 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
2 votes
1 answer
42 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
  • 499
0 votes
0 answers
51 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
  • 499
0 votes
0 answers
81 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
0 votes
1 answer
77 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
281 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
  • 499
0 votes
0 answers
59 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
  • 499
2 votes
1 answer
286 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
1 vote
1 answer
67 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
  • 169
2 votes
0 answers
238 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
  • 499

1
2 3 4 5
14