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

opengl difference setting value in layout location or uniform variable

i am trying to get myself familiar with opengl programming. I cant stop wondering when should i use layout for variable input to a shader (with glVertexAttribPointer) vs just setting an uniform with glUniform. What are the advantage and when should…
pccash
  • 11
  • 2
0
votes
1 answer

Binding error with OpenGL buffers and Direct State Access (DSA)

I got this error from OpenGL when I use glNamedBufferStorage() : GL_INVALID_OPERATION error generated. Buffer must be bound. Normally I don't have to use glBindBuffer() with direct state access !? Here is my gl call sequence : glCreateBuffers(1,…
0
votes
0 answers

Find the maximum float in the array

I have a compute shader program which looks for the maximum value in the float array. it uses reduction (compare two values and save the bigger one to the output buffer). Now I am not quite sure how to run this program from the Java code (using…
Artholl
  • 1,291
  • 1
  • 19
  • 38
0
votes
0 answers

Modern OpenGL with SDL2: How to draw a triangle

I am using SDL2 and my intention is to draw a simple triangle using modern OpenGL. Using modern OpenGL means not to use deprecated functions such as glBegin/glEnd etc. My tutorial source is http://www.opengl-tutorial.org. My code: int main(int ac,…
Anonymous
  • 4,617
  • 9
  • 48
  • 61
0
votes
0 answers

How can I use instancing to generate 2 single different texture?

For example, I have two transform matrix: WVP_Left and WVP_Right. Can I render geometry (like a rabbit) using instancing to generate left texture and right texture? The left texture should just have only one rabbit with the WVP_Left effect, and the…
Xin YANG
  • 81
  • 1
  • 9
0
votes
1 answer

Opengl4 : how pass matrix4x4 by attributes way

I need your help for a simple thing to do (I hope) when passing Matrices4x4 by VBO and get it in the shader (version 4.3). I don't know how to do exactly. I have my version of code like it : void GLWidget::initializeGL() { // Set up the rendering…
chtimy
  • 11
  • 4
0
votes
1 answer

OpenGL generate triangle mesh

I am a beginner at OpenGl and I am trying to draw a triangle mesh in OpenGL like this and my problem is that it is not drawing and I cannot see why. Also if I print the array of vertices the x- and y-coordinate remain the same for all vertices. Both…
Marcus
  • 164
  • 1
  • 13
0
votes
0 answers

creating my own projection matrix in opengl

Here is my reasoning: openGL draws everything within a 2x2x2 cube the x,y values inside this cube determine where the point is drawn on the screen. The z value is used for other stuff... if you want the z value to have some effect on perspective…
Theo Walton
  • 1,085
  • 9
  • 24
0
votes
1 answer

How to set a unit for an object in OpenGL

I'm learning OpenGL and I'm a bit confused about setting vertex data position. For instance, I want to draw a rectangle size 300mm x 300mm, as I understand, I can assume 1 OpenGL unit = 1 mm and then I set the vertex data like this: data = [-0.5, …
ryanvolap
  • 77
  • 1
  • 8
0
votes
1 answer

Opengl 4 debug output does not work

I am writing a game. I use ArchLinux most of time but I have tried to run my game on the Ubuntu 16.04 recently. On Ubuntu 16.04 there is a strange error: 1280. It is too difficult to find what causes the error so I wanted to see opengl's debug…
VP.
  • 15,509
  • 17
  • 91
  • 161
0
votes
1 answer

Passing data through shaders

How it possible to pass data through shaders, when using vertex, tess. control, tess. evaluation, geometry and fragment shaders. I've tried using interface block this way. //vertex shaders out VS_OUT { ... } vs_out; Than I wrote this code in…
Peter
  • 435
  • 1
  • 3
  • 11
0
votes
1 answer

Tessellation with glPrimitiveRestartIndex()?

I'm trying to draw cube using tessellation and primitive restart index. With using primitive restart index I can reduce index count down to 17, and draw cube with something like…
Peter
  • 435
  • 1
  • 3
  • 11
0
votes
1 answer

Compiling a C program that uses OpenGl 4 in Mac OS X

So I am learning OpenGL 4 from openglbook. I copied and pasted the simple window creating program in my editor and followed Compiling OpenGL programs on OS X by using gcc -o hello hello.c -framework OpenGL -framework GLUT I got the following…
gjjhhh_
  • 169
  • 3
  • 21
0
votes
1 answer

glsl UNEXPECTED NEW_IDENTIFIER, expecting $end

I'm experimenting this frustrating error while compiling a fragment shader. If I try to compile the shader as it is : #version 450 core in vec2 tex_coord; in flat int vertex_id; out vec4 color; layout (binding = 20) uniform sampler2D…
Andrea Loforte
  • 117
  • 1
  • 10
0
votes
1 answer

how can I update vbo data larger than current vbo buffer size?

I generated a vbo buffer (vertex buffer) object called object_A, let's assume that object_A contains 10 vertices (30 floats). Now I want to update object_A using glMapBuffer with 20 vertices (60 floats), can I use glMapBuffer?
Damons
  • 153
  • 1
  • 1
  • 7