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

GLSL uniform access causing sefault in program

I have a program set up with deferred rendering. I am in the process of removing my position texture in favour of reconstructing positions from depth. I have done this before with no trouble but now for some reason I am getting a segfault when…
RamblingMad
  • 5,332
  • 2
  • 24
  • 48
0
votes
2 answers

Is there a standard way to rotate around local coordinates (that is, from a modelview matrix) in OpenGL 4.0?

I've been working on a game engine and recently got to the point where I could easily create a Camera class to manage a view matrix (or allow an easy switch to another). I know conceptually what it must do, but where I'm having trouble is figuring…
Cave Dweller
  • 502
  • 2
  • 4
  • 17
0
votes
1 answer

How to render multiple textures?

I'm trying to understand how to render multiple textures for different objects in OpenGL. I decided to simply try it, as far as I'm aware glActivate is used to select the right texture, but it doesn't work as I expected it. In my code, two objects…
user1502256
0
votes
1 answer

Incorrect texture coordinate calculated for shadow map

I am having problems getting the correct texture coordinate to sample my shadow map. Looking at my code, the problem appears to be from incorrect matrices. This is the fragment shader for the rendering pass where I do shadows: in vec2 st; uniform…
jbills
  • 694
  • 1
  • 7
  • 22
0
votes
1 answer

Tiled rendering compute shader light culling and shading

I'm trying to implement tiled-deferred rendering in OpenGL/GLSL and I'm stuck on light culling. My GPU is kind of older (AMD Radeon 6490m) and for strange reasons compute shaders runs in infinite cycle when atomic operations are called inside them…
mezo
  • 423
  • 1
  • 7
  • 19
0
votes
1 answer

glDrawElement crashes using GLSL shaders

I coded a simple program using GLSL which must display a simple textured Box. To do this I load an OBJ file called 'Box.mesh' and next I initialize VBOs for the vertex, normal, texture and index buffer. Here's the Box.mesh file content : o Cube v…
user1364743
  • 5,283
  • 6
  • 51
  • 90
0
votes
4 answers

Is there an OpenGL function to reset a texture to a solid color?

Is there a way to initialize or reset an OpenGL texture with a solid color? I can use functions up to OpenGL 4.0 since I'd like to support notebook's Intel HD Graphics 4000.
danijar
  • 32,406
  • 45
  • 166
  • 297
0
votes
3 answers

How to rotate a single object in a 3d scene?

I want to rotate an object in a 3d scene. In the code below I simply rotated the WorldMatrix. But what if the scene contained 2 objects instead of one? If I rotated the WorldMatrix both would rotate (in a weird way). How should I rotate a single…
user1502256
0
votes
0 answers

How can I draw SDL_Texture (SDL 2) using vertex buffer (OpenGL 4+)?

I've tried to find some code, but found only obsolete. I've made only verts & indices arrays (hope they are correct): const SDL_Point blocksCount = { 4, 16 }; //I have texture with 4x16 squares 8x8 px. f32 *verts = new f32[(blocksCount.x + 1) *…
Necronomicron
  • 1,150
  • 4
  • 24
  • 47
0
votes
1 answer

GLSL 4.2 - Syntax error: "layout" parse error

So, I recently found an interesting shader and tried to compile it. But, the GLSL compiler threw the following error: ERROR: 0:50: error(#132) Syntax error: "layout" parse error @ (Fragment shader) #version 420 ... uint…
Andreas Goulas
  • 163
  • 1
  • 1
  • 11
0
votes
1 answer

Is it safe to use constants of higher version of OpenGL which is not supported by driver?

For instance, I'm using GL_LUMINANCE_ALPHA to transfer two component data to texture. Someone told me that some internal format constants like GL_LUMINACE_ALPHA are deprecated in OpenGL 3.0(maybe 4.0?) or higher, so use GL_RG or GL_RG8,…
slyx
  • 2,063
  • 1
  • 19
  • 28
0
votes
1 answer

Million mesh programmatically?

I have a flat surface drawn with a single fullscreen GL_QUAD. I want to deform this surface at each point specified by my GL_Texture2D, preferably through some kind of shader. In my mind, black could correspond to flat and white could correspond…
Mikhail
  • 7,749
  • 11
  • 62
  • 136
0
votes
1 answer

nvidia OpenGL extension not available even with a compatible graphics card and updated driver

I have a 440 GT Nvidia card. I need support for opengl 4.3 which contains a new GL_NV_bindless_texture extension that i need to use. I upgraded my driver and, as it says, OpenGl 4.3 would be available to all Kepler or Fermi based GPUs. Mine is on…
Darkgaze
  • 2,280
  • 6
  • 36
  • 59
0
votes
1 answer

OpenGL Window Error

I'm trying to create a simple OpenGL window in C, but I'm having problems with the window itself. A window is created, and then it suddenly disappears. I fixed this by zeroing "msg" but then the window still tries to exit and all other messages…
user1502256
0
votes
1 answer

simple triangle won't draw in opengl 4.3

I'm trying my hand at opengl programming, loaded up a default example in codeblocks, and after doing a whole lot of function pointer loading, I got myself an opengl 4.3 context in a window which can be cleared with a certain color(YES!), so I went…