All Questions
638 questions
0
votes
0
answers
30
views
Bindless Uniform Variables
I am implementing a 3d renderer in OpenGL.
Here is how you would render some 3d models:
Renderer3D.begin(camera);
Renderer3D.setShader(shader_1);
Renderer3D.render(model_1, transform_1);
Renderer3D....
0
votes
0
answers
52
views
OpenGL does nothing to window
I am making an OpenGL renderer with winit in rust. The issue is, that even gl::ClearColor does nothing to the screen.
My suspicion is that the opengl context is somehow bound to the wrong window or ...
0
votes
0
answers
44
views
Python and OpenGL: Texture Not Filling Polygon Correctly in Koch Snowflake Rendering [duplicate]
Question:
I’m working on rendering a Koch snowflake with a sinus-plasma texture using PYTHON and OpenGL. The initial polygon is star-shaped, evolving into the Koch snowflake. My goal is to fill this ...
0
votes
0
answers
57
views
What happens when rendering an OpenGL buffer that has been padded with NULL (or another value)?
I have the following setup:
S - the scene that includes terrain, some houses and other man-made objects
T - a set of tree configurations that I would like to iterate through and place in S.
Every ...
1
vote
1
answer
142
views
Can I solve this OpenGL problem with the depth/stencil buffers
I'm trying to render meshes with the points and edges as black lines and points, similar to a modeling engine like blender. I have 3 separate draw routines to draw points, lines, and faces (each face ...
0
votes
0
answers
49
views
Why opengl code in a lib doesn't renderer?
I am experimenting with OpenGL using c99 on windows and VS 2022. I tried to create an window using glfw in one project and put a function that supposed to generate a texture in another project that is ...
1
vote
2
answers
491
views
HGLRC OpenGL rendering context - How to indicate the version of the OpenGL
How I'm creating my rendering context using wgl :
//Device
HDC hdc = GetDC(hWnd);
HGLRC hRC = wglCreateContext(hdc);
How/where/when should I change the version of the OpenGL context?
Is there a ...
1
vote
0
answers
124
views
Using vectors to store vertex attributes
I've been trying to use a vector to accumulate transformed screen coordinates so that I can render multiple objects at the same time rather than rendering one object per frame.
At the moment, I see ...
0
votes
1
answer
124
views
Sphere not rendering properly in OpenGL
I am trying to render a sphere using OpenGL ES 3.0, with the FragColor being equal to the normals of the sphere, but due to some reason I am seeing the inner circles(horizontal circles) in the sphere, ...
0
votes
0
answers
565
views
UV coords flipped opengl?
I'm currently writing a simple 2D renderer using OpenGl and C and have been trying to implement a system that allows you to only render part of a texture for things such as animations with sprite ...
0
votes
1
answer
115
views
How to draw multiple vertices per transform?
I have two buffers:
(1) Vertices - Holds interleaved positions, colors, etc. Many of these make up a single mesh.
(2) Transforms - Holds 4x4 transform matrices. One of these corresponds to a single ...
0
votes
1
answer
490
views
Can't have a separate depth and stencil buffer for a custom framebuffer? OpenGL
I wanted to create a depth and stencil buffer for a new frame buffer object. But I got GL_FRAMEBUFFER_UNSUPPORTED error. This is how I was creating the buffers:
GLuint depthBuffer;
...
0
votes
1
answer
469
views
Efficiently transforming many different models in modern OpenGL
Suppose I want to render many different models, each with a different transformation matrix I want to be applied to their vertices. As far as I understand, the naive approach is to specify a matrix ...
0
votes
0
answers
53
views
Flexible llighting method in 2D (using OpenGL)
I'm working on a simple 2D game engine. I'd like to support a variety of light types, like the URP in Unity. Lighting would be calculated according to the normal and specular maps attached to the ...
0
votes
1
answer
106
views
opengl get window space to world space cursor position
i am trying to get the mouse cursor in world space pos from window space(-1,1 window width and height) using the viewprojectionmatrix.
This is how i calculate my projection matrix:
static mat4 ...