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

OpenGL SuperBible 6th edition, header file sb6.h missing

Recently I started to learn OpenGL and; in turn, began to read the OpenGL SuperBible 6th edition, which uses OpenGL 4.3. My problem is in the sb6.h header file, because in the book it was written that this is a c++ header file that defines a…
Nicholas
  • 3,529
  • 2
  • 23
  • 31
4
votes
1 answer

Updating OpenGL mipmapped texture

There is something I fail to understand completely about texture update in OpenGL.Let's say I create OpenGL texture with mipmaps like this: ///.. tex gen and bind here .... /// …
Michael IV
  • 11,016
  • 12
  • 92
  • 223
4
votes
1 answer

how glGenerateMipmap works?

I call glTexImage2D with a parameter level = 0. Then I call glGenerateMipmap(GL_TEXTURE_2D). What happens with GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL ? I assume that they are automatically set this way: glTexParameteri(GL_TEXTURE_2D,…
Irbis
  • 11,537
  • 6
  • 39
  • 68
4
votes
2 answers

glBlendFunc and glClearColor alpha parameter

In OpenGL for achieving a proper transparency effect I should use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) but with that blending function an alpha parameter in glClearColor becomes meaningless. When I change an alpha parameter in…
Irbis
  • 11,537
  • 6
  • 39
  • 68
3
votes
1 answer

Drawing a simple rectangle in OpenGL 4

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, -0.75f); This is has been removed however in…
traveh
  • 2,700
  • 3
  • 27
  • 44
3
votes
1 answer

How to implement painting (with layer support) in OpenGL?

situation I'm implementing a height field editor, with two views. The main view displays the height field in 3D enabling trackball navigation. The edit view shows the height field as a 2D image. On top of this height field, new images can be…
Velrok
  • 345
  • 4
  • 17
3
votes
2 answers

What exactly is a VBO in OpenGL?

I am trying to understand the theory behind OpenGL and I'm studying VBOs at the moment. This is what I understand so far: when we declare a series of vertices, let's say 3 vertices that form a triangle primitive, we basically store those nowhere,…
3
votes
1 answer

Can an SSBO binding point index be any value?

When you specify "location = x" in a shader to specify a shader storage or uniform buffer binding point, can that number be any value? Is this binding point independent of which shader is currently bound? Would it be possible to bind all my ubos and…
3
votes
1 answer

OpenGL geometry shader, setting input size

I've written my first geometry shader with success. It takes in lines and outputs a little triangle at the center of each. I could do the same thing for triangles easily enough, but what about a cube? Is there a way to get a geometry shader to…
Hal Gee
  • 65
  • 2
3
votes
1 answer

glpointsize() Fails to Shrink a Point

I'm trying to write a simple opengl program that cyclically grows and shrinks a single point at the center of the screen using glPointSize() and a variable pointSize. Printing the value of pointSize and stepping through the code with a debugger…
overflow
  • 33
  • 4
3
votes
1 answer

How do I draw vertices that are stored in a SSBO?

This is a question following OpenGL and loading/reading data in AoSoA (hybrid SoA) format. I am trying to use a shader storage buffer object (SSBO) to store vertex data which is represented in AoSoA format. I am having trouble drawing the vertices,…
thomas_f
  • 1,854
  • 19
  • 27
3
votes
1 answer

Inverted geometry gBuffer positions for perspective. Orthographic is ok?

I have a deferred renderer which appears to work correctly, depth, colour and shading comes out correctly. However the position buffer is fine for orthographic, while the geometry appears 'inverted' (or depth disabled) when using a perspective…
lfgtm
  • 1,037
  • 6
  • 19
3
votes
1 answer

How do I query the alignment/stride for an SSBO struct?

I'm not sure which structure layout is most suited for my application: shared, packed,std140, std430. I'm not asking for an explanation of each, that information is easy to find, it's just hard to figure out the impact each will have on vendor…
Mr. Smith
  • 4,288
  • 7
  • 40
  • 82
3
votes
1 answer

PyOpenGL - Minimal glDrawArrays Example

I've seen many minimal PyOpenGL examples, but none of the ones I've found make use of VAOs or glDrawArrays / glDrawElements. Instead they all use glVertex, glut shapes, and occasionally the old glCallList function. I'm now trying to write a minimal…
Codesmith
  • 5,779
  • 5
  • 38
  • 50
3
votes
0 answers

glTexImage2D memory usage in RAM (used in conjunction with an FBO)

When using glTexImage2D to attach textures to a Framebuffer Object (FBO), i recognized that the memory usage goes up in RAM. It looks like textures are allocated by OpenGL not only on the GPU but also in main memory. Why is that happening? Does it…
j00hi
  • 5,420
  • 3
  • 45
  • 82