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

Third triangle vertex in OpenGL is displayed at 0.0 when rendered in a window

So I've been trying to learn OpenGL Lately with these videos (https://www.youtube.com/playlist?list=PLlrATfBNZ98foTJPJ_Ev03o2oq3-GGOS2). But when i tried to run the program using modern OpenGL instead of legacy OpenGL, i had a little problem that…
Luca
  • 43
  • 3
2
votes
0 answers

How do I set up a custom index as generic vertex attribute data correctly?

I am trying to render multiple text labels in a single draw call. To that end I pass the matrices of each label in a uniform array. For each vertex of the text meshes a "labelIndex" attribute is passed to select the correct matrix from the…
Christian
  • 317
  • 1
  • 14
2
votes
1 answer

OpenGL usampler2d value cannot be divided

I've been writing GLSL shaders, and using an integer texture (GL_RED) to store values in the shader. When I attempt to divide a value taken from the usampler2D texture, it stays the same. The following is the minimal reproducible shader. #version…
2
votes
2 answers

Polygon tearing in OpenGL

500x500 grid with 1000 sub Divisions: Just one question. Why is this happening ? #include #include #include #define GLEW_STATIC #include #include #include "glm/glm.hpp" #include…
Prabh Jot
  • 29
  • 7
2
votes
1 answer

What is the best way to remove internal faces from an array of cubes?

I'm trying to create a Minecraft look-alike with opengl and have gotten to the point where I can draw a "chunk" of cubes clustered together. However, I can't seem to find a good method for removing all the unseen faces from inside the cluster of…
2
votes
0 answers

Replicate the infinite render distance of GL_LINES with triangles

A line rendered with GL_LINES is visible regardless of how far away from the camera it is, yet its visibility is still able to be obstructed by world geometry. I recently converted my ballistic projectile rendering code from GL_LINES to lines…
Mr. Smith
  • 4,288
  • 7
  • 40
  • 82
2
votes
1 answer

Opengl 4.0 Texture issue

Hi I am trying to render texture on a rectangle. I am using GL_CLAMP_TO_BORDER because I dont want texture to repeat itself. glTextureParameteri(id, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTextureParameteri(id, GL_TEXTURE_WRAP_T,…
Rahul galgali
  • 775
  • 2
  • 10
  • 26
2
votes
1 answer

Why wont matrix multiplication in VERTEX shader work properly?

I am getting to know OpenGL in Visual Studio 2017. Following www.learnopengl.com tutorials and got past the textures checkpoint, transformations being the main problem right now. I send my model, view and perspective matrices to the shader, using…
2
votes
1 answer

Rewrite old OpenGL to OpenGL 4.5 with DSA?

I tried to rewrite following code many times, but failed, I know I have to use functions like glCreateBuffers, glVertexArrayElementBuffer, glVertexArrayVertexBuffer, glnamedBufferData, glBindVertexArray but I have a problem with section with…
Afendas
  • 31
  • 2
2
votes
2 answers

openGL - failed to display an images

Learning to display images using QOpenGLWidget. However, I've met some problems. How can I pass the GLuint texture variable (the actual texture loaded from the image) into the shader scripts? Like how to bind GLuint texture to uniform sampler2D…
SpellTheif
  • 715
  • 2
  • 12
  • 26
2
votes
1 answer

how to use GL_RGB9_E5 format?

I am trying to use GL_RGB9_E5 format with 3D texture. For this I have created simple test to understand the usage of format. Somehow I am not getting what I expect. Following is test program GLuint texture; const unsigned int depth = 1; const…
2
votes
1 answer

Call glDrawArray using a 'count' argument stored in GPU memory only

I am generating a buffer (accessed as a SSBO) in a fragment shader during draw call #1. Then I'd like to use that buffer (accessed as a VBO) as the input for draw call #2. The problem is that, using the function void glDrawArrays(GLenum mode, GLint…
Tarquiscani
  • 649
  • 7
  • 20
2
votes
0 answers

Crash when managing shared OpenGL resources in multithreaded app on GeForce GTX 1060

Looks like a driver bug, but I'm not sure ) Or maybe I do something wrong In my application I use two different threads (and two shared contexts) to upload and render data. The app sometimes crashes (probably when the workload is higher than…
simpetar
  • 39
  • 2
2
votes
2 answers

Is there an advantage of using glGetProgramResourceLocation instead glGetUniformLocation?

When I was looking at OpenGL 4.5 specification, I noticed you could get a uniform's location by calling: glGetProgramResourceLocation(program, GL_UNIFORM, name); Which is very similar to: glGetUniformLocation(program, name); I was wondering if…
James Nguyen
  • 1,079
  • 1
  • 10
  • 20
2
votes
3 answers

OpenGL 4.0 GPU Draw Feature?

In Wikipedia and other sources' description of OpenGL 4.0 I read about this feature: Drawing of data generated by OpenGL or external APIs such as OpenCL, without CPU intervention. What is this referring to? Edit: Seems like this must be referring…