Skip to content

Latest commit

 

History

History

gl_330

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OpenGL 3.3 Highlights (g-truc review)

  • dual source blending
  • load a diffuse texture and enables blending in order to get the output of the fragment shader on the index 1
  • ?
  • OpenGL texture objects is a conceptual non sens which blend data and operations on a single object. It results in a lot of limitations that various extensions try to remove. GL_ARB_sampler_objects allows sampling a single image with multiple different filters and sampling multiple images with the same filter. This could be a huge benefice both in texture memory (no data copy) and texture filtering processing thanks to an adaptive filtering per-fragment. Why using an amazing filtering method when the fragment is in a blurred part of the image? This extension still rely on the "texture unit" semantic.
  • render four different types of data, RGB10A2, F32, I8 and I32
  • OpenGL 330 capabilities
  • renders 10 instance of the same geometry, changing the color attribute once every two instance
  • Instanced arrays provides an alternative to the current OpenGL instancing techniques. We can already use uniform buffer and texture buffer to store the per instance data, GL_ARB_instanced_arrays proposed to use array buffers for per instance data. Using the function glVertexAttribDivisor for each per-instance array buffer, we specify that the draw call must use the first attribute for N vertices where N should be the count of instances vertices. This extension allows to draw multiples different objects as well, as far as they have the same number of vertices. Using attributes for instance data is likely to avoid the latency of a texture buffer fetch but might fill up the attribute data flow if the size of per instance data is quite large. Probably the fastest instancing method for small per instance data rendering and huge number of instance.
  • glVertexAttribDivisor(Semantic.Attr.POSITION, 0) this means disabled (==0)
  • glVertexAttribDivisor(Semantic.Attr.COLOR, 2) this means enabled (!=0)
  • glDrawArraysInstanced
  • renders a texture to an fbo with multisampled (4) renderbuffer color and multisampled (4) renderbuffer depth and then resolve it on the screen. The left part of the screen renders averaging among samples, the right one fetch only the first sample.
  • GL_NV_explicit_multisample
  • GL_TEXTURE_RENDERBUFFER_NV
  • textureSizeRenderbuffer
  • texelFetchRenderbuffer
  • conditional rendering
  • GL_ARB_occlusion_query2
  • GL_ANY_SAMPLES_PASSED
  • glBeginConditionalRender - glEndConditionalRender
  • query the time at the begin and at the end of the rendering
  • glQueryCounter
  • GL_TIMESTAMP
  • GL_QUERY_RESULT_AVAILABLE
  • queries if any samples has passed, expected GL_FALSE or GL_TRUE
  • GL_ANY_SAMPLES_PASSE
  • GL_ARB_timer_query use the query object to request the time in nanosecond spend by OpenGL calls without stalling the graphics pipeline. A great extension for optimizations and maybe for dynamically adjusting the quality level to keep a good enough frame rate.
  • queries the elapsed time
  • GL_TIME_ELAPSED
  • anisotropy filtering at 1, 2, 4 and 16
  • GL_TEXTURE_MAX_ANISOTROPY_EXT
  • different sampler filters
  • GL_NEAREST
  • GL_LINEAR
  • GL_LINEAR_MIPMAP_NEAREST
  • GL_LINEAR_MIPMAP_LINEAR
  • renders the upper left corner of a texture with GL_TEXTURE_MIN_FILTER/GL_TEXTURE_MAG_FILTER to GL_NEAREST_MIPMAP_NEAREST/GL_NEAREST and the lower right with GL_LINEAR_MIPMAP_LINEAR/GL_LINEAR
  • renders a texture with four different wrap s/t
  • GL_MIRRORED_REPEAT
  • GL_CLAMP_TO_BORDER
  • GL_REPEAT
  • GL_CLAMP_TO_EDGE
  • texture swizzling
  • GL_TEXTURE_SWIZZLE_R
  • GL_TEXTURE_SWIZZLE_G
  • GL_TEXTURE_SWIZZLE_B
  • GL_TEXTURE_SWIZZLE_A