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
0 answers

Stop glTexImage2D from clamping data

When I call glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, w, h, 0, GL_RGBA, GL_FLOAT, data); , it seems that OpenGL will clamp the values of data to [0.0, 1.0]. Is there some way to prevent OpenGL from clamping it, and just write the exact floating…
user10037795
0
votes
1 answer

Non recursive ray_color function from Raytracing in One Weekend in GLSL using compute shaders

I am trying to write a real time ray tracer using compute shaders in opengl 4.3. I know that this is a rather popular question. I have checked this, and this, but the architecture provided over there does not really correspond to my use case. I am…
Kaan E.
  • 515
  • 4
  • 16
0
votes
1 answer

What happened to glAlphaFunc? Why was it deprecated?

I was reading about the side effects of using "discard" in OpenGL's fragment shader, such as early testing being disabled. But I could not find any alternative for alpha-testing until I stumbled upon glAlphaFunc, which seems to be deprecated since…
Type Definition
  • 75
  • 1
  • 13
0
votes
0 answers

Vertices indexing in geometry shader & SSBO performance

I'm constructing a shader program & GL host environment that would do a relatively simple task: Run VS -> TCS -> TES -> GS set of shader stages on a number of triangles (patches). TES/TCS do produce additional tesselated triangles. Create a simple…
lhog
  • 105
  • 1
  • 8
0
votes
1 answer

knapsack ComputerGraphics cg opengl

I'm trying to implement knapsack using OpenGL. I'm generating balls of given weight and profit taking values from the user, and then draw balls on the screen. I want to send the balls which are selected into a box but I'm not at all able to move the…
NK Prasad
  • 3
  • 2
0
votes
0 answers

Drawing a cube for each vertex

I have a list of 3D vertices which I can easily render as a pointcloud by passing the whole list to my vertex shader, setting gl_Position = pos, then setting FragColor = vec4(1.0, 1.0, 1.0, 1.0)and use GL_POINTS in the drawing function. I would now…
Ke Vin
  • 2,004
  • 1
  • 18
  • 28
0
votes
1 answer

OpenGl - enable debugging - runtime System.AccessViolationException

I've been through multiple articles on enabling glDebugMessageCallback and I don't get any compile errors. However, when I run the program, I get a runtime System.AccessViolationException right on the glDebugMessageCallback call. I'm using GLEW…
Jim
  • 864
  • 1
  • 8
  • 16
0
votes
1 answer

What is the most efficient way to normalize a point cloud (for display in OpenGL)?

Given a point cloud with x,y,z coordinates in some arbitrary range (i.e. x: [-40,40], y: [-1,1], z: [-100:100]) what is the most efficient way to transform the coordinates such that they fall within OpenGL's clipping volume range (x: [-1,1], y:…
j_dev
  • 191
  • 1
  • 2
  • 11
0
votes
1 answer

Draw object with multi texture and other object with one texture

I want draw object rectangle with two texture and triangle with only one texture. I follow this website LearnOpenGL.com -…
ledien
  • 529
  • 2
  • 8
  • 19
0
votes
0 answers

Mandelbrot set in OpenGL - C

I'm new to OpenGL and I am trying to get a mandelbrot set computed with OpenGL and GLFW. I found the code here but freeglut is broken on my system and for some reason complains about no callback being set even though it clearly is being set. It…
BitShift
  • 977
  • 2
  • 9
  • 28
0
votes
0 answers

How do I draw a polygon with a 1,2 ... or n-pixel inset outline in OpenGL 4.1?

How do I create a polygon in OpenGL 4.1 that has an inset border of n-pixels? Presumably, since I have said the magic word "pixel", this means that I need to invoke a fragment shader of some form. (And, even though I said "pixel", this might need…
0
votes
1 answer

Particle collision with voxel world in compute shader

I've added a particle system to a voxel game I'm working on. At the moment, all the physics are done on the CPU, and it's pretty slow (my CPU struggles with 2000 particles). For each particle, I determine the range of voxels that it could…
Mr. Smith
  • 4,288
  • 7
  • 40
  • 82
0
votes
1 answer

Using glBindVertexArray in update loop in DSA code or not

I'm the process of converting some opengl code to DSA and everywhere its written not to bind the vertex array, because its inherit in DSA. So I use GLuint VBO, VAO, indexBuffer; glCreateVertexArrays(1, &VAO); glCreateBuffers(1,…
Hans Micheelsen
  • 19
  • 1
  • 2
  • 10
0
votes
1 answer

OpenGL big 3D texture (>2GB) is very slow

My graphics card is GTX 1080 ti. I want to use OpenGL 3D texture. The pixel (voxel) format is GL_R32F. OpenGL did not report any errors when I initialized the texture and rendered with the texture. When the 3D texture was small (512x512x512), my…
user3677630
  • 635
  • 6
  • 14
0
votes
1 answer

Access primitive id/index a vertex belongs inside glsl:vertex-shader

I'm drawing set of polygons using glMultiDrawArray command. I want to color each polygon with a different color. If I can access the primitive index (or the polygon) a vertex belongs to inside vertex shader, I can look color up from an array and…
warunapww
  • 966
  • 4
  • 18
  • 38