opengl3

You are currently browsing articles tagged opengl3.

The spec is available at http://www.opengl.org/registry/ for both profiles as well as the new GLSL 1.5 spec.

Some of the highlights:

  • OpenGL 3.2 comes in 2 “flavors” called profiles. The core profile contains the streamlined, modern OpenGL API, while the compatibility profile contains all of core plus all of the old-world APIs. An implementation of OpenGL 3.2 is required to support core, while compatibility is optional. This profile mechanism replaces the ARB_compatibility extension mechanism for providing deprecated functionality.
  • GLSL 1.5, which has numerous improvements (listed below).
  • Geometry shaders (ARB_geometry_shader4). I think we all know what this does :)
  • Multisampled textures and texture samplers (allows access to specific multi-sampling samples) (ARB_texture_multisample). This is useful for a wide range of applications, including efficient depth peeling, K-buffer emulation and multi-sampled deferred shading.
  • Fragment depth clamping (ARB_depth_clamp). Useful for a number of algorithms, such as shadow volumes.
  • Fence objects (ARB_sync or APPLE_fence). Allows finer-grained pipeline synchronization and non-blocking “are you done” queries.
  • Seamless cube map filtering (ARB_seamless_cube_map). This functionality allows the GPU to sample from adjacent faces for a given cube map sampling operation in order to compute a seamless filtered sample. Without this functionality, any samples falling outside of the selected cube map face are subject to the normal texture wrapping mode (e.g. CLAMP_TO_EDGE, etc.), which leads to seams appearing between the cube map faces.

There are also a number of new features that are designed specifically to make it easier to port Direct3D code or to re-use assets designed for Direct3D. Some of those include:

  • BGRA vertex component ordering (ARB_vertex_array_bgra). This is basically the standard Direct3D ordering.
  • Modification of the base vertex index (ARB_draw_elements_base_vertex). This adds a variant DrawElements function which allows to specify an offset that is to be added to every index. This in turn allows to have “relocatable” indexed meshes: a particular indexed mesh, for which you have the index array, can be relocated anywhere inside any number of vertex arrays. All you need to know is the new base offset of the mesh inside the vertex array that is to be used by a particular draw call. This is a direct equivalent of BaseVertexIndex in Direct3D 9 and BaseVertexLocation in Direct3D 10.
  • Configurable fragment center coordinates (ARB_fragment_coord_conventions). This basically lets you configure the fragment center and origin for fragment processing (e.g. fragment shaders). With this extension, you can adopt the Direct3D 9 conventions (pixel center at <0.0, 0.0> and origin at upper-left corner of window) or the Direct3D 10 conventions (pixel center at <0.5, 0.5> and origin at upper-left corner of window). This does not affect rasterization or transformation (which you can modify using existing OpenGL state).
  • Provoking vertex control (ARB_provoking_vertex). Quoting the extension, “[t]he provoking vertex of a primitive is the vertex that determines the constant primary and secondary colors when flat shading is enabled”. In OpenGL, the last vertex is the provoking vertex (with the exception of polygon primitives), whereas it is the first vertex in Direct3D. This lets you instruct OpenGL to use the first vertex.

As for GLSL 1.5, some of the highlights include:

  • Geometry shader support. This was previously provided by extensions, now it’s in the core spec.
  • New gl_PrimitiveID as an input to fragment shaders (relevant when using geometry shading or instancing).
  • New determinant built-in function.
  • Vertex shader inputs (e.g. vertex attributes) can now be arrays.
  • Vertex shader outputs, geometry shader inputs and outputs as well as fragment shader inputs can now be structures.
  • The “interface blocks” mechanism introduced in GLSL 1.4 to support uniform buffer objects has been expanded to include in and out interfaces as well (e.g. vertex attributes and varyings).
  • New origin_upper_left and pixel_center_integer qualifiers for gl_FragCoord, to match the configurable fragment center coordinates functionality.
  • New sampler types for multi-sampled texture sampling.

Perhaps the most dramatic change to the language are interface blocks, which is an extension of the uniform block functionality introduced in GLSL 1.4 to support uniform buffer objects. Right now, it is illegal to have an input block in a vertex shader or an output block in a fragment shader, so they are mainly used to define coarse granularity backing of interface data (e.g. varyings) between vertex, geometry and fragment shaders. Uniform blocks are shared across all shader types and can be backed by buffer objects, which is how OpenGL expresses Direct3D 10 constant buffers.

Update: More information about the release and some new extensions at http://www.g-truc.net/#news0170.

Tags: , ,

NVidia releases beta OpenGL 3.1 drivers

Get the from http://developer.nvidia.com/object/opengl_3_driver.html. I’m sure AMD will follow suite in short order. IHV support is incredibly important to the ongoing success of the OpenGL standard, so a big thank you to them.

Tags: ,

OpenGL 3.1 officially released

The spec is available at http://www.opengl.org/registry/doc/glspec31.20090324.pdf

Some of the highlights:

  • ARB_draw_instanced is now core (instanced draw in vertex shaders with an instance ID built-in)
  • EXT_copy_buffer is now core (data copies between buffer objects without round-tripping to SRAM)
  • ARB_texture_buffer_object is now core (using buffer objects as the backing store for texture images)
  • ARB_texture_rectangle is now core (non-power of two textures with non-normalized texture coordinates and additional restrictions)
  • ARB_uniform_buffer_object is now core (using buffer objects as the backing store for many uniforms)
  • New signed normalized texture format
  • Modified NV_primitive_restart is now core (server-side primitive rasterization restart)
  • All of the OpenGL 3.0 features marked deprecated in Section E of the OpenGL 3.0 specification are gone from the OpenGL 3.1 specification, with the exception of line widths greater than one.

In addition, GLSL 1.4 has been released in tandem with OpenGL 3.1. The spec is available at http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.40.05.pdf. Some of the highlights include support for uniform buffers, rectangular textures, texture buffers and instanced drawing. In addition, all OpenGL “fixed function” built-in variables, namely built-in vertex shader inputs, built-in state uniforms (with the exception of depth range parameters) and all built-in varyings have been removed.

Of course, in both cases, the removed functionality has been moved to ARB extensions (ARB_compatibility), as was described in detail in the deprecation model section of the OpenGL 3.0 specification.

Tags: ,

Khronos to reveal details about OpenGL 3.1 at GDC

From http://www.khronos.org/news/events/detail/gdc_san_francisco_2009 and Khronos announces highlights from the News Conference and Developers Sessions at GDC 2009:

Streamlined OpenGL 3.1 Specification Released
Just nine months after OpenGL 3.0; Adds cutting-edge GPU functionality

The press release also mentions that OpenCL 1.0 implementations are close to shipping, which is extremely impressive considering that the specification was not released too long ago. In any case, this is going to be an interesting week for the OpenGL and OpenCL communities.

Tags: , ,

AMD to release full OpenGL 3.0 drivers today

From FireUser.com:

The first official driver release with the full support for OpenGL 3.0 on Radeon HD 2400 and above is built into ATI Catalyst Release 9.1, set for public consumption on January 28, 2009. It will be available for download on the AMD Support & Drivers page. This release will enable full and forward-looking GL3.0 contexts on Windows XP, Windows Vista, and Linux.

Tags: ,

NVIDIA has released their final OpenGL 3.0 for Windows and Linux today. One vendor down, one to go (okay, 2 with Intel).

http://developer.nvidia.com/object/opengl_3_driver.html

Tags:

Latest NVIDIA beta drivers expose EXT_direct_state_access

NVIDIA released a new version of their beta ForceWare 180 drivers. There are 2 very interesting things about it worth mentioning.

First, it supports most of the OpenGL 3 ARB extensions, bringing some useful functionality such as vertex array objects (which first appeared on Mac OS X many years ago) and looser restrictions on framebuffer attachments with respect to their resolution.

However, the most exciting new feature is support for EXT_direct_state_access. That extension addresses a long-standing problem of the OpenGL API, namely state selectors. Indeed, there are quite a large number of functions in OpenGL whose behavior is affected by a number of state variables. For instance, the LoadMatrix* commands depend on the current matrix mode state. As the name suggest, EXT_direct_state_access adds a large number of new functions to OpenGL that explicitly take as an argument the object or piece of state to be modified, bypassing state selectors. This allows, for example, to load a texture matrix without changing the matrix mode first, or to change a texture parameter without binding that texture first.

As the EXT prefix suggests, this extensions is probably not likely to be adopted in the core specification in the next revision of OpenGL 3, but there’s a good chance it might be promoted to ARB, and integrated into core OpenGL by the 3.2 timeframe. This is pure speculation on my part, but this extension is something that a lot of people in the industry desire, so there should be momentum behind it.

Tags: ,

GLee 5.32 adds OpenGL 3 extensions support

GLee is my favorite OpenGL extension “manager” due to its simplicity (2 files to add to your project) and ease of use (just use one of the GLEE extension variables in an if statement, and function pointers are automatically bound).

Check it out.

Tags: ,

ATI Catalyst™ 8.9 brings some OpenGL 3 extensions to Windows

AMD has released ATI Catalyst™ 8.9, which includes a number of OpenGL 3 extensions:

  • ARB_half_float_pixel
  • ARB_draw_instanced
  • ARB_instanced_arrays
  • ARB_map_buffer_range
  • EXT_texture_compression_3dc
  • EXT_texture_compression_rgtc
  • EXT_texture_compression_latc
  • EXT_texture_shared_exponent
  • EXT_depth_buffer_float
  • EXT_gpu_shader4

The addition of the geometry instancing extensions and of gpu_shader4 (GLSL 1.20) is particularly significant, as they expose functionality that has been available since DirectX™ 9, and of course DirectX™ 10 features as well.

Tags: ,

Forward-compatible OpenGL 3.0 constants

Michael Lucas-Smith posted on his blog a list of forward-compatible OpenGL 3.0 constants. This, combined with my list of forward-compatible OpenGL 3.0 entry points, should help people write future-proof OpenGL code.

http://www.cincomsmalltalk.com/userblogs/mls/blogView?showComments=true&printTitle=Forward_compatible_OpenGL_3.0_defines&entry=3398275422

Tags:

« Older entries