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

cannot render own created model with loaded models together in modern OpenGL

I am failing to render my own created model with loaded obj at the same time. I have mesh.h that is designed for loading objects: struct Vertex { glm::vec3 Position; glm::vec3 Normal; }; struct Light { glm::vec3 position; …
1
vote
1 answer

Why does glObjectLabel only fails for GL_TEXTURE?

Using OpenGL 4.3 with a debug context, I am able to label programs, shaders, vertex arrays and vertex buffers. However, I am not able to label textures and get the following error in my callback: Source: DebugSourceApi Type: DebugTypeError Id:…
aybe
  • 15,516
  • 9
  • 57
  • 105
1
vote
1 answer

OpenGL GLM rotate 2D shape around Z-axis

This is similar to this question, but I have a 2D triangle I'm trying to rotate solely about the z-axis, so I don't think I have to do any negative rotations. I have intentionally picked a triangle that is centered around the center of the screen (I…
Jon G
  • 317
  • 2
  • 7
1
vote
2 answers

Issues with infinite grid in OpenGL 4.5 with GLSL

I've been toying around with an infinite grid using shaders in OpenGL 4.5, following this tutorial here. Since the tutorial was written for Vulkan and a higher version of GLSL (I'm using 450 core), I had to move the vertices out of the vertex shader…
Mauricio
  • 123
  • 5
1
vote
2 answers

OpenGL Render Half Polygon

I am getting half polygon rendered while using Indices in OpenGL. Any idea what's going wrong? float vertices[] = { -0.5f, 0.5f, 0, -0.5f, -0.5f, 0, 0.5f, -0.5f, 0, 0.5f, -0.5f, 0, 0.5f, 0.5f, 0, -0.5f, 0.5f, 0 }; …
1
vote
1 answer

c++ opengl 4.5 doesn't show the object

I writed code which must to show triangle but it doesn't. I really don't know where is problem. I checked everything and don't find out what is the problem. If you can please help me. Here is code: #include #include…
1
vote
1 answer

Can we run the openGL project from server using node.js child process?

I have been trying to automate the launching of OpenGL Project from server using node.js The problem is like whenever new client join in (create a window in browser) I want to launch the .exe file. .exe file is an OpenGL Project which renders…
MacTak
  • 21
  • 2
1
vote
1 answer

Textures using different data types for different components

The OpenGL 4.5 doc and spec mentions the existence of parameter names GL_TEXTURE_RED_TYPE, GL_TEXTURE_GREEN_TYPE, GL_TEXTURE_BLUE_TYPE, GL_TEXTURE_ALPHA_TYPE, GL_TEXTURE_DEPTH_TYPE for glTextureLevelParameter*, saying that they return the data type…
Matrefeytontias
  • 592
  • 1
  • 4
  • 13
1
vote
1 answer

How to do a branchless discard?

I have a fairly basic fragment shader which can sample from texture and change the assigned fixed color based on the sample. If I sample from the texture, I do an alpha check and discard low-alpha values. Is there a way to make this process…
Doga Oruc
  • 783
  • 3
  • 16
1
vote
1 answer

OpenGL/GLSL 4.5 - using MRT in the default FBO

I'm using MRT to resolve the 3D picking problem in OpenGL 4.5. (Reference link: http://ogldev.atspace.co.uk/www/tutorial29/tutorial29.html) According to the information I found online, we generally apply a new FBO when using the MRT. If so, I should…
Ray
  • 61
  • 4
1
vote
1 answer

When using texture arrays, why do I not have to bind the sampler to the shader?

I am creating an array of textures using GL_TEXTURE_2D_ARRAY in my code: // Load all images ito opengl unsigned int width, height; std::vector textures; int num = 0; for ( auto each : image_list ) { // Load PNG …
TuxStash.de
  • 187
  • 1
  • 8
1
vote
1 answer

With OpenGL 4.3, how do I correctly use glVertexAttribFormat/Binding?

I was trying to use this feature, here is what I did: glGenBuffers(1, &m_vbo_id); glGenVertexArrays(1, &m_vao_id); glBindBuffer(GL_ARRAY_BUFFER, m_vbo_id); glBindVertexArray(m_vao_id); glEnableVertexAttribArray(0); //…
TuxStash.de
  • 187
  • 1
  • 8
1
vote
1 answer

OpenGL Texture DSA not showing texture

I'm attempting to use the newer DSA functions to show textures but it's not working at all. Here is the code for using the older approach. unsigned int containerTexture = 0; glGenTextures(1, &containerTexture); glBindTexture(GL_TEXTURE_2D,…
xKaihatsu
  • 124
  • 1
  • 9
1
vote
1 answer

Qt + OpenGL4 : glBindVertexArray() creates a GL_INVALID_OPERATION when drawing

As the title suggests, I'm trying to find the cause of a bug in my program. glBindVertexArray() creates a GL_INVALID_OPERATION when drawing a scene in my program, even though I have properly initialized it beforehand. The program uses Qt 5.15, with…
1
vote
2 answers

Is there any difference in OpenGL between creating Index Buffers with GL_ARRAY_BUFFER and creating them with GL_ELEMENT_ARRAY_BUFFER?

I've been delving into OpenGL a while, and now, working on a project, I found that, when I'm creating an index buffer, if I bind it to a GL_ARRAY_BUFFER instead to a GL_ELEMENT_ARRAY_BUFFER has (apparently) the same result. I mean, the vertex…
LuchoSuaya
  • 77
  • 10