GLUT, FreeGlut, GLFW, etc… Stackoverflow answers
The Open-Asset-Importer-Lib
The Open-Asset-Importer-Lib - Viewer
irrXML 1.2 API documentation
OpenGL Context
OpenGL and multithreading
Legacy OpenGL
Fixed Function Pipeline
Getting Started
Creating an OpenGL Context (WGL)
What is shareable between OpenGL contexts and how to enable sharing
GitHub - graphics-snippets - C++ code snippets - Debug context and Debug output
error | hex | number |
---|---|---|
GL_INVALID_ENUM |
0x0500 | 1280 |
GL_INVALID_VALUE |
0x0501 | 1281 |
GL_INVALID_OPERATION |
0x0502 | 1282 |
GL_STACK_OVERFLOW |
0x0503 | 1283 |
GL_STACK_UNDERFLOW |
0x0504 | 1284 |
GL_OUT_OF_MEMORY |
0x0505 | 1285 |
https://stackoverflow.com/questions/59793047/what-is-proper-way-of-handling-data-in-compute-shader
When does OpenGL get finished with pointers in functions?
EXT_shader_framebuffer_fetch
KHR_blend_equation_advanced
OpenGL extension availability on newer contexts
Why OpenGL uses column-major matrix order?
Concentration of potentially active microfacets in a Normal Distribution Function
Can I use different multiGPU in OpenGL?
OpenGL Context with Multiple Devices (Monitors)
What happens when rendering on monitors connected to different GPUs
OpenGL ES deprecated in iOS 12 and SKShader
Minimal Windowless OpenGL Context Initialization
Windowless OpenGL
How to render offscreen on OpenGL?
How to use GLUT/OpenGL to render to a file?
PyOpenGL headless rendering
OpenGL render view without a visible window in python
Creating OpenGL context without window
It is not possible to create an OpenGL Context with an version above 1.0 without any window.
But it is possible to use a completely hidden window for “offscreen” rendering.
It is possible to create a initially hidden window with the GLFW library by setting the window hint VISIBLE
to False
.
Sadly it is not possible to create a initially hidden window with Pygame.
It is only possible to hide a window after it was created by pygame.display.iconify()
.
See also Hiding pygame display.
Opengl reduce usage of uniforms
Rendering Pipeline — Performance — Scaling with regard to amount of pixels
LearnOpenGL.com - Shaders
The Book of Shaders
Khronos wiki, Rendering Pipeline Overview
Khronos wiki, Shader Compilation
Khronos wiki, GLSL Object
Khronos wiki, Program Introspection
Khronos wiki, Example/GLSL Separate Program Multi Stage
Khronos wiki, Example/GLSL Separate Program Basics
Can the OpenGL ‘deprecated’ functions possibly be unsupported?
Will Vulkan effectively “replace” OpenGL or not?
Introducing Zink, an OpenGL implementation on top of Vulkan
How to make an OpenGL rendering context with transparent background?
How to move shader scripts in external files?
Multithreaded Rendering on OpenGL
Im trying to use OpenGL with the windows API on different threads
WebGL - is there an alternative to embedding shaders in HTML?
Geometry shader in web
Does every variable have to be set for every vertex emitted in a geometry shader?
Copying pixel data directly from windows Device Context to an openGL rendering context
Switching from OpenGL to GDI
Alpha Compositing, OpenGL Blending and Premultiplied Alpha
Alpha Blending: To Pre or Not To Pre
Alpha compositing
Blending
ModernGL depth-test ignoring vertices in the back (sometimes?)
Fragments with different depth are blended
Text2DEntity renders opaque and hides other entities behind it
OpenGL: Transparent texture issue
Blending doesn’t work properly when Depth Test is enabled, because the fragments behind already drawn objects are discarded by depth test before they can be blended. You must draw the primitives in the correct order from back to front to make it work properly. See also OpenGL depth sorting and OpenGL: Transparent texture issue.
Blending may not work as you expect when the Depth Test is enabled. The depth test discards the fragments before they can be blended. If depth test and blending are enabled, a fragment that is not discarded during the depth test will be blended. So it depends on the order in which the objects are drawn.
To achieve correct blending of objects with different depths, draw all objects in order from back to front (depth sorting). Since the objects are drawn from back to front, the depth test is not needed at all.
premultipliedAlpha: false
, UNPACK_PREMULTIPLIED_ALPHA_WEBGL
!
generating text texture in webgl: Alpha is opaque
WebGL: Beveled smooth anti-aliased circles using GL_POINT?
Buffer Object (Immutable Storage / Mutable Storage)
Is it possible to in-place resize VBOs?
How can I improve the performance of my custom OpenGL ES 2.0 depth texture generation?
How to render depth linearly in modern OpenGL with gl_FragCoord.z in fragment shader?
Pack depth information in a RGBA texture using mediump precison
Is it possible to depth test against a depth texture I am also sampling, in the same draw call?
OpenGL depth test doesn’t work on some computers
In addition to activating the Depth Test (glEnable(GL_DEPTH_TEST)
), it is important that the current framebuffer has a depth buffer.
The default framebuffer is created at the time the OpenGL Context is constructed. Thecreation of the OpenGL context depends on the OS and windowing library (e.g. GLFW, SDL, SFML). Whether a depth buffer is created by default often depends on the system. In general, window libraries provide additional options for explicitly specifying a depth buffer when generating the OpenGL window:
For instance:
GLFW - Framebuffer related hints
glfwWindowHint(GLFW_DEPTH_BITS, 24);
// [...]
GLFWwindow *wnd = glfwCreateWindow(800, 600, "OpenGL window", nullptr, nullptr);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
// [...]
SDL_SetVideoMode(800, 600, bpp, flags);
SFML - Using OpenGL in a SFML window
sf::ContextSettings settings;
settings.depthBits = 24;
// [...]
sf::Window window(sf::VideoMode(800, 600), "OpenGL window", sf::Style::Default, settings);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH );
glutInitWindowSize(800, 600);
Framebuffer Object
Framebuffer Object Extension Examples
Multisampling
Multiple output buffers with the default framebuffer
OpenGL 4.6 API Compatibility Profile Specification - 17.4.1 Selecting Buffers for Writing, page 631:
If the default framebuffer is affected, then each of the constants must be one of the values listed in table 17.6 or the special value BACK. When BACK is used, n must be 1 and color values are written into the left buffer for single-buffered contexts, or into the back left buffer for double-buffered contexts. If a framebuffer object is affected, then each of the constants must be one of the values listed in table 17.5. In both cases, the draw buffers being defined correspond in order to the respective fragment colors. The draw buffer for fragment colors beyond n is set to NONE.
[Khronos reference page - glCheckFramebufferStatus
][https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glCheckFramebufferStatus.xhtml]:
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
is returned if the value ofGL_RENDERBUFFER_SAMPLES
is not the same for all attached renderbuffers; if the value ofGL_TEXTURE_SAMPLES
is the not same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value ofGL_RENDERBUFFER_SAMPLES
does not match the value ofGL_TEXTURE_SAMPLES
.
Concept: what is the use of glDrawBuffer and glDrawBuffers?
opengl es 2.0 android c++ glGetTexImage alternative
Should I ever use a vec3
inside of a uniform buffer or shader storage buffer object?
Passing a list of values to fragment shader
Can I put a R8G8B8A8 in a UBO, and use it as a vec4?
Can I make a GLSL struct have std140 layout?
GLSL: Are writes to Shader Storage Buffers discarded (or undone) by a later discard statement?
What is the proper way to modify OpenGL vertex buffer?
Overhead of glDrawArrays vs. glMultiDrawArrays
Errors during creation of OpenGL objects
EXT_shader_framebuffer_fetch - gl_LastFragData
Is there a way in Opengl es 2.0 fragment shader, to get a previews fragment color
#extension GL_EXT_shader_framebuffer_fetch : require
OpenGL Shadow Map Mobile Version Doesn’t work
Implementing a gooey effect with a shader (Processing 3)
How to add glowing effect to a line for OpenGL?
How to get a “Glow” shader effect in OpenGL ES 2.0?
Do conditional statements slow down shaders?
Why won’t my GLSL program link when one shader is optimized and the other is not?
Is it ok to declare an oversized output array in fragment shader and leave some indices unused?
OpenGL - How to calculate normals in a terrain height grid?
How can I use ARGB color in opengl/SDL?
Frequency of shader invocations in rendering commands
Is it really so difficult to draw smooth lines in Unity?
glLineStipple deprecated in OpenGL 3.1
Three.js uniform dashed line relative to camera
Dashed line in OpenGL3?
OpenGL ES - Dashed Lines
Drawing rectangle with dashed boundary in openGL android
Draw a simple dotted line or dashed line in OpenGL GLES20 android using fragment shader and GL_LINE_STRIP
OpenGL Line Width
GLSL Geometry shader to replace glLineWidth
OpenGL 3.2 Core Profile glLineWidth
Transformation order reversed in glMatrix?
Algorithm for finding Eigenvectors given Eigenvalues of a 3x3 matrix in C#
How to access automatic mipmap level in GLSL fragment shader texture?
How to perform Mipmapping in WebGL?
Does it make sense to use own mipmap creation algorithm for OpenGL textures?
How multi sampling works for Integer textures
how should i handle (morphing) 4D objects in opengl?
Rendering meshes with multiple indices
Why does OpenGL not support multiple index buffering?
Random / noise functions for GLSL
Why transforming normals with the transpose of the inverse of the modelview matrix?
Silhouette-Outlined shader
OpenGL - object outline
Scalable outline for any shape with THREE.js
What exactly are eye space coordinates?
Get Projection and View Matrix from Camera Matrix
Projection matrices: What should depth map to?
Transformation of 3D objects related to vanishing points and horizon line
Using Quaternions for OpenGL Rotations
Reflection and refraction impossible without recursive ray tracing?
How to handle incorrect index calculation for discretized ray tracing?
Ray Tracer Shadow Problems
Antialiasing during depth post-processing for SSAO
Incorrect tracing with SSLR (Screen Space Local Reflections)
How to scale environment map perspective according to the position of the main camera
Passing a list of values to fragment shader
How to draw inside the black edges in iOS SDK with OpenGL ES?
Drawing Filled, Concave Polygons Using the Stencil Buffer
opengl create a depth_stencil texture for reading
OpenGL 16 bit stencil buffers?
Strange bugs occur while using stencil testing
How to use stencil buffer to achieve hierarchical clipping
In a TBN Matrix are the normal, tangent, and bitangent vectors always perpendicular?
What is state-of-the-art for text rendering in OpenGL as of version 4.1?
Correspondance between texture units and sampler uniforms in opengl
How do opengl texture coordinates work?
Difference between U V and S T texture coordinates
What is, in simple terms, textureGrad()?
OpenGL vertex shader for pinhole camera model
Does it make sense to use own mipmap creation algorithm for OpenGL textures?
Is glTexStorage2D imperative when auto generating mipmaps
How to get texture data using textureID’s in openGL
Will any of the following texture lookups cause undefined behavior, non-uniform flow, or both?
Weighted Blended Order-Independent Transparency rendering issues
OpenGL: Transparent texture issue
How are tripled sequence in IBO working?
glVertexAttribPointer and glVertexAttribFormat: What’s the difference?
OpenGL: Vertex attribute arrays per primitive?
Drawing multiple triangles in OpenGL