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
1 answer

How to color triangles with indexed vertices

I have an application which draws a tetrahedron with glDrawElements(GL_TRIANGLES,...) I would now like to color the tetrahedron's faces with a single flat color each. If i understand correctly, i have to triplicate my 4 vertices so that every face…
user1479670
  • 1,145
  • 3
  • 10
  • 22
3
votes
1 answer

Cannot get index buffers to draw a square in OpenGL

I'm definitely doing something extremely rookie here, but I simply cannot draw a square with index buffers. I'm following the intructions in this video. But I just don't get the expected output. If I comment out one of the vertices in the array, it…
youneverknow
  • 137
  • 2
  • 8
3
votes
1 answer

glMultiDrawElementsIndirect is slow

I'm rewriting my old rendering pipeline. I created a very lean prototype of what I'd like, and I'm stunned that my old fairly complex and badly optimized pipeline has the exact same performance as the super simple prototype. Task is rendering 1024…
Simon Danisch
  • 554
  • 3
  • 8
3
votes
1 answer

Getting data back from compute shader

I'm fairly new to opengl and I found myself in situation where I need to get data from compute shader but as I miss some critical knowledge I can't get it to work. So I came here, so that maybe you can give me some hints. Say I have a compute shader…
3
votes
0 answers

OpenGL staging buffer to improve Uniform Buffer performance

I read that driver seems to put buffers on client side memory, so it comes to me a different idea to manage my uniform buffers. My uniform buffers work with matrix, materials etc, so they are updated more than once by frame. The old way was this one…
Antoine Morrier
  • 3,930
  • 16
  • 37
3
votes
1 answer

OpenGL 4.5 : glClear() doesn't work (using SDL2 and GLEW)

I made a short code in order to clear a SDL2 window with black color using OpenGL 4.5 (GLEW API). However, it works only when I use my Intel chipset (In this case an older OpenGL version should be used). The problem is that if I use my Nvidia GTX…
Antonin
  • 181
  • 2
  • 11
3
votes
1 answer

glBindBuffer and direct state access?

According to slide 23 of NVIDIA's OpenGL 4.5 Update presentation the following is true: Non-DSA: glGenBuffers + glBindBuffer DSA: glCreateBuffers I tried writing a DSA only program. While using glDrawArraysIndirect to draw I'm forced to use…
Tek
  • 2,888
  • 5
  • 45
  • 73
3
votes
1 answer

Binding a single buffer to multiple indexed targets of the SSBO, simultaneously

Am I allowed to bind a single opengl buffer to multiple indexed targets (of the SSBO target) simultaneously? For instance, suppose my shader has two different uniform blocks with different binding indexes. If the information I need is located in the…
obelloc
  • 299
  • 1
  • 14
3
votes
1 answer

How do I use image store with 3D textures?

I am trying to store data into a 3D texture, however it doesn't seem to work. I set up the texture like this: glGenTextures(1, &voxelTexture); glBindTexture(GL_TEXTURE_3D, voxelTexture); unsigned char clearData[VoxelSize* VoxelSize*…
user975989
  • 2,578
  • 1
  • 20
  • 38
3
votes
1 answer

Are OpenGL indices and locations the same thing for uniforms and vertex attributes?

In the OpenGL Reference Pages, some functions are marked as using uniform locations, while other functions are marked as using uniform indices. Are these the same thing? Similarly for vertex attributes, some functions are marked as using vertex…
Litherum
  • 22,564
  • 3
  • 23
  • 27
3
votes
1 answer

glNamedBufferData fires GL_INVALID_OPERATION

I get an exception at the very begin of my sample, when I try to allocate geometry for the gound, here and here: at this point gl4.glNamedBufferData(vertexBuffer[0], Vertex.size() * vertices.size(), floatBuffer,…
elect
  • 6,765
  • 10
  • 53
  • 119
3
votes
0 answers

How do you upload texture data to a Sparse Texture using TexSubImage in OpenGL?

I am following apitest on github, and am seeing some very strange behavior in my renderer. It seems like the Virtual Pages are not receiving the correct image data. Original Image is 500x311: When i render this image using a Sparse Texture, i must…
Joe
  • 454
  • 1
  • 6
  • 20
3
votes
1 answer

Number of fragment shader outputs

Does OpenGL provide API to gain number of fragment shaders outputs? I've found functions such as glBindFragDataLocation, glBindFragDataLocationIndexed, glGetFragDataIndex and glGetFragDataLocation but all of them are designed to set indices or…
t91
  • 163
  • 1
  • 8
3
votes
2 answers

Upgrading project to OpenGL 4.1 on OSX - Using NSOpenGLProfileVersion4_1Core makes rendering slow

I'm trying to update an OSX OpenGL project to OpenGL 4.1. My shaders use #version 410 and everything is working and pretty snappy. Today I noticed that there's a new NSOpenGLPFAOpenGLProfile value for 4.1, so I updated the pixel format profile from…
Mike Hays
  • 93
  • 6
3
votes
2 answers

Parralax mapping does not work correctly using OpenGL and GLSL

I try to implement parralax mapping in my 3D engine using OpenGL and GLSL API but the display is not correct. To learn and apply the complexity of a such technique I was inspired by the following PDF tutorial (page 16, 17 and…
user1364743
  • 5,283
  • 6
  • 51
  • 90