Questions tagged [opengl-4]

OpenGL 4 is the current iteration of the OpenGL standard, designed to reflect newest capabilities of modern GPU in 3D rendering. OpenGL 4 requires DX11 level hardware.

OpenGL 4 is the current iteration of the OpenGL () standard, designed to reflect newest capabilities of modern GPU in 3D rendering. OpenGL 4 requires DX11 () level hardware. The major features of GL4 include: hardware tesselation support, ability to dynamically link shader subroutines, ability to set individual blend equations and blend functions for each color output and a mechanism to supply the arguments to certain Draw functions from buffer-object memory.

Release Dates:

  • OpenGL 4.0: March 11, 2010
  • OpenGL 4.1: July 26, 2010
  • OpenGL 4.2: August 8, 2011
  • OpenGL 4.3: August 6, 2012
  • OpenGL 4.4: July 22, 2013
  • OpenGL 4.5: August 11, 2014
  • OpenGL 4.6: July 31, 2017
426 questions
3
votes
2 answers

Does an immutable texture need a GL_TEXTURE_MAX_LEVEL?

When allocating textures using glTexImage* functions, I know that I need to set glTexParameteri(GL_TEXTURE_MAX_LEVEL) to a reasonable value and specify all the levels up to that value, as described here. I didn't expect for this to be necessary in…
Kos
  • 70,399
  • 25
  • 169
  • 233
3
votes
1 answer

Obtaining a unique buffer index for multiple threads accessing a voxel

I'm trying to implement a portion of "Octree-Based Sparse Voxelization for Real-Time Global Illumination". Basically just the voxelization, which I am already done with. And the "Voxel-fragment list" construction, which is basically several…
ragnar
  • 480
  • 3
  • 18
3
votes
2 answers

What about NURBS and opengl 4.2 core?

NURBS chapter in RedBook is denoted deprecated, including utility library: "Even though some of this functionality is part of the GLU library, it relies on functionality that has been removed from the core OpenGL library." Does it mean OpenGL 4.2…
Ahk4iePaiv8u
  • 108
  • 1
  • 8
3
votes
2 answers

eye-space pixel width in GLSL vertex shader

I want to compute the eye-space width of a pixel's projected pyramid at the current vertex location in a glsl vertex shader, but I can't seem to get the math right. Here is an obviously incorrect example: // GLSL VERTEX SHADER #version 410…
atb
  • 1,412
  • 1
  • 14
  • 30
3
votes
1 answer

glsl double-precision vertex buffer

If I create a double-precision vertex buffer, for example: GLuint vertBuffer, spanBuffer, spanCount, patchSize, program; // already setup glUseProgram (program); glEnableClientState (GL_VERTEX_ARRAY); glBindBuffer (GL_ARRAY_BUFFER,…
atb
  • 1,412
  • 1
  • 14
  • 30
3
votes
1 answer

OpenGL 4.2 headers, Mesa 3D, extensions - how does it fit together?

Now, I've had an extremely hard time finding information about OpenGL headers and extensions and how to access the latest features. OpenGL.org doesn't touch upon any of this, neither does Mesa (updated 2006!) or anyone - but I can't think I am the…
Max
  • 4,345
  • 8
  • 38
  • 64
2
votes
0 answers

OpenGL glProam link failed in windows: error C5145: must write to gl_Position

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: Vertex info ----------- (0) : error C5145: must write to…
NerdNiels
  • 21
  • 1
2
votes
1 answer

OpenGL - Can I draw non-indexed when index-buffer is set for VAO?

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 commands, or will it work with glDrawArrays…
Newline
  • 769
  • 3
  • 12
2
votes
2 answers

Initializing a OpenGL VBO with a struct

Im having problems to add a struct to a OpenGL VBO This is my struct struct Vertex { //vertices std::vector vertices; //texture coordinates std::vector texCord; } This is how im assigning and initializing the…
Denmuell
  • 87
  • 1
  • 10
2
votes
1 answer

glGetTexImage returns all-black texture

I'm using the OpenGL API (v 4.6) to do some image processing stuff, its basically OpenGL image load store operations in a shader, I load the Texture via glBindImageTexture and do some processing, then I want to use glGetTexImage to read the contents…
2
votes
0 answers

OpenGL mapped memory not updating

I have a code like this: glNamedBufferStorage(atlas, capacity, nullptr, GL_DYNAMIC_STORAGE_BIT | GL_MAP_READ_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); mappedMemory = glMapNamedBufferRange(atlas, 0, cap, GL_MAP_READ_BIT |…
Danol
  • 368
  • 1
  • 15
2
votes
1 answer

OpenGL Setting SSBO for Compute Shader

I've been having trouble sending data to an SSBO for use by a compute shader. Unfortunately, the khronos docs say "TODO" and I cant make their sample code work, and people seem to do very slightly different things Example 1 Example 2 Example 3 - can…
Turtwiggy
  • 21
  • 3
2
votes
1 answer

Texture doesn't get rendered when applying a shader in OpenGL

Following a tutorial, I'm trying to render text in OpenGL using FreeType. As such, a grayscale 8-bit image is used as texture for each character in a way that each byte of the image corresponds to the texture's red component. In order to render the…
Syndelis
  • 23
  • 3
2
votes
1 answer

Trouble with glVertexArrayVertexBuffer() / glVertexArrayAttribFormat() in different buffer layouts

I'm trying to bring my OpenGL code up to speed with Direct State access and have been closely following the code from Guide to Modern OpenGL Functions. I have a little test project with some vertices and colors in the form of: std::vector
Basti
  • 2,228
  • 1
  • 19
  • 25
2
votes
1 answer

OpenGL 4.5 Direct State Access Render a Triangle - GL_INVALID_VALUE

The Description I'm currently learning OpenGL and want to try out the the direct state access extension from OpenGL 4.5. Thus I setup a simple triangle render example (in 3D) which should render my triangle. The code below is executed each frame and…
ShadowDragon
  • 2,238
  • 5
  • 20
  • 32