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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

For questions involving use of the OpenGL graphics library.

1
vote
0answers
34 views

glTexSubImage3D throws GL_INVALID_ENUMERATION on NVIDIA

I'm having problems when using the following statement on different GPUs: glTexSubImage3D(target, 0, 0, 0, 0, width, height, layers, format, type, NULL); on ...
0
votes
0answers
30 views

What is the use of effect files?

I am reading Real Time Rendering and getting confused by something called effect files. From what I understand, it is like a library of pre-written shaders so instead of writing my own shaders for a ...
0
votes
0answers
35 views

How to compute size of OpenGL's image buffer?

I am trying to retrieve OpenGL's color buffer with the following code. My program is crasing in the line that makes the call to glReadPixels() apparently image.data ...
0
votes
0answers
29 views

Should I jump straight to DirectX 12 or is it better to start from DirectX 11 given some OpenGL experience?

I've been studying OGL and developing an engine on it for about 2 years now. I'd like to port this engine to Windows/DirectX eventually, but, before I start, I'd like to ask for advise from people who ...
1
vote
0answers
41 views

How Skia uses OpenGL backend?

Skia 2D's one notable backend in OpenGL, but how does it work under the hood to render? Say, we need to draw an anti-aliased circle. Does Skia: make a quad (using 2 triangles) and paint the circle ...
1
vote
1answer
40 views

Drawing a plane super-imposing over another plane

I wish to draw a plane (A building's floor in this case) over a canvas plane (assume the plane is smooth). The planes are drawn as QUADS. The problem is that both plane are located at the same height....
0
votes
0answers
45 views

Hard edges appearing in voxel cone tracing (how to remove them?)

I am generating shadows using a voxel pyramid (commonly called voxel cone, although I hate that term). Some of my shadows come as expected, however some are very strange. For example in this image: ...
0
votes
0answers
24 views

Problem with imageStore to 3D texture on old AMD card

I've been updating an old project that does Marching Cubes using compute shaders, and it fails on my laptop with an old AMD GPU (7670M). After investigating a bit, I found the problem is with writing ...
0
votes
0answers
67 views

Changing coordinate system from texelFetch to textureLod is breaking the algebra

I have a scene rendered using texelFetch() and I am trying to modify the shader to use textureLod() instead. This is the image generated with texelFetch: When I try to change the shader to use ...
0
votes
0answers
56 views

OpenGL - Fit High/Low Resolution Image/Texture to a particular size Window

Consider a ray tracer written in OpenGL and using GLFW as a window toolkit. There are basically 2 options to display the ray-traced image. 1) Create a RenderBuffer ...
1
vote
0answers
52 views

Voxel cone tracing artifacts (what causes them and how to solve them)?

I am trying to generate soft shadows using voxel cone tracing. Which gives me the next images: In the first image you can see an artifact of a sequence of horizontal shadows alternating with ...
1
vote
0answers
41 views

How exactly do soft shadows get generated using a voxel cone tracing rendering technique?

Let's assume we have voxelized a scene, and all of our materials have an opacity level of 1. The reuslt would then look like: If we raytraced the final volume that gets generated after rasterization. ...
1
vote
2answers
59 views

How to convert from glBegin() and glEnd() to VBOs?

How to convert from glBegin() and glEnd() to VBOs (Vertex Buffer Objects)? I found a simple example here: ...
4
votes
2answers
99 views

What is OpenGL's paradigm?

OpenGL is not object-oriented, but more like "switches you turn on"? Like ...
0
votes
1answer
62 views

Self intersection artifacts in 3D image raytracing

I am developping a voxel raytracer for global illumination. I have been successful in multiple aspects but there is a problem I am not sure how to solve. The model works as most other Voxelization ...
0
votes
1answer
16 views

Texture units parameters in OpenGL

I am writing a procedural terrain renderer for OpenGL. To shade the terrain I use multitexturing, that is 4 material textures and a blend map which distributes them across the terrain (encoded in RGBA)...
0
votes
0answers
45 views

Least painful way of porting OpenGL renderer from Mac to Windows

Can experienced people advise me some tools/approaches for porting my OpenGL engine from Mac to Windows? I've been developing a renderer using C++ as much as possible, but the 'tool' part is written ...
0
votes
0answers
42 views

How to ensure that the raytrcing coordinate system is teh same as the projection one?

I have 2 shading models right now, one is using voxels the other one is the standard projection absed renderization method. Putting them side by side I have noticed that no matter what I do one is ...
2
votes
0answers
169 views

Circular pattern aliasing in voxel ray tracer

I am doing a voxel based raytracer. In other words, I first voxelize the scene using rasterization and I proceed to raytrace the volume in a 3D image to generate a final frame. Currently I noticed ...
1
vote
1answer
47 views

Can you avoid querying for a texture location in OpenGL?

The way I learnt to send a texture to a shader is more or less ...
2
votes
1answer
66 views

How to solve Z buffer artifacts

I am currently rendering a scene in the most standard fashion possible (triangle projection and Blinn-Phong for shading) However I am getting some artifacts: As you can see the lion head is not ...
1
vote
0answers
32 views

Handling varying texture sizes in an array texture

Say we've idetified that we have a varying number of textures that are upper capped by 2 parametrs. thus we allocate the maximum amount of memory needed to store all textures as follows: ...
1
vote
2answers
42 views

How to assign a texture to a single entry of a texture array?

The C++ psuedo code to transmit the idea of what I want to do would be: Texture_array tarr = Texture_array(6); tarr[0] = texture; Which I am attempting to do as ...
1
vote
1answer
39 views

How do you load multiple textures into an array texture with OpenGL?

I have been reading the OpenGL documentation but it is not clear to me how to achieve the following. Say we have an array of strings. Each string in the array is a valid relative path to an image ...
0
votes
0answers
62 views

Texture coordinates for cone

I am new to OpenGL so forgive me for the basic questions. I am trying to draw a cone with texture coordinates and surface normals. The surface normals seems to be working fine for the lighting part ...
-1
votes
1answer
23 views

Cant seem to get pyopengl tutorial 4 to work

i am trying to work through some of the tutorials for pyopengl and cant seem to get it working. the only message i'm getting is a warning: python tutorial4.py <...
0
votes
1answer
46 views

Opengl black screen for a simple translation

i am a beginner to opengl following an online guide, I am trying to make a simple translation to my triangle. The triangle did render correctly when i made a float uniform to translate it, but when i ...
0
votes
0answers
39 views

How to properly modify a ray in a raytracer to achieve camera rotation

I am trying to make a particular kind of raytracer, but there is some strange bug occurring when I attempt to rotate the camera. As you can see, there is some important distortion ocurring when the ...
0
votes
1answer
135 views

Distorted OpenGL graphics in certain models of Intel GPUs under Windows; possible causes?

I'm not sure this is the best place to post this, but it definitely seemed more appropriate than programming. I'm one of the developers of Performous, essentially a karaoke (and instruments) game. We ...
0
votes
0answers
37 views

Performance drop caused by vertex shader

I'm rendering the Sponza scene and performance drops based on how many objects are located in camera frustum. Worst case scenario takes up to 25ms per frame, but when looking close at a flat wall ...
1
vote
1answer
93 views

How to use GLSL texelFetch?

I have read the OpenGl documentation of texelFetch, which is: gvec4 texelFetch(gsampler2D sampler, ivec2 P, int lod). I know the first argument "sampler" is just a texture. But I am very confused ...
3
votes
1answer
79 views

How to align Ray Marching on top of traditional 3D rasterization?

I'm trying to apply raymarching on top of 3D rasterization, ordering what 3D object gets displayed based on the depth of a rasterization pass and the raymarch depth. After getting the transform ...
1
vote
1answer
58 views

How different is the SPIR-V accepted by OpenGL (ARB_gl_spirv) from SPIR-V accepted by Vulkan?

The format of SPIR-V bytecode is probably one of the least documented parts of both OpenGL and Vulkan that I am aware of. I have compiled a very basic fragment shaders into both the OpenGL and Vulkan ...
3
votes
1answer
125 views

Manually fetching 8 neighboring texels from 3D texture greatly decreases performance

I'm implementing manual interpolation between texels in a 3D texture to be able to discard some of them when needed. Compared to hardware interpolation, this process takes a lot of time. If I simply ...
0
votes
1answer
39 views

Skeletal animation: What is the purpose of multiplying interpolated bone matrix with parent's matrix?

Let's say I have the following hierarchy: Bone A Bone B Bone C Here's how most tutorial is telling me how to calculate the finalMatrix to be sent to ...
1
vote
1answer
49 views

Confusion about how inverse bind pose is actually calculated and used?

I am trying to do skeletal animation using Assimp and the inverse bind pose matrix just trips me up. I will give a little example to illustrate my point. ...
3
votes
4answers
122 views

How to access several textures from huge amount of textures in a shader?

I'm developing a light probe based GI solution and currently dealing with light leaks due to interpolation between probes located on opposite sides of the walls. I want to tackle the problem by ...
0
votes
1answer
90 views

What is the typical use case for rendering to an image through imageStore?

The typical scenario for using a texture would simply be: ...
0
votes
2answers
29 views

How can DSA functions be used without extension names on lower versions of OpenGL?

My GPU supports OpenGL 4.4 but looking at the OpenGL extensions viewer the only part of 4.5 that it does not support is the GLSL version. I am able to use all DSA functions without specifying any ...
1
vote
1answer
31 views

What are the performance implications of the optional flags used when mapping a buffer?

The docs for glMapNamedBufferRange list several optional flags that can be used when a buffer is mapped such as ...
0
votes
0answers
100 views

glGenerateMipmap does not generate mips for texture with a particular image

I load materials for my models using stbi library and upload pixels to textures through glTexImage2D function. Immediately after ...
1
vote
0answers
35 views

GLSL can't calculate texture and reflection

I'm working on a universal shader, and have a function for calculating reflections and a function for textures. When I run the shader, it seems to give up and discard all fragments. The texture and ...
3
votes
1answer
54 views

If I have more than enough memory, can it still be beneficial to use compressed textures?

I'm wondering whether some of you would have tested and seen quite a difference in using a compressed texture even when the OpenGL environment does not need saving any memory (i.e. the card has more ...
0
votes
1answer
37 views

At which stage of the pipeline is the projection transform applied?

I've found a site that provides an overview of the OpenGL pipeline: Rendering pipeline overview Now in the 3th phase (vertex processing) it says that after the transform feedback, there is the ...
4
votes
1answer
58 views

Dealing with OpenGL versions across multiple computers

I'm new to OpenGL, and I'm wondering what I need to pay attention to regarding versioning. The things I've been reading have been clear about there being version differences, and needing the ...
2
votes
2answers
151 views

Full screen quad texture coordinates mapping

I'm rendering a full screen quad using gl_VertexID as GL_TRIANGLE_STRIP ...
5
votes
1answer
69 views

What actually happens in frame buffer when an image or document is scrolled?

What actually happens inside computer when the text, pdf, jpeg, ms-word or any other document(file) is scrolled? Does it generate a new bitmap image sufficient for the screen to display even for tiny ...
2
votes
2answers
59 views

How to take consistent screenshots across multiple machines?

I have some OpenGL based software and I would like to set up some automated testing using image comparison, but one problem we always have is that the screenshots we take always have some small ...
2
votes
1answer
82 views

Dealing with GL reflection

I'm planning the port of our DX based renderer to OpenGL. The target will be Desktop OpenGL 4.x. For DX we use shader reflection but as far as I know OpenGL just has glGetProgramInterfaceiv , ...
1
vote
1answer
75 views

How to rotate a camera?

So I am doing a simple FPS camera with openGL. I store the camera as 4 vector, a position vector, a lookAt vector, an up vector and a right vector. When the user presses a key, I create a rotation ...