Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
0 replies
34 views

I need to display many (a lot) 3d trajectories with modernGL. For now, I chain the trajectories and I create two arrays only (one for all the vertices and one for their colors) that I pass as params ...
mike's user avatar
  • 55
0 votes
0 answers
55 views

I have recently moved on newer hardware (laptop with rtx 5070) and so with new nvdia driver (version 575). I am now using OpenGL 4.6 rather than 3.3 I used before and now I am struggling ...
Sofiane Benzait's user avatar
0 votes
1 answer
99 views

I'm using a generic mathod to bind buffers (uniform buffers, shader storage buffers, ...) to my shader programs, based on glGetProgramResourceIndex() function and buffer's name, but sometimes I'm ...
Vingilot's user avatar
2 votes
0 answers
125 views

I'm currently getting a GPU's total memory from GL_NVX_gpu_memory_info or GL_ATI_meminfo. However, testing this code with an Intel Arc card neither extension is supported (makes sense). However, ...
JHall's user avatar
  • 61
-1 votes
1 answer
36 views

I was trying to set up texture rendering for an OpenGL project I was working on and I can't get it to work because apparently the glTexImage2D function's last parameter in a nint. I looked online and ...
Jackson Chapman's user avatar
2 votes
1 answer
600 views

Suppose I have three meshes A, B, C in one VBO and used glMultiDrawElementsIndirect with the instance count set to 1, 0, and 1 for A, B, and C respectively and the draw count set to 3. What would be ...
Geraldo Christiano's user avatar
0 votes
0 answers
71 views

The vertex shader: in vec3 a_Position; in vec4 a_Color; in float a_Width; in vec4 a_JointProduct; in int a_EntityID; layout(location=0) out vec3 pos; layout(location=1) out vec4 color; layout(...
Batres's user avatar
  • 33
0 votes
1 answer
132 views

I have looked everywhere but couldn't find one that used DSA (Direct State Access). I need a SSBO with dynamic size so that I can update my instances WITHOUT having a limit like MAX_INSTANCE_COUNT. At ...
Alphenex's user avatar
4 votes
1 answer
279 views

When getting the mode of GL_POLYGON_MODE, glGetIntergerv(GL_POLYGON_MODE, data), I'll have to make data an integer array of size 2. because I've read somewhere that: params returns two values: ...
Weber Lin's user avatar
0 votes
1 answer
332 views

The following works fine: glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_ID); But when I replace it with this, it doesn't work. (I don't get any errors, just a black color instead of ...
Mark's user avatar
  • 45
-1 votes
1 answer
80 views

so I'm having a problem with what it seems to be shadow acne (as far as I can tell), but the thing is that I have not yet implemented shadows of any type. I have implemented Phong Lighting model (...
borja vazquez's user avatar
0 votes
1 answer
333 views

I'm trying to port a Windows program to GNU/Linux, but a compute shader doesn't compile. I have a few knowledge of GLSL. So I wonder if there are workarounds to get the shader working. I have written ...
Bertrand125's user avatar
  • 1,054
0 votes
1 answer
197 views

I am currently trying to learn OpenGL, and I have the following issue: when I use glGetUniformLocation to locate my shader uniform, it simply cannot find this uniform. Do you have any idea why? My ...
Patrick's user avatar
  • 11
-1 votes
1 answer
97 views

I am trying to perform read-back of SSBO data in OpenGL. For this I persistenly map the SSBO, but the following piece of code does not actually read back the written data from the example compute ...
IGarFieldI's user avatar
0 votes
1 answer
97 views

I'm using OpenGL4.5, and using Direct State Access where possible. I wrote basic wrappers around VAO and buffer objects. I'm using glVertexArrayVertexBuffer to bind a buffer to a VAO. I'm wondering if ...
Newline's user avatar
  • 993
1 vote
0 answers
158 views

I stumbled upon a problem that I'm unsure of how to fix or if a fix even exists. I need to apply a positive polygon offset to a filled mesh for rendering some line geometry on top of them. The lines ...
IGarFieldI's user avatar
1 vote
1 answer
100 views

I'm trying to gradually change a triangle's color to each color on the spectrum. The color basically changes incrementally in every iteration of the render loop and passes the color information to a ...
Creui's user avatar
  • 13
0 votes
2 answers
681 views

I am doing on overhaul on a game engine from my university and I've hit a brick wall when dealing with OpenGL rendering. I'm using OpenTK with GLFW.NET to render to a window. (I recently switched to ...
Alex Vasile's user avatar
2 votes
0 answers
112 views

I am currently learning the Book "Computer Graphics Programming - Using OpenGL and C++". When I test the chapter 2-3, I found the error: shader program failed to link: Program Info Log: ...
NerdNiels's user avatar
0 votes
1 answer
131 views

I have an MFC based Windows desktop SDI application built with the Doc-View framework and which displays modern OpenGL based 3D graphics in the MainFrame. It used for rendering relatively simple ...
DavidH's user avatar
  • 107
0 votes
0 answers
642 views

I need to pass two textures of 65536x1024 pixels each to the shader program. I can't do this via the standard glTexImage2D() method because there is a limitation on the OpenGL side on the height and ...
Fabalo Asdimov's user avatar
1 vote
0 answers
219 views

this question is a bit related to this one, but quite some time has gone by since it was asked. The basic premise: I have device-local (non-mappable) vertex buffers with interleaved attributes. These ...
IGarFieldI's user avatar
1 vote
1 answer
189 views

I'm currently writing a render pass which renders to a framebuffer with attached color and depth attachments. Before the pass starts, it needs to clear the depth attachment to a set value. I'm trying ...
IGarFieldI's user avatar
0 votes
1 answer
284 views

I have a very simple shader here: #version 460 layout (location = 0) in vec3 inPos; layout (location = 0) out vec3 outPos; void main() { gl_Position = vec4(inPos.x, inPos.y, inPos.z, 1.0); ...
Liyuu_'s user avatar
  • 51
0 votes
1 answer
144 views

I have just started using OpenGl in visual studio. I used the drawsquare() and drawRoundRect () to draw multiple shapes in seperate void functions which I called seperately in an another function ...
Wiki's user avatar
  • 1
-2 votes
1 answer
110 views

I am trying to get the uniform block name from a shader handle using glGetProgramResourceName(). Yet it throws (0xC0000005: Access violation executing location 0x0000000000000000) on std::vector<...
user3533871's user avatar
1 vote
2 answers
895 views

I've followed a gtkmm4 + opengl example, the window loads and displays without any errors and renders one frame but then seems to ignore my queue_render() and queue_draw() calls as evidenced by the ...
seraph's user avatar
  • 109
1 vote
1 answer
119 views

In the OpenGL 4.6 specification under section 22.3, a command named glGetInternalformat is described which can be used to gather implementation dependent information about internal formats. The ...
Dwarfley's user avatar
1 vote
1 answer
95 views

I am failing to render my own created model with loaded obj at the same time. I have mesh.h that is designed for loading objects: struct Vertex { glm::vec3 Position; glm::vec3 Normal; }; ...
Alexander S's user avatar
1 vote
1 answer
284 views

Using OpenGL 4.3 with a debug context, I am able to label programs, shaders, vertex arrays and vertex buffers. However, I am not able to label textures and get the following error in my callback: ...
aybe's user avatar
  • 16.8k
4 votes
1 answer
2k views

According to this wikibook it used to be possible to draw a simple rectangle as easily as this (after creating and initializing the window): glColor3f(0.0f, 0.0f, 0.0f); glRectf(-0.75f,0.75f, 0.75f, -...
traveh's user avatar
  • 2,934
-1 votes
2 answers
426 views

Trying to setup bindless textures, whenever I call glGetTextureHandleARB() it results in the OpenGL error GL_INVALID_OPERATION. This page says this is because my texture object specified is not ...
Pancake's user avatar
1 vote
1 answer
706 views

This is similar to this question, but I have a 2D triangle I'm trying to rotate solely about the z-axis, so I don't think I have to do any negative rotations. I have intentionally picked a triangle ...
Jon G's user avatar
  • 317
0 votes
1 answer
211 views

I am writing a shader that uses the same algorithm several times on different inputs to calculate some intermediate results that are later combined to get the final result. The data is dependent on ...
Arkadiy Mel's user avatar
1 vote
2 answers
2k views

I've been toying around with an infinite grid using shaders in OpenGL 4.5, following this tutorial here. Since the tutorial was written for Vulkan and a higher version of GLSL (I'm using 450 core), I ...
Mauricio's user avatar
  • 145
0 votes
1 answer
560 views

As per the OpenGL documentation, void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); The second argument count in the call to glDrawElements, "Specifies the ...
DigitalEye's user avatar
  • 1,585
0 votes
0 answers
20 views

I have a texture that used to be read in as GL_INTENSITY16 internal pixel format. After upgrading the pipeline ive noticed GL_INTENSITY16 is deprecated though i can kind of load the texture with ...
Marauder2k9's user avatar
1 vote
2 answers
80 views

I am getting half polygon rendered while using Indices in OpenGL. Any idea what's going wrong? float vertices[] = { -0.5f, 0.5f, 0, -0.5f, -0.5f, 0, 0.5f, -0.5f, 0, 0.5f, -0.5f, 0, ...
Techpreneur's user avatar
0 votes
1 answer
1k views

I have a problem with a very simple compute shader that just copies a texture using imageStore. #define KS 16 // kernel size layout (local_size_x = KS, local_size_y = KS) in; layout(location = 0) ...
tuket's user avatar
  • 4,169
0 votes
1 answer
655 views

I get OpenGL error 1282 when I try to run fragment shader with a function that returns struct with uint array initialized from function argument and integer literal. When I run my program with the ...
Arkadiy Mel's user avatar
2 votes
1 answer
524 views

I set up a VAO, binding vertex-buffers to it for vertex attributes, but also set index-buffer (With glVertexArrayElementBuffer). Does that restrict it so it only works with glDrawElements type of ...
Newline's user avatar
  • 993
1 vote
1 answer
843 views

I'm getting the following warning: Buffer performance warning: Buffer object 19 (bound to NONE, usage hint is GL_DYNAMIC_DRAW) is being copied/moved from VIDEO memory to HOST memory. I allocate this ...
Newline's user avatar
  • 993
0 votes
0 answers
131 views

I have a problem which only affects ATI-graphic cards on PC, but it seems no other graphics hardware, including Nvidia/Intel/Android/iOS. When I create a 2D texture I allocate using glTexStorage2D, ...
Viktor Sehr's user avatar
  • 13.2k
0 votes
0 answers
59 views

This base code was working well for 2D objects, but will not render the 3D object that I have the vertices and index for. At first I thought it was the shader, but the shader works well for ...
faangorn's user avatar
0 votes
1 answer
732 views

glblitframebuffer requires matched internal format, so what's the internal format of default framebuffer's depth component?Is there a standard?I couldn't find a document for it. My laptop's nvidia ...
xubury's user avatar
  • 104
1 vote
1 answer
66 views

I writed code which must to show triangle but it doesn't. I really don't know where is problem. I checked everything and don't find out what is the problem. If you can please help me. Here is code: #...
Normal Name's user avatar
0 votes
1 answer
360 views

Here's the things, I am trying to do deferred shading with multisample texture. To create the GBuffer, I create a framebuffer with mutlisample texture attachments to draw on and a framebuffer with ...
xubury's user avatar
  • 104
0 votes
1 answer
1k views

I have a scene in which i load the same texture only depending on its resolution i use different filtering modes in OpenGL, these are GL_LINEAR, GL_NEAREST and so on. For example, for a texture with a ...
Kenny's user avatar
  • 132
1 vote
1 answer
349 views

I have been trying to automate the launching of OpenGL Project from server using node.js The problem is like whenever new client join in (create a window in browser) I want to launch the .exe file. ....
MacTak's user avatar
  • 21
0 votes
0 answers
97 views

I'm relatively new to opengl and I'm trying to make a basic 2d scened with gl-4.5. I have three tiles laid next to each other on the plane, two images from a single spritesheet and a coloured ...
Amos's user avatar
  • 1

1
2 3 4 5
9