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
2
votes
2 answers

Texture coordinates on a triangle strip

I've created a cube with a geometry shader with 14 vertex (Thanks to triangle strip). The problem now is how to place my texture coordinates. I have an image file that contains 3 textures : Top face of the cube Bottom face left/right/front/back…
Adrien Givry
  • 956
  • 7
  • 18
2
votes
1 answer

GLSL Uniform layout binding and textures

I'm a bit confused on what would be the right way to bind the texture when uniforms are using the layout binding. layout(binding = 0, std140) uniform uCommon { mat4 projectionMatrix; mat4 viewMatrix; }; layout(binding = 1, std140) uniform…
Gediminas
  • 1,830
  • 3
  • 27
  • 47
2
votes
1 answer

glGetTextureSubImage INVALID OPERATION

I'm unable to make glGetTextureSubImage work. On the other hand, glGetTextureImage works fine for me. Test code: const unsigned int sizeX=16; const unsigned int sizeY=16; // Init texture. unsigned int texId; glCreateTextures (GL_TEXTURE_2D, 1,…
2
votes
1 answer

OpenGL DSA and FBO

I upgraded my FBO code to use DSA (Direct Access State) features from OpenGL 4.5. All is fine, but I still need to use glBindFramebuffer() before drawing. Is there something I missed ? I was thinking about this call before drawing to my FBO.…
2
votes
2 answers

Does it matter if there are gaps between uniform locations in OpenGL/GLSL shaders?

In a GLSL shader, if I have the following layout specifications: layout (location = 0) uniform mat4 modelMatrix; layout (location = 1) uniform mat4 viewMatrix; layout (location = 5) uniform mat4 projMatrix; layout (location = 30) uniform vec3…
j00hi
  • 5,420
  • 3
  • 45
  • 82
2
votes
1 answer

GLSL - unable to access second index of a SSBO array for multiple lights

In my application I add two lights. One at (0,0,2) and the second one at (2,0,0). Here's what I get (the x,y,z axes are represented respectively by the red, green & blue lines): Notice how only the first light is working and the second is not. I…
pandaman1234
  • 523
  • 7
  • 17
2
votes
1 answer

Need help adding different textures to different objects in JOGL

So I've been working 2 nights with this code that I got from my teacher. I have been looking to find some good Javadoc on JOGL without much success. So I've been using the try/fail method changing the variables here and there. I've learned how to…
2
votes
1 answer

OpenGL 4.5 - Shader storage: write in vertex shader, read in fragment shader

Both my fragment and vertex shaders contain the following two guys: struct Light { mat4 view; mat4 proj; vec4 fragPos; }; layout (std430, binding = 0) buffer Lights { Light lights[]; }; My problem is that that last field, fragPos, is…
2
votes
1 answer

Allocate multiple objects at once or not

OpenGL has functions that can create and multiple objects at once glCreateBuffers(1,&handle); ... glDeleteBuffers(1,&handle); I guess the intention is that it saves time to create/destroy all objects at once. But is that only at initialization, or…
user877329
  • 6,717
  • 8
  • 46
  • 88
2
votes
1 answer

Can I limit OpenGL version to 4.3?

I have an OpenGL 4.5 capable GPU and I wish to test if my application runs on an OpenGL 4.3 capable system. Can I set my GPU to use OpenGL 4.3?
Andreas
  • 177
  • 1
  • 8
2
votes
1 answer

Modifying a Shader Storage Buffer Object from within a Vertex Shader

In my base program (C++/OpenGL 4.5) I have copied the content of the Vertex Buffer to an Shader Storage Buffer (SSBO): float* buffer = (float*) glMapBuffer(GL_ARRAY_BUFFER, GL_READ_ONLY); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 3,…
Corbie
  • 819
  • 9
  • 31
2
votes
1 answer

OpenGL Image Load/Store 24-bit RGB images

It looks like glBindImageTexture does not have an image format for 24-bit RGB (3 8-bit channels) images. My texture has an internal format of the type GL_RGB8 (a 24-bit RGB image). Unfortunately I cannot easily change the type of my texture that I'm…
AnimatedRNG
  • 1,859
  • 3
  • 26
  • 39
2
votes
2 answers

Why is my glBindBufferRange offset alignment incorrect?

I'm having difficulty understanding how glBindBufferRange offset / alignment works in the Nvidia example project gl_commandlist_basic. I've read that the offset needs to be a multiple of GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT which is 256 and/or that…
bvs
  • 340
  • 5
  • 20
2
votes
1 answer

imageAtomic GLSL functions and RGBA image format

I have an application where I use texture buffers bound using glBindImageTexture, and my GLSL code does various things and updates the buffers. Recently I changed some of my image buffer formats from GL_R32UI to GL_RGBA32UI. So basically, one texel…
Martin Frank
  • 199
  • 1
  • 13
2
votes
1 answer

GLSL skips "if" statement

My GLSL fragment shader skips the "if" statement. The shader itself is very short. I send some data via a uniform buffer object and use it further in the shader. However, the thing skips the assignment attached to the "if" statement for whatever…