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

Synchronization with fencing

I have a misunderstanding using glClientWaitSync function. Admit I am using something like that : glDraw(...); sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); glDraw(...); glClientWaitSync(sync, GL_SYNC_FLUSH_COMMANDS_BIT,…
Antoine Morrier
  • 3,930
  • 16
  • 37
0
votes
1 answer

Reusing VBO for hardware instancing

Usually I try to separate mesh specific information (VBO/VAO) from instance specific information (transform, uniforms, etc). In this way parts of the code which manipulate instance info do not need to know anything about VBOs/VAOs, and…
glopes
  • 4,038
  • 3
  • 26
  • 29
0
votes
1 answer

glReadPixels changing the buffer data?

I'm having a strange issue where calling glReadPixels appears to be changing the data of the pixels being read. I'm reading from two RGBA textures on a framebuffer, which are used to encode the position and velocity of particles. While debugging, I…
Claytorpedo
  • 179
  • 2
  • 13
0
votes
1 answer

OpenGL rotate camera on 2 keys

Basically what I'm trying to do is rotate a camera around an object in the center when I hold down "c" and use the arrow keys. My first question doesn't have much to do with the camera, but with having a key callback recognize 2 keys at the same…
wheels
  • 99
  • 2
  • 2
  • 9
0
votes
1 answer

GLSL no color when using two input variables multiplied

Sorry for the bad title, but I couldn't come up with anything better. I have the following fragment shader code: #version 430 core out vec4 color; uniform vec4 coords; //set to {1.f,1.f,1.f,1.f} uniform vec3 values; //{time, a, b} void main() { …
Grisungen
  • 333
  • 2
  • 7
0
votes
1 answer

glGetQueryObjectuiv, "Bound query buffer is not large enough to store result."

I am trying to solve an error I get when I run this sample. It regards query occlusion, essentially it renders four times a square changing everytime viewport but only the central two times it will actually render something since the first and the…
elect
  • 6,765
  • 10
  • 53
  • 119
0
votes
0 answers

OpenGL 4.3+ element arrays

I'm building my own game engine in C++14 with a core OpenGL 4.3 back-end. I'm following the following tutorials: http://www.learnopengl.com/ http://antongerdelan.net/opengl/ I also follow these books: OpenGL SuperBible (Sixth Edition) OpenGL 4…
cjdb
  • 54
  • 3
  • 9
0
votes
1 answer

Is there a simple way to get the depth of an object in OpenGL (JOGL)

how can I get the z-Coordinate of an Object in 3D-space when I click on it. (Its not really an Object more an graph, I need to know what an user selected) I use JOGL.
Kanteran
  • 80
  • 8
0
votes
1 answer

OpenGl Rendering .obj file issue

I am trying to load a .obj file using a .obj file loader I built and it seems to be working correctly (in terms of loading). With that being said, when I go to draw the 3d object to the screen it creates a large red square. GLenum err =…
user5600884
  • 119
  • 1
  • 8
0
votes
1 answer

how to draw a circle using opengl4

I want to draw a circle. but anything isn't drawn. for (int i = 0; i < 1080; i += 3) { angle = (float)M_PI / 180.0f * i; vertices[i] = sinf((float)angle) * 0.5f; vertices[i + 1] = cosf((float)angle) * 0.5f; vertices[i + 2] =…
keehl
  • 43
  • 2
  • 9
0
votes
2 answers

SFML - Opengl VAO issue giving me an (1282) error

I am getting an error when trying to use VAO's inside of SFML and not sure if it is SFML or it is my own opengl code GLenum err = glewInit(); if (err != GLEW_OK) { std::cout << "NOT WORKING" << std::endl; } std::vector
user5600884
  • 119
  • 1
  • 8
0
votes
1 answer

near/far planes and z in orthographic rasterization

Ive coded tons of shaders but Ive stumbled into something I never realized before. I needed a vertex + fragment shader with a simple orthographic projection, with no depth test. The camera is Z-aligned with the origin. I disabled GL_DEPTH_TEST, and…
user815129
  • 2,236
  • 2
  • 20
  • 40
0
votes
1 answer

WARN: Variable cannot be bound (it either doesn't exist or has been optimized away)

I am trying to pass a variable timeVar (a float initially set to 0.0) that changes in my display() method with the line timeVar = time(0); to my fragment shader. Then I do this safe_glUniform1f(h_uTime, timeVar); and pass it to my shader…
user3474409
  • 55
  • 2
  • 10
0
votes
1 answer

SDL2 with OpenGL 4.4: Triangle Not Rendering Properly

I'm using OpenGL 4.4 with SDL2. I am trying to render a simple triangle with the vertices (-1, -1, 0), (1, -1, 0), (0, 1, 0). However, when I think I'm doing everything correctly, nothing is drawn. I extracted and reorganized the relevant code from…
0
votes
0 answers

Shadow not rendered correctly

I am trying create shadow using shadow maps. I believe that shadow map is rendered well. It seems that sphere's shadow is not in the correct place, so how would I go about fixing that? Also why is there a black ring around the sphere and how to…
BINKLE
  • 1
  • 4