Questions tagged [opengl]

For questions involving use of the OpenGL graphics library.

Filter by
Sorted by
Tagged with
1
vote
1answer
40 views

Point light illuminating only half of a scene

A point light is illuminating only a half of a scene in my small 3D renderer. It happens on every scene I've tried (conference room, cornell box, etc). How do I go about debugging this? What could ...
0
votes
0answers
20 views

After making any 3D model using Opengl how to export it's data in .dae file?

I'm trying to make simple 3d modeling program in c++ with Opengl. So I don't know how to transfer/convert/export or save data of 3D model in .dae file. NOTE:- 3d model is made using Opengl ...
0
votes
0answers
38 views

Problems with Cascaded Shadow Maps

I got basic shadow mapping with a single directional light working in a small voxel game I'm working on, and I've been trying to upgrade it to Cascaded Shadow Maps. I've looked at a few tutorials - ...
-1
votes
0answers
43 views

Books on topic OpenGL in software developing

Maybe it's a duplicated question but I haven't found anything similar. So, I've recently started to learn OpenGL using sites like learnopengl.com, which gave me a brief and nice explanation on how to ...
0
votes
1answer
40 views

Generating the end caps of a cylinder using triangle strips for use in a geometry shader

I know how to generate the walls of a cylinder with triangle strips and the caps with triangle fans, but since I am working inside a geometry shader, I can only output triangle strips, so I am kind of ...
2
votes
1answer
123 views

Implementing the example of Walter et al. (2007) paper

As the title suggests I'm trying to implement the last images of the "Microfacet Models for Refraction through Rough Surfaces" Paper by Walter et al. in OpenGL I "think" (I had to put that into ...
2
votes
0answers
80 views

Why there are calculation differences in WebGL and OpenGL

I am currently implementing the Mandelbrot fractal on the GPU. I wrote two programs: the first in OpenGL (desktop C++ application) and the second in WebGL (static webpage). The two programs use almost ...
1
vote
0answers
33 views

Apply transformation to single vertices in OpenGL in order to deform mesh

I'm making a 2D cell simulation game. The mesh for my cell is basically just a manually-generated triangle fan that looks like this. I would like to reproduce the wobbling/vibration effect on the ...
1
vote
0answers
36 views

Projective Texture / Shadow Mapping — Why is the perspective division performed in the fragment shader?

I've just worked my way through this OpenGL shadow mapping tutorial. While I understand the basic algorithm, one thing puzzles me: During the 2nd render pass all vertices are transformed into the clip ...
0
votes
1answer
39 views

Stumped on GLSL error C5041 (cannot located suitable resources to bind variable… possibly large array

I have an OpenGL based graphics engine coming along quite nicely, but I'm currently stumped on a problem that arose after adding a new vertex shader output array. The vertex shader is outputing the ...
1
vote
0answers
29 views

Optimizing texture fetches with higher mip levels

Let's say I have some shader program in DirectX or OpenGL rendering a full screen quad. And in a pixel/fragment shader I sample some huge textures at random texture coordinates. That is one same ...
2
votes
1answer
60 views

Strange VSync issues on a GTX 1060

I'm out of my wits. I've been working an a voxel game for the last couple of years, written in C# and OpenTK (=OpenGL backend) I've been struggling to achieve a stable frame rate and one of the major ...
1
vote
0answers
52 views

gBuffer view/eye space missing z (depth) value?

I need some help understanding whats happening to my view space. I have the following colour buffers coming out of my deffered renderer... My concern is with the view space buffer (third image), ...
1
vote
1answer
119 views

How to compute normal in quartic Walton-Meek's Gregory patch in tessellation shader?

I am programing a tessellation shader in OpenGL which computes the quartic Walton-Meek's Gregory patch. I am searching for a local G1 method with good shading/visual results. So I am trying this patch....
1
vote
2answers
37 views

Help with wireframe artifacts on mesh procedural UV texturing

My goal in my project is to render a procedural texture for a given mesh based on a predefined camera projection. The way I choose to accomplish it is by creating tex coords based on only the visible ...
1
vote
1answer
61 views

An idea for an implementation of continuous collision detection of circles

So I'm making a 2D pool game in OpenGL (you might've guessed as soon as I've mentioned collision of circles). I'm having a little trouble with collision detection. What I mean by that is that I have ...
1
vote
1answer
76 views

GLSL - increasing line spacing with y

I'm trying to force perspective into the horizon of a Shadertoy scene by drawing horizontal lines at decreasing distances as y grows to create an outrun-esque scene, but can't figure out which ...
0
votes
1answer
35 views

What are the type constants that the documentation for glGetProgramResourceiv() refers to?

Quoting the Khronos OpenGL documentation pages for the glGetProgramResourceiv() function: For the property GL_TYPE, a single integer identifying the type of an ...
1
vote
0answers
57 views

Why is glUniform1i() returning GL_INVALID_VALUE?

I have a sampler variable in a shader: uniform sampler2DArray tiles; Which I am trying to bind to a texture unit in GL: ...
3
votes
1answer
201 views

Double buffering always necessary?

Question from the graphics newbie: What I know by now is that "usually" double buffering is used: You calculate the content of frame x+1 while frame x is shown on the screen, if you want to achieve ...
0
votes
0answers
34 views

How combine multiple projections into a single pass?

We have a projector type display used in an automotive application, where a projector displays an application on the windshield. Because the projector would normally warp a flat image, we have to ...
0
votes
1answer
35 views

GLFW | What is a frame?

Here I was reading about buffers and found such text: When the entire frame has been rendered, the buffers need to be swapped with one another, so the back buffer becomes the front buffer and vice ...
1
vote
0answers
36 views

How to render multiple shaders per mesh

I've tried looking everywhere, but I just don't get it. How is multiple shaders assigned to a mesh if you can only bind a single shader in OpenGL? Assume I have a mesh with a texture shader and now I ...
2
votes
1answer
276 views

What's the difference between Clipping and Culling?

In a tutorial about OpenGL both words are mentioned, unfortunately without a good explanation. To find out, I have read this article three times, but I fear I'm a too common man... my understanding is ...
1
vote
1answer
61 views

In the rendering pipeline, in what coordinate space are vertices when they arrive at the primitive assembly stage?

Full disclaimer, this was a test question, but I couldn't find any information online. In my opinion, this depends on if the primitive assembly stage happens before or after perspective division. If ...
0
votes
1answer
46 views

About view matrix and frustum culling

I was trying to determine if an object (sphere) is inside a view frustum. My strategy was first to get the view matrix: ...
2
votes
1answer
66 views

Zero-copy texture reading from CPU memory

The Intel 740 AGP graphics card read textures directly from system RAM, using VRAM exclusively for depth buffers and the framebuffer. This has the effect of saving video RAM, and it could be ...
1
vote
1answer
187 views

Debugging tools for OpenGL on macOS

I am porting some code from Metal to OpenGL since we want to run our app on Windows too. Xcode is my preferred IDE, but the newer versions of Xcode do not support any OpenGL debugging. Question: What ...
1
vote
0answers
22 views

Confusion about glVertexAttribPointer and non-active attributes

When binding an attribute index using glVertexAttribPointer, what happens when a later bound program does not contain an attribute at said index? Is the behaviour undefined, or is the attribute ...
1
vote
1answer
37 views

Change of speed but no change of size after OpenGL Perspective Projection

I am new to OpenGL and I am trying to code un optic flow with dots appearing from the background and moving towards the viewer. As a consequence of a perspective projection, the dots are faster and ...
1
vote
1answer
74 views

In what scenarios and how does GL_ARB_buffer_storage help performance?

The Dolphin emulator for GameCube/Wii has the ability to use the ARB_buffer_storage (or EXT_buffer_storage for GLES) to improve rendering performance. From the extension's description, a GPU driver ...
0
votes
0answers
23 views

What quad will fill the screen, which can be inverse-projection-view transformed to map to the near frustum plane?

I've been experimenting with raytracing using GLSL. I had success rendering a cube which encloses the object. Now I want to do a full-screen raytrace, and I want to construct a quad which covers the ...
0
votes
0answers
23 views

How to visualize a dataset , generated in curvilinear grid, in opengl with texture maping?

I have a dataset obtained from astronomical simulation. This data was created in a curvilinear grid with polar coordinates. The form of this dataset is a simple array (1d) of intensities, i can ...
2
votes
1answer
66 views

Trading off instancing for render order

I've been doing some searching online and it seems like I could improve my renderer by ordering my draw calls based on depth. For opaque objects render the closest items first and move backward in ...
4
votes
1answer
198 views

Why is OpenGL recompiling my depth map vertex shader based on the GL state?

I've written a shader that writes depth to each face of a cube map, as part of rendering cube map shadows for a realtime 3D engine I'm writing with OpenGL and C++. The shader transforms each vertex ...
1
vote
1answer
65 views

Weird glColor3f results in framebuffer objects

The code is glColor3f(1, 1, 1); gluSphere(gluq, 0.2, 10, 10); glColor3f(1, 0, 0); glTranslatef(1, 0, 0); gluSphere(gluq, 0.2, 10, 10); In short, when I draw ...
2
votes
1answer
76 views

Use glTranslatef and shaders?

In newer OpenGL it's encouraged to use shaders and pass the model-view-projection as parameters. But what if I drew a complex object, and wanted to translate/rotate it and draw many copies? For ...
2
votes
0answers
50 views

Screen space reflections become warped when looking up or down

I have been experiencing issues over the past few days with implementing SSR on water into my engine. Looking straight forward, it appears to be alright. However, when I look up or down, the ...
2
votes
1answer
72 views

Represent shape as particles

Input: Triangles which make up an arbitrary shape. Each triangle is represented by 3 3D points. Output: A set of particles which fills up the inside of the object (see image). I have read the ...
1
vote
1answer
85 views

Camera position in vertex shader

in the vertex shader I have the vertex position vpos which is in object space and I want to get the vector going from the camera to ...
1
vote
2answers
348 views

How can i create a 3D Sphere(earth) using OpenGL, GLFW, GLAD, GLM?

Please help me out with this thing and currently i am a little more than a beginner so please tell me in that context. i don't need any obsolete methods for creating this like using GLUT or GLEW.can ...
0
votes
1answer
85 views

Pseudo rounded cube in OpenGL

If I have a cube in OpenGL, how can I have it appear like rounded? I think it's too complicated to really have the cube rounded so is there any "light trick" to have something like this: The cubes ...
1
vote
1answer
34 views

Is there a list of OpenGL extension support?

I am looking for a list that states which vendor does support which OpenGL extension. For example I wanted to use ARB_shading_language_include, which was accepted ...
2
votes
1answer
130 views

Is it possible to do color conversion on decoded video without getting it from GPUmemory to CPU memory?

Decoding video will result in different pixel formats on different GPUs and drivers. I have an application which can render (using OpenGL), only the RGB8 pixel format, therefore I need to do color ...
2
votes
1answer
166 views

GLSL Compute Shader doesn't run for large inputs

The shader takes an SSBO of Photons that have a position, direction, wavelength and intensity and each thread is responsible for tracing exactly one photon through the grid, where at each grid cell ...
2
votes
1answer
101 views

Async readback storage buffer

Every frame I dispatch a compute shader which write data in a storage buffer. The cpu needs to readback this data and use it. I would expect this to work : ...
0
votes
0answers
33 views

Software Rendering Display Latency

I've been doing some reading as to how to reduce input delay on modern computing devices. A lot of my understanding from this comes from the VR research paper by Carmack explaining the numerous ...
3
votes
2answers
194 views

Triangle - Why is it the basic building block for complex shapes

I was recently learning about OpenGL and computer graphics development. I have a question regarding the usage of triangle as the basic building block, or basic shape to develop complex shapes. Is ...
1
vote
1answer
91 views

How was computer graphics libraries or gtk,qt programmed?

I am wondering how was first graphic or image libraries created,I know C and Python ,I want to create plotting application,and I cant imagine these libraries(QT,OpenGL,Vulkan) written by C,how can I ...
2
votes
1answer
278 views

What do the OpenGL version strings from glxinfo actually mean?

Note: I wasn't 100% certain if this question belonged here or in Ask Ubuntu. I figured since it was about OpenGL programming I'd put it here, but if I should move it to Ask Ubuntu, please let me know. ...