mirror of
https://github.com/openharmony/third_party_opengles.git
synced 2026-07-01 04:39:50 -04:00
@@ -0,0 +1,4 @@
|
||||
Options +Indexes
|
||||
|
||||
# Rewrites from old opengl.org GL and khronos.org ES/SC registries
|
||||
# are done in those locations on a per-file/pattern basis.
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
From: Barthold Lichtenbelt <barthold.lichtenbelt 'at' 3dlabs.com>
|
||||
Date: Wed, 01 Dec 1999 10:32:55 -0700
|
||||
|
||||
3Dlabs extension support for:
|
||||
|
||||
Permedia3 Create!, Oxygen VX1, Oxygen GVX1, Oxygen GVX210
|
||||
---------------------------------------------------------
|
||||
|
||||
GL_Autodesk_valid_back_buffer_hint *
|
||||
GL_EXT_bgra
|
||||
GL_EXT_blend_minmax
|
||||
GL_EXT_blend_subtract
|
||||
GL_EXT_paletted_texture
|
||||
GL_EXT_polygon_offset
|
||||
GL_EXT_shared_texture_palette
|
||||
GL_EXT_texture3D
|
||||
GL_EXT_texture_edge_clamp
|
||||
GL_EXT_texture_env_add
|
||||
GL_EXT_texture_env_combine
|
||||
GL_EXT_texture_object
|
||||
GL_EXT_vertex_array
|
||||
GL_KTX_buffer_region *
|
||||
GL_WIN_swap_hint
|
||||
|
||||
* WinNT only. All other ones are for Win9x and WinNT.
|
||||
|
||||
OpenGL extensions for Permedia3 Create! and Oxygen VX1 only
|
||||
-----------------------------------------------------------
|
||||
|
||||
GL_ARB_multitexture
|
||||
GL_Autodesk_facet_normal
|
||||
GL_SGIS_multitexture
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
From: "Stockwell, Bruce" <Bruce.Stockwell 'at' compaq.com>
|
||||
Date: Tue, 30 Nov 1999 10:16:29 -0500
|
||||
|
||||
PowerStorm 300/350 extension support (Tru64 UNIX and Windows NT):
|
||||
|
||||
GL_EXT_texture_object
|
||||
GL_EXT_vertex_array
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
From: "Kirkland, Dale L" <dlkirkla 'at' intense3d.com>
|
||||
Date: Thu, 9 Dec 1999 15:23:34 -0600
|
||||
|
||||
Intergraph extension support:
|
||||
|
||||
GL_Autodesk_valid_back_buffer_hint
|
||||
GL_EXT_422_pixels
|
||||
GL_EXT_bgra
|
||||
GL_EXT_blend_color
|
||||
GL_EXT_blend_func_separate
|
||||
GL_EXT_blend_minmax
|
||||
GL_EXT_blend_subtract
|
||||
GL_EXT_color_matrix
|
||||
GL_EXT_color_subtable
|
||||
GL_EXT_color_table
|
||||
GL_EXT_convolution
|
||||
GL_EXT_convolution_border_modes
|
||||
GL_EXT_fog_function
|
||||
GL_EXT_fog_offset
|
||||
GL_EXT_generate_mipmap
|
||||
GL_EXT_interlace
|
||||
GL_EXT_multisample
|
||||
GL_EXT_occlusion_test
|
||||
GL_EXT_packed_pixels
|
||||
GL_EXT_pixel_texture
|
||||
GL_EXT_rescale_normal
|
||||
GL_EXT_separate_specular_color
|
||||
GL_EXT_swap_control
|
||||
GL_EXT_texture3D
|
||||
GL_EXT_texture_border_clamp
|
||||
GL_EXT_texture_color_table
|
||||
GL_EXT_texture_edge_clamp
|
||||
GL_EXT_texture_lod
|
||||
GL_EXT_texture_object
|
||||
GL_HP_occlusion_test
|
||||
GL_I3D_color_clamp
|
||||
GL_I3D_interlace_read
|
||||
GL_KTX_buffer_region
|
||||
GL_SGIS_fog_function
|
||||
GL_SGIS_generate_mipmap
|
||||
GL_SGIS_multisample
|
||||
GL_SGIS_texture_border_clamp
|
||||
GL_SGIX_fog_offset
|
||||
GL_SGIX_interlace
|
||||
GL_SGIX_pixel_texture
|
||||
GL_SGI_color_matrix
|
||||
GL_SGI_color_table
|
||||
GL_SGI_texture_color_table
|
||||
GL_WIN_swap_hint
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
From: Brian Paul <brian_paul 'at' avid.com>
|
||||
Date: Tue, 14 Sep 1999 16:27:11 -0400
|
||||
|
||||
Mesa 3.1 extension support:1
|
||||
|
||||
GL_ARB_multitexture
|
||||
GL_EXT_abgr
|
||||
GL_EXT_blend_color
|
||||
GL_EXT_blend_logic_op
|
||||
GL_EXT_blend_minmax
|
||||
GL_EXT_blend_subtract
|
||||
GL_EXT_clip_volume_hint
|
||||
GL_EXT_compiled_vertex_array
|
||||
GL_EXT_paletted_texture
|
||||
GL_EXT_point_parameters
|
||||
GL_EXT_polygon_offset
|
||||
GL_EXT_rescale_normal
|
||||
GL_EXT_shared_texture_palette
|
||||
GL_EXT_stencil_wrap
|
||||
GL_EXT_texture3D
|
||||
GL_EXT_texture_object
|
||||
GL_EXT_vertex_array
|
||||
GL_EXT_vertex_array_set
|
||||
GL_INGR_blend_func_separate
|
||||
GL_MESA_resize_buffers
|
||||
GL_MESA_window_pos
|
||||
GL_NV_texgen_reflection
|
||||
GL_PGI_misc_hints
|
||||
GL_SGIS_texture_edge_clamp
|
||||
Executable
+77
@@ -0,0 +1,77 @@
|
||||
From: Jon Leech <ljp 'at' sgi.com>
|
||||
Date: September 10, 1999
|
||||
|
||||
Silicon Graphics extension support (various platforms):
|
||||
IR2 Extreme Impact Indy O2
|
||||
--- ------- ------ ---- --
|
||||
GL_EXT_abgr X X X X X
|
||||
GL_EXT_blend_color X X X X X
|
||||
GL_EXT_blend_logic_op X X X X X
|
||||
GL_EXT_blend_minmax X X X X X
|
||||
GL_EXT_blend_subtract X X X X X
|
||||
GL_EXT_convolution X X X X X
|
||||
GL_EXT_copy_texture X X X X X
|
||||
GL_EXT_histogram X X X X X
|
||||
GL_EXT_packed_pixels X X X X X
|
||||
GL_EXT_polygon_offset X X X X X
|
||||
GL_EXT_subtexture X X X X X
|
||||
GL_EXT_texture X X X X X
|
||||
GL_EXT_texture3D X X X X X
|
||||
GL_EXT_texture_object X X X X X
|
||||
GL_EXT_vertex_array X X X X X
|
||||
GL_SGI_color_matrix X X X X X
|
||||
GL_SGI_color_table X X X X X
|
||||
GL_SGI_texture_color_table X X X X X
|
||||
GL_SGIS_detail_texture X X
|
||||
GL_SGIS_fog_function X
|
||||
GL_SGIS_multisample X
|
||||
GL_SGIS_point_line_texgen X
|
||||
GL_SGIS_point_parameters X
|
||||
GL_SGIS_sharpen_texture X
|
||||
GL_SGIS_texture_border_clamp X
|
||||
GL_SGIS_texture_edge_clamp X X
|
||||
GL_SGIS_texture_filter4 X X X X
|
||||
GL_SGIS_texture_lod X X
|
||||
GL_SGIS_texture_select X X
|
||||
GL_SGIX_calligraphic_fragment X
|
||||
GL_SGIX_clipmap X
|
||||
GL_SGIX_fog_offset X
|
||||
GL_SGIX_instruments X
|
||||
GL_SGIX_interlace X X
|
||||
GL_SGIX_ir_instrument1 X
|
||||
GL_SGIX_flush_raster X
|
||||
GL_SGIX_list_priority X
|
||||
GL_SGIX_pixel_texture X
|
||||
GL_SGIX_reference_plane X
|
||||
GL_SGIX_shadow X
|
||||
GL_SGIX_shadow_ambient X
|
||||
GL_SGIX_sprite X
|
||||
GL_SGIX_subdiv_patch X X X
|
||||
GL_SGIX_texture_add_env X
|
||||
GL_SGIX_texture_lod_bias X
|
||||
GL_SGIX_texture_multi_buffer X
|
||||
GL_SGIX_texture_scale_bias X X X X
|
||||
GL_SGIX_depth_texture X
|
||||
|
||||
GLX_EXT_import_context X X X X X
|
||||
GLX_EXT_visual_info X X X X X
|
||||
GLX_EXT_visual_rating X X X X X
|
||||
GLX_SGI_make_current_read X X X
|
||||
GLX_SGI_swap_control X X X X X
|
||||
GLX_SGI_video_sync X X X X X
|
||||
GLX_SGIS_multisample X
|
||||
GLX_SGIX_dm_pbuffer X
|
||||
GLX_SGIX_fbconfig X X X X X
|
||||
GLX_SGIX_hyperpipe X
|
||||
GLX_SGIX_pbuffer X X X
|
||||
GLX_SGIX_swap_barrier X
|
||||
GLX_SGIX_swap_group X X X X X
|
||||
GLX_SGIX_video_resize X
|
||||
GLX_SGIX_video_source X
|
||||
|
||||
GLU_EXT_abgr X X X X X
|
||||
GLU_EXT_nurbs_tessellator X X X X X
|
||||
GLU_EXT_object_space_tess X X X X X
|
||||
GLU_EXT_packed_pixels X X X X X
|
||||
GLU_EXT_texture X X X X X
|
||||
GLU_SGI_filter4_parameters X X X X X
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
From: Ron Bielaski <Ron.Bielaski 'at' Eng.Sun.COM>
|
||||
Date: Mon, 13 Sep 1999 07:56:04 -0700 (PDT)
|
||||
|
||||
Sun Ultra extension support:
|
||||
|
||||
GL_ARB_imaging
|
||||
GL_EXT_abgr
|
||||
GL_EXT_blend_color
|
||||
GL_EXT_blend_logic_op
|
||||
GL_EXT_blend_minmax
|
||||
GL_EXT_blend_subtract
|
||||
GL_EXT_convolution
|
||||
GL_EXT_histogram
|
||||
GL_EXT_multi_draw_arrays
|
||||
GL_EXT_pixel_transform
|
||||
GL_EXT_polygon_offset
|
||||
GL_EXT_rescale_normal
|
||||
GL_EXT_texture3D
|
||||
GL_HP_convolution_border_modes
|
||||
GL_HP_occlusion_test
|
||||
GL_SGI_color_table
|
||||
GL_SGI_texture_color_table
|
||||
GL_SUNX_constant_data
|
||||
GL_SUNX_geometry_compression
|
||||
GL_SUNX_surface_hint
|
||||
GL_SUN_convolution_border_modes
|
||||
GL_SUN_global_alpha
|
||||
GL_SUN_multi_draw_arrays
|
||||
GL_SUN_triangle_list
|
||||
GL_SUN_vertex
|
||||
|
||||
GLX_SGIX_fbconfig
|
||||
GLX_SGIX_pbuffer
|
||||
GLX_SGI_make_current_read
|
||||
GLX_SUN_get_transparent_index
|
||||
GLX_SUN_init_threads
|
||||
|
||||
GLU_EXT_nurbs_tessellator
|
||||
GLU_EXT_object_space_tess
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
From: Thomas Roell <roell 'at' xig.com>
|
||||
Date: Mon, 13 Sep 1999 08:43:28 -0600 (MDT)
|
||||
|
||||
Xi Graphics extension support:
|
||||
|
||||
GL_ARB_multitexture
|
||||
GL_EXT_abgr
|
||||
GL_EXT_bgra
|
||||
GL_EXT_blend_color
|
||||
GL_EXT_blend_subtract
|
||||
GL_EXT_compiled_vertex_array
|
||||
GL_EXT_copy_texture
|
||||
GL_EXT_draw_range_elements
|
||||
GL_EXT_separate_specular_color
|
||||
GL_EXT_stencil_wrap
|
||||
GL_EXT_subtexture
|
||||
GL_EXT_texture
|
||||
GL_EXT_texture_clamp_to_edge
|
||||
GL_EXT_texture_env_add
|
||||
GL_EXT_texture_env_combine
|
||||
GL_EXT_texture_object
|
||||
|
||||
GLX_EXT_import_context
|
||||
GLX_EXT_visual_info
|
||||
GLX_EXT_visual_rating
|
||||
GLX_SGI_swap_control
|
||||
|
||||
GLU_EXT_nurbs_tessellator
|
||||
GLU_EXT_object_space_tess
|
||||
+690
@@ -0,0 +1,690 @@
|
||||
<?php
|
||||
$static_title = 'OpenGL® Application Binary Interface for Linux';
|
||||
$static_breadcrumb = array(
|
||||
'/registry/' => 'Registry',
|
||||
'/registry/OpenGL' => 'OpenGL',
|
||||
'NOLINK' => 'ABI'
|
||||
);
|
||||
include_once("../../../assets/static_pages/khr_page_top.php");
|
||||
?>
|
||||
|
||||
|
||||
<h1 style="text-align:center">
|
||||
OpenGL® Application Binary Interface for Linux <br/>
|
||||
<span style="font-size:12px"> (formerly Linux/OpenGL Base) </span>
|
||||
</h1>
|
||||
|
||||
<p style="text-align:center">Version 1.0<br/>
|
||||
Approved June 20, 2000<br/>
|
||||
Editor: Jon Leech, SGI </p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h6>Latest News</h6>
|
||||
|
||||
<p> Version 1.0 is complete. It was approved on June 20, 2000; all
|
||||
submitted votes were in favor. </p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h6>Index</h6>
|
||||
|
||||
<ul>
|
||||
<li><a href="#1">1. Overview and Goals </a></li>
|
||||
<li><a href="#2">2. Calling Conventions</a></li>
|
||||
<li><a href="#3">3. Libraries</a></li>
|
||||
<li><a href="#4">4. Header Files</a></li>
|
||||
<li><a href="#5">5. Extension Headers</a></li>
|
||||
<li><a href="#6">6. Feedback and Mailing Lists</a></li>
|
||||
<li><a href="#app">Appendix: Open Issues</a></li>
|
||||
<li><a href="#log">Change Log</a></li>
|
||||
</ul>
|
||||
|
||||
<p> <a name="1"></a></p>
|
||||
<h6>1. Overview and Goals </h6>
|
||||
|
||||
<p> 1.1. This document is intended to solve two related problems. First,
|
||||
defining the ABI and runtime environment for applications using
|
||||
OpenGL under X11 on Linux. This will enable applications using the
|
||||
OpenGL API for rendering to run on a variety of underlying
|
||||
implementations transparently. The intent is to address all of open
|
||||
source, commercial closed binary, OpenGL SI-based, and Mesa-based
|
||||
implementations. </p>
|
||||
|
||||
<p> Second, defining the SDK for developing apps using OpenGL. This
|
||||
includes header file locations, conventions for use of extensions,
|
||||
etc. </p>
|
||||
|
||||
<p> It has similar goals to the <a href="http://www.linuxbase.org">Linux
|
||||
Standard Base</a>, but focused much
|
||||
more narrowly: on the OpenGL API. Representatives from LSB are
|
||||
involved and ultimately this effort should be part of LSB. </p>
|
||||
|
||||
<p> We do not exactly track all LSB practice (particularly naming
|
||||
conventions for libraries) because LSB itself is not complete, and
|
||||
because existing practice with other OpenGL implementations suggests
|
||||
preferred methods which may differ from LSB. </p>
|
||||
|
||||
<p> 1.2. Things we do <b>not</b> attempt to address include: </p>
|
||||
|
||||
<ul>
|
||||
<li> Internal implementation dependent issues - details of direct
|
||||
rendering, loadable driver modules, etc. Such details are
|
||||
hidden from the public interfaces by the implementation,
|
||||
and are irrelevant to applications using the ABI. </li>
|
||||
<li> Operating systems other than Linux. Other platforms such as BSD
|
||||
are welcome to use whatever comes out of this project, but we
|
||||
are explicitly not trying to solve this problem for every free
|
||||
OS in the world. </li>
|
||||
<li> Changes to the OpenGL API. The definition of OpenGL is
|
||||
controlled by the OpenGL Architecture Review Board, and we in no
|
||||
way challenge this. A single GLX extension is required; this
|
||||
extension has already been approved by the ARB. </li>
|
||||
<li> Use of 3D outside the X11/GLX context. There are a variety of
|
||||
approaches (fxMesa, GGI, etc.) that again are welcome to use
|
||||
relevant parts of this project, but whose support is not part of
|
||||
its goals. </li>
|
||||
</ul>
|
||||
|
||||
<p> 1.3. We believe all critical decisions have been made. Some
|
||||
remaining comments (previously identified as open issues) of
|
||||
interest are identified in the <a href="#app">appendix</a>. We
|
||||
recognize that some decisions are largely arbitrary (filenames and
|
||||
file locations, for example) and in those cases have been guided by
|
||||
existing practice (<i>in other words, complaining about arbitrary
|
||||
decisions is unlikely to change them</i>). </p>
|
||||
|
||||
<p> 1.4. Participants in this effort to date include people working at
|
||||
or involved with the following companies and open source projects
|
||||
(as well as a large number of individuals with unknown
|
||||
affiliations): </p>
|
||||
|
||||
<blockquote>
|
||||
3Dfx, Alias/Wavefront, Apple, Avid, Compaq, Debian, HP, IBM, Intel,
|
||||
Linux Standard Base, Loki Games, Mesa, Metro Link, NVIDIA, Nichimen,
|
||||
Parametric Technology Corporation, Precision Insight, SGI, Sharp
|
||||
Eye, Sun, XFree86, Xi Graphics.</blockquote>
|
||||
|
||||
<p> <a name="2"></a></p>
|
||||
<h6>2. Calling Conventions</h6>
|
||||
|
||||
<p> 2.1. OpenGL already includes its own datatypes (<tt>GLint,
|
||||
GLshort,</tt> etc.) used in the API. Guaranteed minimum sizes are
|
||||
stated (see table 2.2 of the OpenGL 1.2 Specification), but the
|
||||
actual choice of C datatype is left to the implementation. For our
|
||||
purposes, however, all implementations on a given binary
|
||||
architecture must have common definitions of these datatypes. </p>
|
||||
|
||||
<p> For the IA32 architecture, the definitions should be: </p>
|
||||
|
||||
<table border="1" class="center-table">
|
||||
<tr><td>GL datatype</td>
|
||||
<td>Description</td>
|
||||
<td>gcc equivalent for IA32</td></tr>
|
||||
<tr><td><tt>GLboolean</tt></td>
|
||||
<td>8-bit boolean</td>
|
||||
<td><tt>unsigned char</tt></td></tr>
|
||||
<tr><td><tt>GLbyte</tt></td>
|
||||
<td>signed 8-bit 2's-complement integer</td>
|
||||
<td><tt>signed char</tt></td></tr>
|
||||
<tr><td><tt>GLubyte</tt></td>
|
||||
<td>unsigned 8-bit integer</td>
|
||||
<td><tt>unsigned char</tt></td></tr>
|
||||
<tr><td><tt>GLshort</tt></td>
|
||||
<td>signed 16-bit 2's-complement integer</td>
|
||||
<td><tt>short</tt></td></tr>
|
||||
<tr><td><tt>GLushort</tt></td>
|
||||
<td>unsigned 16-bit integer</td>
|
||||
<td><tt>unsigned short</tt></td></tr>
|
||||
<tr><td><tt>GLint</tt></td>
|
||||
<td>signed 32-bit 2's-complement integer</td>
|
||||
<td><tt>int</tt></td></tr>
|
||||
<tr><td><tt>GLuint</tt></td>
|
||||
<td>unsigned 32-bit integer</td>
|
||||
<td><tt>unsigned int</tt></td></tr>
|
||||
<tr><td><tt>GLsizei</tt></td>
|
||||
<td>non-negative 32-bit binary integer size</td>
|
||||
<td><tt>int</tt></td></tr>
|
||||
<tr><td><tt>GLenum</tt></td>
|
||||
<td>enumerated 32-bit value</td>
|
||||
<td><tt>unsigned int</tt></td></tr>
|
||||
<tr><td><tt>GLbitfield</tt></td>
|
||||
<td>32 bit bitfield</td>
|
||||
<td><tt>unsigned int</tt></td></tr>
|
||||
<tr><td><tt>GLfloat</tt></td>
|
||||
<td>32-bit IEEE754 floating-point</td>
|
||||
<td><tt>float</tt></td></tr>
|
||||
<tr><td><tt>GLclampf</tt></td>
|
||||
<td>Same as GLfloat, but in range [0, 1]</td>
|
||||
<td><tt>float</tt></td></tr>
|
||||
<tr><td><tt>GLdouble</tt></td>
|
||||
<td>64-bit IEEE754 floating-point</td>
|
||||
<td><tt>double</tt></td></tr>
|
||||
<tr><td><tt>GLclampd</tt></td>
|
||||
<td>Same as GLdouble, but in range [0, 1]</td>
|
||||
<td><tt>double</tt></td></tr>
|
||||
</table>
|
||||
|
||||
<p> <a href="#issue2.1">Issues</a></p>
|
||||
|
||||
<p> 2.2. Assembly-level call conventions must be shared. Since the
|
||||
OpenGL implementation may use C++ code internally (e.g. for GLU),
|
||||
this is potentially a serious problem. Static linking of C++
|
||||
libraries used by OpenGL libraries may be required of the
|
||||
implementation (also see the <a href="#3">Libraries</a> section
|
||||
below). </p>
|
||||
|
||||
<p> <a href="#issue2.2">Issues</a> </p>
|
||||
|
||||
<p> <a name="3"></a></p>
|
||||
<h6>3. Libraries</h6>
|
||||
|
||||
<p> 3.1. There are two link-level libraries. <tt>libGL</tt> includes the
|
||||
OpenGL and GLX entry points and in general depends on underlying
|
||||
hardware and/or X server dependent code that may or may not be
|
||||
incorporated into this library. <tt>libGLU</tt> includes the GLU
|
||||
utility routines and should be hardware independent, using only the
|
||||
OpenGL API. </p>
|
||||
|
||||
<p> Each library has two names: the link name used
|
||||
on the ld command line, and the <tt>DT_SONAME</tt> within that
|
||||
library (specified by the <i>-soname</i> switch when linking the
|
||||
library), defining where it's looked up at runtime. Both forms must
|
||||
exist so that both linking and running will operate properly. The
|
||||
library names are: </p>
|
||||
|
||||
<table cellspacing="1" border="1" class="center-table">
|
||||
<tr><td>Link name</td>
|
||||
<td>Runtime name (<tt>DT_SONAME</tt>)</td>
|
||||
</tr>
|
||||
<tr><td><tt>libGL.so<tt></td>
|
||||
<td><tt>libGL.so.1<tt></td>
|
||||
</tr>
|
||||
<tr><td><tt>libGLU.so<tt></td>
|
||||
<td><tt>libGLU.so.1<tt></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p> <tt>libGL.so</tt> and <tt>libGLU.so</tt> should
|
||||
be symbolic links pointing to the runtime names, so that
|
||||
future versions of the standard can be implemented transparently
|
||||
to applications by changing the link. </p>
|
||||
|
||||
<p> <a href="#issue3.1">Issues</a> </p>
|
||||
|
||||
<p> 3.2. These libraries must be located in <tt>/usr/lib</tt>. The
|
||||
X-specific library direction (<tt>/usr/lib/X11</tt>) was also
|
||||
considered, but existing practice on Linux and other platforms
|
||||
indicates that <tt>/usr/lib</tt> is preferable. </p>
|
||||
|
||||
<p> <a href="#issue3.2">Issues</a>
|
||||
|
||||
<p> 3.3. C++ runtime environments are likely to be incompatible
|
||||
cross-platform, including both the standard C++ library location and
|
||||
entry points, and the semantics of issues such as static
|
||||
constructors and destructors. The LSB apparently mandates static
|
||||
linking of libraries which aren't already in LSB, but this could
|
||||
lead to problems with multiple C++ RTLs present in the same app
|
||||
using C++. We'll have to tread carefully here until this issue
|
||||
is more completely understood. </p>
|
||||
|
||||
<p> <a href="#issue3.3">Issues</a> </p>
|
||||
|
||||
<p> 3.4. The libraries must export all OpenGL 1.2,
|
||||
GLU 1.3, GLX 1.3, and <tt>ARB_multitexture</tt> entry points
|
||||
statically. </p>
|
||||
|
||||
<p> It's possible (but unlikely) that additional ARB or vendor
|
||||
extensions will be mandated before the ABI is finalized.
|
||||
Applications should not expect to link statically against any entry
|
||||
points not specified here. </p>
|
||||
|
||||
<p> 3.5. Because non-ARB extensions vary so widely and are constantly
|
||||
increasing in number, it's infeasible to require that they all be
|
||||
supported, and extensions can always be added to hardware drivers
|
||||
after the base link libraries are released. These drivers are
|
||||
dynamically loaded by <tt>libGL</tt>, so extensions not in the base
|
||||
library must also be obtained dynamically. </p>
|
||||
|
||||
<p> 3.6. To perform the dynamic query,
|
||||
<tt>libGL</tt> also must export an entry point called </p>
|
||||
|
||||
<blockquote>
|
||||
<tt>void (*glXGetProcAddressARB(const GLubyte *))();</tt>
|
||||
</blockquote>
|
||||
|
||||
<p> The <a href="http://www.opengl.org/registry/specs/ARB/get_proc_address.txt">full specification</a>
|
||||
of this function is available separately. It takes the string name
|
||||
of a GL or GLX entry point and returns a pointer to a function
|
||||
implementing that entry point. It is functionally identical to the
|
||||
<tt>wglGetProcAddress</tt> query defined by the Windows OpenGL
|
||||
library, except that the function pointers returned are <i>context
|
||||
independent</i>, unlike the WGL query. </p>
|
||||
|
||||
<p> All OpenGL and GLX entry points may be queried with this extension;
|
||||
GLU extensions cannot, because GLU is a client-side library that
|
||||
cannot easily be extended. </p>
|
||||
|
||||
<p> <a href="#issue3.6">Issues</a> </p>
|
||||
|
||||
<p> 3.7. Thread safety (the ability to issue OpenGL calls to different
|
||||
graphics contexts from different application threads) is required.
|
||||
Multithreaded applications must use <b>-lpthread</b>. </p>
|
||||
|
||||
<p> 3.8. <tt>libGL</tt> and <tt>libGLU</tt> must be
|
||||
transitively linked with any libraries they require in their own
|
||||
internal implementation, so that applications don't fail on some
|
||||
implementations due to not pulling in libraries needed not by the
|
||||
app, but by the implementation. </p>
|
||||
|
||||
<p> <a name="4"></a></p>
|
||||
<h6>4. Header Files</h6>
|
||||
|
||||
<p> 4.1. The following header files are required: </p>
|
||||
|
||||
<ul>
|
||||
<li> <tt><GL/gl.h></tt> - OpenGL </li>
|
||||
<li> <tt><GL/glx.h></tt> - GLX </li>
|
||||
<li> <tt><GL/glu.h></tt> - GLU </li>
|
||||
<li> <tt><GL/glext.h></tt> - OpenGL Extensions </li>
|
||||
<li> <tt><GL/glxext.h></tt> - GLX Extensions </li>
|
||||
</ul>
|
||||
|
||||
<p> These headers should properly define prototypes and enumerants for
|
||||
use by applications written in either C or C++. Other language
|
||||
bindings are not addressed at this time. </p>
|
||||
|
||||
<p> 4.2. These header files must be located in <tt>/usr/include/GL</tt>.
|
||||
<tt>/usr/include/X11/GL</tt> was considered and rejected for the
|
||||
same reasons as library locations in section 3.2 above. </p>
|
||||
|
||||
<p> 4.3. The required headers must not pull in
|
||||
internal headers or headers from other packages where that would
|
||||
cause unexpected namespace pollution (for example, on IRIX
|
||||
<tt>glx.h</tt> pulls in <tt><X11/Xmd.h></tt>). Likewise the
|
||||
required headers must be protected against multiple inclusion and
|
||||
should not themselves include any headers that are not so protected.
|
||||
However, <tt>glx.h</tt> is allowed to include
|
||||
<tt><X11/Xlib.h></tt> and <tt><X11/Xutil.h></tt>. </p>
|
||||
|
||||
<p> 4.4. <tt>glx.h</tt> must include the prototype of the
|
||||
<tt>glXGetProcAddressARB</tt> extension described above. </p>
|
||||
|
||||
<p> 4.5. All OpenGL 1.2 and <tt>ARB_multitexture</tt>, GLU 1.3, and GLX
|
||||
1.3 entry points and enumerants must be present in the corresponding
|
||||
header files <tt>gl.h</tt>, <tt>glu.h</tt>, and <tt>glx.h</tt>,
|
||||
<b>even if</b> only OpenGL 1.1 is implemented at runtime by the
|
||||
associated runtime libraries. </p>
|
||||
|
||||
<p> <a href="#issue4.5">Issues</a> </p>
|
||||
|
||||
<p> 4.6. Non-ARB OpenGL extensions are
|
||||
defined in <tt>glext.h</tt>, and non-ARB GLX extensions in
|
||||
<tt>glxext.h</tt>. If these extensions are also defined in one of
|
||||
the other required headers, this must be done conditionally so that
|
||||
multiple definition problems don't occur. </p>
|
||||
|
||||
<p> <a href="#issue4.6">Issues</a> </p>
|
||||
|
||||
<p> 4.7. Vendor-specific shortcuts, such as macros for higher
|
||||
performance GL entry points, are intrinsically unportable. These
|
||||
should <b>not</b> be present in the required header files, but
|
||||
instead in a vendor-specific header file that requires explicit
|
||||
effort to access, such as defining a vendor-specific preprocessor
|
||||
symbol. Likewise vendors who are not willing to include their
|
||||
extensions in <tt>glext.h</tt> must isolate those extensions in
|
||||
vendor-specific headers. </p>
|
||||
|
||||
<p> 4.8. <tt>gl.h</tt> must define the symbol
|
||||
<tt>GL_OGLBASE_VERSION</tt>. This symbol must be an integer defining
|
||||
the version of the ABI supported by the headers. Its value is
|
||||
<i>1000 * major_version + minor_version</i> where
|
||||
<i>major_version</i> and <i>minor_version</i> are the major and
|
||||
minor revision numbers of this ABI standard. The primary purpose of
|
||||
the symbol is to provide a compile-time test by which application
|
||||
code knows whether the ABI guarantees are in force. </p>
|
||||
|
||||
<p> <a href="#issue4.8">Issues</a> </p>
|
||||
|
||||
<p> <a name="5"></a></p>
|
||||
<h6>5. Extension Headers</h6>
|
||||
|
||||
<p> 5.1. Providing prototypes and enumerants for OpenGL extensions is
|
||||
challenging because of the expected wide variety of hardware
|
||||
drivers, continuing creation of extensions, and multiple sources of
|
||||
header files on Linux OpenGL implementations. Some extensions will
|
||||
be supported only for a specific implementation, and some will be
|
||||
supported only for a specific hardware driver within that
|
||||
implementation. This situation does not lend itself easily to
|
||||
independent maintenance of header files definining the extensions.
|
||||
</p>
|
||||
|
||||
<p> Instead, we require a single header file defining <b>all</b> OpenGL
|
||||
extensions be supplied from a central point and updated on a
|
||||
continuing basis as new extensions are added to the OpenGL <a
|
||||
href="http://www.opengl.org/registry/">extension registry</a> (which
|
||||
is similarly centrally maintained). The central point is in the
|
||||
registry at <a href="http://www.opengl.org/registry/">
|
||||
http://www.opengl.org/registry/</a>. </p>
|
||||
|
||||
<p> The <a href="../api/GL/glext.h">latest version of
|
||||
<tt>glext.h</tt></a> is available in the registry. It is
|
||||
automatically generated from the master OpenGL function and
|
||||
enumerant registries, and is updated as new extensions are
|
||||
registered. The header is intended to be useful on other platforms
|
||||
than Linux, particularly Windows; please let us know (via feedback
|
||||
to OpenGL.org forums) if it needs enhancement for use on another
|
||||
platform. The generator scripts and ".spec" files used in
|
||||
generating glext.h are also available. </p>
|
||||
|
||||
<p> Likewise for GLX, a single header defining
|
||||
all GLX extensions, <a href="../api/GL/glxext.h"><tt>glxext.h</tt></a>,
|
||||
is required and is maintained centrally. </p>
|
||||
|
||||
<p> The registry also contains a header defining WGL
|
||||
extensions, <a href="../api/GL/wglext.h"><tt>wglext.h</tt></a>, but this is
|
||||
only for use on Windows; <tt>wglext.h</tt> is <b>not</b> required by
|
||||
or useful for the Linux ABI. </p>
|
||||
|
||||
<p> <a href="#issue5.1">Issues</a> </p>
|
||||
|
||||
<p> 5.2. The centrally maintained <tt>glext.h</tt> will be continually
|
||||
updated, so version creep is expected. This could cause problems for
|
||||
open source projects distributing source code. The proper solution
|
||||
is for users to update glext.h to the latest version, but versioning
|
||||
has proven helpful with other extensible aspects of OpenGL.
|
||||
Therefore <tt>glext.h</tt> must include a preprocessor version
|
||||
symbol <tt>GL_GLEXT_VERSION</tt>, enabling apps to do something
|
||||
like: </p>
|
||||
|
||||
<blockquote>
|
||||
<tt>
|
||||
#include <GL/glext.h><br>
|
||||
#if GL_GLEXT_VERSION < 42<br>
|
||||
#error "I need a newer <GL/glext.h>. Please download it from http://www.opengl.org/registry/ABI/"<br>
|
||||
#endif
|
||||
</tt>
|
||||
</blockquote>
|
||||
|
||||
<p> <a href="#issue5.2">Issues</a> </p>
|
||||
|
||||
<p> 5.3. Only extensions whose fully documented specifications have been
|
||||
made available to the extension registry and whose authors have
|
||||
committed to shipping them in their drivers will be included in
|
||||
<tt>glext.h</tt> and <tt>glxext.h</tt>. The structure of each
|
||||
extension defined in these headers should resemble: </p>
|
||||
|
||||
<blockquote>
|
||||
<tt>
|
||||
#ifndef GL_EXT_<i>extensionname</i><br>
|
||||
#define GL_EXT_<i>extensionname</i> 1<br>
|
||||
<i> Define enumerants specific to this extension</i><br>
|
||||
<i> Typedef function pointers for entry points specifically to
|
||||
this extension, dynamically obtained
|
||||
with glXGetProcAddressARB</i><br>
|
||||
#ifdef GL_GLEXT_PROTOTYPES<br>
|
||||
<i> Define prototypes specific to this extension</i><br>
|
||||
#endif<br>
|
||||
#endif
|
||||
</tt>
|
||||
</blockquote>
|
||||
|
||||
<p> Benign redefinition of the enumerants is allowable, so these may be
|
||||
outside protective <tt>#ifndef</tt> statements (this structure
|
||||
results from the generator scripts used in the OpenGL SI to build
|
||||
<tt>glext.h</tt>, and also because some enums may be defined by
|
||||
multiple different extensions, so it could make sense to segregate
|
||||
them). </p>
|
||||
|
||||
<p> Function pointer typedefs will use the Windows convention (e.g. the
|
||||
typedef for a function <tt>glFooARB</tt> will be
|
||||
<tt>PFNGLFOOARBPROC</tt>) for application source code portability.
|
||||
</p>
|
||||
|
||||
<p> Normally, prototypes are present in
|
||||
the header files, but are not visible due to conditional compilation.
|
||||
To define prototypes as well as typedefs, the application must
|
||||
<tt>#define GL_GLEXT_PROTOTYPES</tt> prior to including
|
||||
<tt>gl.h</tt> or <tt>glx.h</tt>. <i>(Note: consistency suggests
|
||||
using <tt>GLX_GLXEXT_PROTOTYPES</tt> for <tt>glxext.h</tt> -
|
||||
TBD)</i>. </p>
|
||||
|
||||
<p> The preprocessor symbol protecting the extension declaration
|
||||
must be the same as the name string identifying the extension at
|
||||
runtime and in the extension registry. </p>
|
||||
|
||||
<p> <b>All</b> OpenGL and GLX extensions that are shipping should have a
|
||||
full extension specification in the master
|
||||
<a href="http://www.opengl.org/registry">
|
||||
extension registry</a> on www.opengl.org. Vendors failing to document
|
||||
and specify their on extensions will not be allowed to incorporate
|
||||
the resulting inadequate interfaces into the ABI. </p>
|
||||
|
||||
<p> <a href="#issue5.3">Issues</a> </p>
|
||||
|
||||
<p> 5.4. <tt>glext.h</tt> is normally
|
||||
<tt>#include</tt>ed by <tt>gl.h</tt>. This inclusion can be
|
||||
suppressed by the application defining the preprocessor symbol
|
||||
<tt>GL_GLEXT_LEGACY</tt> prior to its <tt>#include
|
||||
<GL/gl.h></tt>. </p>
|
||||
|
||||
<p> <img src="new.gif">Similarly, <tt>glxext.h</tt> is normally
|
||||
<tt>#include</tt>ed by <tt>glx.h</tt>. This inclusion can be
|
||||
suppressed by the application defining the preprocessor symbol
|
||||
<tt>GLX_GLXEXT_LEGACY</tt> prior to its <tt>#include
|
||||
<GL/glx.h></tt>. </p>
|
||||
|
||||
<p> <a href="#issue5.4">Issues</a> </p>
|
||||
|
||||
<p> <a name="6"></a></p>
|
||||
<h6>6. Feedback and Mailing Lists</h6>
|
||||
|
||||
<p> Since the ABI has been finalized, we are no longer maintaining the
|
||||
oglbase-discuss mailing list used during its development. List
|
||||
archives may still be available from
|
||||
<a href="http://www.mail-archive.com/oglbase-discuss@corp.sgi.com/">
|
||||
http://www.mail-archive.com/oglbase-discuss@corp.sgi.com/</a> </p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p> <a name="app"></a></p>
|
||||
<h6>Appendix: Open Issues</h6>
|
||||
|
||||
<p> <a name="issue2.1"></a>
|
||||
<b>Section 2.1</b>:
|
||||
Define GL datatypes for other supported Linux architectures - Alpha,
|
||||
PowerPC, MIPS, etc. (in general these will be identical to the IA32
|
||||
types). Note: we may want to suggest <tt>GLlong</tt> and
|
||||
<tt>GLulong</tt> as 64-bit datatypes for future OpenGL revisions. </p>
|
||||
|
||||
<p> <a name="issue2.2"></a>
|
||||
<b>Section 2.2</b>:
|
||||
C++ libraries at runtime can be problematic - take the gcc/egcs
|
||||
split, for example. Another potential problem area is static
|
||||
constructor/destructor issues, e.g. when a C <tt>main()</tt> is
|
||||
linked against GLU. Some tweaking may be required as apps running
|
||||
against different ABI revisions start appearing. </p>
|
||||
|
||||
<p> <a name="issue3.1"></a>
|
||||
<b>Section 3.1</b>:
|
||||
LSB uses a more complex naming convention for libraries; we're
|
||||
avoiding this at least for now, because these conventions disagree
|
||||
with common practice on virtually all other Unix OpenGL
|
||||
implementations. </p>
|
||||
|
||||
<p> <a name="issue3.2"></a>
|
||||
<b>Section 3.2 (also Section 4.1)</b>:
|
||||
Placing the headers and libraries in non-X11 specific locations
|
||||
could impact non-GLX OpenGL implementations resident on the same
|
||||
platform. It is also somewhat out of keeping with other X
|
||||
extensions. However, this practice is so common on other platforms,
|
||||
and non-X based OpenGL implementations are so rarely used, that we
|
||||
chose to do so for build portability and "principle of least
|
||||
surprise" purposes. </p>
|
||||
|
||||
<p> Nothing prohibits the implementation from
|
||||
placing the actual library files in other locations and implementing
|
||||
the required library paths as links. </p>
|
||||
|
||||
<p> <a name="issue3.3"></a>
|
||||
<b>Section 3.3</b>:
|
||||
The ABI should probably state requirements on GL libraries using C++
|
||||
or other auxiliary libraries, such that no conflict will arise with
|
||||
apps also using those libraries. </p>
|
||||
|
||||
<p> <a name="issue3.6"></a>
|
||||
<b>Section 3.6</b>:
|
||||
The context-independence requirement was the subject of enormous
|
||||
controversy, mostly because the consequences of this requirement on
|
||||
the underlying link library and driver implementations can be
|
||||
significant. It is impossible to briefly recap the many pro and con
|
||||
arguments briefly; refer to the <a href="#6">mailing list
|
||||
archive</a> to learn more. </p>
|
||||
|
||||
<p> GLU does sometimes need to be extended to
|
||||
properly support new GL extensions; in particular, new pixel formats
|
||||
and types, or new targets for texture downloads, such as cube
|
||||
mapping, should ideally be exposed through the GLU mipmap generation
|
||||
routines. This is an unresolved problem, since GLU is client code
|
||||
not specific to any GL driver and thus not dynamically loadable. The
|
||||
best current option is for driver suppliers to make sure that
|
||||
whatever GLU functionality they need is contributed to the OpenGL
|
||||
Sample Implementation's GLU library. </p>
|
||||
|
||||
<p> Portable applications should treat the pointers
|
||||
as context-dependent. </p>
|
||||
|
||||
<p> We haven't determined if any non-ARB extensions should be standard
|
||||
entry points not requiring this dynamic lookup. As a reference
|
||||
point, here are lists of GL, GLX, and GLU extensions supported by a
|
||||
variety of OpenGL and Mesa implementations today (please send
|
||||
additions for other platforms to the oglbase-discuss mailing list so
|
||||
they can be added): </p>
|
||||
|
||||
<ul>
|
||||
<li><a href="ext/3dlabs.txt">3Dlabs</a> </li>
|
||||
<li><a href="ext/compaq.txt">Compaq</a> </li>
|
||||
<li><a href="ext/intergraph.txt">Intergraph/Intense 3D</a> </li>
|
||||
<li><a href="ext/mesa.txt">Mesa</a> </li>
|
||||
<li><a href="ext/sgi.txt">SGI (multiple platforms)</a> </li>
|
||||
<li><a href="ext/sun_ultra.txt">Sun Ultra</a> </li>
|
||||
<li><a href="ext/xig.txt">Xi Graphics</a> </li>
|
||||
</ul>
|
||||
|
||||
<p> <a name="issue4.5"></a>
|
||||
<b>Section 4.5</b>:
|
||||
Implementations may still implement only OpenGL 1.1 functionality,
|
||||
but the 1.2 header and link library material must still be provided.
|
||||
Since applications must already check both compile and runtime
|
||||
OpenGL version numbers, no problems due to lacking support for 1.2
|
||||
are expected. The next version of this standard is anticipated to
|
||||
require OpenGL 1.2 support. </p>
|
||||
|
||||
<p> <a name="issue4.6"></a>
|
||||
<b>Section 4.6</b>:
|
||||
It's important that <tt>glext.h</tt> and <tt>glxext.h</tt> can be
|
||||
updated from the extension registry without breaking <tt>gl.h</tt>
|
||||
and <tt>glx.h</tt>. Making sure that all extension definitions are
|
||||
properly protected helps to this end, as well as being good
|
||||
programming practice. </p>
|
||||
|
||||
<p> <a name="issue4.8"></a>
|
||||
<b>Section 4.8</b>:
|
||||
<tt>GL_OGLBASE_VERSION</tt> is mostly provided so that apps can
|
||||
determine whether to use traditional static linking of extensions,
|
||||
or to dynamically query them. Unlike GL/GLX versioning, the ABI
|
||||
version is not dynamically queryable at runtime. Historical
|
||||
experience suggests that not providing the runtime query to begin
|
||||
with is a bad decision. </p>
|
||||
|
||||
<p> <a name="issue5.1"></a>
|
||||
<b>Section 5.1</b>:
|
||||
<tt>glext.h</tt> is an exception to the Linux-centric nature of this
|
||||
document, since it is already being used on other platforms. </p>
|
||||
|
||||
<p> <a name="issue5.2"></a>
|
||||
<b>Section 5.2</b>:
|
||||
Applications should <b>not</b> use the version number in
|
||||
<tt>glext.h</tt> to test for presence or absence of specific
|
||||
extension prototypes; this is extremely unportable and dangerous.
|
||||
Always use the extension-specific symbols described in section 5.3.
|
||||
</p>
|
||||
|
||||
<p> The header version symbol was changed from
|
||||
<tt>GL_GLEXT_VERSION_EXT</tt> to <tt>GL_GLEXT_VERSION</tt> for
|
||||
consistency with the <tt>GLEXT</tt> namespace the ABI group has
|
||||
started using. </p>
|
||||
|
||||
<p> <a name="issue5.3"></a>
|
||||
<b>Section 5.3</b>:
|
||||
Other structures for the extension prototypes have been suggested,
|
||||
such as having separate header files for each extension. Having both
|
||||
structures may be preferable, but it requires more work. </p>
|
||||
|
||||
<p> <a name="issue5.4"></a>
|
||||
<b>Section 5.4</b>:
|
||||
It's important to be able to suppress automatic inclusion of
|
||||
<tt>glext.h</tt> and <tt>glxext.h</tt> in order to support
|
||||
compilation of legacy code not written to be ABI-aware (e.g.
|
||||
assuming that extensions can be statically linked). </p>
|
||||
|
||||
<p> <a name="log"></a></p>
|
||||
<h6>7. Change Log</h6>
|
||||
|
||||
<ul>
|
||||
<li> 10/9/2006 - updated registry links to the new location on
|
||||
opengl.org and cleaned up other dangling wording due to the move
|
||||
from oss.sgi.com.
|
||||
<li> 6/20/2000 (version 1.0) - Linux ABI approved on the oglbase-discuss
|
||||
mailing list. Corrected Windows function-pointer typedef convention
|
||||
in section 5.3 by appending <tt>PROC</tt>, to match what glext.h
|
||||
already does. </li>
|
||||
<li> 5/29/2000 (version 0.9.8) - <tt>glxext.h</tt> added to section 4.
|
||||
Resolution reached on the structure of <tt>glext.h</tt> and
|
||||
<tt>glxext.h</tt>, and how they are included from <tt>gl.h</tt> and
|
||||
<tt>glx.h</tt>. In particular, <tt>GL_OGLBASE_VERSION</tt> symbol
|
||||
defined, default inclusion of extension headers from core headers
|
||||
mandated, <tt>GL_GLEXT_PROTOTYPES</tt> may be specified in order to
|
||||
get extension prototypes as well as function pointer typedefs.
|
||||
Renamed <tt>GL_GLEXT_VERSION_EXT</tt> to <tt>GL_GLEXT_VERSION</tt>.
|
||||
</li>
|
||||
<li> 4/9/2000 (version 0.9.7) - <tt>glext.h</tt> is now available
|
||||
together with the ABI specification. </li>
|
||||
<li> 2/22/2000 (version 0.9.6) - Revised for public comment period.
|
||||
Moved open issues to the new appendix. </li>
|
||||
<li> 2/8/2000 (version 0.9.5) - Removed ellipses from prototype in
|
||||
section 3.6, and simplified the lists of SGI supported extensions
|
||||
into one file. Mandated threadsafety in section 3.7. Moved
|
||||
glXGetProcAddressARB prototype from gl.h to glx.h in section 4.4,
|
||||
since the function itself was moved from gl to glX during
|
||||
standardization. Restructured the page to fit into the ogl-sample
|
||||
site on oss.sgi.com, next to the extension registry. Pointed to the
|
||||
updated extension registry on oss.sgi.com in several places. </li>
|
||||
<li> 12/9/99 (version 0.9.4) - Added Intergraph extension list in
|
||||
section 3.6. </li>
|
||||
<li> 12/6/99 (version 0.9.3) - Added Compaq and 3Dlabs extension
|
||||
lists in section 3.6. </li>
|
||||
<li> 11/23/99 (version 0.9.2) - Refined discussion of
|
||||
glXGetProcAddressARB to specify that any GL or GLX function can be
|
||||
queried. </li>
|
||||
<li> 11/23/99 (version 0.9.1) - Summing up lots of email discussion.
|
||||
Expanded participant list in section 1.4. Pinned down library
|
||||
naming scheme in section 3.1. Changed to require statically
|
||||
exporting all GL 1.2 / GLX 1.3 / GLU 1.3 / ARB extension entry
|
||||
points in section 3.4. Changed GetProcAddress from EXT to ARB and
|
||||
from gl to glX(in anticipation of ARB approval) in section 3.5.
|
||||
Does <b>not</b> require a context parameter. Require Windows naming
|
||||
convention for <tt>glext.h</tt> function prototypes in section 5.3.
|
||||
Added a link to the list archives in section 6. </li>
|
||||
<li> 9/16/1999 - Added Mesa, Sun, and Xi Graphics extension lists in
|
||||
section 3.6. Added section 3.8 on transitive library dependencies
|
||||
of the GL libraries. </li>
|
||||
<li> 9/10/1999 - Added initial list of GL/GLX/GLU extensions
|
||||
for existing platforms in section 3.6.<br>
|
||||
Specified text/link colors as well as background color. </li>
|
||||
<li> 9/7/1999 - Initial version. </li>
|
||||
</ul>
|
||||
|
||||
<?php include_once("../../../assets/static_pages/khr_page_bottom.php"); ?>
|
||||
</body>
|
||||
</html>
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 116 B |
@@ -0,0 +1,20 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
config("libGLES_public_config") {
|
||||
include_dirs = [ "api" ]
|
||||
}
|
||||
|
||||
group("libGLES") {
|
||||
public_configs = [ ":libGLES_public_config" ]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright 2018-2021 The Khronos Group Inc.
|
||||
// SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
= Code of Conduct
|
||||
|
||||
A reminder that this issue tracker is managed by the Khronos Group.
|
||||
Interactions here should follow the
|
||||
https://www.khronos.org/developers/code-of-conduct[Khronos Code of Conduct],
|
||||
which prohibits aggressive or derogatory language. Please keep the
|
||||
discussion friendly and civil.
|
||||
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"Name": "openGLES",
|
||||
"License": "Apache-2.0",
|
||||
"License File": "NOTICE",
|
||||
"Version Number": "3.2",
|
||||
"Owner": "lizheng2@huawei.com",
|
||||
"Upstream URL": "https://github.com/KhronosGroup/OpenGL-Registry.git",
|
||||
"Description": "The OpenGL ES registry contains specifications of the core API and shading language; specifications of Khronos- and vendor-approved OpenGL ES extensions; header files corresponding to the specificatio"
|
||||
}
|
||||
]
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
// Copyright 2017-2021 The Khronos Group Inc.
|
||||
// SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
= OpenGL-Registry
|
||||
|
||||
|
||||
== OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry
|
||||
|
||||
This site contains the API and Extension registries for the OpenGL family
|
||||
APIs - OpenGL, OpenGL ES, and OpenGL SC. It includes API specifications;
|
||||
specifications of Khronos- and vendor-approved extensions; header files
|
||||
corresponding to the specifications; the XML API Registry defining each
|
||||
API; and related tools and scripts.
|
||||
|
||||
It does not contain the OpenGL and OpenGL ES Reference Pages, which are in
|
||||
the KhronosGroup/OpenGL-Refpages repository.
|
||||
|
||||
If you want to add an extension specification to the Registry, correct an
|
||||
existing specification, request allocation of enumerants and other
|
||||
controlled resources in the OpenGL / GLX / WGL namespaces, or otherwise
|
||||
change the Registry, propose a pull request against the OpenGL-Registry
|
||||
repository and adding the appropriate extension specifications, making changes
|
||||
to the appropriate XML file, etc. Note that any changes you propose to
|
||||
reserved values in the registry are not official until your pull request is
|
||||
*accepted* into the main branch.
|
||||
|
||||
Feel free to post issues on the repository if it's unclear how to do
|
||||
something you need to with extensions, or if you find any problems.
|
||||
|
||||
|
||||
== Please Don't File API And GLSL Bugs Here!
|
||||
|
||||
The OpenGL-Registry repository isn't the right place to report problems with
|
||||
the OpenGL and OpenGL ES API and Shading Language Specifications.
|
||||
|
||||
For API (both core and extension) issues, please use the issue tracker in
|
||||
the https://github.com/KhronosGroup/OpenGL-API repository.
|
||||
|
||||
For Shading Language (both core and extension) issues, please use the issue
|
||||
tracker in the https://github.com/KhronosGroup/OpenGL-GLSL repository.
|
||||
|
||||
Please tag your issues with +[OpenGL]+ or +[OpenGL ES]+ in the title, if
|
||||
they are specific to that API and/or Shading Language.
|
||||
|
||||
Reporting problems with the registry *itself*, including missing or badly
|
||||
formed extension documents, headers, or XML files, should be done using the
|
||||
OpenGL-Registry issue tracker.
|
||||
|
||||
|
||||
=== Defining New Extensions
|
||||
|
||||
To create a new extension specification, take these steps:
|
||||
|
||||
* Request one or more blocks of unused enumerants for GL, GLX, or WGL
|
||||
depending on the needs of your extension, by adding the reservation(s) to
|
||||
the end of gl.xml, glx.xml, and/or wgl.xml.
|
||||
* Once the pull request modifying the XML files is accepted into main, you
|
||||
have control of those enumerant blocks.
|
||||
* Create an extension specification, following the model of existing vendor
|
||||
specifications under extensions/*vendor*/ .
|
||||
* Obtain whatever degree of review, implementation, and signoff you need
|
||||
from affected parties before declaring the extension complete.
|
||||
* Add the extension specification under extensions/*vendor*/*extension* .
|
||||
* Modify extensions/registry.py to include the extension, using the next
|
||||
free ARB, GL, and/or ES extension numbers (depending on which API the
|
||||
extension is defined for). Execute the python script nextfree.py in the
|
||||
extensions/ directory to find the next free numbers.
|
||||
* Once registry.py is updated, 'make' in extensions/ to update the PHP
|
||||
include files which are used to show an index of extensions on the
|
||||
registry website. This requires GNU make and Python 3.
|
||||
* Add the extension number(s) to the extension specification in the 'Number'
|
||||
block.
|
||||
* Add the extension interfaces and enumerant assignments to xml/gl.xml,
|
||||
glx.xml, and/or wgl.xml following existing examples. Verify that the
|
||||
relevant extension headers are generated with the correct interfaces by
|
||||
running 'make' in xml/. This requires the lxml Python module.
|
||||
* Once the pull request adding the extension specification and modifying
|
||||
registry.py is accepted, your extension is registered.
|
||||
|
||||
There are some documents under the docs/ directory describing some of the
|
||||
processes for making extensions, but they are largely out of date. They may
|
||||
be updated or removed over time:
|
||||
|
||||
* link:docs/rules.html[How to create extensions]
|
||||
* link:docs/enums.html[Enumerant allocation policies]
|
||||
* link:docs/template.txt[Extension specification template]
|
||||
* link:docs/promoting.html[Extension promotion guidelines]
|
||||
* link:docs/reserved.txt[GLX opcode registry (rarely updated)]
|
||||
* link:docs/syntaxrules.txt[OpenGL Syntax Rules (updated 2006/12/13)]
|
||||
* link:docs/GLSLExtensionRules.txt[OpenGL Shading Language Extension Conventions (updated 2006/12/18)]
|
||||
* link:docs/fog_coord.txt[Extension Specification Example]
|
||||
|
||||
|
||||
=== Repository Contents
|
||||
|
||||
* ABI - OpenGL ABI for Linux
|
||||
* api - Header files for all APIs
|
||||
** api/ES - Headers for OpenGL ES
|
||||
** api/GL - Headers for OpenGL
|
||||
** api/SC - Headers for OpenGL SC
|
||||
** Note that the OpenGL ES and OpenGL SC headers all depend on the shared
|
||||
https://www.khronos.org/registry/EGL/api/KHR/khrplatform.h[khrplatform.h]
|
||||
This file is maintained in the http://www.khronos.org/registry/EGL/[EGL
|
||||
Registry].
|
||||
* docs - Miscellaneous documentation on creating extensions, mostly out of date.
|
||||
* extensions - Extension specifications for all APIs
|
||||
** extensions/registry.py - combined extension registry for all APIs
|
||||
** extensions/makeindex.py - create HTML extension indices from registry.py
|
||||
* index_{es,gl,sc}.php - Index files for the website, linking to specifications, headers, and extensions relevant to each API
|
||||
* specs - API and Shading Language Specifications for all APIs
|
||||
** specs/es - OpenGL ES Specifications
|
||||
** specs/gl - OpenGL Specifications
|
||||
** specs/sc - OpenGL SC Specifications
|
||||
* xml - XML API Registry and related tools
|
||||
|
||||
|
||||
=== There Sure Is A Lot Of Stuff In Here!
|
||||
|
||||
Yes, there sure is. The specs/ directory contains over 125 MB of PDFs,
|
||||
including the latest specs for each version of OpenGL and OpenGL ES. While
|
||||
this may be somewhat distressing to people who just want to add a single
|
||||
extension, due to the repository download time, the *primary* purpose of
|
||||
this repository is to be the backing store for the web registry on
|
||||
khronos.org. Fortunately git is very efficient, so once you've done the
|
||||
initial repository clone, updates will be small and quick.
|
||||
Executable
+5991
File diff suppressed because it is too large
Load Diff
+12894
File diff suppressed because it is too large
Load Diff
Executable
+954
@@ -0,0 +1,954 @@
|
||||
#ifndef __glx_glxext_h_
|
||||
#define __glx_glxext_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#define GLX_GLXEXT_VERSION 20211115
|
||||
|
||||
/* Generated C header for:
|
||||
* API: glx
|
||||
* Versions considered: .*
|
||||
* Versions emitted: 1\.[3-9]
|
||||
* Default extensions included: glx
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_VERSION_1_3 1
|
||||
typedef XID GLXContextID;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
#define GLX_CONFIG_CAVEAT 0x20
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
#define GLX_SCREEN 0x800C
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040
|
||||
#define GLX_PBUFFER_WIDTH 0x8041
|
||||
typedef GLXFBConfig *( *PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef GLXFBConfig *( *PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
typedef int ( *PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
||||
typedef GLXWindow ( *PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
||||
typedef GLXPixmap ( *PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
||||
typedef GLXPbuffer ( *PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef void ( *PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
typedef GLXContext ( *PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef Bool ( *PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
||||
typedef int ( *PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
typedef void ( *PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
typedef void ( *PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXFBConfig *glXGetFBConfigs (Display *dpy, int screen, int *nelements);
|
||||
GLXFBConfig *glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
XVisualInfo *glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
|
||||
GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
void glXDestroyWindow (Display *dpy, GLXWindow win);
|
||||
GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
|
||||
GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
|
||||
void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
GLXDrawable glXGetCurrentReadDrawable (void);
|
||||
int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
#endif
|
||||
#endif /* GLX_VERSION_1_3 */
|
||||
|
||||
#ifndef GLX_VERSION_1_4
|
||||
#define GLX_VERSION_1_4 1
|
||||
typedef void ( *__GLXextFuncPtr)(void);
|
||||
#define GLX_SAMPLE_BUFFERS 100000
|
||||
#define GLX_SAMPLES 100001
|
||||
typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
__GLXextFuncPtr glXGetProcAddress (const GLubyte *procName);
|
||||
#endif
|
||||
#endif /* GLX_VERSION_1_4 */
|
||||
|
||||
#ifndef GLX_ARB_context_flush_control
|
||||
#define GLX_ARB_context_flush_control 1
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||
#endif /* GLX_ARB_context_flush_control */
|
||||
|
||||
#ifndef GLX_ARB_create_context
|
||||
#define GLX_ARB_create_context 1
|
||||
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define GLX_CONTEXT_FLAGS_ARB 0x2094
|
||||
typedef GLXContext ( *PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
#endif
|
||||
#endif /* GLX_ARB_create_context */
|
||||
|
||||
#ifndef GLX_ARB_create_context_no_error
|
||||
#define GLX_ARB_create_context_no_error 1
|
||||
#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
|
||||
#endif /* GLX_ARB_create_context_no_error */
|
||||
|
||||
#ifndef GLX_ARB_create_context_profile
|
||||
#define GLX_ARB_create_context_profile 1
|
||||
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#endif /* GLX_ARB_create_context_profile */
|
||||
|
||||
#ifndef GLX_ARB_create_context_robustness
|
||||
#define GLX_ARB_create_context_robustness 1
|
||||
#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||
#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#endif /* GLX_ARB_create_context_robustness */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
#define GLX_ARB_fbconfig_float 1
|
||||
#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
|
||||
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
||||
#endif /* GLX_ARB_fbconfig_float */
|
||||
|
||||
#ifndef GLX_ARB_framebuffer_sRGB
|
||||
#define GLX_ARB_framebuffer_sRGB 1
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
|
||||
#endif /* GLX_ARB_framebuffer_sRGB */
|
||||
|
||||
#ifndef GLX_ARB_get_proc_address
|
||||
#define GLX_ARB_get_proc_address 1
|
||||
typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
__GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
|
||||
#endif
|
||||
#endif /* GLX_ARB_get_proc_address */
|
||||
|
||||
#ifndef GLX_ARB_multisample
|
||||
#define GLX_ARB_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_ARB 100000
|
||||
#define GLX_SAMPLES_ARB 100001
|
||||
#endif /* GLX_ARB_multisample */
|
||||
|
||||
#ifndef GLX_ARB_robustness_application_isolation
|
||||
#define GLX_ARB_robustness_application_isolation 1
|
||||
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||
#endif /* GLX_ARB_robustness_application_isolation */
|
||||
|
||||
#ifndef GLX_ARB_robustness_share_group_isolation
|
||||
#define GLX_ARB_robustness_share_group_isolation 1
|
||||
#endif /* GLX_ARB_robustness_share_group_isolation */
|
||||
|
||||
#ifndef GLX_ARB_vertex_buffer_object
|
||||
#define GLX_ARB_vertex_buffer_object 1
|
||||
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
|
||||
#endif /* GLX_ARB_vertex_buffer_object */
|
||||
|
||||
#ifndef GLX_3DFX_multisample
|
||||
#define GLX_3DFX_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
|
||||
#define GLX_SAMPLES_3DFX 0x8051
|
||||
#endif /* GLX_3DFX_multisample */
|
||||
|
||||
#ifndef GLX_AMD_gpu_association
|
||||
#define GLX_AMD_gpu_association 1
|
||||
#define GLX_GPU_VENDOR_AMD 0x1F00
|
||||
#define GLX_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define GLX_GPU_RAM_AMD 0x21A3
|
||||
#define GLX_GPU_CLOCK_AMD 0x21A4
|
||||
#define GLX_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define GLX_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define GLX_GPU_NUM_RB_AMD 0x21A7
|
||||
#define GLX_GPU_NUM_SPI_AMD 0x21A8
|
||||
typedef unsigned int ( *PFNGLXGETGPUIDSAMDPROC) (unsigned int maxCount, unsigned int *ids);
|
||||
typedef int ( *PFNGLXGETGPUINFOAMDPROC) (unsigned int id, int property, GLenum dataType, unsigned int size, void *data);
|
||||
typedef unsigned int ( *PFNGLXGETCONTEXTGPUIDAMDPROC) (GLXContext ctx);
|
||||
typedef GLXContext ( *PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC) (unsigned int id, GLXContext share_list);
|
||||
typedef GLXContext ( *PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (unsigned int id, GLXContext share_context, const int *attribList);
|
||||
typedef Bool ( *PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC) (GLXContext ctx);
|
||||
typedef Bool ( *PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (GLXContext ctx);
|
||||
typedef GLXContext ( *PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef void ( *PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC) (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
unsigned int glXGetGPUIDsAMD (unsigned int maxCount, unsigned int *ids);
|
||||
int glXGetGPUInfoAMD (unsigned int id, int property, GLenum dataType, unsigned int size, void *data);
|
||||
unsigned int glXGetContextGPUIDAMD (GLXContext ctx);
|
||||
GLXContext glXCreateAssociatedContextAMD (unsigned int id, GLXContext share_list);
|
||||
GLXContext glXCreateAssociatedContextAttribsAMD (unsigned int id, GLXContext share_context, const int *attribList);
|
||||
Bool glXDeleteAssociatedContextAMD (GLXContext ctx);
|
||||
Bool glXMakeAssociatedContextCurrentAMD (GLXContext ctx);
|
||||
GLXContext glXGetCurrentAssociatedContextAMD (void);
|
||||
void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
#endif /* GLX_AMD_gpu_association */
|
||||
|
||||
#ifndef GLX_EXT_buffer_age
|
||||
#define GLX_EXT_buffer_age 1
|
||||
#define GLX_BACK_BUFFER_AGE_EXT 0x20F4
|
||||
#endif /* GLX_EXT_buffer_age */
|
||||
|
||||
#ifndef GLX_EXT_context_priority
|
||||
#define GLX_EXT_context_priority 1
|
||||
#define GLX_CONTEXT_PRIORITY_LEVEL_EXT 0x3100
|
||||
#define GLX_CONTEXT_PRIORITY_HIGH_EXT 0x3101
|
||||
#define GLX_CONTEXT_PRIORITY_MEDIUM_EXT 0x3102
|
||||
#define GLX_CONTEXT_PRIORITY_LOW_EXT 0x3103
|
||||
#endif /* GLX_EXT_context_priority */
|
||||
|
||||
#ifndef GLX_EXT_create_context_es2_profile
|
||||
#define GLX_EXT_create_context_es2_profile 1
|
||||
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* GLX_EXT_create_context_es2_profile */
|
||||
|
||||
#ifndef GLX_EXT_create_context_es_profile
|
||||
#define GLX_EXT_create_context_es_profile 1
|
||||
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* GLX_EXT_create_context_es_profile */
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
#define GLX_EXT_fbconfig_packed_float 1
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
|
||||
#endif /* GLX_EXT_fbconfig_packed_float */
|
||||
|
||||
#ifndef GLX_EXT_framebuffer_sRGB
|
||||
#define GLX_EXT_framebuffer_sRGB 1
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
|
||||
#endif /* GLX_EXT_framebuffer_sRGB */
|
||||
|
||||
#ifndef GLX_EXT_get_drawable_type
|
||||
#define GLX_EXT_get_drawable_type 1
|
||||
#endif /* GLX_EXT_get_drawable_type */
|
||||
|
||||
#ifndef GLX_EXT_import_context
|
||||
#define GLX_EXT_import_context 1
|
||||
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
||||
#define GLX_VISUAL_ID_EXT 0x800B
|
||||
#define GLX_SCREEN_EXT 0x800C
|
||||
typedef Display *( *PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
|
||||
typedef int ( *PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
typedef GLXContextID ( *PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
|
||||
typedef GLXContext ( *PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
|
||||
typedef void ( *PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Display *glXGetCurrentDisplayEXT (void);
|
||||
int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
GLXContextID glXGetContextIDEXT (const GLXContext context);
|
||||
GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
|
||||
void glXFreeContextEXT (Display *dpy, GLXContext context);
|
||||
#endif
|
||||
#endif /* GLX_EXT_import_context */
|
||||
|
||||
#ifndef GLX_EXT_libglvnd
|
||||
#define GLX_EXT_libglvnd 1
|
||||
#define GLX_VENDOR_NAMES_EXT 0x20F6
|
||||
#endif /* GLX_EXT_libglvnd */
|
||||
|
||||
#ifndef GLX_EXT_no_config_context
|
||||
#define GLX_EXT_no_config_context 1
|
||||
#endif /* GLX_EXT_no_config_context */
|
||||
|
||||
#ifndef GLX_EXT_stereo_tree
|
||||
#define GLX_EXT_stereo_tree 1
|
||||
typedef struct {
|
||||
int type;
|
||||
unsigned long serial;
|
||||
Bool send_event;
|
||||
Display *display;
|
||||
int extension;
|
||||
int evtype;
|
||||
GLXDrawable window;
|
||||
Bool stereo_tree;
|
||||
} GLXStereoNotifyEventEXT;
|
||||
#define GLX_STEREO_TREE_EXT 0x20F5
|
||||
#define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001
|
||||
#define GLX_STEREO_NOTIFY_EXT 0x00000000
|
||||
#endif /* GLX_EXT_stereo_tree */
|
||||
|
||||
#ifndef GLX_EXT_swap_control
|
||||
#define GLX_EXT_swap_control 1
|
||||
#define GLX_SWAP_INTERVAL_EXT 0x20F1
|
||||
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
|
||||
typedef void ( *PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval);
|
||||
#endif
|
||||
#endif /* GLX_EXT_swap_control */
|
||||
|
||||
#ifndef GLX_EXT_swap_control_tear
|
||||
#define GLX_EXT_swap_control_tear 1
|
||||
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
|
||||
#endif /* GLX_EXT_swap_control_tear */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
#define GLX_EXT_texture_from_pixmap 1
|
||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
||||
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
|
||||
#define GLX_TEXTURE_TARGET_EXT 0x20D6
|
||||
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
|
||||
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
|
||||
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
|
||||
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
|
||||
#define GLX_TEXTURE_1D_EXT 0x20DB
|
||||
#define GLX_TEXTURE_2D_EXT 0x20DC
|
||||
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
|
||||
#define GLX_FRONT_LEFT_EXT 0x20DE
|
||||
#define GLX_FRONT_RIGHT_EXT 0x20DF
|
||||
#define GLX_BACK_LEFT_EXT 0x20E0
|
||||
#define GLX_BACK_RIGHT_EXT 0x20E1
|
||||
#define GLX_FRONT_EXT 0x20DE
|
||||
#define GLX_BACK_EXT 0x20E0
|
||||
#define GLX_AUX0_EXT 0x20E2
|
||||
#define GLX_AUX1_EXT 0x20E3
|
||||
#define GLX_AUX2_EXT 0x20E4
|
||||
#define GLX_AUX3_EXT 0x20E5
|
||||
#define GLX_AUX4_EXT 0x20E6
|
||||
#define GLX_AUX5_EXT 0x20E7
|
||||
#define GLX_AUX6_EXT 0x20E8
|
||||
#define GLX_AUX7_EXT 0x20E9
|
||||
#define GLX_AUX8_EXT 0x20EA
|
||||
#define GLX_AUX9_EXT 0x20EB
|
||||
typedef void ( *PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
typedef void ( *PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
#endif
|
||||
#endif /* GLX_EXT_texture_from_pixmap */
|
||||
|
||||
#ifndef GLX_EXT_visual_info
|
||||
#define GLX_EXT_visual_info 1
|
||||
#define GLX_X_VISUAL_TYPE_EXT 0x22
|
||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
|
||||
#define GLX_NONE_EXT 0x8000
|
||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||
#endif /* GLX_EXT_visual_info */
|
||||
|
||||
#ifndef GLX_EXT_visual_rating
|
||||
#define GLX_EXT_visual_rating 1
|
||||
#define GLX_VISUAL_CAVEAT_EXT 0x20
|
||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||
#endif /* GLX_EXT_visual_rating */
|
||||
|
||||
#ifndef GLX_INTEL_swap_event
|
||||
#define GLX_INTEL_swap_event 1
|
||||
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
|
||||
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
|
||||
#define GLX_COPY_COMPLETE_INTEL 0x8181
|
||||
#define GLX_FLIP_COMPLETE_INTEL 0x8182
|
||||
#endif /* GLX_INTEL_swap_event */
|
||||
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
#define GLX_MESA_agp_offset 1
|
||||
typedef unsigned int ( *PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
unsigned int glXGetAGPOffsetMESA (const void *pointer);
|
||||
#endif
|
||||
#endif /* GLX_MESA_agp_offset */
|
||||
|
||||
#ifndef GLX_MESA_copy_sub_buffer
|
||||
#define GLX_MESA_copy_sub_buffer 1
|
||||
typedef void ( *PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
#endif
|
||||
#endif /* GLX_MESA_copy_sub_buffer */
|
||||
|
||||
#ifndef GLX_MESA_pixmap_colormap
|
||||
#define GLX_MESA_pixmap_colormap 1
|
||||
typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
#endif
|
||||
#endif /* GLX_MESA_pixmap_colormap */
|
||||
|
||||
#ifndef GLX_MESA_query_renderer
|
||||
#define GLX_MESA_query_renderer 1
|
||||
#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
|
||||
#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
|
||||
#define GLX_RENDERER_VERSION_MESA 0x8185
|
||||
#define GLX_RENDERER_ACCELERATED_MESA 0x8186
|
||||
#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
|
||||
#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
|
||||
#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
|
||||
#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
|
||||
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
|
||||
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
|
||||
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
|
||||
typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
|
||||
typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
|
||||
typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
|
||||
typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value);
|
||||
const char *glXQueryCurrentRendererStringMESA (int attribute);
|
||||
Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
|
||||
const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute);
|
||||
#endif
|
||||
#endif /* GLX_MESA_query_renderer */
|
||||
|
||||
#ifndef GLX_MESA_release_buffers
|
||||
#define GLX_MESA_release_buffers 1
|
||||
typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
|
||||
#endif
|
||||
#endif /* GLX_MESA_release_buffers */
|
||||
|
||||
#ifndef GLX_MESA_set_3dfx_mode
|
||||
#define GLX_MESA_set_3dfx_mode 1
|
||||
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
|
||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
|
||||
typedef GLboolean ( *PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLboolean glXSet3DfxModeMESA (GLint mode);
|
||||
#endif
|
||||
#endif /* GLX_MESA_set_3dfx_mode */
|
||||
|
||||
#ifndef GLX_MESA_swap_control
|
||||
#define GLX_MESA_swap_control 1
|
||||
typedef int ( *PFNGLXGETSWAPINTERVALMESAPROC) (void);
|
||||
typedef int ( *PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetSwapIntervalMESA (void);
|
||||
int glXSwapIntervalMESA (unsigned int interval);
|
||||
#endif
|
||||
#endif /* GLX_MESA_swap_control */
|
||||
|
||||
#ifndef GLX_NV_copy_buffer
|
||||
#define GLX_NV_copy_buffer 1
|
||||
typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
void glXNamedCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
#endif
|
||||
#endif /* GLX_NV_copy_buffer */
|
||||
|
||||
#ifndef GLX_NV_copy_image
|
||||
#define GLX_NV_copy_image 1
|
||||
typedef void ( *PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
#endif /* GLX_NV_copy_image */
|
||||
|
||||
#ifndef GLX_NV_delay_before_swap
|
||||
#define GLX_NV_delay_before_swap 1
|
||||
typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds);
|
||||
#endif
|
||||
#endif /* GLX_NV_delay_before_swap */
|
||||
|
||||
#ifndef GLX_NV_float_buffer
|
||||
#define GLX_NV_float_buffer 1
|
||||
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#endif /* GLX_NV_float_buffer */
|
||||
|
||||
#ifndef GLX_NV_multigpu_context
|
||||
#define GLX_NV_multigpu_context 1
|
||||
#define GLX_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA
|
||||
#define GLX_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB
|
||||
#define GLX_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC
|
||||
#define GLX_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD
|
||||
#define GLX_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE
|
||||
#endif /* GLX_NV_multigpu_context */
|
||||
|
||||
#ifndef GLX_NV_multisample_coverage
|
||||
#define GLX_NV_multisample_coverage 1
|
||||
#define GLX_COVERAGE_SAMPLES_NV 100001
|
||||
#define GLX_COLOR_SAMPLES_NV 0x20B3
|
||||
#endif /* GLX_NV_multisample_coverage */
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
#define GLX_NV_present_video 1
|
||||
#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
typedef unsigned int *( *PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef int ( *PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
unsigned int *glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements);
|
||||
int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
#endif
|
||||
#endif /* GLX_NV_present_video */
|
||||
|
||||
#ifndef GLX_NV_robustness_video_memory_purge
|
||||
#define GLX_NV_robustness_video_memory_purge 1
|
||||
#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7
|
||||
#endif /* GLX_NV_robustness_video_memory_purge */
|
||||
|
||||
#ifndef GLX_NV_swap_group
|
||||
#define GLX_NV_swap_group 1
|
||||
typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||
typedef Bool ( *PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
|
||||
typedef Bool ( *PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
|
||||
typedef Bool ( *PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef Bool ( *PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count);
|
||||
typedef Bool ( *PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||
Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier);
|
||||
Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
|
||||
Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count);
|
||||
Bool glXResetFrameCountNV (Display *dpy, int screen);
|
||||
#endif
|
||||
#endif /* GLX_NV_swap_group */
|
||||
|
||||
#ifndef GLX_NV_video_capture
|
||||
#define GLX_NV_video_capture 1
|
||||
typedef XID GLXVideoCaptureDeviceNV;
|
||||
#define GLX_DEVICE_ID_NV 0x20CD
|
||||
#define GLX_UNIQUE_ID_NV 0x20CE
|
||||
#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||
typedef int ( *PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
|
||||
typedef GLXVideoCaptureDeviceNV *( *PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef void ( *PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
typedef int ( *PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
|
||||
typedef void ( *PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
|
||||
GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements);
|
||||
void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
|
||||
void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
#endif
|
||||
#endif /* GLX_NV_video_capture */
|
||||
|
||||
#ifndef GLX_NV_video_out
|
||||
#define GLX_NV_video_out 1
|
||||
typedef unsigned int GLXVideoDeviceNV;
|
||||
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define GLX_VIDEO_OUT_FRAME_NV 0x20C8
|
||||
#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
|
||||
#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
|
||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
|
||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
|
||||
typedef int ( *PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
typedef int ( *PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
typedef int ( *PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
|
||||
typedef int ( *PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef int ( *PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
|
||||
typedef int ( *PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
|
||||
int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf);
|
||||
int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
|
||||
int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif
|
||||
#endif /* GLX_NV_video_out */
|
||||
|
||||
#ifndef GLX_OML_swap_method
|
||||
#define GLX_OML_swap_method 1
|
||||
#define GLX_SWAP_METHOD_OML 0x8060
|
||||
#define GLX_SWAP_EXCHANGE_OML 0x8061
|
||||
#define GLX_SWAP_COPY_OML 0x8062
|
||||
#define GLX_SWAP_UNDEFINED_OML 0x8063
|
||||
#endif /* GLX_OML_swap_method */
|
||||
|
||||
#ifndef GLX_OML_sync_control
|
||||
#define GLX_OML_sync_control 1
|
||||
#ifndef GLEXT_64_TYPES_DEFINED
|
||||
/* This code block is duplicated in glext.h, so must be protected */
|
||||
#define GLEXT_64_TYPES_DEFINED
|
||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
/* (as used in the GLX_OML_sync_control extension). */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
#include <inttypes.h>
|
||||
#if defined(__STDC__)
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int int64_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
#else
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#endif /* __STDC__ */
|
||||
#elif defined( __VMS ) || defined(__sgi)
|
||||
#include <inttypes.h>
|
||||
#elif defined(__SCO__) || defined(__USLC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#elif defined(_WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(_WIN32)
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
/* Fallback if nothing above works */
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#endif
|
||||
typedef Bool ( *PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
typedef Bool ( *PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
||||
typedef int64_t ( *PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
|
||||
typedef Bool ( *PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
typedef Bool ( *PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
||||
int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
|
||||
Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
#endif
|
||||
#endif /* GLX_OML_sync_control */
|
||||
|
||||
#ifndef GLX_SGIS_blended_overlay
|
||||
#define GLX_SGIS_blended_overlay 1
|
||||
#define GLX_BLENDED_RGBA_SGIS 0x8025
|
||||
#endif /* GLX_SGIS_blended_overlay */
|
||||
|
||||
#ifndef GLX_SGIS_multisample
|
||||
#define GLX_SGIS_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
||||
#define GLX_SAMPLES_SGIS 100001
|
||||
#endif /* GLX_SGIS_multisample */
|
||||
|
||||
#ifndef GLX_SGIS_shared_multisample
|
||||
#define GLX_SGIS_shared_multisample 1
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
|
||||
#endif /* GLX_SGIS_shared_multisample */
|
||||
|
||||
#ifndef GLX_SGIX_dmbuffer
|
||||
#define GLX_SGIX_dmbuffer 1
|
||||
typedef XID GLXPbufferSGIX;
|
||||
#ifdef _DM_BUFFER_H_
|
||||
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
|
||||
typedef Bool ( *PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
#endif
|
||||
#endif /* _DM_BUFFER_H_ */
|
||||
#endif /* GLX_SGIX_dmbuffer */
|
||||
|
||||
#ifndef GLX_SGIX_fbconfig
|
||||
#define GLX_SGIX_fbconfig 1
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
||||
#define GLX_WINDOW_BIT_SGIX 0x00000001
|
||||
#define GLX_PIXMAP_BIT_SGIX 0x00000002
|
||||
#define GLX_RGBA_BIT_SGIX 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
|
||||
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
|
||||
#define GLX_RENDER_TYPE_SGIX 0x8011
|
||||
#define GLX_X_RENDERABLE_SGIX 0x8012
|
||||
#define GLX_FBCONFIG_ID_SGIX 0x8013
|
||||
#define GLX_RGBA_TYPE_SGIX 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
|
||||
typedef int ( *PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
typedef GLXFBConfigSGIX *( *PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||
typedef GLXContext ( *PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
|
||||
typedef GLXFBConfigSGIX ( *PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
GLXFBConfigSGIX *glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||
GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||
XVisualInfo *glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
|
||||
GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_fbconfig */
|
||||
|
||||
#ifndef GLX_SGIX_hyperpipe
|
||||
#define GLX_SGIX_hyperpipe 1
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int networkId;
|
||||
} GLXHyperpipeNetworkSGIX;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int channel;
|
||||
unsigned int participationType;
|
||||
int timeSlice;
|
||||
} GLXHyperpipeConfigSGIX;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
|
||||
int destXOrigin, destYOrigin, destWidth, destHeight;
|
||||
} GLXPipeRect;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int XOrigin, YOrigin, maxHeight, maxWidth;
|
||||
} GLXPipeRectLimits;
|
||||
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
|
||||
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
|
||||
#define GLX_BAD_HYPERPIPE_SGIX 92
|
||||
#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
|
||||
#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
|
||||
#define GLX_PIPE_RECT_SGIX 0x00000001
|
||||
#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
|
||||
#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
|
||||
#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
|
||||
#define GLX_HYPERPIPE_ID_SGIX 0x8030
|
||||
typedef GLXHyperpipeNetworkSGIX *( *PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
|
||||
typedef int ( *PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
typedef GLXHyperpipeConfigSGIX *( *PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
|
||||
typedef int ( *PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
|
||||
typedef int ( *PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
|
||||
typedef int ( *PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
|
||||
typedef int ( *PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
|
||||
typedef int ( *PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes);
|
||||
int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes);
|
||||
int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId);
|
||||
int glXBindHyperpipeSGIX (Display *dpy, int hpId);
|
||||
int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
|
||||
int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
|
||||
int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_hyperpipe */
|
||||
|
||||
#ifndef GLX_SGIX_pbuffer
|
||||
#define GLX_SGIX_pbuffer 1
|
||||
#define GLX_PBUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
|
||||
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
|
||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
|
||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
|
||||
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
|
||||
#define GLX_WIDTH_SGIX 0x801D
|
||||
#define GLX_HEIGHT_SGIX 0x801E
|
||||
#define GLX_EVENT_MASK_SGIX 0x801F
|
||||
#define GLX_DAMAGED_SGIX 0x8020
|
||||
#define GLX_SAVED_SGIX 0x8021
|
||||
#define GLX_WINDOW_SGIX 0x8022
|
||||
#define GLX_PBUFFER_SGIX 0x8023
|
||||
typedef GLXPbufferSGIX ( *PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
typedef void ( *PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||
typedef void ( *PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||
typedef void ( *PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
void glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||
void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||
void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_pbuffer */
|
||||
|
||||
#ifndef GLX_SGIX_swap_barrier
|
||||
#define GLX_SGIX_swap_barrier 1
|
||||
typedef void ( *PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
typedef Bool ( *PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_swap_barrier */
|
||||
|
||||
#ifndef GLX_SGIX_swap_group
|
||||
#define GLX_SGIX_swap_group 1
|
||||
typedef void ( *PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_swap_group */
|
||||
|
||||
#ifndef GLX_SGIX_video_resize
|
||||
#define GLX_SGIX_video_resize 1
|
||||
#define GLX_SYNC_FRAME_SGIX 0x00000000
|
||||
#define GLX_SYNC_SWAP_SGIX 0x00000001
|
||||
typedef int ( *PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
|
||||
typedef int ( *PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
typedef int ( *PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||
typedef int ( *PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||
typedef int ( *PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
|
||||
int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||
int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||
int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_video_resize */
|
||||
|
||||
#ifndef GLX_SGIX_video_source
|
||||
#define GLX_SGIX_video_source 1
|
||||
typedef XID GLXVideoSourceSGIX;
|
||||
#ifdef _VL_H
|
||||
typedef GLXVideoSourceSGIX ( *PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
typedef void ( *PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
#endif
|
||||
#endif /* _VL_H */
|
||||
#endif /* GLX_SGIX_video_source */
|
||||
|
||||
#ifndef GLX_SGIX_visual_select_group
|
||||
#define GLX_SGIX_visual_select_group 1
|
||||
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
|
||||
#endif /* GLX_SGIX_visual_select_group */
|
||||
|
||||
#ifndef GLX_SGI_cushion
|
||||
#define GLX_SGI_cushion 1
|
||||
typedef void ( *PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCushionSGI (Display *dpy, Window window, float cushion);
|
||||
#endif
|
||||
#endif /* GLX_SGI_cushion */
|
||||
|
||||
#ifndef GLX_SGI_make_current_read
|
||||
#define GLX_SGI_make_current_read 1
|
||||
typedef Bool ( *PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
GLXDrawable glXGetCurrentReadDrawableSGI (void);
|
||||
#endif
|
||||
#endif /* GLX_SGI_make_current_read */
|
||||
|
||||
#ifndef GLX_SGI_swap_control
|
||||
#define GLX_SGI_swap_control 1
|
||||
typedef int ( *PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXSwapIntervalSGI (int interval);
|
||||
#endif
|
||||
#endif /* GLX_SGI_swap_control */
|
||||
|
||||
#ifndef GLX_SGI_video_sync
|
||||
#define GLX_SGI_video_sync 1
|
||||
typedef int ( *PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
|
||||
typedef int ( *PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetVideoSyncSGI (unsigned int *count);
|
||||
int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
|
||||
#endif
|
||||
#endif /* GLX_SGI_video_sync */
|
||||
|
||||
#ifndef GLX_SUN_get_transparent_index
|
||||
#define GLX_SUN_get_transparent_index 1
|
||||
typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex);
|
||||
#endif
|
||||
#endif /* GLX_SUN_get_transparent_index */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+936
@@ -0,0 +1,936 @@
|
||||
#ifndef __wgl_wgl_h_
|
||||
#define __wgl_wgl_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/* Generated on date 20211115 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: wgl
|
||||
* Versions considered: .*
|
||||
* Versions emitted: .*
|
||||
* Default extensions included: wgl
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef WGL_VERSION_1_0
|
||||
#define WGL_VERSION_1_0 1
|
||||
#define WGL_FONT_LINES 0
|
||||
#define WGL_FONT_POLYGONS 1
|
||||
#define WGL_SWAP_MAIN_PLANE 0x00000001
|
||||
#define WGL_SWAP_OVERLAY1 0x00000002
|
||||
#define WGL_SWAP_OVERLAY2 0x00000004
|
||||
#define WGL_SWAP_OVERLAY3 0x00000008
|
||||
#define WGL_SWAP_OVERLAY4 0x00000010
|
||||
#define WGL_SWAP_OVERLAY5 0x00000020
|
||||
#define WGL_SWAP_OVERLAY6 0x00000040
|
||||
#define WGL_SWAP_OVERLAY7 0x00000080
|
||||
#define WGL_SWAP_OVERLAY8 0x00000100
|
||||
#define WGL_SWAP_OVERLAY9 0x00000200
|
||||
#define WGL_SWAP_OVERLAY10 0x00000400
|
||||
#define WGL_SWAP_OVERLAY11 0x00000800
|
||||
#define WGL_SWAP_OVERLAY12 0x00001000
|
||||
#define WGL_SWAP_OVERLAY13 0x00002000
|
||||
#define WGL_SWAP_OVERLAY14 0x00004000
|
||||
#define WGL_SWAP_OVERLAY15 0x00008000
|
||||
#define WGL_SWAP_UNDERLAY1 0x00010000
|
||||
#define WGL_SWAP_UNDERLAY2 0x00020000
|
||||
#define WGL_SWAP_UNDERLAY3 0x00040000
|
||||
#define WGL_SWAP_UNDERLAY4 0x00080000
|
||||
#define WGL_SWAP_UNDERLAY5 0x00100000
|
||||
#define WGL_SWAP_UNDERLAY6 0x00200000
|
||||
#define WGL_SWAP_UNDERLAY7 0x00400000
|
||||
#define WGL_SWAP_UNDERLAY8 0x00800000
|
||||
#define WGL_SWAP_UNDERLAY9 0x01000000
|
||||
#define WGL_SWAP_UNDERLAY10 0x02000000
|
||||
#define WGL_SWAP_UNDERLAY11 0x04000000
|
||||
#define WGL_SWAP_UNDERLAY12 0x08000000
|
||||
#define WGL_SWAP_UNDERLAY13 0x10000000
|
||||
#define WGL_SWAP_UNDERLAY14 0x20000000
|
||||
#define WGL_SWAP_UNDERLAY15 0x40000000
|
||||
typedef int (WINAPI * PFNCHOOSEPIXELFORMATPROC) (HDC hDc, const PIXELFORMATDESCRIPTOR *pPfd);
|
||||
typedef int (WINAPI * PFNDESCRIBEPIXELFORMATPROC) (HDC hdc, int ipfd, UINT cjpfd, const PIXELFORMATDESCRIPTOR *ppfd);
|
||||
typedef UINT (WINAPI * PFNGETENHMETAFILEPIXELFORMATPROC) (HENHMETAFILE hemf, const PIXELFORMATDESCRIPTOR *ppfd);
|
||||
typedef int (WINAPI * PFNGETPIXELFORMATPROC) (HDC hdc);
|
||||
typedef BOOL (WINAPI * PFNSETPIXELFORMATPROC) (HDC hdc, int ipfd, const PIXELFORMATDESCRIPTOR *ppfd);
|
||||
typedef BOOL (WINAPI * PFNSWAPBUFFERSPROC) (HDC hdc);
|
||||
typedef BOOL (WINAPI * PFNWGLCOPYCONTEXTPROC) (HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTPROC) (HDC hDc);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATELAYERCONTEXTPROC) (HDC hDc, int level);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETECONTEXTPROC) (HGLRC oldContext);
|
||||
typedef BOOL (WINAPI * PFNWGLDESCRIBELAYERPLANEPROC) (HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, const LAYERPLANEDESCRIPTOR *plpd);
|
||||
typedef HGLRC (WINAPI * PFNWGLGETCURRENTCONTEXTPROC) (void);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTDCPROC) (void);
|
||||
typedef int (WINAPI * PFNWGLGETLAYERPALETTEENTRIESPROC) (HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr);
|
||||
typedef PROC (WINAPI * PFNWGLGETPROCADDRESSPROC) (LPCSTR lpszProc);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECURRENTPROC) (HDC hDc, HGLRC newContext);
|
||||
typedef BOOL (WINAPI * PFNWGLREALIZELAYERPALETTEPROC) (HDC hdc, int iLayerPlane, BOOL bRealize);
|
||||
typedef int (WINAPI * PFNWGLSETLAYERPALETTEENTRIESPROC) (HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr);
|
||||
typedef BOOL (WINAPI * PFNWGLSHARELISTSPROC) (HGLRC hrcSrvShare, HGLRC hrcSrvSource);
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPLAYERBUFFERSPROC) (HDC hdc, UINT fuFlags);
|
||||
typedef BOOL (WINAPI * PFNWGLUSEFONTBITMAPSPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase);
|
||||
typedef BOOL (WINAPI * PFNWGLUSEFONTBITMAPSAPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase);
|
||||
typedef BOOL (WINAPI * PFNWGLUSEFONTBITMAPSWPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase);
|
||||
typedef BOOL (WINAPI * PFNWGLUSEFONTOUTLINESPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
|
||||
typedef BOOL (WINAPI * PFNWGLUSEFONTOUTLINESAPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
|
||||
typedef BOOL (WINAPI * PFNWGLUSEFONTOUTLINESWPROC) (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
int WINAPI ChoosePixelFormat (HDC hDc, const PIXELFORMATDESCRIPTOR *pPfd);
|
||||
int WINAPI DescribePixelFormat (HDC hdc, int ipfd, UINT cjpfd, const PIXELFORMATDESCRIPTOR *ppfd);
|
||||
UINT WINAPI GetEnhMetaFilePixelFormat (HENHMETAFILE hemf, const PIXELFORMATDESCRIPTOR *ppfd);
|
||||
int WINAPI GetPixelFormat (HDC hdc);
|
||||
BOOL WINAPI SetPixelFormat (HDC hdc, int ipfd, const PIXELFORMATDESCRIPTOR *ppfd);
|
||||
BOOL WINAPI SwapBuffers (HDC hdc);
|
||||
BOOL WINAPI wglCopyContext (HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask);
|
||||
HGLRC WINAPI wglCreateContext (HDC hDc);
|
||||
HGLRC WINAPI wglCreateLayerContext (HDC hDc, int level);
|
||||
BOOL WINAPI wglDeleteContext (HGLRC oldContext);
|
||||
BOOL WINAPI wglDescribeLayerPlane (HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, const LAYERPLANEDESCRIPTOR *plpd);
|
||||
HGLRC WINAPI wglGetCurrentContext (void);
|
||||
HDC WINAPI wglGetCurrentDC (void);
|
||||
int WINAPI wglGetLayerPaletteEntries (HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr);
|
||||
PROC WINAPI wglGetProcAddress (LPCSTR lpszProc);
|
||||
BOOL WINAPI wglMakeCurrent (HDC hDc, HGLRC newContext);
|
||||
BOOL WINAPI wglRealizeLayerPalette (HDC hdc, int iLayerPlane, BOOL bRealize);
|
||||
int WINAPI wglSetLayerPaletteEntries (HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr);
|
||||
BOOL WINAPI wglShareLists (HGLRC hrcSrvShare, HGLRC hrcSrvSource);
|
||||
BOOL WINAPI wglSwapLayerBuffers (HDC hdc, UINT fuFlags);
|
||||
BOOL WINAPI wglUseFontBitmaps (HDC hDC, DWORD first, DWORD count, DWORD listBase);
|
||||
BOOL WINAPI wglUseFontBitmapsA (HDC hDC, DWORD first, DWORD count, DWORD listBase);
|
||||
BOOL WINAPI wglUseFontBitmapsW (HDC hDC, DWORD first, DWORD count, DWORD listBase);
|
||||
BOOL WINAPI wglUseFontOutlines (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
|
||||
BOOL WINAPI wglUseFontOutlinesA (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
|
||||
BOOL WINAPI wglUseFontOutlinesW (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf);
|
||||
#endif
|
||||
#endif /* WGL_VERSION_1_0 */
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
#define WGL_ARB_buffer_region 1
|
||||
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
||||
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
||||
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
||||
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
|
||||
VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
|
||||
BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
|
||||
BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#endif
|
||||
#endif /* WGL_ARB_buffer_region */
|
||||
|
||||
#ifndef WGL_ARB_context_flush_control
|
||||
#define WGL_ARB_context_flush_control 1
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||
#endif /* WGL_ARB_context_flush_control */
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
#define WGL_ARB_create_context 1
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#endif
|
||||
#endif /* WGL_ARB_create_context */
|
||||
|
||||
#ifndef WGL_ARB_create_context_no_error
|
||||
#define WGL_ARB_create_context_no_error 1
|
||||
#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
|
||||
#endif /* WGL_ARB_create_context_no_error */
|
||||
|
||||
#ifndef WGL_ARB_create_context_profile
|
||||
#define WGL_ARB_create_context_profile 1
|
||||
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||
#endif /* WGL_ARB_create_context_profile */
|
||||
|
||||
#ifndef WGL_ARB_create_context_robustness
|
||||
#define WGL_ARB_create_context_robustness 1
|
||||
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#endif /* WGL_ARB_create_context_robustness */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#define WGL_ARB_extensions_string 1
|
||||
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
const char *WINAPI wglGetExtensionsStringARB (HDC hdc);
|
||||
#endif
|
||||
#endif /* WGL_ARB_extensions_string */
|
||||
|
||||
#ifndef WGL_ARB_framebuffer_sRGB
|
||||
#define WGL_ARB_framebuffer_sRGB 1
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
||||
#endif /* WGL_ARB_framebuffer_sRGB */
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define WGL_ARB_make_current_read 1
|
||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||
#endif
|
||||
#endif /* WGL_ARB_make_current_read */
|
||||
|
||||
#ifndef WGL_ARB_multisample
|
||||
#define WGL_ARB_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||
#define WGL_SAMPLES_ARB 0x2042
|
||||
#endif /* WGL_ARB_multisample */
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
#define WGL_ARB_pbuffer 1
|
||||
DECLARE_HANDLE(HPBUFFERARB);
|
||||
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
|
||||
int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
|
||||
BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_ARB_pbuffer */
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
#define WGL_ARB_pixel_format 1
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||
#define WGL_ACCELERATION_ARB 0x2003
|
||||
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||
#define WGL_TRANSPARENT_ARB 0x200A
|
||||
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_STEREO_ARB 0x2012
|
||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
#define WGL_COLOR_BITS_ARB 0x2014
|
||||
#define WGL_RED_BITS_ARB 0x2015
|
||||
#define WGL_RED_SHIFT_ARB 0x2016
|
||||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||
#define WGL_SWAP_COPY_ARB 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
#endif /* WGL_ARB_pixel_format */
|
||||
|
||||
#ifndef WGL_ARB_pixel_format_float
|
||||
#define WGL_ARB_pixel_format_float 1
|
||||
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||
#endif /* WGL_ARB_pixel_format_float */
|
||||
|
||||
#ifndef WGL_ARB_render_texture
|
||||
#define WGL_ARB_render_texture 1
|
||||
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||
#define WGL_BACK_LEFT_ARB 0x2085
|
||||
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||
#define WGL_AUX0_ARB 0x2087
|
||||
#define WGL_AUX1_ARB 0x2088
|
||||
#define WGL_AUX2_ARB 0x2089
|
||||
#define WGL_AUX3_ARB 0x208A
|
||||
#define WGL_AUX4_ARB 0x208B
|
||||
#define WGL_AUX5_ARB 0x208C
|
||||
#define WGL_AUX6_ARB 0x208D
|
||||
#define WGL_AUX7_ARB 0x208E
|
||||
#define WGL_AUX8_ARB 0x208F
|
||||
#define WGL_AUX9_ARB 0x2090
|
||||
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#endif
|
||||
#endif /* WGL_ARB_render_texture */
|
||||
|
||||
#ifndef WGL_ARB_robustness_application_isolation
|
||||
#define WGL_ARB_robustness_application_isolation 1
|
||||
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||
#endif /* WGL_ARB_robustness_application_isolation */
|
||||
|
||||
#ifndef WGL_ARB_robustness_share_group_isolation
|
||||
#define WGL_ARB_robustness_share_group_isolation 1
|
||||
#endif /* WGL_ARB_robustness_share_group_isolation */
|
||||
|
||||
#ifndef WGL_3DFX_multisample
|
||||
#define WGL_3DFX_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||
#define WGL_SAMPLES_3DFX 0x2061
|
||||
#endif /* WGL_3DFX_multisample */
|
||||
|
||||
#ifndef WGL_3DL_stereo_control
|
||||
#define WGL_3DL_stereo_control 1
|
||||
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||
typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
|
||||
#endif
|
||||
#endif /* WGL_3DL_stereo_control */
|
||||
|
||||
#ifndef WGL_AMD_gpu_association
|
||||
#define WGL_AMD_gpu_association 1
|
||||
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define WGL_GPU_RAM_AMD 0x21A3
|
||||
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
|
||||
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void *data);
|
||||
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
|
||||
INT WINAPI wglGetGPUInfoAMD (UINT id, INT property, GLenum dataType, UINT size, void *data);
|
||||
UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
|
||||
HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
|
||||
HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
|
||||
BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
|
||||
HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
|
||||
VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
#endif /* WGL_AMD_gpu_association */
|
||||
|
||||
#ifndef WGL_ATI_pixel_format_float
|
||||
#define WGL_ATI_pixel_format_float 1
|
||||
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||
#endif /* WGL_ATI_pixel_format_float */
|
||||
|
||||
#ifndef WGL_ATI_render_texture_rectangle
|
||||
#define WGL_ATI_render_texture_rectangle 1
|
||||
#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5
|
||||
#endif /* WGL_ATI_render_texture_rectangle */
|
||||
|
||||
#ifndef WGL_EXT_colorspace
|
||||
#define WGL_EXT_colorspace 1
|
||||
#define WGL_COLORSPACE_EXT 0x309D
|
||||
#define WGL_COLORSPACE_SRGB_EXT 0x3089
|
||||
#define WGL_COLORSPACE_LINEAR_EXT 0x308A
|
||||
#endif /* WGL_EXT_colorspace */
|
||||
|
||||
#ifndef WGL_EXT_create_context_es2_profile
|
||||
#define WGL_EXT_create_context_es2_profile 1
|
||||
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* WGL_EXT_create_context_es2_profile */
|
||||
|
||||
#ifndef WGL_EXT_create_context_es_profile
|
||||
#define WGL_EXT_create_context_es_profile 1
|
||||
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* WGL_EXT_create_context_es_profile */
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
#define WGL_EXT_depth_float 1
|
||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||
#endif /* WGL_EXT_depth_float */
|
||||
|
||||
#ifndef WGL_EXT_display_color_table
|
||||
#define WGL_EXT_display_color_table 1
|
||||
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
||||
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
|
||||
GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
|
||||
GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
|
||||
VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
|
||||
#endif
|
||||
#endif /* WGL_EXT_display_color_table */
|
||||
|
||||
#ifndef WGL_EXT_extensions_string
|
||||
#define WGL_EXT_extensions_string 1
|
||||
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
const char *WINAPI wglGetExtensionsStringEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_extensions_string */
|
||||
|
||||
#ifndef WGL_EXT_framebuffer_sRGB
|
||||
#define WGL_EXT_framebuffer_sRGB 1
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||
#endif /* WGL_EXT_framebuffer_sRGB */
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define WGL_EXT_make_current_read 1
|
||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_make_current_read */
|
||||
|
||||
#ifndef WGL_EXT_multisample
|
||||
#define WGL_EXT_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||
#define WGL_SAMPLES_EXT 0x2042
|
||||
#endif /* WGL_EXT_multisample */
|
||||
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
#define WGL_EXT_pbuffer 1
|
||||
DECLARE_HANDLE(HPBUFFEREXT);
|
||||
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
|
||||
int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
|
||||
BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_EXT_pbuffer */
|
||||
|
||||
#ifndef WGL_EXT_pixel_format
|
||||
#define WGL_EXT_pixel_format 1
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||
#define WGL_ACCELERATION_EXT 0x2003
|
||||
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||
#define WGL_TRANSPARENT_EXT 0x200A
|
||||
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||
#define WGL_STEREO_EXT 0x2012
|
||||
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||
#define WGL_COLOR_BITS_EXT 0x2014
|
||||
#define WGL_RED_BITS_EXT 0x2015
|
||||
#define WGL_RED_SHIFT_EXT 0x2016
|
||||
#define WGL_GREEN_BITS_EXT 0x2017
|
||||
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||
#define WGL_BLUE_BITS_EXT 0x2019
|
||||
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||
#define WGL_SWAP_COPY_EXT 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
#endif /* WGL_EXT_pixel_format */
|
||||
|
||||
#ifndef WGL_EXT_pixel_format_packed_float
|
||||
#define WGL_EXT_pixel_format_packed_float 1
|
||||
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||
#endif /* WGL_EXT_pixel_format_packed_float */
|
||||
|
||||
#ifndef WGL_EXT_swap_control
|
||||
#define WGL_EXT_swap_control 1
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglSwapIntervalEXT (int interval);
|
||||
int WINAPI wglGetSwapIntervalEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_swap_control */
|
||||
|
||||
#ifndef WGL_EXT_swap_control_tear
|
||||
#define WGL_EXT_swap_control_tear 1
|
||||
#endif /* WGL_EXT_swap_control_tear */
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
#define WGL_I3D_digital_video_control 1
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_I3D_digital_video_control */
|
||||
|
||||
#ifndef WGL_I3D_gamma
|
||||
#define WGL_I3D_gamma 1
|
||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||
BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||
BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||
#endif
|
||||
#endif /* WGL_I3D_gamma */
|
||||
|
||||
#ifndef WGL_I3D_genlock
|
||||
#define WGL_I3D_genlock 1
|
||||
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
|
||||
BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
|
||||
BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
|
||||
BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
|
||||
BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
|
||||
BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
|
||||
BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
|
||||
BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
|
||||
BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
|
||||
BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
|
||||
BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
|
||||
BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||
#endif
|
||||
#endif /* WGL_I3D_genlock */
|
||||
|
||||
#ifndef WGL_I3D_image_buffer
|
||||
#define WGL_I3D_image_buffer 1
|
||||
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
|
||||
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||
BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
|
||||
BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||
BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||
#endif
|
||||
#endif /* WGL_I3D_image_buffer */
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_lock
|
||||
#define WGL_I3D_swap_frame_lock 1
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnableFrameLockI3D (void);
|
||||
BOOL WINAPI wglDisableFrameLockI3D (void);
|
||||
BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
|
||||
BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
|
||||
#endif
|
||||
#endif /* WGL_I3D_swap_frame_lock */
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_usage
|
||||
#define WGL_I3D_swap_frame_usage 1
|
||||
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
|
||||
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
|
||||
BOOL WINAPI wglBeginFrameTrackingI3D (void);
|
||||
BOOL WINAPI wglEndFrameTrackingI3D (void);
|
||||
BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||
#endif
|
||||
#endif /* WGL_I3D_swap_frame_usage */
|
||||
|
||||
#ifndef WGL_NV_DX_interop
|
||||
#define WGL_NV_DX_interop 1
|
||||
#define WGL_ACCESS_READ_ONLY_NV 0x00000000
|
||||
#define WGL_ACCESS_READ_WRITE_NV 0x00000001
|
||||
#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002
|
||||
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
|
||||
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
|
||||
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle);
|
||||
HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice);
|
||||
BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice);
|
||||
HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject);
|
||||
BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access);
|
||||
BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
#endif
|
||||
#endif /* WGL_NV_DX_interop */
|
||||
|
||||
#ifndef WGL_NV_DX_interop2
|
||||
#define WGL_NV_DX_interop2 1
|
||||
#endif /* WGL_NV_DX_interop2 */
|
||||
|
||||
#ifndef WGL_NV_copy_image
|
||||
#define WGL_NV_copy_image 1
|
||||
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
#endif /* WGL_NV_copy_image */
|
||||
|
||||
#ifndef WGL_NV_delay_before_swap
|
||||
#define WGL_NV_delay_before_swap 1
|
||||
typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglDelayBeforeSwapNV (HDC hDC, GLfloat seconds);
|
||||
#endif
|
||||
#endif /* WGL_NV_delay_before_swap */
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
#define WGL_NV_float_buffer 1
|
||||
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||
#endif /* WGL_NV_float_buffer */
|
||||
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
#define WGL_NV_gpu_affinity 1
|
||||
DECLARE_HANDLE(HGPUNV);
|
||||
struct _GPU_DEVICE {
|
||||
DWORD cb;
|
||||
CHAR DeviceName[32];
|
||||
CHAR DeviceString[128];
|
||||
DWORD Flags;
|
||||
RECT rcVirtualScreen;
|
||||
};
|
||||
typedef struct _GPU_DEVICE *PGPU_DEVICE;
|
||||
#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||
#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
|
||||
BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
BOOL WINAPI wglDeleteDCNV (HDC hdc);
|
||||
#endif
|
||||
#endif /* WGL_NV_gpu_affinity */
|
||||
|
||||
#ifndef WGL_NV_multigpu_context
|
||||
#define WGL_NV_multigpu_context 1
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE
|
||||
#endif /* WGL_NV_multigpu_context */
|
||||
|
||||
#ifndef WGL_NV_multisample_coverage
|
||||
#define WGL_NV_multisample_coverage 1
|
||||
#define WGL_COVERAGE_SAMPLES_NV 0x2042
|
||||
#define WGL_COLOR_SAMPLES_NV 0x20B9
|
||||
#endif /* WGL_NV_multisample_coverage */
|
||||
|
||||
#ifndef WGL_NV_present_video
|
||||
#define WGL_NV_present_video 1
|
||||
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
int WINAPI wglEnumerateVideoDevicesNV (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
BOOL WINAPI wglBindVideoDeviceNV (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_NV_present_video */
|
||||
|
||||
#ifndef WGL_NV_render_depth_texture
|
||||
#define WGL_NV_render_depth_texture 1
|
||||
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||
#endif /* WGL_NV_render_depth_texture */
|
||||
|
||||
#ifndef WGL_NV_render_texture_rectangle
|
||||
#define WGL_NV_render_texture_rectangle 1
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||
#endif /* WGL_NV_render_texture_rectangle */
|
||||
|
||||
#ifndef WGL_NV_swap_group
|
||||
#define WGL_NV_swap_group 1
|
||||
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
|
||||
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
|
||||
BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
|
||||
BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
|
||||
BOOL WINAPI wglResetFrameCountNV (HDC hDC);
|
||||
#endif
|
||||
#endif /* WGL_NV_swap_group */
|
||||
|
||||
#ifndef WGL_NV_vertex_array_range
|
||||
#define WGL_NV_vertex_array_range 1
|
||||
typedef void *(WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
void *WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
void WINAPI wglFreeMemoryNV (void *pointer);
|
||||
#endif
|
||||
#endif /* WGL_NV_vertex_array_range */
|
||||
|
||||
#ifndef WGL_NV_video_capture
|
||||
#define WGL_NV_video_capture 1
|
||||
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
|
||||
#define WGL_UNIQUE_ID_NV 0x20CE
|
||||
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||
typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||
UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||
BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
#endif
|
||||
#endif /* WGL_NV_video_capture */
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
#define WGL_NV_video_output 1
|
||||
DECLARE_HANDLE(HPVIDEODEV);
|
||||
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
|
||||
BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif
|
||||
#endif /* WGL_NV_video_output */
|
||||
|
||||
#ifndef WGL_OML_sync_control
|
||||
#define WGL_OML_sync_control 1
|
||||
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||
INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
#endif
|
||||
#endif /* WGL_OML_sync_control */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Executable
+845
@@ -0,0 +1,845 @@
|
||||
#ifndef __wgl_wglext_h_
|
||||
#define __wgl_wglext_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define WGL_WGLEXT_VERSION 20211115
|
||||
|
||||
/* Generated C header for:
|
||||
* API: wgl
|
||||
* Versions considered: .*
|
||||
* Versions emitted: _nomatch_^
|
||||
* Default extensions included: wgl
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
#define WGL_ARB_buffer_region 1
|
||||
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
||||
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
||||
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
||||
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
|
||||
VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
|
||||
BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
|
||||
BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#endif
|
||||
#endif /* WGL_ARB_buffer_region */
|
||||
|
||||
#ifndef WGL_ARB_context_flush_control
|
||||
#define WGL_ARB_context_flush_control 1
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||
#endif /* WGL_ARB_context_flush_control */
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
#define WGL_ARB_create_context 1
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#endif
|
||||
#endif /* WGL_ARB_create_context */
|
||||
|
||||
#ifndef WGL_ARB_create_context_no_error
|
||||
#define WGL_ARB_create_context_no_error 1
|
||||
#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
|
||||
#endif /* WGL_ARB_create_context_no_error */
|
||||
|
||||
#ifndef WGL_ARB_create_context_profile
|
||||
#define WGL_ARB_create_context_profile 1
|
||||
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||
#endif /* WGL_ARB_create_context_profile */
|
||||
|
||||
#ifndef WGL_ARB_create_context_robustness
|
||||
#define WGL_ARB_create_context_robustness 1
|
||||
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#endif /* WGL_ARB_create_context_robustness */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#define WGL_ARB_extensions_string 1
|
||||
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
const char *WINAPI wglGetExtensionsStringARB (HDC hdc);
|
||||
#endif
|
||||
#endif /* WGL_ARB_extensions_string */
|
||||
|
||||
#ifndef WGL_ARB_framebuffer_sRGB
|
||||
#define WGL_ARB_framebuffer_sRGB 1
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
||||
#endif /* WGL_ARB_framebuffer_sRGB */
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define WGL_ARB_make_current_read 1
|
||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||
#endif
|
||||
#endif /* WGL_ARB_make_current_read */
|
||||
|
||||
#ifndef WGL_ARB_multisample
|
||||
#define WGL_ARB_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||
#define WGL_SAMPLES_ARB 0x2042
|
||||
#endif /* WGL_ARB_multisample */
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
#define WGL_ARB_pbuffer 1
|
||||
DECLARE_HANDLE(HPBUFFERARB);
|
||||
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
|
||||
int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
|
||||
BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_ARB_pbuffer */
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
#define WGL_ARB_pixel_format 1
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||
#define WGL_ACCELERATION_ARB 0x2003
|
||||
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||
#define WGL_TRANSPARENT_ARB 0x200A
|
||||
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_STEREO_ARB 0x2012
|
||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
#define WGL_COLOR_BITS_ARB 0x2014
|
||||
#define WGL_RED_BITS_ARB 0x2015
|
||||
#define WGL_RED_SHIFT_ARB 0x2016
|
||||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||
#define WGL_SWAP_COPY_ARB 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
#endif /* WGL_ARB_pixel_format */
|
||||
|
||||
#ifndef WGL_ARB_pixel_format_float
|
||||
#define WGL_ARB_pixel_format_float 1
|
||||
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||
#endif /* WGL_ARB_pixel_format_float */
|
||||
|
||||
#ifndef WGL_ARB_render_texture
|
||||
#define WGL_ARB_render_texture 1
|
||||
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||
#define WGL_BACK_LEFT_ARB 0x2085
|
||||
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||
#define WGL_AUX0_ARB 0x2087
|
||||
#define WGL_AUX1_ARB 0x2088
|
||||
#define WGL_AUX2_ARB 0x2089
|
||||
#define WGL_AUX3_ARB 0x208A
|
||||
#define WGL_AUX4_ARB 0x208B
|
||||
#define WGL_AUX5_ARB 0x208C
|
||||
#define WGL_AUX6_ARB 0x208D
|
||||
#define WGL_AUX7_ARB 0x208E
|
||||
#define WGL_AUX8_ARB 0x208F
|
||||
#define WGL_AUX9_ARB 0x2090
|
||||
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#endif
|
||||
#endif /* WGL_ARB_render_texture */
|
||||
|
||||
#ifndef WGL_ARB_robustness_application_isolation
|
||||
#define WGL_ARB_robustness_application_isolation 1
|
||||
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||
#endif /* WGL_ARB_robustness_application_isolation */
|
||||
|
||||
#ifndef WGL_ARB_robustness_share_group_isolation
|
||||
#define WGL_ARB_robustness_share_group_isolation 1
|
||||
#endif /* WGL_ARB_robustness_share_group_isolation */
|
||||
|
||||
#ifndef WGL_3DFX_multisample
|
||||
#define WGL_3DFX_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||
#define WGL_SAMPLES_3DFX 0x2061
|
||||
#endif /* WGL_3DFX_multisample */
|
||||
|
||||
#ifndef WGL_3DL_stereo_control
|
||||
#define WGL_3DL_stereo_control 1
|
||||
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||
typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
|
||||
#endif
|
||||
#endif /* WGL_3DL_stereo_control */
|
||||
|
||||
#ifndef WGL_AMD_gpu_association
|
||||
#define WGL_AMD_gpu_association 1
|
||||
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define WGL_GPU_RAM_AMD 0x21A3
|
||||
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
|
||||
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void *data);
|
||||
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
|
||||
INT WINAPI wglGetGPUInfoAMD (UINT id, INT property, GLenum dataType, UINT size, void *data);
|
||||
UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
|
||||
HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
|
||||
HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
|
||||
BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
|
||||
HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
|
||||
VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
#endif /* WGL_AMD_gpu_association */
|
||||
|
||||
#ifndef WGL_ATI_pixel_format_float
|
||||
#define WGL_ATI_pixel_format_float 1
|
||||
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||
#endif /* WGL_ATI_pixel_format_float */
|
||||
|
||||
#ifndef WGL_ATI_render_texture_rectangle
|
||||
#define WGL_ATI_render_texture_rectangle 1
|
||||
#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5
|
||||
#endif /* WGL_ATI_render_texture_rectangle */
|
||||
|
||||
#ifndef WGL_EXT_colorspace
|
||||
#define WGL_EXT_colorspace 1
|
||||
#define WGL_COLORSPACE_EXT 0x309D
|
||||
#define WGL_COLORSPACE_SRGB_EXT 0x3089
|
||||
#define WGL_COLORSPACE_LINEAR_EXT 0x308A
|
||||
#endif /* WGL_EXT_colorspace */
|
||||
|
||||
#ifndef WGL_EXT_create_context_es2_profile
|
||||
#define WGL_EXT_create_context_es2_profile 1
|
||||
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* WGL_EXT_create_context_es2_profile */
|
||||
|
||||
#ifndef WGL_EXT_create_context_es_profile
|
||||
#define WGL_EXT_create_context_es_profile 1
|
||||
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* WGL_EXT_create_context_es_profile */
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
#define WGL_EXT_depth_float 1
|
||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||
#endif /* WGL_EXT_depth_float */
|
||||
|
||||
#ifndef WGL_EXT_display_color_table
|
||||
#define WGL_EXT_display_color_table 1
|
||||
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
||||
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
|
||||
GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
|
||||
GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
|
||||
VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
|
||||
#endif
|
||||
#endif /* WGL_EXT_display_color_table */
|
||||
|
||||
#ifndef WGL_EXT_extensions_string
|
||||
#define WGL_EXT_extensions_string 1
|
||||
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
const char *WINAPI wglGetExtensionsStringEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_extensions_string */
|
||||
|
||||
#ifndef WGL_EXT_framebuffer_sRGB
|
||||
#define WGL_EXT_framebuffer_sRGB 1
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||
#endif /* WGL_EXT_framebuffer_sRGB */
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define WGL_EXT_make_current_read 1
|
||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_make_current_read */
|
||||
|
||||
#ifndef WGL_EXT_multisample
|
||||
#define WGL_EXT_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||
#define WGL_SAMPLES_EXT 0x2042
|
||||
#endif /* WGL_EXT_multisample */
|
||||
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
#define WGL_EXT_pbuffer 1
|
||||
DECLARE_HANDLE(HPBUFFEREXT);
|
||||
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
|
||||
int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
|
||||
BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_EXT_pbuffer */
|
||||
|
||||
#ifndef WGL_EXT_pixel_format
|
||||
#define WGL_EXT_pixel_format 1
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||
#define WGL_ACCELERATION_EXT 0x2003
|
||||
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||
#define WGL_TRANSPARENT_EXT 0x200A
|
||||
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||
#define WGL_STEREO_EXT 0x2012
|
||||
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||
#define WGL_COLOR_BITS_EXT 0x2014
|
||||
#define WGL_RED_BITS_EXT 0x2015
|
||||
#define WGL_RED_SHIFT_EXT 0x2016
|
||||
#define WGL_GREEN_BITS_EXT 0x2017
|
||||
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||
#define WGL_BLUE_BITS_EXT 0x2019
|
||||
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||
#define WGL_SWAP_COPY_EXT 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
#endif /* WGL_EXT_pixel_format */
|
||||
|
||||
#ifndef WGL_EXT_pixel_format_packed_float
|
||||
#define WGL_EXT_pixel_format_packed_float 1
|
||||
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||
#endif /* WGL_EXT_pixel_format_packed_float */
|
||||
|
||||
#ifndef WGL_EXT_swap_control
|
||||
#define WGL_EXT_swap_control 1
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglSwapIntervalEXT (int interval);
|
||||
int WINAPI wglGetSwapIntervalEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_swap_control */
|
||||
|
||||
#ifndef WGL_EXT_swap_control_tear
|
||||
#define WGL_EXT_swap_control_tear 1
|
||||
#endif /* WGL_EXT_swap_control_tear */
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
#define WGL_I3D_digital_video_control 1
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_I3D_digital_video_control */
|
||||
|
||||
#ifndef WGL_I3D_gamma
|
||||
#define WGL_I3D_gamma 1
|
||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||
BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||
BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||
#endif
|
||||
#endif /* WGL_I3D_gamma */
|
||||
|
||||
#ifndef WGL_I3D_genlock
|
||||
#define WGL_I3D_genlock 1
|
||||
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
|
||||
BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
|
||||
BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
|
||||
BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
|
||||
BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
|
||||
BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
|
||||
BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
|
||||
BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
|
||||
BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
|
||||
BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
|
||||
BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
|
||||
BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||
#endif
|
||||
#endif /* WGL_I3D_genlock */
|
||||
|
||||
#ifndef WGL_I3D_image_buffer
|
||||
#define WGL_I3D_image_buffer 1
|
||||
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
|
||||
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||
BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
|
||||
BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||
BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||
#endif
|
||||
#endif /* WGL_I3D_image_buffer */
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_lock
|
||||
#define WGL_I3D_swap_frame_lock 1
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnableFrameLockI3D (void);
|
||||
BOOL WINAPI wglDisableFrameLockI3D (void);
|
||||
BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
|
||||
BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
|
||||
#endif
|
||||
#endif /* WGL_I3D_swap_frame_lock */
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_usage
|
||||
#define WGL_I3D_swap_frame_usage 1
|
||||
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
|
||||
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
|
||||
BOOL WINAPI wglBeginFrameTrackingI3D (void);
|
||||
BOOL WINAPI wglEndFrameTrackingI3D (void);
|
||||
BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||
#endif
|
||||
#endif /* WGL_I3D_swap_frame_usage */
|
||||
|
||||
#ifndef WGL_NV_DX_interop
|
||||
#define WGL_NV_DX_interop 1
|
||||
#define WGL_ACCESS_READ_ONLY_NV 0x00000000
|
||||
#define WGL_ACCESS_READ_WRITE_NV 0x00000001
|
||||
#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002
|
||||
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
|
||||
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
|
||||
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle);
|
||||
HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice);
|
||||
BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice);
|
||||
HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject);
|
||||
BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access);
|
||||
BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
#endif
|
||||
#endif /* WGL_NV_DX_interop */
|
||||
|
||||
#ifndef WGL_NV_DX_interop2
|
||||
#define WGL_NV_DX_interop2 1
|
||||
#endif /* WGL_NV_DX_interop2 */
|
||||
|
||||
#ifndef WGL_NV_copy_image
|
||||
#define WGL_NV_copy_image 1
|
||||
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
#endif /* WGL_NV_copy_image */
|
||||
|
||||
#ifndef WGL_NV_delay_before_swap
|
||||
#define WGL_NV_delay_before_swap 1
|
||||
typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglDelayBeforeSwapNV (HDC hDC, GLfloat seconds);
|
||||
#endif
|
||||
#endif /* WGL_NV_delay_before_swap */
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
#define WGL_NV_float_buffer 1
|
||||
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||
#endif /* WGL_NV_float_buffer */
|
||||
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
#define WGL_NV_gpu_affinity 1
|
||||
DECLARE_HANDLE(HGPUNV);
|
||||
struct _GPU_DEVICE {
|
||||
DWORD cb;
|
||||
CHAR DeviceName[32];
|
||||
CHAR DeviceString[128];
|
||||
DWORD Flags;
|
||||
RECT rcVirtualScreen;
|
||||
};
|
||||
typedef struct _GPU_DEVICE *PGPU_DEVICE;
|
||||
#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||
#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
|
||||
BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
BOOL WINAPI wglDeleteDCNV (HDC hdc);
|
||||
#endif
|
||||
#endif /* WGL_NV_gpu_affinity */
|
||||
|
||||
#ifndef WGL_NV_multigpu_context
|
||||
#define WGL_NV_multigpu_context 1
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_NV 0x20AA
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV 0x20AB
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV 0x20AC
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV 0x20AD
|
||||
#define WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV 0x20AE
|
||||
#endif /* WGL_NV_multigpu_context */
|
||||
|
||||
#ifndef WGL_NV_multisample_coverage
|
||||
#define WGL_NV_multisample_coverage 1
|
||||
#define WGL_COVERAGE_SAMPLES_NV 0x2042
|
||||
#define WGL_COLOR_SAMPLES_NV 0x20B9
|
||||
#endif /* WGL_NV_multisample_coverage */
|
||||
|
||||
#ifndef WGL_NV_present_video
|
||||
#define WGL_NV_present_video 1
|
||||
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
int WINAPI wglEnumerateVideoDevicesNV (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
BOOL WINAPI wglBindVideoDeviceNV (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_NV_present_video */
|
||||
|
||||
#ifndef WGL_NV_render_depth_texture
|
||||
#define WGL_NV_render_depth_texture 1
|
||||
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||
#endif /* WGL_NV_render_depth_texture */
|
||||
|
||||
#ifndef WGL_NV_render_texture_rectangle
|
||||
#define WGL_NV_render_texture_rectangle 1
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||
#endif /* WGL_NV_render_texture_rectangle */
|
||||
|
||||
#ifndef WGL_NV_swap_group
|
||||
#define WGL_NV_swap_group 1
|
||||
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
|
||||
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
|
||||
BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
|
||||
BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
|
||||
BOOL WINAPI wglResetFrameCountNV (HDC hDC);
|
||||
#endif
|
||||
#endif /* WGL_NV_swap_group */
|
||||
|
||||
#ifndef WGL_NV_vertex_array_range
|
||||
#define WGL_NV_vertex_array_range 1
|
||||
typedef void *(WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
void *WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
void WINAPI wglFreeMemoryNV (void *pointer);
|
||||
#endif
|
||||
#endif /* WGL_NV_vertex_array_range */
|
||||
|
||||
#ifndef WGL_NV_video_capture
|
||||
#define WGL_NV_video_capture 1
|
||||
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
|
||||
#define WGL_UNIQUE_ID_NV 0x20CE
|
||||
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||
typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||
UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||
BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
#endif
|
||||
#endif /* WGL_NV_video_capture */
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
#define WGL_NV_video_output 1
|
||||
DECLARE_HANDLE(HPVIDEODEV);
|
||||
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
|
||||
BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif
|
||||
#endif /* WGL_NV_video_output */
|
||||
|
||||
#ifndef WGL_OML_sync_control
|
||||
#define WGL_OML_sync_control 1
|
||||
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||
INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
#endif
|
||||
#endif /* WGL_OML_sync_control */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,584 @@
|
||||
#ifndef __gl_h_
|
||||
#define __gl_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.0 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: The application programming interfaces
|
||||
** established by SGI in conjunction with the Original Code are The
|
||||
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
|
||||
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
|
||||
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
|
||||
** Window System(R) (Version 1.3), released October 19, 1998. This software
|
||||
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef signed char GLbyte;
|
||||
typedef short GLshort;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef unsigned char GLubyte;
|
||||
typedef unsigned short GLushort;
|
||||
typedef unsigned int GLuint;
|
||||
typedef float GLfloat;
|
||||
typedef float GLclampf;
|
||||
typedef void GLvoid;
|
||||
typedef int GLintptrARB;
|
||||
typedef int GLsizeiptrARB;
|
||||
typedef int GLfixed;
|
||||
typedef int GLclampx;
|
||||
/* Internal convenience typedefs */
|
||||
typedef void (*_GLfuncptr)();
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Extensions */
|
||||
#define GL_OES_VERSION_1_0 1
|
||||
#define GL_OES_read_format 1
|
||||
#define GL_OES_compressed_paletted_texture 1
|
||||
|
||||
/* ClearBufferMask */
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
|
||||
/* Boolean */
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* BeginMode */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
|
||||
/* AlphaFunction */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
|
||||
/* BlendingFactorDest */
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
|
||||
/* BlendingFactorSrc */
|
||||
/* GL_ZERO */
|
||||
/* GL_ONE */
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
/* GL_SRC_ALPHA */
|
||||
/* GL_ONE_MINUS_SRC_ALPHA */
|
||||
/* GL_DST_ALPHA */
|
||||
/* GL_ONE_MINUS_DST_ALPHA */
|
||||
|
||||
/* ColorMaterialFace */
|
||||
/* GL_FRONT_AND_BACK */
|
||||
|
||||
/* ColorMaterialParameter */
|
||||
/* GL_AMBIENT_AND_DIFFUSE */
|
||||
|
||||
/* ColorPointerType */
|
||||
/* GL_UNSIGNED_BYTE */
|
||||
/* GL_FLOAT */
|
||||
/* GL_FIXED */
|
||||
|
||||
/* CullFaceMode */
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
|
||||
/* DepthFunction */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* EnableCap */
|
||||
#define GL_FOG 0x0B60
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_COLOR_LOGIC_OP 0x0BF2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
/* GL_LIGHT0 */
|
||||
/* GL_LIGHT1 */
|
||||
/* GL_LIGHT2 */
|
||||
/* GL_LIGHT3 */
|
||||
/* GL_LIGHT4 */
|
||||
/* GL_LIGHT5 */
|
||||
/* GL_LIGHT6 */
|
||||
/* GL_LIGHT7 */
|
||||
#define GL_POINT_SMOOTH 0x0B10
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
#define GL_RESCALE_NORMAL 0x803A
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
#define GL_MULTISAMPLE 0x809D
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_STACK_OVERFLOW 0x0503
|
||||
#define GL_STACK_UNDERFLOW 0x0504
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* FogMode */
|
||||
/* GL_LINEAR */
|
||||
#define GL_EXP 0x0800
|
||||
#define GL_EXP2 0x0801
|
||||
|
||||
/* FogParameter */
|
||||
#define GL_FOG_DENSITY 0x0B62
|
||||
#define GL_FOG_START 0x0B63
|
||||
#define GL_FOG_END 0x0B64
|
||||
#define GL_FOG_MODE 0x0B65
|
||||
#define GL_FOG_COLOR 0x0B66
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
/* GetPName */
|
||||
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_ELEMENTS_VERTICES 0x80E8
|
||||
#define GL_MAX_ELEMENTS_INDICES 0x80E9
|
||||
#define GL_MAX_TEXTURE_UNITS 0x84E2
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
|
||||
/* HintMode */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
|
||||
/* HintTarget */
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
#define GL_POLYGON_SMOOTH_HINT 0x0C53
|
||||
#define GL_FOG_HINT 0x0C54
|
||||
|
||||
/* LightModelParameter */
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
|
||||
|
||||
/* LightParameter */
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_POSITION 0x1203
|
||||
#define GL_SPOT_DIRECTION 0x1204
|
||||
#define GL_SPOT_EXPONENT 0x1205
|
||||
#define GL_SPOT_CUTOFF 0x1206
|
||||
#define GL_CONSTANT_ATTENUATION 0x1207
|
||||
#define GL_LINEAR_ATTENUATION 0x1208
|
||||
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||
|
||||
/* DataType */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
|
||||
/* LogicOp */
|
||||
#define GL_CLEAR 0x1500
|
||||
#define GL_AND 0x1501
|
||||
#define GL_AND_REVERSE 0x1502
|
||||
#define GL_COPY 0x1503
|
||||
#define GL_AND_INVERTED 0x1504
|
||||
#define GL_NOOP 0x1505
|
||||
#define GL_XOR 0x1506
|
||||
#define GL_OR 0x1507
|
||||
#define GL_NOR 0x1508
|
||||
#define GL_EQUIV 0x1509
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_OR_REVERSE 0x150B
|
||||
#define GL_COPY_INVERTED 0x150C
|
||||
#define GL_OR_INVERTED 0x150D
|
||||
#define GL_NAND 0x150E
|
||||
#define GL_SET 0x150F
|
||||
|
||||
/* MaterialFace */
|
||||
/* GL_FRONT_AND_BACK */
|
||||
|
||||
/* MaterialParameter */
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
/* GL_AMBIENT */
|
||||
/* GL_DIFFUSE */
|
||||
/* GL_SPECULAR */
|
||||
|
||||
/* MatrixMode */
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
|
||||
/* NormalPointerType */
|
||||
/* GL_BYTE */
|
||||
/* GL_SHORT */
|
||||
/* GL_FLOAT */
|
||||
/* GL_FIXED */
|
||||
|
||||
/* PixelFormat */
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
|
||||
/* PixelStoreParameter */
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
|
||||
/* PixelType */
|
||||
/* GL_UNSIGNED_BYTE */
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
|
||||
/* ShadingModel */
|
||||
#define GL_FLAT 0x1D00
|
||||
#define GL_SMOOTH 0x1D01
|
||||
|
||||
/* StencilFunction */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* StencilOp */
|
||||
/* GL_ZERO */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
/* GL_INVERT */
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* TexCoordPointerType */
|
||||
/* GL_SHORT */
|
||||
/* GL_FLOAT */
|
||||
/* GL_FIXED */
|
||||
/* GL_BYTE */
|
||||
|
||||
/* TextureEnvMode */
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_DECAL 0x2101
|
||||
/* GL_BLEND */
|
||||
#define GL_ADD 0x0104
|
||||
/* GL_REPLACE */
|
||||
|
||||
/* TextureEnvParameter */
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
|
||||
/* TextureEnvTarget */
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* TextureMinFilter */
|
||||
/* GL_NEAREST */
|
||||
/* GL_LINEAR */
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
/* TextureParameterName */
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
|
||||
/* TextureTarget */
|
||||
/* GL_TEXTURE_2D */
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
|
||||
/* TextureWrapMode */
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
|
||||
/* PixelInternalFormat */
|
||||
#define GL_PALETTE4_RGB8_OES 0x8B90
|
||||
#define GL_PALETTE4_RGBA8_OES 0x8B91
|
||||
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
|
||||
#define GL_PALETTE4_RGBA4_OES 0x8B93
|
||||
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
|
||||
#define GL_PALETTE8_RGB8_OES 0x8B95
|
||||
#define GL_PALETTE8_RGBA8_OES 0x8B96
|
||||
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
|
||||
#define GL_PALETTE8_RGBA4_OES 0x8B98
|
||||
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
|
||||
|
||||
/* VertexPointerType */
|
||||
/* GL_SHORT */
|
||||
/* GL_FLOAT */
|
||||
/* GL_FIXED */
|
||||
/* GL_BYTE */
|
||||
|
||||
/* LightName */
|
||||
#define GL_LIGHT0 0x4000
|
||||
#define GL_LIGHT1 0x4001
|
||||
#define GL_LIGHT2 0x4002
|
||||
#define GL_LIGHT3 0x4003
|
||||
#define GL_LIGHT4 0x4004
|
||||
#define GL_LIGHT5 0x4005
|
||||
#define GL_LIGHT6 0x4006
|
||||
#define GL_LIGHT7 0x4007
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
GLAPI void APIENTRY glActiveTexture (GLenum texture);
|
||||
GLAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
|
||||
GLAPI void APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
|
||||
GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GLAPI void APIENTRY glClear (GLbitfield mask);
|
||||
GLAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GLAPI void APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
|
||||
GLAPI void APIENTRY glClearDepthf (GLclampf depth);
|
||||
GLAPI void APIENTRY glClearDepthx (GLclampx depth);
|
||||
GLAPI void APIENTRY glClearStencil (GLint s);
|
||||
GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
|
||||
GLAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GLAPI void APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GLAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
GLAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GLAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glCullFace (GLenum mode);
|
||||
GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||
GLAPI void APIENTRY glDepthFunc (GLenum func);
|
||||
GLAPI void APIENTRY glDepthMask (GLboolean flag);
|
||||
GLAPI void APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||
GLAPI void APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
|
||||
GLAPI void APIENTRY glDisable (GLenum cap);
|
||||
GLAPI void APIENTRY glDisableClientState (GLenum array);
|
||||
GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
GLAPI void APIENTRY glEnable (GLenum cap);
|
||||
GLAPI void APIENTRY glEnableClientState (GLenum array);
|
||||
GLAPI void APIENTRY glFinish (void);
|
||||
GLAPI void APIENTRY glFlush (void);
|
||||
GLAPI void APIENTRY glFogf (GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glFogfv (GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glFogx (GLenum pname, GLfixed param);
|
||||
GLAPI void APIENTRY glFogxv (GLenum pname, const GLfixed *params);
|
||||
GLAPI void APIENTRY glFrontFace (GLenum mode);
|
||||
GLAPI void APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GLAPI void APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GLAPI GLenum APIENTRY glGetError (void);
|
||||
GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params);
|
||||
GLAPI const GLubyte * APIENTRY glGetString (GLenum name);
|
||||
GLAPI void APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GLAPI void APIENTRY glLightModelf (GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glLightModelx (GLenum pname, GLfixed param);
|
||||
GLAPI void APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
|
||||
GLAPI void APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
|
||||
GLAPI void APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
|
||||
GLAPI void APIENTRY glLineWidth (GLfloat width);
|
||||
GLAPI void APIENTRY glLineWidthx (GLfixed width);
|
||||
GLAPI void APIENTRY glLoadIdentity (void);
|
||||
GLAPI void APIENTRY glLoadMatrixf (const GLfloat *m);
|
||||
GLAPI void APIENTRY glLoadMatrixx (const GLfixed *m);
|
||||
GLAPI void APIENTRY glLogicOp (GLenum opcode);
|
||||
GLAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
|
||||
GLAPI void APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
|
||||
GLAPI void APIENTRY glMatrixMode (GLenum mode);
|
||||
GLAPI void APIENTRY glMultMatrixf (const GLfloat *m);
|
||||
GLAPI void APIENTRY glMultMatrixx (const GLfixed *m);
|
||||
GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
GLAPI void APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
GLAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
|
||||
GLAPI void APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
GLAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GLAPI void APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glPointSize (GLfloat size);
|
||||
GLAPI void APIENTRY glPointSizex (GLfixed size);
|
||||
GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GLAPI void APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
|
||||
GLAPI void APIENTRY glPopMatrix (void);
|
||||
GLAPI void APIENTRY glPushMatrix (void);
|
||||
GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
|
||||
GLAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
GLAPI void APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
|
||||
GLAPI void APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
|
||||
GLAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glShadeModel (GLenum mode);
|
||||
GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GLAPI void APIENTRY glStencilMask (GLuint mask);
|
||||
GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GLAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
|
||||
GLAPI void APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
|
||||
GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GLAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl_h_ */
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
** Copyright 2008-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* Skeleton egl.h to provide compatibility for early GLES 1.0
|
||||
* applications. Several early implementations included gl.h
|
||||
* in egl.h leading applications to include only egl.h
|
||||
*/
|
||||
|
||||
#ifndef __legacy_egl_h_
|
||||
#define __legacy_egl_h_
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES/gl.h>
|
||||
|
||||
#endif /* __legacy_egl_h_ */
|
||||
+571
@@ -0,0 +1,571 @@
|
||||
#ifndef __gles1_gl_h_
|
||||
#define __gles1_gl_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <GLES/glplatform.h>
|
||||
|
||||
/* Generated on date 20211115 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles1
|
||||
* Profile: common
|
||||
* Versions considered: .*
|
||||
* Versions emitted: .*
|
||||
* Default extensions included: None
|
||||
* Additional extensions included: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GL_VERSION_ES_CM_1_0
|
||||
#define GL_VERSION_ES_CM_1_0 1
|
||||
#include <KHR/khrplatform.h>
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int16_t GLshort;
|
||||
typedef khronos_uint16_t GLushort;
|
||||
typedef void GLvoid;
|
||||
typedef unsigned int GLenum;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef int GLint;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_int32_t GLclampx;
|
||||
#define GL_VERSION_ES_CL_1_0 1
|
||||
#define GL_VERSION_ES_CM_1_1 1
|
||||
#define GL_VERSION_ES_CL_1_1 1
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_CLIP_PLANE0 0x3000
|
||||
#define GL_CLIP_PLANE1 0x3001
|
||||
#define GL_CLIP_PLANE2 0x3002
|
||||
#define GL_CLIP_PLANE3 0x3003
|
||||
#define GL_CLIP_PLANE4 0x3004
|
||||
#define GL_CLIP_PLANE5 0x3005
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_FOG 0x0B60
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_COLOR_LOGIC_OP 0x0BF2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_POINT_SMOOTH 0x0B10
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
#define GL_RESCALE_NORMAL 0x803A
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
#define GL_MULTISAMPLE 0x809D
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_STACK_OVERFLOW 0x0503
|
||||
#define GL_STACK_UNDERFLOW 0x0504
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
#define GL_EXP 0x0800
|
||||
#define GL_EXP2 0x0801
|
||||
#define GL_FOG_DENSITY 0x0B62
|
||||
#define GL_FOG_START 0x0B63
|
||||
#define GL_FOG_END 0x0B64
|
||||
#define GL_FOG_MODE 0x0B65
|
||||
#define GL_FOG_COLOR 0x0B66
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_CURRENT_COLOR 0x0B00
|
||||
#define GL_CURRENT_NORMAL 0x0B02
|
||||
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
|
||||
#define GL_POINT_SIZE 0x0B11
|
||||
#define GL_POINT_SIZE_MIN 0x8126
|
||||
#define GL_POINT_SIZE_MAX 0x8127
|
||||
#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
|
||||
#define GL_POINT_DISTANCE_ATTENUATION 0x8129
|
||||
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_SHADE_MODEL 0x0B54
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_MATRIX_MODE 0x0BA0
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
|
||||
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
|
||||
#define GL_TEXTURE_STACK_DEPTH 0x0BA5
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||
#define GL_ALPHA_TEST_FUNC 0x0BC1
|
||||
#define GL_ALPHA_TEST_REF 0x0BC2
|
||||
#define GL_BLEND_DST 0x0BE0
|
||||
#define GL_BLEND_SRC 0x0BE1
|
||||
#define GL_LOGIC_OP_MODE 0x0BF0
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_CLIP_PLANES 0x0D32
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_TEXTURE_UNITS 0x84E2
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_VERTEX_ARRAY_SIZE 0x807A
|
||||
#define GL_VERTEX_ARRAY_TYPE 0x807B
|
||||
#define GL_VERTEX_ARRAY_STRIDE 0x807C
|
||||
#define GL_NORMAL_ARRAY_TYPE 0x807E
|
||||
#define GL_NORMAL_ARRAY_STRIDE 0x807F
|
||||
#define GL_COLOR_ARRAY_SIZE 0x8081
|
||||
#define GL_COLOR_ARRAY_TYPE 0x8082
|
||||
#define GL_COLOR_ARRAY_STRIDE 0x8083
|
||||
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
|
||||
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
|
||||
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
|
||||
#define GL_VERTEX_ARRAY_POINTER 0x808E
|
||||
#define GL_NORMAL_ARRAY_POINTER 0x808F
|
||||
#define GL_COLOR_ARRAY_POINTER 0x8090
|
||||
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
#define GL_FOG_HINT 0x0C54
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_POSITION 0x1203
|
||||
#define GL_SPOT_DIRECTION 0x1204
|
||||
#define GL_SPOT_EXPONENT 0x1205
|
||||
#define GL_SPOT_CUTOFF 0x1206
|
||||
#define GL_CONSTANT_ATTENUATION 0x1207
|
||||
#define GL_LINEAR_ATTENUATION 0x1208
|
||||
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
#define GL_CLEAR 0x1500
|
||||
#define GL_AND 0x1501
|
||||
#define GL_AND_REVERSE 0x1502
|
||||
#define GL_COPY 0x1503
|
||||
#define GL_AND_INVERTED 0x1504
|
||||
#define GL_NOOP 0x1505
|
||||
#define GL_XOR 0x1506
|
||||
#define GL_OR 0x1507
|
||||
#define GL_NOR 0x1508
|
||||
#define GL_EQUIV 0x1509
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_OR_REVERSE 0x150B
|
||||
#define GL_COPY_INVERTED 0x150C
|
||||
#define GL_OR_INVERTED 0x150D
|
||||
#define GL_NAND 0x150E
|
||||
#define GL_SET 0x150F
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_FLAT 0x1D00
|
||||
#define GL_SMOOTH 0x1D01
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_DECAL 0x2101
|
||||
#define GL_ADD 0x0104
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_GENERATE_MIPMAP 0x8191
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_LIGHT0 0x4000
|
||||
#define GL_LIGHT1 0x4001
|
||||
#define GL_LIGHT2 0x4002
|
||||
#define GL_LIGHT3 0x4003
|
||||
#define GL_LIGHT4 0x4004
|
||||
#define GL_LIGHT5 0x4005
|
||||
#define GL_LIGHT6 0x4006
|
||||
#define GL_LIGHT7 0x4007
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
|
||||
#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
|
||||
#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
|
||||
#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
#define GL_SUBTRACT 0x84E7
|
||||
#define GL_COMBINE 0x8570
|
||||
#define GL_COMBINE_RGB 0x8571
|
||||
#define GL_COMBINE_ALPHA 0x8572
|
||||
#define GL_RGB_SCALE 0x8573
|
||||
#define GL_ADD_SIGNED 0x8574
|
||||
#define GL_INTERPOLATE 0x8575
|
||||
#define GL_CONSTANT 0x8576
|
||||
#define GL_PRIMARY_COLOR 0x8577
|
||||
#define GL_PREVIOUS 0x8578
|
||||
#define GL_OPERAND0_RGB 0x8590
|
||||
#define GL_OPERAND1_RGB 0x8591
|
||||
#define GL_OPERAND2_RGB 0x8592
|
||||
#define GL_OPERAND0_ALPHA 0x8598
|
||||
#define GL_OPERAND1_ALPHA 0x8599
|
||||
#define GL_OPERAND2_ALPHA 0x859A
|
||||
#define GL_ALPHA_SCALE 0x0D1C
|
||||
#define GL_SRC0_RGB 0x8580
|
||||
#define GL_SRC1_RGB 0x8581
|
||||
#define GL_SRC2_RGB 0x8582
|
||||
#define GL_SRC0_ALPHA 0x8588
|
||||
#define GL_SRC1_ALPHA 0x8589
|
||||
#define GL_SRC2_ALPHA 0x858A
|
||||
#define GL_DOT3_RGB 0x86AE
|
||||
#define GL_DOT3_RGBA 0x86AF
|
||||
GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLfloat ref);
|
||||
GL_API void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthf (GLfloat d);
|
||||
GL_API void GL_APIENTRY glClipPlanef (GLenum p, const GLfloat *eqn);
|
||||
GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_API void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
|
||||
GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glFrustumf (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
GL_API void GL_APIENTRY glGetClipPlanef (GLenum plane, GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
|
||||
GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
|
||||
GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
|
||||
GL_API void GL_APIENTRY glOrthof (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glPointSize (GLfloat size);
|
||||
GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLfixed ref);
|
||||
GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GL_API void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_API void GL_APIENTRY glClearColorx (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthx (GLfixed depth);
|
||||
GL_API void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
|
||||
GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
||||
GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||
GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||
GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||
GL_API void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_API void GL_APIENTRY glDepthRangex (GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_API void GL_APIENTRY glDisableClientState (GLenum array);
|
||||
GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
GL_API void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_API void GL_APIENTRY glEnableClientState (GLenum array);
|
||||
GL_API void GL_APIENTRY glFinish (void);
|
||||
GL_API void GL_APIENTRY glFlush (void);
|
||||
GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_API void GL_APIENTRY glFrustumx (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
|
||||
GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetClipPlanex (GLenum plane, GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||
GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GL_API GLenum GL_APIENTRY glGetError (void);
|
||||
GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
|
||||
GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
|
||||
GL_API const GLubyte *GL_APIENTRY glGetString (GLenum name);
|
||||
GL_API void GL_APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvxv (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
|
||||
GL_API void GL_APIENTRY glLoadIdentity (void);
|
||||
GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
|
||||
GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
|
||||
GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glOrthox (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointSizex (GLfixed size);
|
||||
GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
|
||||
GL_API void GL_APIENTRY glPopMatrix (void);
|
||||
GL_API void GL_APIENTRY glPushMatrix (void);
|
||||
GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glShadeModel (GLenum mode);
|
||||
GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_API void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#endif /* GL_VERSION_ES_CM_1_0 */
|
||||
|
||||
#ifndef GL_OES_compressed_paletted_texture
|
||||
#define GL_OES_compressed_paletted_texture 1
|
||||
#define GL_PALETTE4_RGB8_OES 0x8B90
|
||||
#define GL_PALETTE4_RGBA8_OES 0x8B91
|
||||
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
|
||||
#define GL_PALETTE4_RGBA4_OES 0x8B93
|
||||
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
|
||||
#define GL_PALETTE8_RGB8_OES 0x8B95
|
||||
#define GL_PALETTE8_RGBA8_OES 0x8B96
|
||||
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
|
||||
#define GL_PALETTE8_RGBA4_OES 0x8B98
|
||||
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
|
||||
#endif /* GL_OES_compressed_paletted_texture */
|
||||
|
||||
#ifndef GL_OES_point_size_array
|
||||
#define GL_OES_point_size_array 1
|
||||
#define GL_POINT_SIZE_ARRAY_OES 0x8B9C
|
||||
#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
|
||||
#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
|
||||
#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
|
||||
#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
|
||||
GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const void *pointer);
|
||||
#endif /* GL_OES_point_size_array */
|
||||
|
||||
#ifndef GL_OES_point_sprite
|
||||
#define GL_OES_point_sprite 1
|
||||
#define GL_POINT_SPRITE_OES 0x8861
|
||||
#define GL_COORD_REPLACE_OES 0x8862
|
||||
#endif /* GL_OES_point_sprite */
|
||||
|
||||
#ifndef GL_OES_read_format
|
||||
#define GL_OES_read_format 1
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
|
||||
#endif /* GL_OES_read_format */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,954 @@
|
||||
#ifndef __gles1_glext_h_
|
||||
#define __gles1_glext_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
#define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/* Generated on date 20211115 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles1
|
||||
* Profile: common
|
||||
* Versions considered: .*
|
||||
* Versions emitted: _nomatch_^
|
||||
* Default extensions included: gles1
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$
|
||||
*/
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#define GL_KHR_debug 1
|
||||
#endif /* GL_KHR_debug */
|
||||
|
||||
#ifndef GL_OES_EGL_image
|
||||
#define GL_OES_EGL_image 1
|
||||
typedef void *GLeglImageOES;
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
|
||||
GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
#endif /* GL_OES_EGL_image */
|
||||
|
||||
#ifndef GL_OES_EGL_image_external
|
||||
#define GL_OES_EGL_image_external 1
|
||||
#define GL_TEXTURE_EXTERNAL_OES 0x8D65
|
||||
#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
|
||||
#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
|
||||
#endif /* GL_OES_EGL_image_external */
|
||||
|
||||
#ifndef GL_OES_blend_equation_separate
|
||||
#define GL_OES_blend_equation_separate 1
|
||||
#define GL_BLEND_EQUATION_RGB_OES 0x8009
|
||||
#define GL_BLEND_EQUATION_ALPHA_OES 0x883D
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha);
|
||||
#endif
|
||||
#endif /* GL_OES_blend_equation_separate */
|
||||
|
||||
#ifndef GL_OES_blend_func_separate
|
||||
#define GL_OES_blend_func_separate 1
|
||||
#define GL_BLEND_DST_RGB_OES 0x80C8
|
||||
#define GL_BLEND_SRC_RGB_OES 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA_OES 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA_OES 0x80CB
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
#endif
|
||||
#endif /* GL_OES_blend_func_separate */
|
||||
|
||||
#ifndef GL_OES_blend_subtract
|
||||
#define GL_OES_blend_subtract 1
|
||||
#define GL_BLEND_EQUATION_OES 0x8009
|
||||
#define GL_FUNC_ADD_OES 0x8006
|
||||
#define GL_FUNC_SUBTRACT_OES 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode);
|
||||
#endif
|
||||
#endif /* GL_OES_blend_subtract */
|
||||
|
||||
#ifndef GL_OES_byte_coordinates
|
||||
#define GL_OES_byte_coordinates 1
|
||||
#endif /* GL_OES_byte_coordinates */
|
||||
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_sub_texture 1
|
||||
#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */
|
||||
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_texture 1
|
||||
#define GL_ETC1_RGB8_OES 0x8D64
|
||||
#endif /* GL_OES_compressed_ETC1_RGB8_texture */
|
||||
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_OES_depth24 1
|
||||
#define GL_DEPTH_COMPONENT24_OES 0x81A6
|
||||
#endif /* GL_OES_depth24 */
|
||||
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_OES_depth32 1
|
||||
#define GL_DEPTH_COMPONENT32_OES 0x81A7
|
||||
#endif /* GL_OES_depth32 */
|
||||
|
||||
#ifndef GL_OES_draw_texture
|
||||
#define GL_OES_draw_texture 1
|
||||
#define GL_TEXTURE_CROP_RECT_OES 0x8B9D
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
|
||||
GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
|
||||
GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords);
|
||||
#endif
|
||||
#endif /* GL_OES_draw_texture */
|
||||
|
||||
#ifndef GL_OES_element_index_uint
|
||||
#define GL_OES_element_index_uint 1
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#endif /* GL_OES_element_index_uint */
|
||||
|
||||
#ifndef GL_OES_extended_matrix_palette
|
||||
#define GL_OES_extended_matrix_palette 1
|
||||
#endif /* GL_OES_extended_matrix_palette */
|
||||
|
||||
#ifndef GL_OES_fbo_render_mipmap
|
||||
#define GL_OES_fbo_render_mipmap 1
|
||||
#endif /* GL_OES_fbo_render_mipmap */
|
||||
|
||||
#ifndef GL_OES_fixed_point
|
||||
#define GL_OES_fixed_point 1
|
||||
#define GL_FIXED_OES 0x140C
|
||||
typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);
|
||||
typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);
|
||||
typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
|
||||
typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
|
||||
typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
|
||||
typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
|
||||
typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
|
||||
typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);
|
||||
GL_API void GL_APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthxOES (GLfixed depth);
|
||||
GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width);
|
||||
GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
GL_API void GL_APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointSizexOES (GLfixed size);
|
||||
GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
|
||||
GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
|
||||
#endif
|
||||
#endif /* GL_OES_fixed_point */
|
||||
|
||||
#ifndef GL_OES_framebuffer_object
|
||||
#define GL_OES_framebuffer_object 1
|
||||
#define GL_NONE_OES 0
|
||||
#define GL_FRAMEBUFFER_OES 0x8D40
|
||||
#define GL_RENDERBUFFER_OES 0x8D41
|
||||
#define GL_RGBA4_OES 0x8056
|
||||
#define GL_RGB5_A1_OES 0x8057
|
||||
#define GL_RGB565_OES 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16_OES 0x81A5
|
||||
#define GL_RENDERBUFFER_WIDTH_OES 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3
|
||||
#define GL_COLOR_ATTACHMENT0_OES 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT_OES 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT_OES 0x8D20
|
||||
#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD
|
||||
#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING_OES 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint *renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint *renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint *framebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint *framebuffers);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint *renderbuffers);
|
||||
GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint *renderbuffers);
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer);
|
||||
GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer);
|
||||
GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint *framebuffers);
|
||||
GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint *framebuffers);
|
||||
GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target);
|
||||
GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target);
|
||||
#endif
|
||||
#endif /* GL_OES_framebuffer_object */
|
||||
|
||||
#ifndef GL_OES_mapbuffer
|
||||
#define GL_OES_mapbuffer 1
|
||||
#define GL_WRITE_ONLY_OES 0x88B9
|
||||
#define GL_BUFFER_ACCESS_OES 0x88BB
|
||||
#define GL_BUFFER_MAPPED_OES 0x88BC
|
||||
#define GL_BUFFER_MAP_POINTER_OES 0x88BD
|
||||
typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
|
||||
GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
|
||||
GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params);
|
||||
#endif
|
||||
#endif /* GL_OES_mapbuffer */
|
||||
|
||||
#ifndef GL_OES_matrix_get
|
||||
#define GL_OES_matrix_get 1
|
||||
#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
|
||||
#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
|
||||
#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
|
||||
#endif /* GL_OES_matrix_get */
|
||||
|
||||
#ifndef GL_OES_matrix_palette
|
||||
#define GL_OES_matrix_palette 1
|
||||
#define GL_MAX_VERTEX_UNITS_OES 0x86A4
|
||||
#define GL_MAX_PALETTE_MATRICES_OES 0x8842
|
||||
#define GL_MATRIX_PALETTE_OES 0x8840
|
||||
#define GL_MATRIX_INDEX_ARRAY_OES 0x8844
|
||||
#define GL_WEIGHT_ARRAY_OES 0x86AD
|
||||
#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843
|
||||
#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846
|
||||
#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847
|
||||
#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848
|
||||
#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849
|
||||
#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E
|
||||
#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB
|
||||
#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9
|
||||
#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA
|
||||
#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC
|
||||
#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E
|
||||
typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex);
|
||||
typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex);
|
||||
GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void);
|
||||
GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
#endif
|
||||
#endif /* GL_OES_matrix_palette */
|
||||
|
||||
#ifndef GL_OES_packed_depth_stencil
|
||||
#define GL_OES_packed_depth_stencil 1
|
||||
#define GL_DEPTH_STENCIL_OES 0x84F9
|
||||
#define GL_UNSIGNED_INT_24_8_OES 0x84FA
|
||||
#define GL_DEPTH24_STENCIL8_OES 0x88F0
|
||||
#endif /* GL_OES_packed_depth_stencil */
|
||||
|
||||
#ifndef GL_OES_query_matrix
|
||||
#define GL_OES_query_matrix 1
|
||||
typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);
|
||||
#endif
|
||||
#endif /* GL_OES_query_matrix */
|
||||
|
||||
#ifndef GL_OES_required_internalformat
|
||||
#define GL_OES_required_internalformat 1
|
||||
#define GL_ALPHA8_OES 0x803C
|
||||
#define GL_LUMINANCE4_ALPHA4_OES 0x8043
|
||||
#define GL_LUMINANCE8_ALPHA8_OES 0x8045
|
||||
#define GL_LUMINANCE8_OES 0x8040
|
||||
#define GL_RGB8_OES 0x8051
|
||||
#define GL_RGBA8_OES 0x8058
|
||||
#define GL_RGB10_EXT 0x8052
|
||||
#define GL_RGB10_A2_EXT 0x8059
|
||||
#endif /* GL_OES_required_internalformat */
|
||||
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_OES_rgb8_rgba8 1
|
||||
#endif /* GL_OES_rgb8_rgba8 */
|
||||
|
||||
#ifndef GL_OES_single_precision
|
||||
#define GL_OES_single_precision 1
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
|
||||
typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth);
|
||||
GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);
|
||||
GL_API void GL_APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
#endif
|
||||
#endif /* GL_OES_single_precision */
|
||||
|
||||
#ifndef GL_OES_stencil1
|
||||
#define GL_OES_stencil1 1
|
||||
#define GL_STENCIL_INDEX1_OES 0x8D46
|
||||
#endif /* GL_OES_stencil1 */
|
||||
|
||||
#ifndef GL_OES_stencil4
|
||||
#define GL_OES_stencil4 1
|
||||
#define GL_STENCIL_INDEX4_OES 0x8D47
|
||||
#endif /* GL_OES_stencil4 */
|
||||
|
||||
#ifndef GL_OES_stencil8
|
||||
#define GL_OES_stencil8 1
|
||||
#define GL_STENCIL_INDEX8_OES 0x8D48
|
||||
#endif /* GL_OES_stencil8 */
|
||||
|
||||
#ifndef GL_OES_stencil_wrap
|
||||
#define GL_OES_stencil_wrap 1
|
||||
#define GL_INCR_WRAP_OES 0x8507
|
||||
#define GL_DECR_WRAP_OES 0x8508
|
||||
#endif /* GL_OES_stencil_wrap */
|
||||
|
||||
#ifndef GL_OES_surfaceless_context
|
||||
#define GL_OES_surfaceless_context 1
|
||||
#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
|
||||
#endif /* GL_OES_surfaceless_context */
|
||||
|
||||
#ifndef GL_OES_texture_cube_map
|
||||
#define GL_OES_texture_cube_map 1
|
||||
#define GL_NORMAL_MAP_OES 0x8511
|
||||
#define GL_REFLECTION_MAP_OES 0x8512
|
||||
#define GL_TEXTURE_CUBE_MAP_OES 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C
|
||||
#define GL_TEXTURE_GEN_MODE_OES 0x2500
|
||||
#define GL_TEXTURE_GEN_STR_OES 0x8D60
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params);
|
||||
#endif
|
||||
#endif /* GL_OES_texture_cube_map */
|
||||
|
||||
#ifndef GL_OES_texture_env_crossbar
|
||||
#define GL_OES_texture_env_crossbar 1
|
||||
#endif /* GL_OES_texture_env_crossbar */
|
||||
|
||||
#ifndef GL_OES_texture_mirrored_repeat
|
||||
#define GL_OES_texture_mirrored_repeat 1
|
||||
#define GL_MIRRORED_REPEAT_OES 0x8370
|
||||
#endif /* GL_OES_texture_mirrored_repeat */
|
||||
|
||||
#ifndef GL_OES_texture_npot
|
||||
#define GL_OES_texture_npot 1
|
||||
#endif /* GL_OES_texture_npot */
|
||||
|
||||
#ifndef GL_OES_vertex_array_object
|
||||
#define GL_OES_vertex_array_object 1
|
||||
#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
|
||||
typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
|
||||
typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array);
|
||||
GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
|
||||
GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
|
||||
GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
|
||||
#endif
|
||||
#endif /* GL_OES_vertex_array_object */
|
||||
|
||||
#ifndef GL_AMD_compressed_3DC_texture
|
||||
#define GL_AMD_compressed_3DC_texture 1
|
||||
#define GL_3DC_X_AMD 0x87F9
|
||||
#define GL_3DC_XY_AMD 0x87FA
|
||||
#endif /* GL_AMD_compressed_3DC_texture */
|
||||
|
||||
#ifndef GL_AMD_compressed_ATC_texture
|
||||
#define GL_AMD_compressed_ATC_texture 1
|
||||
#define GL_ATC_RGB_AMD 0x8C92
|
||||
#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
|
||||
#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
|
||||
#endif /* GL_AMD_compressed_ATC_texture */
|
||||
|
||||
#ifndef GL_APPLE_copy_texture_levels
|
||||
#define GL_APPLE_copy_texture_levels 1
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
|
||||
#endif
|
||||
#endif /* GL_APPLE_copy_texture_levels */
|
||||
|
||||
#ifndef GL_APPLE_framebuffer_multisample
|
||||
#define GL_APPLE_framebuffer_multisample 1
|
||||
#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
|
||||
#define GL_MAX_SAMPLES_APPLE 0x8D57
|
||||
#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
|
||||
#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
|
||||
#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
|
||||
#endif
|
||||
#endif /* GL_APPLE_framebuffer_multisample */
|
||||
|
||||
#ifndef GL_APPLE_sync
|
||||
#define GL_APPLE_sync 1
|
||||
typedef struct __GLsync *GLsync;
|
||||
typedef khronos_uint64_t GLuint64;
|
||||
typedef khronos_int64_t GLint64;
|
||||
#define GL_SYNC_OBJECT_APPLE 0x8A53
|
||||
#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
|
||||
#define GL_OBJECT_TYPE_APPLE 0x9112
|
||||
#define GL_SYNC_CONDITION_APPLE 0x9113
|
||||
#define GL_SYNC_STATUS_APPLE 0x9114
|
||||
#define GL_SYNC_FLAGS_APPLE 0x9115
|
||||
#define GL_SYNC_FENCE_APPLE 0x9116
|
||||
#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
|
||||
#define GL_UNSIGNALED_APPLE 0x9118
|
||||
#define GL_SIGNALED_APPLE 0x9119
|
||||
#define GL_ALREADY_SIGNALED_APPLE 0x911A
|
||||
#define GL_TIMEOUT_EXPIRED_APPLE 0x911B
|
||||
#define GL_CONDITION_SATISFIED_APPLE 0x911C
|
||||
#define GL_WAIT_FAILED_APPLE 0x911D
|
||||
#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
|
||||
#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
|
||||
typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
|
||||
GL_API GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
|
||||
GL_API void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
|
||||
GL_API GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
GL_API void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
GL_API void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
|
||||
GL_API void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
|
||||
#endif
|
||||
#endif /* GL_APPLE_sync */
|
||||
|
||||
#ifndef GL_APPLE_texture_2D_limited_npot
|
||||
#define GL_APPLE_texture_2D_limited_npot 1
|
||||
#endif /* GL_APPLE_texture_2D_limited_npot */
|
||||
|
||||
#ifndef GL_APPLE_texture_format_BGRA8888
|
||||
#define GL_APPLE_texture_format_BGRA8888 1
|
||||
#define GL_BGRA_EXT 0x80E1
|
||||
#define GL_BGRA8_EXT 0x93A1
|
||||
#endif /* GL_APPLE_texture_format_BGRA8888 */
|
||||
|
||||
#ifndef GL_APPLE_texture_max_level
|
||||
#define GL_APPLE_texture_max_level 1
|
||||
#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
|
||||
#endif /* GL_APPLE_texture_max_level */
|
||||
|
||||
#ifndef GL_ARM_rgba8
|
||||
#define GL_ARM_rgba8 1
|
||||
#endif /* GL_ARM_rgba8 */
|
||||
|
||||
#ifndef GL_EXT_blend_minmax
|
||||
#define GL_EXT_blend_minmax 1
|
||||
#define GL_MIN_EXT 0x8007
|
||||
#define GL_MAX_EXT 0x8008
|
||||
#endif /* GL_EXT_blend_minmax */
|
||||
|
||||
#ifndef GL_EXT_debug_marker
|
||||
#define GL_EXT_debug_marker 1
|
||||
typedef char GLchar;
|
||||
typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
|
||||
typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
|
||||
typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
|
||||
GL_API void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
|
||||
GL_API void GL_APIENTRY glPopGroupMarkerEXT (void);
|
||||
#endif
|
||||
#endif /* GL_EXT_debug_marker */
|
||||
|
||||
#ifndef GL_EXT_discard_framebuffer
|
||||
#define GL_EXT_discard_framebuffer 1
|
||||
#define GL_COLOR_EXT 0x1800
|
||||
#define GL_DEPTH_EXT 0x1801
|
||||
#define GL_STENCIL_EXT 0x1802
|
||||
typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
#endif
|
||||
#endif /* GL_EXT_discard_framebuffer */
|
||||
|
||||
#ifndef GL_EXT_map_buffer_range
|
||||
#define GL_EXT_map_buffer_range 1
|
||||
#define GL_MAP_READ_BIT_EXT 0x0001
|
||||
#define GL_MAP_WRITE_BIT_EXT 0x0002
|
||||
#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
|
||||
#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
|
||||
#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
|
||||
#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
|
||||
typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
GL_API void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
#endif
|
||||
#endif /* GL_EXT_map_buffer_range */
|
||||
|
||||
#ifndef GL_EXT_multi_draw_arrays
|
||||
#define GL_EXT_multi_draw_arrays 1
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||
GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
|
||||
#endif
|
||||
#endif /* GL_EXT_multi_draw_arrays */
|
||||
|
||||
#ifndef GL_EXT_multisampled_render_to_texture
|
||||
#define GL_EXT_multisampled_render_to_texture 1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
|
||||
#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
|
||||
#define GL_MAX_SAMPLES_EXT 0x8D57
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
#endif
|
||||
#endif /* GL_EXT_multisampled_render_to_texture */
|
||||
|
||||
#ifndef GL_EXT_read_format_bgra
|
||||
#define GL_EXT_read_format_bgra 1
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
|
||||
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
|
||||
#endif /* GL_EXT_read_format_bgra */
|
||||
|
||||
#ifndef GL_EXT_robustness
|
||||
#define GL_EXT_robustness 1
|
||||
#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
|
||||
#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
|
||||
#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
|
||||
#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
|
||||
#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
|
||||
#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
|
||||
#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
|
||||
typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
|
||||
GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
#endif
|
||||
#endif /* GL_EXT_robustness */
|
||||
|
||||
#ifndef GL_EXT_sRGB
|
||||
#define GL_EXT_sRGB 1
|
||||
#define GL_SRGB_EXT 0x8C40
|
||||
#define GL_SRGB_ALPHA_EXT 0x8C42
|
||||
#define GL_SRGB8_ALPHA8_EXT 0x8C43
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
|
||||
#endif /* GL_EXT_sRGB */
|
||||
|
||||
#ifndef GL_EXT_texture_compression_dxt1
|
||||
#define GL_EXT_texture_compression_dxt1 1
|
||||
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
|
||||
#endif /* GL_EXT_texture_compression_dxt1 */
|
||||
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_EXT_texture_filter_anisotropic 1
|
||||
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
||||
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
|
||||
#endif /* GL_EXT_texture_filter_anisotropic */
|
||||
|
||||
#ifndef GL_EXT_texture_format_BGRA8888
|
||||
#define GL_EXT_texture_format_BGRA8888 1
|
||||
#endif /* GL_EXT_texture_format_BGRA8888 */
|
||||
|
||||
#ifndef GL_EXT_texture_lod_bias
|
||||
#define GL_EXT_texture_lod_bias 1
|
||||
#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
|
||||
#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
|
||||
#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
|
||||
#endif /* GL_EXT_texture_lod_bias */
|
||||
|
||||
#ifndef GL_EXT_texture_storage
|
||||
#define GL_EXT_texture_storage 1
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
|
||||
#define GL_ALPHA8_EXT 0x803C
|
||||
#define GL_LUMINANCE8_EXT 0x8040
|
||||
#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
|
||||
#define GL_RGBA32F_EXT 0x8814
|
||||
#define GL_RGB32F_EXT 0x8815
|
||||
#define GL_ALPHA32F_EXT 0x8816
|
||||
#define GL_LUMINANCE32F_EXT 0x8818
|
||||
#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
|
||||
#define GL_RGBA16F_EXT 0x881A
|
||||
#define GL_RGB16F_EXT 0x881B
|
||||
#define GL_ALPHA16F_EXT 0x881C
|
||||
#define GL_LUMINANCE16F_EXT 0x881E
|
||||
#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
|
||||
#define GL_R8_EXT 0x8229
|
||||
#define GL_RG8_EXT 0x822B
|
||||
#define GL_R32F_EXT 0x822E
|
||||
#define GL_RG32F_EXT 0x8230
|
||||
#define GL_R16F_EXT 0x822D
|
||||
#define GL_RG16F_EXT 0x822F
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
#endif /* GL_EXT_texture_storage */
|
||||
|
||||
#ifndef GL_IMG_multisampled_render_to_texture
|
||||
#define GL_IMG_multisampled_render_to_texture 1
|
||||
#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
|
||||
#define GL_MAX_SAMPLES_IMG 0x9135
|
||||
#define GL_TEXTURE_SAMPLES_IMG 0x9136
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
#endif
|
||||
#endif /* GL_IMG_multisampled_render_to_texture */
|
||||
|
||||
#ifndef GL_IMG_read_format
|
||||
#define GL_IMG_read_format 1
|
||||
#define GL_BGRA_IMG 0x80E1
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
|
||||
#endif /* GL_IMG_read_format */
|
||||
|
||||
#ifndef GL_IMG_texture_compression_pvrtc
|
||||
#define GL_IMG_texture_compression_pvrtc 1
|
||||
#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
|
||||
#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
|
||||
#endif /* GL_IMG_texture_compression_pvrtc */
|
||||
|
||||
#ifndef GL_IMG_texture_env_enhanced_fixed_function
|
||||
#define GL_IMG_texture_env_enhanced_fixed_function 1
|
||||
#define GL_MODULATE_COLOR_IMG 0x8C04
|
||||
#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05
|
||||
#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06
|
||||
#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07
|
||||
#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08
|
||||
#define GL_ADD_BLEND_IMG 0x8C09
|
||||
#define GL_DOT3_RGBA_IMG 0x86AF
|
||||
#endif /* GL_IMG_texture_env_enhanced_fixed_function */
|
||||
|
||||
#ifndef GL_IMG_user_clip_plane
|
||||
#define GL_IMG_user_clip_plane 1
|
||||
#define GL_CLIP_PLANE0_IMG 0x3000
|
||||
#define GL_CLIP_PLANE1_IMG 0x3001
|
||||
#define GL_CLIP_PLANE2_IMG 0x3002
|
||||
#define GL_CLIP_PLANE3_IMG 0x3003
|
||||
#define GL_CLIP_PLANE4_IMG 0x3004
|
||||
#define GL_CLIP_PLANE5_IMG 0x3005
|
||||
#define GL_MAX_CLIP_PLANES_IMG 0x0D32
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn);
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glClipPlanefIMG (GLenum p, const GLfloat *eqn);
|
||||
GL_API void GL_APIENTRY glClipPlanexIMG (GLenum p, const GLfixed *eqn);
|
||||
#endif
|
||||
#endif /* GL_IMG_user_clip_plane */
|
||||
|
||||
#ifndef GL_NV_fence
|
||||
#define GL_NV_fence 1
|
||||
#define GL_ALL_COMPLETED_NV 0x84F2
|
||||
#define GL_FENCE_STATUS_NV 0x84F3
|
||||
#define GL_FENCE_CONDITION_NV 0x84F4
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
|
||||
typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
|
||||
typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
|
||||
GL_API void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
|
||||
GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
|
||||
GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
|
||||
GL_API void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glFinishFenceNV (GLuint fence);
|
||||
GL_API void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
|
||||
#endif
|
||||
#endif /* GL_NV_fence */
|
||||
|
||||
#ifndef GL_QCOM_driver_control
|
||||
#define GL_QCOM_driver_control 1
|
||||
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
|
||||
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
|
||||
typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
|
||||
typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
|
||||
GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
|
||||
GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
|
||||
GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
|
||||
#endif
|
||||
#endif /* GL_QCOM_driver_control */
|
||||
|
||||
#ifndef GL_QCOM_extended_get
|
||||
#define GL_QCOM_extended_get 1
|
||||
#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
|
||||
#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
|
||||
#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
|
||||
#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
|
||||
#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
|
||||
#define GL_TEXTURE_TYPE_QCOM 0x8BD7
|
||||
#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
|
||||
#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
|
||||
#define GL_TEXTURE_TARGET_QCOM 0x8BDA
|
||||
#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
|
||||
#define GL_STATE_RESTORE 0x8BDC
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
|
||||
GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
|
||||
GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
|
||||
GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
|
||||
GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
|
||||
GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);
|
||||
#endif
|
||||
#endif /* GL_QCOM_extended_get */
|
||||
|
||||
#ifndef GL_QCOM_extended_get2
|
||||
#define GL_QCOM_extended_get2 1
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
|
||||
GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
|
||||
GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
|
||||
GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
|
||||
#endif
|
||||
#endif /* GL_QCOM_extended_get2 */
|
||||
|
||||
#ifndef GL_QCOM_perfmon_global_mode
|
||||
#define GL_QCOM_perfmon_global_mode 1
|
||||
#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
|
||||
#endif /* GL_QCOM_perfmon_global_mode */
|
||||
|
||||
#ifndef GL_QCOM_tiled_rendering
|
||||
#define GL_QCOM_tiled_rendering 1
|
||||
#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
|
||||
#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
|
||||
#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
|
||||
#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
|
||||
#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
|
||||
#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
|
||||
#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
|
||||
#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
|
||||
#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
|
||||
#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
|
||||
#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
|
||||
#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
|
||||
#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
|
||||
#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
|
||||
#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
|
||||
#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
|
||||
#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
|
||||
#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
|
||||
#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
|
||||
#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
|
||||
#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
|
||||
#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
|
||||
#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
|
||||
#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
|
||||
typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
|
||||
typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
|
||||
GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
|
||||
#endif
|
||||
#endif /* GL_QCOM_tiled_rendering */
|
||||
|
||||
#ifndef GL_QCOM_writeonly_rendering
|
||||
#define GL_QCOM_writeonly_rendering 1
|
||||
#define GL_WRITEONLY_RENDERING_QCOM 0x8823
|
||||
#endif /* GL_QCOM_writeonly_rendering */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef __glplatform_h_
|
||||
#define __glplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright 2017-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* Please contribute modifications back to Khronos as pull requests on the
|
||||
* public github repository:
|
||||
* https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_API
|
||||
#define GL_API KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef GL_APIENTRY
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
#endif /* __glplatform_h_ */
|
||||
+656
@@ -0,0 +1,656 @@
|
||||
#ifndef __gles2_gl2_h_
|
||||
#define __gles2_gl2_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <GLES2/gl2platform.h>
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
#define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
#ifndef GL_GLES_PROTOTYPES
|
||||
#define GL_GLES_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
/* Generated on date 20211115 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles2
|
||||
* Profile: common
|
||||
* Versions considered: 2\.[0-9]
|
||||
* Versions emitted: .*
|
||||
* Default extensions included: None
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GL_ES_VERSION_2_0
|
||||
#define GL_ES_VERSION_2_0 1
|
||||
#include <KHR/khrplatform.h>
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
typedef khronos_int16_t GLshort;
|
||||
typedef khronos_uint16_t GLushort;
|
||||
typedef void GLvoid;
|
||||
typedef struct __GLsync *GLsync;
|
||||
typedef khronos_int64_t GLint64;
|
||||
typedef khronos_uint64_t GLuint64;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned int GLuint;
|
||||
typedef char GLchar;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef int GLint;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
#define GL_DEPTH_COMPONENT 0x1902
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_SHADER_TYPE 0x8B4F
|
||||
#define GL_DELETE_STATUS 0x8B80
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_VALIDATE_STATUS 0x8B83
|
||||
#define GL_ATTACHED_SHADERS 0x8B85
|
||||
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
#define GL_FLOAT_VEC2 0x8B50
|
||||
#define GL_FLOAT_VEC3 0x8B51
|
||||
#define GL_FLOAT_VEC4 0x8B52
|
||||
#define GL_INT_VEC2 0x8B53
|
||||
#define GL_INT_VEC3 0x8B54
|
||||
#define GL_INT_VEC4 0x8B55
|
||||
#define GL_BOOL 0x8B56
|
||||
#define GL_BOOL_VEC2 0x8B57
|
||||
#define GL_BOOL_VEC3 0x8B58
|
||||
#define GL_BOOL_VEC4 0x8B59
|
||||
#define GL_FLOAT_MAT2 0x8B5A
|
||||
#define GL_FLOAT_MAT3 0x8B5B
|
||||
#define GL_FLOAT_MAT4 0x8B5C
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_SAMPLER_CUBE 0x8B60
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
#define GL_COMPILE_STATUS 0x8B81
|
||||
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||
#define GL_SHADER_SOURCE_LENGTH 0x8B88
|
||||
#define GL_SHADER_COMPILER 0x8DFA
|
||||
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#define GL_NONE 0
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
||||
typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s);
|
||||
typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
|
||||
typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
|
||||
typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
|
||||
typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
|
||||
typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
|
||||
typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap);
|
||||
typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||
typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode);
|
||||
typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
|
||||
typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
|
||||
typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
|
||||
typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
|
||||
typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
|
||||
typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture);
|
||||
typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width);
|
||||
typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units);
|
||||
typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
|
||||
typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
|
||||
typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#if GL_GLES_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
|
||||
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
|
||||
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
|
||||
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
|
||||
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
|
||||
GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
|
||||
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
|
||||
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
|
||||
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
|
||||
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
|
||||
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
|
||||
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
|
||||
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
|
||||
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
|
||||
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#endif
|
||||
#endif /* GL_ES_VERSION_2_0 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+3985
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
#ifndef __gl2platform_h_
|
||||
#define __gl2platform_h_
|
||||
|
||||
/*
|
||||
** Copyright 2017-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* Please contribute modifications back to Khronos as pull requests on the
|
||||
* public github repository:
|
||||
* https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_APICALL
|
||||
#define GL_APICALL KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef GL_APIENTRY
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
#endif /* __gl2platform_h_ */
|
||||
+1192
File diff suppressed because it is too large
Load Diff
+1507
File diff suppressed because it is too large
Load Diff
+1808
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
#ifndef __gl3platform_h_
|
||||
#define __gl3platform_h_
|
||||
|
||||
/*
|
||||
** Copyright 2017-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* Please contribute modifications back to Khronos as pull requests on the
|
||||
* public github repository:
|
||||
* https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_APICALL
|
||||
#define GL_APICALL KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef GL_APIENTRY
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
#endif /* __gl3platform_h_ */
|
||||
@@ -0,0 +1,578 @@
|
||||
#ifndef __gl_h_
|
||||
#define __gl_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef signed char GLbyte;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef unsigned char GLubyte;
|
||||
typedef short GLshort;
|
||||
typedef unsigned short GLushort;
|
||||
typedef unsigned int GLuint;
|
||||
typedef float GLfloat;
|
||||
typedef float GLclampf;
|
||||
typedef void GLvoid;
|
||||
/* Internal convenience typedefs */
|
||||
typedef void (*_GLfuncptr)(void);
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Extensions */
|
||||
#define GL_OSC_VERSION_1_0 1
|
||||
#define GL_EXT_paletted_texture 1
|
||||
#define GL_OES_single_precision 1
|
||||
|
||||
/* ClearBufferMask */
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
|
||||
/* Boolean */
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* BeginMode */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
|
||||
/* AlphaFunction */
|
||||
/* #define GL_LEQUAL 0x0203 */
|
||||
/* #define GL_ALWAYS 0x0207 */
|
||||
|
||||
/* BlendingFactorDest */
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
|
||||
/* BlendingFactorSrc */
|
||||
/* #define GL_ONE 1 */
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
|
||||
/* ColorMaterialFace */
|
||||
/* #define GL_FRONT_AND_BACK 0x0408 */
|
||||
|
||||
/* ColorMaterialParameter */
|
||||
/* #define GL_AMBIENT_AND_DIFFUSE 0x1602 */
|
||||
|
||||
/* ColorPointerType */
|
||||
/* #define GL_FLOAT 0x1406 */
|
||||
/* #define GL_UNSIGNED_BYTE 0x1401 */
|
||||
|
||||
/* CullFaceMode */
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
|
||||
/* DepthFunction */
|
||||
/* #define GL_LESS 0x0201 */
|
||||
/* #define GL_LEQUAL 0x0203 */
|
||||
/* #define GL_ALWAYS 0x0207 */
|
||||
|
||||
/* EnableCap */
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_LIGHT0 0x4000
|
||||
#define GL_LIGHT1 0x4001
|
||||
#define GL_POINT_SMOOTH 0x0B10
|
||||
#define GL_LINE_STIPPLE 0x0B24
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
#define GL_RESCALE_NORMAL 0x803A
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_POLYGON_STIPPLE 0x0B42
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_STACK_OVERFLOW 0x0503
|
||||
#define GL_STACK_UNDERFLOW 0x0504
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* FogMode */
|
||||
|
||||
/* FogParameter */
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
/* GetBooleanv */
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
|
||||
/* GetFloatv */
|
||||
#define GL_CURRENT_COLOR 0x0B00
|
||||
#define GL_CURRENT_NORMAL 0x0B02
|
||||
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
|
||||
#define GL_CURRENT_RASTER_COLOR 0x0B04
|
||||
#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
|
||||
#define GL_POINT_SIZE 0x0B11
|
||||
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||
#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_ALPHA_TEST_REF 0x0BC2
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
|
||||
/* GetIntegerv */
|
||||
#define GL_MATRIX_MODE 0x0BA0
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
|
||||
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_LINE_STIPPLE_PATTERN 0x0B25
|
||||
#define GL_LINE_STIPPLE_REPEAT 0x0B26
|
||||
#define GL_MAX_LIST_NESTING 0x0B31
|
||||
#define GL_LIST_BASE 0x0B32
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_ALPHA_TEST_FUNC 0x0BC1
|
||||
#define GL_BLEND_DST 0x0BE0
|
||||
#define GL_BLEND_SRC 0x0BE1
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
#define GL_POLYGON_SMOOTH_HINT 0x0C53
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_VERTEX_ARRAY_SIZE 0x807A
|
||||
#define GL_VERTEX_ARRAY_TYPE 0x807B
|
||||
#define GL_VERTEX_ARRAY_STRIDE 0x807C
|
||||
#define GL_NORMAL_ARRAY_TYPE 0x807E
|
||||
#define GL_NORMAL_ARRAY_STRIDE 0x807F
|
||||
#define GL_COLOR_ARRAY_SIZE 0x8081
|
||||
#define GL_COLOR_ARRAY_TYPE 0x8082
|
||||
#define GL_COLOR_ARRAY_STRIDE 0x8083
|
||||
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
|
||||
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
|
||||
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
|
||||
#define GL_SHADE_MODEL 0x0B54
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_MAX_ELEMENTS_VERTICES 0x80E8
|
||||
#define GL_MAX_ELEMENTS_INDICES 0x80E9
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
|
||||
#define GL_MAX_TEXTURE_UNITS 0x84E2
|
||||
|
||||
/* GetMaterialfv */
|
||||
/* #define GL_AMBIENT 0x1200 */
|
||||
/* #define GL_DIFFUSE 0x1201 */
|
||||
/* #define GL_SPECULAR 0x1202 */
|
||||
/* #define GL_EMISSION 0x1600 */
|
||||
/* #define GL_SHININESS 0x1601 */
|
||||
|
||||
/* GetLightfv */
|
||||
/* #define GL_AMBIENT 0x1200 */
|
||||
/* #define GL_DIFFUSE 0x1201 */
|
||||
/* #define GL_SPECULAR 0x1202 */
|
||||
/* #define GL_POSITION 0x1203 */
|
||||
|
||||
/* GetPointerv */
|
||||
#define GL_VERTEX_ARRAY_POINTER 0x808E
|
||||
#define GL_NORMAL_ARRAY_POINTER 0x808F
|
||||
#define GL_COLOR_ARRAY_POINTER 0x8090
|
||||
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
|
||||
|
||||
/* GetTexParameter */
|
||||
/* #define GL_TEXTURE_MAG_FILTER 0x2800 */
|
||||
/* #define GL_TEXTURE_MIN_FILTER 0x2801 */
|
||||
/* #define GL_TEXTURE_WRAP_S 0x2802 */
|
||||
/* #define GL_TEXTURE_WRAP_T 0x2803 */
|
||||
|
||||
/* GetTexEnvfv */
|
||||
/* #define GL_TEXTURE_ENV_MODE 0x2200 */
|
||||
/* #define GL_TEXTURE_ENV_COLOR 0x2201 */
|
||||
|
||||
/* HintMode */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
|
||||
/* HintTarget */
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
|
||||
/* IsEnabled */
|
||||
/* #define GL_LIGHTING 0x0B50 */
|
||||
/* #define GL_TEXTURE_2D 0x0DE1 */
|
||||
/* #define GL_CULL_FACE 0x0B44 */
|
||||
/* #define GL_ALPHA_TEST 0x0BC0 */
|
||||
/* #define GL_BLEND 0x0BE2 */
|
||||
/* #define GL_STENCIL_TEST 0x0B90 */
|
||||
/* #define GL_DEPTH_TEST 0x0B71 */
|
||||
/* #define GL_LIGHT0 0x4000 */
|
||||
/* #define GL_LIGHT1 0x4001 */
|
||||
/* #define GL_POINT_SMOOTH 0x0B10 */
|
||||
/* #define GL_LINE_STIPPLE 0x0B24 */
|
||||
/* #define GL_LINE_SMOOTH 0x0B20 */
|
||||
/* #define GL_SCISSOR_TEST 0x0C11 */
|
||||
/* #define GL_COLOR_MATERIAL 0x0B57 */
|
||||
/* #define GL_NORMALIZE 0x0BA1 */
|
||||
/* #define GL_RESCALE_NORMAL 0x803A */
|
||||
/* #define GL_POLYGON_OFFSET_FILL 0x8037 */
|
||||
/* #define GL_POLYGON_STIPPLE 0x0B42 */
|
||||
/* #define GL_VERTEX_ARRAY 0x8074 */
|
||||
/* #define GL_NORMAL_ARRAY 0x8075 */
|
||||
/* #define GL_COLOR_ARRAY 0x8076 */
|
||||
/* #define GL_TEXTURE_COORD_ARRAY 0x8078 */
|
||||
|
||||
/* LightModelParameter */
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
|
||||
/* LightParameter */
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_POSITION 0x1203
|
||||
|
||||
/* ListMode */
|
||||
#define GL_COMPILE 0x1300
|
||||
/* #define GL_COMPILE_AND_EXECUTE 0x1301 */
|
||||
|
||||
/* DataType */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
/* #define GL_SHORT 0x1402 */
|
||||
/* #define GL_UNSIGNED_SHORT 0x1403 */
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
|
||||
/* LogicOp */
|
||||
|
||||
/* MaterialFace */
|
||||
/* #define GL_FRONT_AND_BACK 0x0408 */
|
||||
|
||||
/* MaterialParameter */
|
||||
/* #define GL_AMBIENT 0x1200 */
|
||||
/* #define GL_DIFFUSE 0x1201 */
|
||||
/* #define GL_SPECULAR 0x1202 */
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
|
||||
/* MatrixMode */
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
|
||||
/* NormalPointerType */
|
||||
/* #define GL_FLOAT 0x1406 */
|
||||
|
||||
/* PixelFormat */
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#define GL_COLOR_INDEX 0x1900
|
||||
|
||||
/* PixelStoreParameter */
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
|
||||
/* PixelType */
|
||||
/* #define GL_UNSIGNED_BYTE 0x1401 */
|
||||
|
||||
/* ReadPixels */
|
||||
#define GL_COLOR 0x1800
|
||||
|
||||
/* ShadingModel */
|
||||
#define GL_FLAT 0x1D00
|
||||
#define GL_SMOOTH 0x1D01
|
||||
|
||||
/* StencilFunction */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
|
||||
/* StencilOp */
|
||||
/* #define GL_ZERO 0 */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* TexCoordPointerType */
|
||||
/* #define GL_FLOAT 0x1406 */
|
||||
|
||||
/* TextureEnvMode */
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_DECAL 0x2101
|
||||
/* #define GL_BLEND 0x0BE2 */
|
||||
#define GL_ADD 0x0104
|
||||
/* #define GL_REPLACE 0x1E01 */
|
||||
|
||||
/* TextureEnvParameter */
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
|
||||
/* TextureEnvTarget */
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* TextureMinFilter */
|
||||
/* #define GL_NEAREST 0x2600 */
|
||||
/* #define GL_LINEAR 0x2601 */
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
/* TextureParameterName */
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
|
||||
/* TextureTarget */
|
||||
/* #define GL_TEXTURE_2D 0x0DE1 */
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
|
||||
/* TextureWrapMode */
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
|
||||
/* PixelInternalFormat */
|
||||
#define GL_COLOR_INDEX8_EXT 0x80E5
|
||||
|
||||
/* VertexPointerType */
|
||||
/* #define GL_FLOAT 0x1406 */
|
||||
|
||||
/* Paletted Textures Extension */
|
||||
#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
|
||||
#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
|
||||
#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
|
||||
#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
|
||||
#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
|
||||
#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
|
||||
#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
|
||||
#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
GLAPI void APIENTRY glActiveTexture (GLenum texture);
|
||||
GLAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
|
||||
GLAPI void APIENTRY glBegin(GLenum mode);
|
||||
GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GLAPI void APIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
|
||||
GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GLAPI void APIENTRY glCallLists (GLsizei n, GLenum type, const GLvoid *lists);
|
||||
GLAPI void APIENTRY glClear (GLbitfield mask);
|
||||
GLAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GLAPI void APIENTRY glClearDepthf (GLclampf depth);
|
||||
GLAPI void APIENTRY glClearStencil (GLint s);
|
||||
GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
|
||||
GLAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GLAPI void APIENTRY glColor4fv (const GLfloat *v);
|
||||
GLAPI void APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
||||
GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GLAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table);
|
||||
GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
|
||||
GLAPI void APIENTRY glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
|
||||
GLAPI void APIENTRY glCullFace (GLenum mode);
|
||||
GLAPI void APIENTRY glDepthFunc (GLenum func);
|
||||
GLAPI void APIENTRY glDepthMask (GLboolean flag);
|
||||
GLAPI void APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||
GLAPI void APIENTRY glDisable (GLenum cap);
|
||||
GLAPI void APIENTRY glDisableClientState (GLenum array);
|
||||
GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
GLAPI void APIENTRY glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glEnable (GLenum cap);
|
||||
GLAPI void APIENTRY glEnableClientState (GLenum array);
|
||||
GLAPI void APIENTRY glEnd (void);
|
||||
GLAPI void APIENTRY glEndList (void);
|
||||
GLAPI void APIENTRY glFinish (void);
|
||||
GLAPI void APIENTRY glFlush (void);
|
||||
GLAPI void APIENTRY glFrontFace (GLenum mode);
|
||||
GLAPI void APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GLAPI GLuint APIENTRY glGenLists (GLsizei range);
|
||||
GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GLAPI GLenum APIENTRY glGetError (void);
|
||||
GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
|
||||
GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *table);
|
||||
GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetPointerv (GLenum pname, GLvoid * *params);
|
||||
GLAPI void APIENTRY glGetPolygonStipple (GLubyte *mask);
|
||||
GLAPI void APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GLAPI const GLubyte * APIENTRY glGetString (GLenum name);
|
||||
GLAPI void APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap);
|
||||
GLAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glLineStipple (GLint factor, GLushort pattern);
|
||||
GLAPI void APIENTRY glLineWidth (GLfloat width);
|
||||
GLAPI void APIENTRY glListBase (GLuint base);
|
||||
GLAPI void APIENTRY glLoadIdentity (void);
|
||||
GLAPI void APIENTRY glLoadMatrixf (const GLfloat *m);
|
||||
GLAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glMatrixMode (GLenum mode);
|
||||
GLAPI void APIENTRY glMultMatrixf (const GLfloat *m);
|
||||
GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
|
||||
GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);
|
||||
GLAPI void APIENTRY glNewList (GLuint list, GLenum mode);
|
||||
GLAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
|
||||
GLAPI void APIENTRY glNormal3fv (const GLfloat *v);
|
||||
GLAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glPointSize (GLfloat size);
|
||||
GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GLAPI void APIENTRY glPolygonStipple (const GLubyte *mask);
|
||||
GLAPI void APIENTRY glPopMatrix (void);
|
||||
GLAPI void APIENTRY glPushMatrix (void);
|
||||
GLAPI void APIENTRY glRasterPos3f (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
|
||||
GLAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glShadeModel (GLenum mode);
|
||||
GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GLAPI void APIENTRY glStencilMask (GLuint mask);
|
||||
GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GLAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glVertex2f (GLfloat x, GLfloat y);
|
||||
GLAPI void APIENTRY glVertex2fv (const GLfloat *v);
|
||||
GLAPI void APIENTRY glVertex3f (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glVertex3fv (const GLfloat *v);
|
||||
GLAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl_h_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,573 @@
|
||||
#ifndef __gl_h_
|
||||
#define __gl_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright 1991-2000 Silicon Graphics, Inc. This document is
|
||||
* licensed under the SGI Free Software B License. For details, see
|
||||
* http://oss.sgi.com/projects/FreeB/
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SYMBIAN32__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef signed char GLbyte;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef unsigned char GLubyte;
|
||||
typedef unsigned short GLushort;
|
||||
typedef unsigned int GLuint;
|
||||
typedef float GLfloat;
|
||||
typedef float GLclampf;
|
||||
typedef void GLvoid;
|
||||
/* Internal convenience typedefs */
|
||||
typedef void (*_GLfuncptr)();
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Extensions */
|
||||
#define GL_OES_SC_VERSION_1_0 1
|
||||
#define GL_EXT_paletted_texture 1
|
||||
|
||||
/* ClearBufferMask */
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
|
||||
/* Boolean */
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* BeginMode */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
|
||||
/* AlphaFunction */
|
||||
/* #define GL_LEQUAL 0x0203 */
|
||||
/* #define GL_ALWAYS 0x0207 */
|
||||
|
||||
/* BlendingFactorDest */
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
|
||||
/* BlendingFactorSrc */
|
||||
/* #define GL_ONE 1 */
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
|
||||
/* ColorMaterialFace */
|
||||
/* #define GL_FRONT_AND_BACK 0x0408 */
|
||||
|
||||
/* ColorMaterialParameter */
|
||||
/* #define GL_AMBIENT_AND_DIFFUSE 0x1602 */
|
||||
|
||||
/* ColorPointerType */
|
||||
/* #define GL_FLOAT 0x1406 */
|
||||
/* #define GL_UNSIGNED_BYTE 0x1401 */
|
||||
|
||||
/* CullFaceMode */
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
|
||||
/* DepthFunction */
|
||||
/* #define GL_LESS 0x0201 */
|
||||
/* #define GL_LEQUAL 0x0203 */
|
||||
/* #define GL_ALWAYS 0x0207 */
|
||||
|
||||
/* EnableCap */
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_LIGHT0 0x4000
|
||||
#define GL_LIGHT1 0x4001
|
||||
#define GL_POINT_SMOOTH 0x0B10
|
||||
#define GL_LINE_STIPPLE 0x0B24
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
#define GL_RESCALE_NORMAL 0x803A
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_POLYGON_STIPPLE 0x0B42
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_STACK_OVERFLOW 0x0503
|
||||
#define GL_STACK_UNDERFLOW 0x0504
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* FogMode */
|
||||
|
||||
/* FogParameter */
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
/* GetBooleanv */
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
|
||||
/* GetFloatv */
|
||||
#define GL_CURRENT_COLOR 0x0B00
|
||||
#define GL_CURRENT_NORMAL 0x0B02
|
||||
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
|
||||
#define GL_CURRENT_RASTER_COLOR 0x0B04
|
||||
#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
|
||||
#define GL_POINT_SIZE 0x0B11
|
||||
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||
#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_ALPHA_TEST_REF 0x0BC2
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
|
||||
/* GetIntegerv */
|
||||
#define GL_MATRIX_MODE 0x0BA0
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
|
||||
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_LINE_STIPPLE_PATTERN 0x0B25
|
||||
#define GL_LINE_STIPPLE_REPEAT 0x0B26
|
||||
#define GL_MAX_LIST_NESTING 0x0B31
|
||||
#define GL_LIST_BASE 0x0B32
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_ALPHA_TEST_FUNC 0x0BC1
|
||||
#define GL_BLEND_DST 0x0BE0
|
||||
#define GL_BLEND_SRC 0x0BE1
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
#define GL_POLYGON_SMOOTH_HINT 0x0C53
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_VERTEX_ARRAY_SIZE 0x807A
|
||||
#define GL_VERTEX_ARRAY_TYPE 0x807B
|
||||
#define GL_VERTEX_ARRAY_STRIDE 0x807C
|
||||
#define GL_NORMAL_ARRAY_TYPE 0x807E
|
||||
#define GL_NORMAL_ARRAY_STRIDE 0x807F
|
||||
#define GL_COLOR_ARRAY_SIZE 0x8081
|
||||
#define GL_COLOR_ARRAY_TYPE 0x8082
|
||||
#define GL_COLOR_ARRAY_STRIDE 0x8083
|
||||
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
|
||||
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
|
||||
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
|
||||
#define GL_SHADE_MODEL 0x0B54
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_MAX_ELEMENTS_VERTICES 0x80E8
|
||||
#define GL_MAX_ELEMENTS_INDICES 0x80E9
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
|
||||
#define GL_MAX_TEXTURE_UNITS 0x84E2
|
||||
|
||||
/* GetMaterialfv */
|
||||
/* #define GL_AMBIENT 0x1200 */
|
||||
/* #define GL_DIFFUSE 0x1201 */
|
||||
/* #define GL_SPECULAR 0x1202 */
|
||||
/* #define GL_EMISSION 0x1600 */
|
||||
/* #define GL_SHININESS 0x1601 */
|
||||
|
||||
/* GetLightfv */
|
||||
/* #define GL_AMBIENT 0x1200 */
|
||||
/* #define GL_DIFFUSE 0x1201 */
|
||||
/* #define GL_SPECULAR 0x1202 */
|
||||
/* #define GL_POSITION 0x1203 */
|
||||
|
||||
/* GetPointerv */
|
||||
#define GL_VERTEX_ARRAY_POINTER 0x808E
|
||||
#define GL_NORMAL_ARRAY_POINTER 0x808F
|
||||
#define GL_COLOR_ARRAY_POINTER 0x8090
|
||||
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
|
||||
|
||||
/* GetTexParameter */
|
||||
/* #define GL_TEXTURE_MAG_FILTER 0x2800 */
|
||||
/* #define GL_TEXTURE_MIN_FILTER 0x2801 */
|
||||
/* #define GL_TEXTURE_WRAP_S 0x2802 */
|
||||
/* #define GL_TEXTURE_WRAP_T 0x2803 */
|
||||
|
||||
/* GetTexEnvfv */
|
||||
/* #define GL_TEXTURE_ENV_MODE 0x2200 */
|
||||
/* #define GL_TEXTURE_ENV_COLOR 0x2201 */
|
||||
|
||||
/* HintMode */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
|
||||
/* HintTarget */
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
|
||||
/* IsEnabled */
|
||||
/* #define GL_LIGHTING 0x0B50 */
|
||||
/* #define GL_TEXTURE_2D 0x0DE1 */
|
||||
/* #define GL_CULL_FACE 0x0B44 */
|
||||
/* #define GL_ALPHA_TEST 0x0BC0 */
|
||||
/* #define GL_BLEND 0x0BE2 */
|
||||
/* #define GL_STENCIL_TEST 0x0B90 */
|
||||
/* #define GL_DEPTH_TEST 0x0B71 */
|
||||
/* #define GL_LIGHT0 0x4000 */
|
||||
/* #define GL_LIGHT1 0x4001 */
|
||||
/* #define GL_POINT_SMOOTH 0x0B10 */
|
||||
/* #define GL_LINE_STIPPLE 0x0B24 */
|
||||
/* #define GL_LINE_SMOOTH 0x0B20 */
|
||||
/* #define GL_SCISSOR_TEST 0x0C11 */
|
||||
/* #define GL_COLOR_MATERIAL 0x0B57 */
|
||||
/* #define GL_NORMALIZE 0x0BA1 */
|
||||
/* #define GL_RESCALE_NORMAL 0x803A */
|
||||
/* #define GL_POLYGON_OFFSET_FILL 0x8037 */
|
||||
/* #define GL_POLYGON_STIPPLE 0x0B42 */
|
||||
/* #define GL_VERTEX_ARRAY 0x8074 */
|
||||
/* #define GL_NORMAL_ARRAY 0x8075 */
|
||||
/* #define GL_COLOR_ARRAY 0x8076 */
|
||||
/* #define GL_TEXTURE_COORD_ARRAY 0x8078 */
|
||||
|
||||
/* LightModelParameter */
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
|
||||
/* LightParameter */
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_POSITION 0x1203
|
||||
|
||||
/* DataType */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_FLOAT 0x1406
|
||||
|
||||
/* LogicOp */
|
||||
|
||||
/* MaterialFace */
|
||||
/* #define GL_FRONT_AND_BACK 0x0408 */
|
||||
|
||||
/* MaterialParameter */
|
||||
/* #define GL_AMBIENT 0x1200 */
|
||||
/* #define GL_DIFFUSE 0x1201 */
|
||||
/* #define GL_SPECULAR 0x1202 */
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
|
||||
/* MatrixMode */
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
|
||||
/* NormalPointerType */
|
||||
/* #define GL_FLOAT 0x1406 */
|
||||
|
||||
/* PixelFormat */
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#define GL_COLOR_INDEX 0x1900
|
||||
|
||||
/* PixelStoreParameter */
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
|
||||
/* PixelType */
|
||||
/* #define GL_UNSIGNED_BYTE 0x1401 */
|
||||
|
||||
/* ReadPixels */
|
||||
#define GL_COLOR 0x1800
|
||||
|
||||
/* ShadingModel */
|
||||
#define GL_FLAT 0x1D00
|
||||
#define GL_SMOOTH 0x1D01
|
||||
|
||||
/* StencilFunction */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
|
||||
/* StencilOp */
|
||||
/* #define GL_ZERO 0 */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* TexCoordPointerType */
|
||||
/* #define GL_FLOAT 0x1406 */
|
||||
|
||||
/* TextureEnvMode */
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_DECAL 0x2101
|
||||
/* #define GL_BLEND 0x0BE2 */
|
||||
#define GL_ADD 0x0104
|
||||
/* #define GL_REPLACE 0x1E01 */
|
||||
|
||||
/* TextureEnvParameter */
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
|
||||
/* TextureEnvTarget */
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* TextureMinFilter */
|
||||
/* #define GL_NEAREST 0x2600 */
|
||||
/* #define GL_LINEAR 0x2601 */
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
/* TextureParameterName */
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
|
||||
/* TextureTarget */
|
||||
/* #define GL_TEXTURE_2D 0x0DE1 */
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
|
||||
/* TextureWrapMode */
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
|
||||
/* PixelInternalFormat */
|
||||
#define GL_COLOR_INDEX8_EXT 0x80E5
|
||||
|
||||
/* VertexPointerType */
|
||||
/* #define GL_FLOAT 0x1406 */
|
||||
|
||||
/* Paletted Textures Extension */
|
||||
#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
|
||||
#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
|
||||
#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
|
||||
#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
|
||||
#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
|
||||
#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
|
||||
#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
|
||||
#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
GLAPI void APIENTRY glActiveTexture (GLenum texture);
|
||||
GLAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
|
||||
GLAPI void APIENTRY glBegin(GLenum mode);
|
||||
GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GLAPI void APIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
|
||||
GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GLAPI void APIENTRY glCallLists (GLsizei n, GLenum type, const GLvoid *lists);
|
||||
GLAPI void APIENTRY glClear (GLbitfield mask);
|
||||
GLAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GLAPI void APIENTRY glClearDepthf (GLclampf depth);
|
||||
GLAPI void APIENTRY glClearStencil (GLint s);
|
||||
GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
|
||||
GLAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GLAPI void APIENTRY glColor4fv (const GLfloat *v);
|
||||
GLAPI void APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
||||
GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GLAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table);
|
||||
GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
|
||||
GLAPI void APIENTRY glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
|
||||
GLAPI void APIENTRY glCullFace (GLenum mode);
|
||||
GLAPI void APIENTRY glDepthFunc (GLenum func);
|
||||
GLAPI void APIENTRY glDepthMask (GLboolean flag);
|
||||
GLAPI void APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||
GLAPI void APIENTRY glDisable (GLenum cap);
|
||||
GLAPI void APIENTRY glDisableClientState (GLenum array);
|
||||
GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
GLAPI void APIENTRY glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glEnable (GLenum cap);
|
||||
GLAPI void APIENTRY glEnableClientState (GLenum array);
|
||||
GLAPI void APIENTRY glEnd (void);
|
||||
GLAPI void APIENTRY glEndList (void);
|
||||
GLAPI void APIENTRY glFinish (void);
|
||||
GLAPI void APIENTRY glFlush (void);
|
||||
GLAPI void APIENTRY glFrontFace (GLenum mode);
|
||||
GLAPI void APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GLAPI GLuint APIENTRY glGenLists (GLsizei range);
|
||||
GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GLAPI GLenum APIENTRY glGetError (void);
|
||||
GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
|
||||
GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *table);
|
||||
GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetPointerv (GLenum pname, GLvoid * *params);
|
||||
GLAPI void APIENTRY glGetPolygonStipple (GLubyte *mask);
|
||||
GLAPI void APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GLAPI const GLubyte * APIENTRY glGetString (GLenum name);
|
||||
GLAPI void APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap);
|
||||
GLAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glLightModelf (GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glLineStipple (GLint factor, GLushort pattern);
|
||||
GLAPI void APIENTRY glLineWidth (GLfloat width);
|
||||
GLAPI void APIENTRY glListBase (GLuint base);
|
||||
GLAPI void APIENTRY glLoadIdentity (void);
|
||||
GLAPI void APIENTRY glLoadMatrixf (const GLfloat *m);
|
||||
GLAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glMatrixMode (GLenum mode);
|
||||
GLAPI void APIENTRY glMultMatrixf (const GLfloat *m);
|
||||
GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
|
||||
GLAPI void APIENTRY glNewList (GLuint list, GLenum mode);
|
||||
GLAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
|
||||
GLAPI void APIENTRY glNormal3fv (const GLfloat *v);
|
||||
GLAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glPointSize (GLfloat size);
|
||||
GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GLAPI void APIENTRY glPolygonStipple (const GLubyte *mask);
|
||||
GLAPI void APIENTRY glPopMatrix (void);
|
||||
GLAPI void APIENTRY glPushMatrix (void);
|
||||
GLAPI void APIENTRY glRasterPos3f (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
|
||||
GLAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glShadeModel (GLenum mode);
|
||||
GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GLAPI void APIENTRY glStencilMask (GLuint mask);
|
||||
GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GLAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GLAPI void APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GLAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glVertex2f (GLfloat x, GLfloat y);
|
||||
GLAPI void APIENTRY glVertex2fv (const GLfloat *v);
|
||||
GLAPI void APIENTRY glVertex3f (GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glVertex3fv (const GLfloat *v);
|
||||
GLAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl_h_ */
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef __gl2platform_h_
|
||||
#define __gl2platform_h_
|
||||
|
||||
/*
|
||||
** Copyright 2017-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL SC 2.0 glsc2.h
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* Please contribute modifications back to Khronos as pull requests on the
|
||||
* public github repository:
|
||||
* https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_APICALL
|
||||
#define GL_APICALL KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef GL_APIENTRY
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
#endif /* __gl2platform_h_ */
|
||||
@@ -0,0 +1,443 @@
|
||||
#ifndef __glsc2_glsc2_h_
|
||||
#define __glsc2_glsc2_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <GLSC2/gl2platform.h>
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
#define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/* Generated on date 20191013 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: glsc2
|
||||
* Profile: common
|
||||
* Versions considered: 2\.[0-9]
|
||||
* Versions emitted: .*
|
||||
* Default extensions included: None
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GL_SC_VERSION_2_0
|
||||
#define GL_SC_VERSION_2_0 1
|
||||
#include <KHR/khrplatform.h>
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_int16_t GLshort;
|
||||
typedef khronos_uint16_t GLushort;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef int GLint;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef int GLsizei;
|
||||
typedef char GLchar;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
#define GL_CONTEXT_LOST 0x0507
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_RED 0x1903
|
||||
#define GL_RG 0x8227
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
|
||||
#define GL_PROGRAM_BINARY_FORMATS 0x87FF
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
#define GL_R8 0x8229
|
||||
#define GL_RG8 0x822B
|
||||
#define GL_RGB8 0x8051
|
||||
#define GL_RGBA8 0x8058
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#define GL_NONE 0
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
#define GL_FRAMEBUFFER_UNDEFINED 0x8219
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
#define GL_GUILTY_CONTEXT_RESET 0x8253
|
||||
#define GL_INNOCENT_CONTEXT_RESET 0x8254
|
||||
#define GL_UNKNOWN_CONTEXT_RESET 0x8255
|
||||
#define GL_CONTEXT_ROBUST_ACCESS 0x90F3
|
||||
#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
|
||||
#define GL_LOSE_CONTEXT_ON_RESET 0x8252
|
||||
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
|
||||
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
|
||||
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
|
||||
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
|
||||
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatus (void);
|
||||
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
|
||||
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
|
||||
GL_APICALL void GL_APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
|
||||
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
|
||||
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
|
||||
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
|
||||
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
|
||||
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
|
||||
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#endif /* GL_SC_VERSION_2_0 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,67 @@
|
||||
#ifndef __glsc2_glsc2ext_h_
|
||||
#define __glsc2_glsc2ext_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
#define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/* Generated on date 20191013 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: glsc2
|
||||
* Profile: common
|
||||
* Versions considered: 2\.[0-9]
|
||||
* Versions emitted: _nomatch_^
|
||||
* Default extensions included: glsc2
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_OES_depth24 1
|
||||
#define GL_DEPTH_COMPONENT24_OES 0x81A6
|
||||
#endif /* GL_OES_depth24 */
|
||||
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_OES_depth32 1
|
||||
#define GL_DEPTH_COMPONENT32_OES 0x81A7
|
||||
#endif /* GL_OES_depth32 */
|
||||
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_OES_rgb8_rgba8 1
|
||||
#define GL_RGB8_OES 0x8051
|
||||
#define GL_RGBA8_OES 0x8058
|
||||
#endif /* GL_OES_rgb8_rgba8 */
|
||||
|
||||
#ifndef GL_OES_standard_derivatives
|
||||
#define GL_OES_standard_derivatives 1
|
||||
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
|
||||
#endif /* GL_OES_standard_derivatives */
|
||||
|
||||
#ifndef GL_EXT_texture_compression_s3tc
|
||||
#define GL_EXT_texture_compression_s3tc 1
|
||||
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||
#endif /* GL_EXT_texture_compression_s3tc */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,409 @@
|
||||
OpenGL(R) Shading Language Extension Conventions
|
||||
|
||||
Last Modified Date: 2006/12/18
|
||||
Author Revision: 11
|
||||
|
||||
Document Source: the OpenGL Extension Registry at
|
||||
|
||||
http://www.opengl.org/registry/
|
||||
|
||||
Contributors:
|
||||
|
||||
Pat Brown, NVIDIA
|
||||
John Kessenich, 3Dlabs
|
||||
Jon Leech
|
||||
Barthold Lichtenbelt, 3Dlabs
|
||||
Bill Licea-Kane, ATI
|
||||
Kent Lin, Intel
|
||||
Jeremy Sandmel, ATI
|
||||
Folker Schamel, Spinor
|
||||
|
||||
The ARB OpenGL Shading Language working group has defined the following
|
||||
conventions for writing OpenGL extension specifications that extend the
|
||||
Shading Language syntax or semantics.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Section #1: Conventions to avoid name-space collision
|
||||
|
||||
We expect the Shading Language to continue to evolve through the
|
||||
use of vendor, EXT, and ARB extensions, as well as through
|
||||
revisions to the core language specification itself. As a result,
|
||||
we'd like to establish some name conventions to avoid name-space
|
||||
collisions between vendors and between the extensions and the core
|
||||
language.
|
||||
|
||||
We have the same kinds of concerns that resulted in the need for
|
||||
naming and syntax rules document for the non-shader parts of
|
||||
OpenGL:
|
||||
|
||||
http://www.opengl.org/registry/doc/rules.html#spec_naming
|
||||
|
||||
We expect that we will need to affix new names with vendor tags
|
||||
where appropriate, and change and/or remove these tags as
|
||||
extensions are promoted, in the same fashion as for core GL
|
||||
function and token names.
|
||||
|
||||
The fact that the Shading Language is modeled after C/C++ means
|
||||
that we have some additional requirements for what the language
|
||||
should "look" like.
|
||||
|
||||
Consequently, vendors must use the following naming conventions
|
||||
when creating new OpenGL extensions that affect the syntax of the
|
||||
Shading Language.
|
||||
|
||||
General principles:
|
||||
|
||||
- New syntax defined by an extension should be suffixed with a
|
||||
vendor specific extension (EXT, ARB, SGI, etc),
|
||||
except as noted below where the constraints of
|
||||
being "C-like" make it unpalatble.
|
||||
- Vendors should make a good faith effort to ensure that new
|
||||
shading language extensions do not conflict in syntax or
|
||||
semantics with the extensions of other vendors
|
||||
or the ARB.
|
||||
|
||||
Rules for adding or modifying specific Shading Language
|
||||
constructs defined by extensions follow.
|
||||
|
||||
Note: VEN stands for any vendor tag, e.g. ARB, EXT, SGI, etc.
|
||||
|
||||
Summary:
|
||||
--------
|
||||
1a) variables: gl_<Name>VEN
|
||||
1b) keywords: __<name>VEN
|
||||
1c) data types:
|
||||
1c1) keywords: __<name>VEN
|
||||
1c2) derived types: gl_<Name>VEN
|
||||
1d) operators: use new data types as operands or ask ARB
|
||||
1e) functions: <name>VEN
|
||||
|
||||
Details:
|
||||
--------
|
||||
1a) Variables
|
||||
STATUS: RESOLVED
|
||||
|
||||
New variables defined by an extension should use:
|
||||
prefix: "gl_" (lower case, single underscore)
|
||||
suffix: "VEN" (no underscore)
|
||||
|
||||
Form:
|
||||
gl_<Name>VEN
|
||||
|
||||
<Name> is subject to these constraints:
|
||||
- Each word in <Name> must start with a capital letter.
|
||||
- Words should be concatenated, not separated with
|
||||
underscores.
|
||||
- Don't use an underscore to separate the
|
||||
final VEN suffix.
|
||||
|
||||
Notes:
|
||||
All of the variables defined in the core
|
||||
shading language specification already follow this
|
||||
convention.
|
||||
|
||||
New variables added by shading language extensions should
|
||||
match the naming style of the core specification
|
||||
where possible.
|
||||
|
||||
Examples:
|
||||
uniform float gl_SomeNewBuiltinScalarARB;
|
||||
varying vec4 gl_YetAnotherVaryingEXT;
|
||||
attribute vec4 gl_OneMoreAttributeATI
|
||||
|
||||
1b) keywords:
|
||||
STATUS: RESOLVED
|
||||
|
||||
New keywords defined by an extension should use:
|
||||
prefix: "__" (double underscore)
|
||||
suffix: VEN (no underscore)
|
||||
|
||||
Form:
|
||||
__<name>VEN
|
||||
|
||||
Notes:
|
||||
New keywords should be prefixed with "__" because this is
|
||||
how C/C++ handle keyword extensions. The core language
|
||||
specification reserves the use of "__" anywhere within a
|
||||
keyword so that future language revisions from the ARB will
|
||||
not conflict with user level names.
|
||||
|
||||
To avoid name collisions between OpenGL implementations from
|
||||
different IHV's, extended keywords should also use a vendor
|
||||
suffix.
|
||||
|
||||
The working group considered requiring a "gl_" for the
|
||||
prefix instead of "__", but felt this diverged too far from
|
||||
the conventions of C/C++
|
||||
|
||||
Examples:
|
||||
__float4EXT
|
||||
__sampler4DSGI
|
||||
__elifARB
|
||||
__some_new_kind_of_while_loopARB
|
||||
|
||||
1c) New data types:
|
||||
STATUS: RESOLVED
|
||||
|
||||
Naming conventions for new data types defined by an extension
|
||||
differ depending on whether the data type is a new fundamental
|
||||
type defined as a keyword (case 1c1), or a new derived type
|
||||
defined by Shading Language constructs (case 1c2). Currently the
|
||||
only derived types are "struct"s.
|
||||
|
||||
1c1) For new data type keywords defined by an extension:
|
||||
|
||||
prefix: "__" (double underscore)
|
||||
suffix: VEN
|
||||
|
||||
Form:
|
||||
__<name>VEN
|
||||
|
||||
Examples:
|
||||
__float4SGI
|
||||
__half2NV
|
||||
__triplefloatARB
|
||||
__mat5EXT
|
||||
|
||||
1c2) For new derived types defined by an extension:
|
||||
|
||||
prefix: "gl_" (gl and single underscore)
|
||||
suffix: VEN
|
||||
|
||||
Form:
|
||||
gl_<name>VEN
|
||||
|
||||
Examples:
|
||||
gl_skinningParametersEXT
|
||||
gl_newDerivedStateStructARB
|
||||
|
||||
Notes:
|
||||
If new data types are defined as keywords, then they
|
||||
should follow the rules for keywords. If new data types
|
||||
are derived types, then they should follow a different
|
||||
naming convention, like the one for variables.
|
||||
|
||||
New data types should not be added as keywords unless
|
||||
absolutely necessary.
|
||||
|
||||
1d) New operators:
|
||||
STATUS: RESOLVED
|
||||
|
||||
To avoid name space collisions for new operators
|
||||
defined by an extension, or existing operators whose
|
||||
behavior is re-defined by an extensions, extensions should
|
||||
either:
|
||||
|
||||
1d1) Add a new data type along with the operator and use at
|
||||
least one of these new data types for the operands of the
|
||||
(re)defined operator. The new data type name should follow
|
||||
the rules given in (1c) above for new data types.
|
||||
|
||||
or
|
||||
|
||||
1d2) For IHVs who want to define a new operator to work on
|
||||
existing data types or to redefine an existing operator to
|
||||
work on existing data types, the IHV should come to the ARB
|
||||
and request the new operator to avoid colliding with any
|
||||
upcoming uses for the operator by the ARB.
|
||||
|
||||
Examples:
|
||||
An extension which overloads the "+" operator to add an int
|
||||
and a "triple" should define a new gl_tripleEXT type, then
|
||||
define the behavior of the + operator when one operand is an
|
||||
int and the other is a gl_tripleEXT.
|
||||
|
||||
An extension needing to overload the "+" operator to add an
|
||||
int and a float must obtain permission from the ARB. If it
|
||||
approves, the ARB would revise the shading language grammar
|
||||
to define the behavior of the + operator when one operand is
|
||||
an int and the other is a float.
|
||||
|
||||
An extension needing to define an entirely new operator for
|
||||
exponentiation must obtain permission from the ARB. If it
|
||||
approves, the ARB would agree to reserve an appropriate new
|
||||
operator, such as "**", and the extension would define the
|
||||
behavior of that operator with respect to some data types.
|
||||
|
||||
Notes:
|
||||
On the surface, operators by themselves need no additional
|
||||
name-space syntax. No one wants "+" redefined as gl_+ARB, for
|
||||
instance.
|
||||
|
||||
However, the ARB still wants to avoid name space and semantic
|
||||
collisions as extensions are promoted. The ARB reserves the
|
||||
use of operators with existing types.
|
||||
|
||||
Therefore we've adopted the two-pronged approach listed above.
|
||||
(A) is borrowed from C++ operator overloading conventions.
|
||||
(B) is a fall-back position in the event that (A) is
|
||||
inconvenient.
|
||||
|
||||
1e) functions:
|
||||
STATUS: RESOLVED
|
||||
|
||||
New functions defined by an extension should use:
|
||||
prefix: none (note, no "gl_" or "__")
|
||||
suffix: VEN
|
||||
|
||||
Form:
|
||||
<name>VEN
|
||||
|
||||
Examples:
|
||||
newfunctionEXT()
|
||||
SomeOtherFuncARB()
|
||||
Yet_Another_FunctionSGI()
|
||||
|
||||
Notes:
|
||||
Since none of the standard core Shading Language functions
|
||||
start with the "gl_" prefix, new functions do not need this
|
||||
prefix either. There is no need to avoid collisions between
|
||||
implementation-defined and user-defined functions, because
|
||||
the Shading Language specifically allows user overloading of
|
||||
built-in functions. In other words, name collisions are
|
||||
expected and intentional. Further, when a name collision
|
||||
occurs between a user function and an implementation-defined
|
||||
function, the user function takes precedence.
|
||||
|
||||
However, we still must avoid name collisions between IHV's
|
||||
and to allow for promotion of new functions into EXT, ARB
|
||||
and core status. So, new functions should use a VENDOR
|
||||
suffix.
|
||||
|
||||
|
||||
=============================================================
|
||||
|
||||
Section #2: Protocol for accessing extension features in the
|
||||
shading language
|
||||
|
||||
2a) Extension #defines?
|
||||
|
||||
STATUS: RESOLVED
|
||||
|
||||
Every extension which affects shading language semantics or
|
||||
syntax must create a Shading Language preprocessor #define that
|
||||
matches the GL extension name string. This #define would be
|
||||
available in the shading language if and only if the extension
|
||||
were supported on a given Shading Language implementation.
|
||||
|
||||
Further, extensions which do not affect shading language
|
||||
semantics or syntax *must not* create this Shading Language
|
||||
preprocessor #define.
|
||||
|
||||
The extension-writing template in the OpenGL Extension Registry
|
||||
will be updated to include a placeholder for shading language
|
||||
extensions showing the corresponding #define.
|
||||
|
||||
Example:
|
||||
An extension which adds the extension string
|
||||
"GL_ARB_shading_extension_1"
|
||||
should also add a Shading Language preprocessor #define called
|
||||
GL_ARB_shading_extension_1
|
||||
|
||||
Doing so means that a shader can do something like:
|
||||
|
||||
#ifdef GL_ARB_shading_extension_1
|
||||
// do something using the extension
|
||||
#else
|
||||
// do something else or #error!
|
||||
#endif
|
||||
|
||||
Notes:
|
||||
If an application wishes to emulate this behavior for any
|
||||
other extensions which do not directly affect the shading
|
||||
language syntax or behavior, they can simply query the
|
||||
extension string for the presence of these extensions and
|
||||
create their own #defines to be prepended to their shader
|
||||
strings.
|
||||
|
||||
Pseudo-code example:
|
||||
char* prefixStr;
|
||||
if (glIsExtensionSupported("GL_ARB_texture_mirrored_repeat"))
|
||||
{
|
||||
ConcatString(prefixStr, "#define GL_ARB_texture_mirrored_repeat 1\n");
|
||||
}
|
||||
// use prefixStr as the first string given to glShaderSource()
|
||||
|
||||
2b) Should we allow and/or require a shader author to declare
|
||||
their intended use of a given extension prior to use?
|
||||
|
||||
STATUS: RESOLVED - YES
|
||||
|
||||
The ARB has received developer feedback requesting we strive
|
||||
towards portability in the shading language. The concern is
|
||||
shaders written on one implementation with an extension will not
|
||||
run on an implementation without the extension and that without
|
||||
an explicit "enable", the shader author may not realize that
|
||||
he/she was using any extended features.
|
||||
|
||||
After much discussion, the resolution is as follows:
|
||||
|
||||
For any extension which can affect shaders written without
|
||||
knowledge of the extension (i.e. no change in syntax to the
|
||||
shading language), the extension must introduce an API which
|
||||
explicitly "enables" the extended behavior. New extensions
|
||||
should not be allowed to change the behavior of old shaders
|
||||
without an explicit request to do so from the application.
|
||||
|
||||
Further, for any extension which affects the syntax or semantics
|
||||
of the shading language, the shader author must explicitly make
|
||||
a request allow the use of the extension, by inserting this
|
||||
request within the shader text itself.
|
||||
|
||||
This request is made using the following syntax:
|
||||
#extension <name> : <behavior>
|
||||
where
|
||||
<name> = the GL extension name string (as defined in section 2a,
|
||||
starting with "GL_").
|
||||
and
|
||||
<behavior> can be one of the following:
|
||||
require, enable, warn, or disable
|
||||
|
||||
Example:
|
||||
To use an extension which adds the extension string
|
||||
"GL_ARB_shading_extension_1", a shader should include a line like:
|
||||
|
||||
#extension GL_ARB_shading_extension_1: enable
|
||||
|
||||
See section 3.3 of the OpenGL Shading Language specification
|
||||
(Language Version 1.20) for details about using this mechanism.
|
||||
|
||||
-----------------------------------
|
||||
|
||||
Revision history:
|
||||
|
||||
#11 - 12/18/2006 - Jon Leech
|
||||
- Clarify that #extension name must be the extension name string
|
||||
starting with "GL_", give an example, fix an old URL.
|
||||
|
||||
#10 - 10/09/2006 - Jon Leech
|
||||
- Move registry URL to www.opengl.org.
|
||||
|
||||
#9 - 05/12/2004 - js
|
||||
- no changes from rev #8, whitespace cleanup only
|
||||
|
||||
#8 - 05/11/2004 - js
|
||||
- minor typos fixed
|
||||
- cleaned up language about when to use 1c1 or 1c2
|
||||
|
||||
#7 - 05/07/2004 - Jon Leech
|
||||
- language cleanups including removing use of "built in"
|
||||
|
||||
#6 - 04/29/04 - js
|
||||
- cleaned up psuedo code example in section 2a
|
||||
- change language about "decorate"ing names to "affix"
|
||||
|
||||
#5 - 04/29/04 - js
|
||||
- added to contributors list
|
||||
|
||||
#4 - 04/29/04 - js
|
||||
- cleaned up section 2 to reflect #extension resolution
|
||||
|
||||
#3 - 03/15/04 - js
|
||||
- summarized section 1 conventions on name decorations
|
||||
|
||||
#2 - 03/24/04 - js
|
||||
- reorganized doc to reflect recent working group discussions
|
||||
|
||||
#1 - 03/19/04 - js
|
||||
- initial revision
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>OpenGL Enumerant Allocation Policies</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>OpenGL Enumerant Allocation Policies</h1>
|
||||
|
||||
<p> If an OpenGL vendor defines a single-vendor OpenGL or GLX extension
|
||||
that requires one or more new enumerant values, then each of those
|
||||
values must be contained in a block of enumerant values that has
|
||||
been allocated by Khronos for the exclusive use of that vendor.
|
||||
Khronos maintains a registry of such allocations. To allocate
|
||||
enumerants, file a request against project 'registry' in the Khronos
|
||||
Bugzilla. If you are unable to access Bugzilla, you may submit a
|
||||
request via email to "registry 'at' khronos.org". However,
|
||||
response time to email requests is unpredictable.
|
||||
|
||||
<p> OpenGL and OpenGL ES use enumerant values in the range [0,24575], as
|
||||
well as reusing some enumerant values in the range [32768,65535].
|
||||
The latter values were initially assigned to extensions which later
|
||||
became part of the OpenGL core. Enumerant values are grouped into
|
||||
blocks of 16 values, and each block begins with a value that is a
|
||||
multiple of 16. Most blocks in the range [0,24575] are unused, and
|
||||
reserved for use with future versions of OpenGL.
|
||||
|
||||
<p> Historically, enumerant values for some single-vendor extensions
|
||||
were allocated in blocks of 1000, beginning with the block
|
||||
[102000,102999] and progressing upward. Values in this range cannot
|
||||
be represented as 16-bit unsigned integers. This imposes a
|
||||
significant and unnecessary performance penalty on some
|
||||
implementations. Such blocks that have already been allocated to
|
||||
vendors will remain allocated unless and until the vendor
|
||||
voluntarily releases the entire block, but no further blocks in this
|
||||
range will be allocated.
|
||||
|
||||
<h3>Allocating Enumerants</h3>
|
||||
|
||||
<p> Enumerant values for single-vendor extensions will be allocated upon
|
||||
request in blocks of 16 values, beginning with the block
|
||||
[32768,32783] and progressing upward. There are a limited number of
|
||||
available blocks in the more desirable 16-bit range [32768,65535],
|
||||
so do not request enumerants until you actually require them to ship
|
||||
an extension, or request more than you need.
|
||||
|
||||
|
||||
<p> Vendors must adhere to the following guidelines for requesting and
|
||||
using enumerants:
|
||||
|
||||
<ul>
|
||||
|
||||
<li> No extension can be shipped using OpenGL or GLX enumerant values
|
||||
that have not been allocated by the Registrar.
|
||||
|
||||
<li> The Registrar will allocate official enumerant values for an
|
||||
extension only when there is a commitment to release that extension.
|
||||
Prior to this point, development work on the extension should be
|
||||
done using temporarily assigned enumerant values. Enumerant values
|
||||
in the range [0x6000,0x7FFF] (e.g. [24576,32767] are reserved for
|
||||
temporary use, and will never be assigned to any shipping core or
|
||||
extension enumerant.
|
||||
|
||||
<li> An extension specification, following the <a
|
||||
href="template.html">template</a>, must exist prior to releasing an
|
||||
extension. The specification will ideally include all fields from
|
||||
the template; if this is proving difficult due to lack of
|
||||
familiarity with the appropriate API Specification, please consult
|
||||
with other implementers on the corresponding Khronos Working Group
|
||||
mailing list. Vendors are strongly encouraged to submit this
|
||||
specification to the registry.
|
||||
|
||||
<li> Minimize the number of unused enumerant values in an allocated
|
||||
block.
|
||||
|
||||
<li> Do not request blocks solely to reserve enumerants against
|
||||
anticipated future use. If you are likely to need a large contiguous
|
||||
block of enumerants in the future, this should be discussed with the
|
||||
Registrar.
|
||||
|
||||
<li> If a vendor determines that it does not need a block of enumerant
|
||||
values that has been previously allocated to that vendor, the vendor
|
||||
may voluntarily return the entire block for future reallocation.
|
||||
|
||||
<li> If an extension is promoted from single-vendor to multi-vendor
|
||||
<tt>EXT</tt> or <tt>ARB</tt> status, the following rule applies: for
|
||||
each enumerant that is present in both the single-vendor version and
|
||||
the multi-vendor version, a new multi-vendor extension enumerant
|
||||
will be defined with the same value as the single-vendor extension
|
||||
enumerant. The name of the new enumerant will be the name of the
|
||||
extension enumerant with the suffix <tt>EXT</tt> or <tt>ARB</tt>
|
||||
replacing the vendor-specific suffix.
|
||||
|
||||
<p> Here, <i>promoted</i> is taken to mean that use of the
|
||||
single-vendor and multi-vendor enumerants is semantically
|
||||
equivalent, e.g. the effects of such use on GL and framebuffer state
|
||||
are identical. If this is not true, new values should be assigned to
|
||||
the multi-vendor enumerants. The intent is that it should be
|
||||
possible for the single-vendor and multi-vendor versions of the
|
||||
extension to coexist in a single implementation.
|
||||
|
||||
<li> If an extension becomes part of a new version of OpenGL,
|
||||
the following rule applies: for each enumerant that is present in
|
||||
both the extension and the new version of OpenGL, the ARB will
|
||||
choose one of the following two options:
|
||||
|
||||
<ul>
|
||||
<li> Define a new OpenGL enumerant with the same value as the
|
||||
extension enumerant. The name of the new enumerant will be the
|
||||
name of the extension enumerant with the extension suffix
|
||||
deleted.
|
||||
|
||||
<li> Define a new OpenGL enumerant with a previously unused value in
|
||||
the range [0,32767]. The name of the new enumerant will be the
|
||||
name of the extension enumerant with the extension suffix
|
||||
deleted.
|
||||
</ul>
|
||||
|
||||
<li> If a group of vendors introduces an extension, one of the vendors
|
||||
in the group must be designated as the "lead vendor" for that
|
||||
extension. The lead vendor will then allocate enumerant values for
|
||||
the extension in the same way that it would allocate enumerant
|
||||
values for a single-vendor extension.
|
||||
</ul>
|
||||
|
||||
<p> If at some future time all blocks up to [99984,99999] have been
|
||||
allocated, allocations of blocks of 16 values will continue in an upward
|
||||
direction, skipping over any block of 16 values that contains one or
|
||||
more values from a currently allocated 1000-value block.
|
||||
|
||||
<p> Last modified August 13, 2006 by Jon Leech
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,380 @@
|
||||
Name
|
||||
|
||||
EXT_fog_coord
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_EXT_fog_coord
|
||||
|
||||
Contact
|
||||
|
||||
Jon Leech, Silicon Graphics (ljp 'at' sgi.com)
|
||||
|
||||
Status
|
||||
|
||||
Shipping (version 1.6)
|
||||
|
||||
Version
|
||||
|
||||
$Date: 1999/06/21 19:57:19 $ $Revision: 1.11 $
|
||||
|
||||
Number
|
||||
|
||||
149
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.1 is required.
|
||||
The extension is written against the OpenGL 1.2 Specification.
|
||||
|
||||
Overview
|
||||
|
||||
This extension allows specifying an explicit per-vertex fog
|
||||
coordinate to be used in fog computations, rather than using a
|
||||
fragment depth-based fog equation.
|
||||
|
||||
Issues
|
||||
|
||||
* Should the specified value be used directly as the fog weighting
|
||||
factor, or in place of the z input to the fog equations?
|
||||
|
||||
As the z input; more flexible and meets ISV requests.
|
||||
|
||||
* Do we want vertex array entry points? Interleaved array formats?
|
||||
|
||||
Yes for entry points, no for interleaved formats, following the
|
||||
argument for secondary_color.
|
||||
|
||||
* Which scalar types should FogCoord accept? The full range, or just
|
||||
the unsigned and float versions? At the moment it follows Index(),
|
||||
which takes unsigned byte, signed short, signed int, float, and
|
||||
double.
|
||||
|
||||
Since we're now specifying a number which behaves like an
|
||||
eye-space distance, rather than a [0,1] quantity, integer types
|
||||
are less useful. However, restricting the commands to floating
|
||||
point forms only introduces some nonorthogonality.
|
||||
|
||||
Restrict to only float and double, for now.
|
||||
|
||||
* Interpolation of the fog coordinate may be perspective-correct or
|
||||
not. Should this be affected by PERSPECTIVE_CORRECTION_HINT,
|
||||
FOG_HINT, or another to-be-defined hint?
|
||||
|
||||
PERSPECTIVE_CORRECTION_HINT; this is already defined to affect
|
||||
all interpolated parameters. Admittedly this is a loss of
|
||||
orthogonality.
|
||||
|
||||
* Should the current fog coordinate be queryable?
|
||||
|
||||
Yes, but it's not returned by feedback.
|
||||
|
||||
* Control the fog coordinate source via an Enable instead of a fog
|
||||
parameter?
|
||||
|
||||
No. We might want to add more sources later.
|
||||
|
||||
* Should the fog coordinate be restricted to non-negative values?
|
||||
|
||||
Perhaps. Eye-coordinate distance of fragments will be
|
||||
non-negative due to clipping. Specifying explicit negative
|
||||
coordinates may result in very large computed f values, although
|
||||
they are defined to be clipped after computation.
|
||||
|
||||
* Use existing DEPTH enum instead of FRAGMENT_DEPTH? Change name of
|
||||
FRAGMENT_DEPTH_EXT to FOG_FRAGMENT_DEPTH_EXT?
|
||||
|
||||
Use FRAGMENT_DEPTH_EXT; FOG_FRAGMENT_DEPTH_EXT is somewhat
|
||||
misleading, since fragment depth itself has no dependence on
|
||||
fog.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void FogCoord[fd]EXT(T coord)
|
||||
void FogCoord[fd]vEXT(T coord)
|
||||
void FogCoordPointerEXT(enum type, sizei stride, void *pointer)
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of Fogi and Fogf:
|
||||
|
||||
FOG_COORDINATE_SOURCE_EXT 0x8450
|
||||
|
||||
Accepted by the <param> parameter of Fogi and Fogf:
|
||||
|
||||
FOG_COORDINATE_EXT 0x8451
|
||||
FRAGMENT_DEPTH_EXT 0x8452
|
||||
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetFloatv, and GetDoublev:
|
||||
|
||||
CURRENT_FOG_COORDINATE_EXT 0x8453
|
||||
FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
|
||||
FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
|
||||
|
||||
Accepted by the <pname> parameter of GetPointerv:
|
||||
|
||||
FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
|
||||
|
||||
Accepted by the <array> parameter of EnableClientState and
|
||||
DisableClientState:
|
||||
|
||||
FOG_COORDINATE_ARRAY_EXT 0x8457
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation)
|
||||
|
||||
These changes describe a new current state type, the fog coordinate,
|
||||
and the commands to specify it:
|
||||
|
||||
- (2.6, p. 12) Second paragraph changed to:
|
||||
|
||||
"Each vertex is specified with two, three, or four coordinates.
|
||||
In addition, a current normal, current texture coordinates,
|
||||
current color, and current fog coordinate may be used in
|
||||
processing each vertex."
|
||||
|
||||
- 2.6.3, p. 19) First paragraph changed to
|
||||
|
||||
"The only GL commands that are allowed within any Begin/End
|
||||
pairs are the commands for specifying vertex coordinates, vertex
|
||||
colors, normal coordinates, texture coordinates, and fog
|
||||
coordinates (Vertex, Color, Index, Normal, TexCoord,
|
||||
FogCoord)..."
|
||||
|
||||
- (2.7, p. 20) Insert the following paragraph following the third
|
||||
paragraph describing current normals:
|
||||
|
||||
" The current fog coodinate is set using
|
||||
void FogCoord[fd]EXT(T coord)
|
||||
void FogCoord[fd]vEXT(T coord)."
|
||||
|
||||
The last paragraph is changed to read:
|
||||
|
||||
"The state required to support vertex specification consists of
|
||||
four floating-point numbers to store the current texture
|
||||
coordinates s, t, r, and q, one floating-point value to store
|
||||
the current fog coordinate, four floating-point values to store
|
||||
the current RGBA color, and one floating-point value to store
|
||||
the current color index. There is no notion of a current vertex,
|
||||
so no state is devoted to vertex coordinates. The initial values
|
||||
of s, t, and r of the current texture coordinates are zero; the
|
||||
initial value of q is one. The initial fog coordinate is zero.
|
||||
The initial current normal has coordinates (0,0,1). The initial
|
||||
RGBA color is (R,G,B,A) = (1,1,1,1). The initial color index is
|
||||
1."
|
||||
|
||||
- (2.8, p. 21) Added fog coordinate command for vertex arrays:
|
||||
|
||||
Change first paragraph to read:
|
||||
|
||||
"The vertex specification commands described in section 2.7
|
||||
accept data in almost any format, but their use requires many
|
||||
command executions to specify even simple geometry. Vertex data
|
||||
may also be placed into arrays that are stored in the client's
|
||||
address space. Blocks of data in these arrays may then be used
|
||||
to specify multiple geometric primitives through the execution
|
||||
of a single GL command. The client may specify up to seven
|
||||
arrays: one each to store edge flags, texture coordinates, fog
|
||||
coordinates, colors, color indices, normals, and vertices. The
|
||||
commands"
|
||||
|
||||
Add to functions listed following first paragraph:
|
||||
|
||||
void FogCoordPointerEXT(enum type, sizei stride, void *pointer)
|
||||
|
||||
Add to table 2.4 (p. 22):
|
||||
|
||||
Command Sizes Types
|
||||
------- ----- -----
|
||||
FogCoordPointerEXT 1 float,double
|
||||
|
||||
Starting with the second paragraph on p. 23, change to add
|
||||
FOG_COORDINATE_ARRAY_EXT:
|
||||
|
||||
"An individual array is enabled or disabled by calling one of
|
||||
|
||||
void EnableClientState(enum array)
|
||||
void DisableClientState(enum array)
|
||||
|
||||
with array set to EDGE_FLAG_ARRAY, TEXTURE_COORD_ARRAY,
|
||||
FOG_COORDINATE_ARRAY_EXT, COLOR_ARRAY, INDEX_ARRAY,
|
||||
NORMAL_ARRAY, or VERTEX_ARRAY, for the edge flag, texture
|
||||
coordinate, fog coordinate, color, color index, normal, or
|
||||
vertex array, respectively.
|
||||
|
||||
The ith element of every enabled array is transferred to the GL
|
||||
by calling
|
||||
|
||||
void ArrayElement(int i)
|
||||
|
||||
For each enabled array, it is as though the corresponding
|
||||
command from section 2.7 or section 2.6.2 were called with a
|
||||
pointer to element i. For the vertex array, the corresponding
|
||||
command is Vertex<size><type>v, where <size> is one of [2,3,4],
|
||||
and <type> is one of [s,i,f,d], corresponding to array types
|
||||
short, int, float, and double respectively. The corresponding
|
||||
commands for the edge flag, texture coordinate, fog coordinate,
|
||||
color, color, color index, and normal arrays are EdgeFlagv,
|
||||
TexCoord<size><type>v, FogCoord<type>v, Color<size><type>v,
|
||||
Index<type>v, and Normal<type>v, respectively..."
|
||||
|
||||
Change pseudocode on p. 27 to disable fog coordinate array for
|
||||
canned interleaved array formats. After the lines
|
||||
|
||||
DisableClientState(EDGE_FLAG_ARRAY);
|
||||
DisableClientState(INDEX_ARRAY);
|
||||
|
||||
insert the line
|
||||
|
||||
DisableClientState(FOG_COORDINATE_ARRAY_EXT);
|
||||
|
||||
Substitute "seven" for every occurence of "six" in the final
|
||||
paragraph on p. 27.
|
||||
|
||||
- (2.12, p. 41) Add fog coordinate to the current rasterpos state.
|
||||
|
||||
Change the first sentence of the first paragraph to read
|
||||
|
||||
"The state required for the current raster position consists of
|
||||
three window coordinates x_w, y_w, and z_w, a clip coordinate
|
||||
w_c value, an eye coordinate distance, a fog coordinate, a valid
|
||||
bit, and associated data consisting of a color and texture
|
||||
coordinates."
|
||||
|
||||
Change the last paragraph to read
|
||||
|
||||
"The current raster position requires six single-precision
|
||||
floating-point values for its x_w, y_w, and z_w window
|
||||
coordinates, its w_c clip coordinate, its eye coordinate
|
||||
distance, and its fog coordinate, a single valid bit, a color
|
||||
(RGBA color and color index), and texture coordinates for
|
||||
associated data. In the initial state, the coordinates and
|
||||
texture coordinates are both (0,0,0,1), the fog coordinate is 0,
|
||||
the eye coordinate distance is 0, the valid bit is set, the
|
||||
associated RGBA color is (1,1,1,1), and the associated color
|
||||
index color is 1. In RGBA mode, the associated color index
|
||||
always has its initial value; in color index mode, the RGBA
|
||||
color always maintains its initial value."
|
||||
|
||||
- (3.10, p. 139) Change the second and third paragraphs to read
|
||||
|
||||
"This factor f may be computed according to one of three
|
||||
equations:"
|
||||
|
||||
f = exp(-d*c) (3.24)
|
||||
f = exp(-(d*c)^2) (3.25)
|
||||
f = (e-c)/(e-s) (3.26)
|
||||
|
||||
If the fog source (as defined below) is FRAGMENT_DEPTH_EXT, then
|
||||
c is the eye-coordinate distance from the eye, (0 0 0 1) in eye
|
||||
coordinates, to the fragment center. If the fog source is
|
||||
FOG_COORDINATE_EXT, then c is the interpolated value of the fog
|
||||
coordinate for this fragment. The equation and the fog source,
|
||||
along with either d or e and s, is specified with
|
||||
|
||||
void Fog{if}(enum pname, T param);
|
||||
void Fog{if}v(enum pname, T params);
|
||||
|
||||
If <pname> is FOG_MODE, then <param> must be, or <param> must
|
||||
point to an integer that is one of the symbolic constants EXP,
|
||||
EXP2, or LINEAR, in which case equation 3.24, 3.25, or 3.26,,
|
||||
respectively, is selected for the fog calculation (if, when 3.26
|
||||
is selected, e = s, results are undefined). If <pname> is
|
||||
FOG_COORDINATE_SOURCE_EXT, then <param> is or <params> points to
|
||||
an integer that is one of the symbolic constants
|
||||
FRAGMENT_DEPTH_EXT or FOG_COORDINATE_EXT. If <pname> is
|
||||
FOG_DENSITY, FOG_START, or FOG_END, then <param> is or <params>
|
||||
points to a value that is d, s, or e, respectively. If d is
|
||||
specified less than zero, the error INVALID_VALUE results."
|
||||
|
||||
- (3.10, p. 140) Change the last paragraph preceding section 3.11
|
||||
to read
|
||||
|
||||
"The state required for fog consists of a three valued integer
|
||||
to select the fog equation, three floating-point values d, e,
|
||||
and s, an RGBA fog color and a fog color index, a two-valued
|
||||
integer to select the fog coordinate source, and a single bit to
|
||||
indicate whether or not fog is enabled. In the initial state,
|
||||
fog is disabled, FOG_COORDINATE_SOURCE_EXT is
|
||||
FRAGMENT_DEPTH_EXT, FOG_MODE is EXP, d = 1.0, e = 1.0, and s =
|
||||
0.0; C_f = (0,0,0,0) and i_f=0."
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 1.2 Specification (State and State
|
||||
Requests)
|
||||
|
||||
None
|
||||
|
||||
Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance)
|
||||
|
||||
None
|
||||
|
||||
Additions to the GLX / WGL / AGL Specifications
|
||||
|
||||
None
|
||||
|
||||
GLX Protocol
|
||||
|
||||
Two new GL rendering commands are added. The following commands are
|
||||
sent to the server as part of a glXRender request:
|
||||
|
||||
FogCoordfvEXT
|
||||
2 8 rendering command length
|
||||
2 4124 rendering command opcode
|
||||
4 FLOAT32 v[0]
|
||||
|
||||
FogCoorddvEXT
|
||||
2 12 rendering command length
|
||||
2 4125 rendering command opcode
|
||||
8 FLOAT64 v[0]
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_ENUM is generated if FogCoordPointerEXT parameter <type> is
|
||||
not FLOAT or DOUBLE.
|
||||
|
||||
INVALID_VALUE is generated if FogCoordPointerEXT parameter <stride>
|
||||
is negative.
|
||||
|
||||
New State
|
||||
|
||||
(table 6.5, p. 195)
|
||||
Get Value Type Get Command Initial Value Description Sec Attribute
|
||||
--------- ---- ----------- ------------- ----------- --- ---------
|
||||
CURRENT_FOG_COORDINATE_EXT R GetIntegerv, 0 Current 2.7 current
|
||||
GetFloatv fog coordinate
|
||||
|
||||
(table 6.6, p. 197)
|
||||
Get Value Type Get Command Initial Value Description Sec Attribute
|
||||
--------- ---- ----------- ------------- ----------- --- ---------
|
||||
FOG_COORDINATE_ARRAY_EXT B IsEnabled False Fog coord array enable 2.8 vertex-array
|
||||
FOG_COORDINATE_ARRAY_TYPE_EXT Z8 GetIntegerv FLOAT Type of fog coordinate 2.8 vertex-array
|
||||
FOG_COORDINATE_ARRAY_STRIDE_EXT Z+ GetIntegerv 0 Stride between fog coords 2.8 vertex-array
|
||||
FOG_COORDINATE_ARRAY_POINTER_EXT Y GetPointerv 0 Pointer to the fog coord array 2.8 vertex-array
|
||||
|
||||
|
||||
(table 6.8, p. 198)
|
||||
Get Value Type Get Command Initial Value Description Sec Attribute
|
||||
--------- ---- ----------- ------------- ----------- --- ---------
|
||||
FOG_COORDINATE_SOURCE_EXT Z2 GetIntegerv, FRAGMENT_DEPTH_EXT Source of fog 3.10 fog
|
||||
GetFloatv coordinate for
|
||||
fog calculation
|
||||
|
||||
Revision History
|
||||
|
||||
* Revision 1.6 - Functionality complete
|
||||
|
||||
* Revision 1.7-1.9 - Fix typos and add fields to bring up to date with
|
||||
the new extension template. No functionality changes.
|
||||
@@ -0,0 +1,88 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Promoting OpenGL Extensions</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Promoting OpenGL Extensions</h1>
|
||||
|
||||
<p> <i>Promoting</i> an extension refers to moving it from single-vendor
|
||||
to multi-vendor or ARB-approved status, usually by changing the vendor
|
||||
tag attached to the extension name string, enumerants and API entry
|
||||
points. This is sometimes done when an extension is successful and more
|
||||
licensees want to support it. This document describes the steps to
|
||||
follow when promoting an extension.
|
||||
|
||||
<h3>Is Promotion Required?</h3>
|
||||
|
||||
<p> Changing the names creates a significant burden for ISVs supporting
|
||||
the existing extension. It should not be done gratuitously; if the
|
||||
existing interface is sufficient, there's no inherent reason an
|
||||
implementation shipped by one vendor cannot advertise and support an
|
||||
extension using another vendor's prefix.
|
||||
|
||||
<p> If you do this, make <b>certain</b> that the original vendor agrees
|
||||
to freeze the definition of the extension, and that what you ship is
|
||||
identical in behavior to what the original vendor is shipping. Shipping
|
||||
what appears to be the "same" extension while implementing different
|
||||
behavior on multiple platforms is a great disservice to ISVs trying to
|
||||
use extensions, and to OpenGL in general.
|
||||
|
||||
<p> <b>Do not</b>, under any circumstances, ship an extension defined by
|
||||
another vendor without first clearing it with that vendor.
|
||||
|
||||
|
||||
<h3>Promoting Without Changes in Behavior</h3>
|
||||
|
||||
<p> If you nevertheless want to promote an extension from
|
||||
vendor-specific to e.g. <tt>EXT</tt> status, without changing the
|
||||
behavior or definition of that extension, then advertise and export
|
||||
<b>both</b> the old and the new forms of the extension for maximum
|
||||
backwards compatibility. This means that:
|
||||
|
||||
<ul>
|
||||
<li>Both extensions strings should be included in the
|
||||
<tt>GL_EXTENSIONS</tt> string query (or the corresponding
|
||||
WGL/GLX query, if it extends those APIs).
|
||||
<li>All enumerants should exist in both
|
||||
<tt>GL_<i>VENDOR</i>_ENUM_NAME</tt> and
|
||||
<tt>GL_EXT_ENUM_NAME</tt> forms, with the same values.
|
||||
<li>All entry points should exist in both
|
||||
<b>glExtensionName<i>Vendor</i></b> and
|
||||
<b>glExtensionNameEXT</b> forms, resolving to the same code.
|
||||
<li>For an extension supported under GLX, the same GLX protocol
|
||||
should be generated no matter whether the vendor or <tt>EXT</tt>
|
||||
version of the extension is called.
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Promoting With Changes in Behavior</h3>
|
||||
|
||||
<p> If you are promoting an extension while changing its definition or
|
||||
behavior, <b>do not</b> treat it as identical to the old extension. This
|
||||
means that:
|
||||
|
||||
<ul>
|
||||
<li>Any new <tt>EXT</tt> enumerants which differ in definition from
|
||||
the original <tt><i>VENDOR</i></tt> enumerants should be assigned new
|
||||
values, and those values registered with SGI.
|
||||
<li>All new <b>EXT</b> entry points should resolve to different code
|
||||
in the GL client library than the original <b><i>Vendor</i></b>
|
||||
extension entry points.
|
||||
<li>For an extension supported under GLX, different GLX protocol
|
||||
requests should be generated for the two extensions, so
|
||||
they can be distinguished on the server side.
|
||||
</ul>
|
||||
|
||||
<p> None of this should be taken to indicate that code cannot be shared
|
||||
between implementations of the old and new extensions; simply that the
|
||||
implementation must be able to distinguish whether the old or new form
|
||||
is being called, since they are de facto different extensions despite
|
||||
sharing similar purposes.
|
||||
|
||||
<hr>
|
||||
|
||||
<p> Last modified April 5, 1999 Jon Leech
|
||||
</body>
|
||||
</html>
|
||||
+538
@@ -0,0 +1,538 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>How to Create Khronos API Extensions</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>How to Create Khronos API Extensions</h1>
|
||||
|
||||
<p> This document outlines the steps to create, define, and use
|
||||
an extension for some of the APIs supported by Khronos. It
|
||||
is currently focused on OpenGL, OpenGL ES, GLX, and EGL.
|
||||
Some discussion of OpenVG and WGL is also included.
|
||||
|
||||
<ul>
|
||||
<li><a href="#spec">Specifying</a> an extension prior to coding it.
|
||||
<li><a href="#implementation">Implementing</a> an extension (this
|
||||
discusses only aspects of the implemention visible to users -
|
||||
primarily determining if the extension is available and
|
||||
defining its interface in header files.
|
||||
<li><a href="#using">Using</a> an extension in an application (this
|
||||
discusses the mechanics of using an extension if and only if
|
||||
it's supported by an implementation).
|
||||
</ul>
|
||||
|
||||
<p><hr>
|
||||
|
||||
<a name="spec"></a>
|
||||
<h2>Specification</h2>
|
||||
|
||||
<p> When initially creating an extension, take the following steps:
|
||||
|
||||
<ul>
|
||||
<li><a href="#spec_existing">Determine if an existing extension</a>
|
||||
can be used, instead of writing a new one. This may involve
|
||||
reuse of an existing specification, or
|
||||
<a href="promoting.html">promotion</a> to multivendor or
|
||||
Khronos-approved status. In either case, coordinate this use
|
||||
with the vendor(s) defining and shipping the existing extension.
|
||||
<li>If no suitable extension already exists, determine if you can
|
||||
<a href="#spec_category">agree on a multivendor or Khronos
|
||||
extension</a>, or if the extension must be specific to a single
|
||||
vendor.
|
||||
<li>Develop and <a href="#spec_writing">write an extension
|
||||
specification</a>, following the <a href="#spec_naming">naming
|
||||
conventions</a>.
|
||||
<li>When you're ready to release the extension, freeze the
|
||||
specification and <a href="#spec_registry">add it to the
|
||||
registry</a> maintained by Khronos. At this time (but not
|
||||
before), you can obtain permanent token (enumerant) assignments.
|
||||
<li>When shipping an extension, make sure that its interfaces are
|
||||
defined in header files accessible to ISVs. If the extension is
|
||||
Khronos-approved, use the Khronos-provided headers.
|
||||
</ul>
|
||||
|
||||
<a name="spec_existing"></a>
|
||||
<h3>Is there already an extension that does what I want?</h3>
|
||||
|
||||
<p> Specifications for extensions that have already been developed can
|
||||
be obtained from the <a href="http://opengl.org/registry/"> Extension
|
||||
Registry</a> maintained by Khronos. Since we are just getting started
|
||||
with most of the Khronos APIs, the registry currently contains only
|
||||
OpenGL, GLX, and WGL extension specifications.
|
||||
|
||||
<p> It's possible that additional extensions may have been submitted to
|
||||
the registry but not yet updated on the website, or that another
|
||||
licensee may be working on a similar extension but not yet have released
|
||||
the specification. So it's worth asking on the appropriate Working
|
||||
Group mailing list if anyone has defined related functionality already.
|
||||
|
||||
<a name="spec_category"></a>
|
||||
<h3>Should the extension be Khronos-approved, multivendor, or specific
|
||||
to a single vendor?</h3>
|
||||
|
||||
<p> OpenGL's history has made clear that ISVs do <b>not</b> want to deal
|
||||
with vendor-specific extensions if they can possibly avoid it. So if
|
||||
the functionality being exposed is going to be available on multiple
|
||||
platforms - as most will - it's a good idea to agree on a single
|
||||
extension with other vendors providing that functionality. This
|
||||
makes it easier for ISVs to justify using extensions.
|
||||
|
||||
<p> If the functionality is well-understood, it may be appropriate to
|
||||
define a <b>Khronos-approved extension</b>. This is the most
|
||||
"blessed" category of extension; it goes through the
|
||||
entire standards process, and is approved by the group, but remains
|
||||
optional functionality. Many core features have been promoted
|
||||
directly from existing Khronos-approved extensions.
|
||||
|
||||
<p> If Khronos as a whole isn't ready to deal with the extension, but
|
||||
other vendors are, then it should be defined as a <b>multivendor
|
||||
extension</b>. The interested parties can develop the specification
|
||||
entirely among themselves, outside the standards process; or they
|
||||
may be able to use Khronos Working Groups as a forum to develop the
|
||||
specification.
|
||||
|
||||
<p> In some cases, vendors may share a common core of functionality,
|
||||
with vendor-specific additional features. Here, it may make sense to
|
||||
agree on a multivendor extension to access the core, with additional
|
||||
vendor-specific extensions layered on the core exposing unique
|
||||
features.
|
||||
|
||||
<p> Finally, some extensions will probably have to remain proprietary.
|
||||
|
||||
<a name="spec_writing"></a>
|
||||
<h3>How do I write a specification?</h3>
|
||||
|
||||
<p> Start with the <a href="template.txt">template</a> for writing
|
||||
extension specifications. There are different templates for
|
||||
different APIs, but general comments apply:
|
||||
|
||||
<ul>
|
||||
<li> It's important to think about all the different areas of the core
|
||||
language specification(s) that are affected. How are queries for
|
||||
state handled? What attribute group does new state belong in? How
|
||||
are existing calls modified or expanded in scope? How are existing
|
||||
objects affected by use of the extension? The template helps with
|
||||
this by at least reminding you to consider each part of the core
|
||||
language specification.
|
||||
<li> Extension specifications must be written against a specific version
|
||||
of the core API specification. If possible, it's highly preferable
|
||||
to write against the most recent public version. "Written
|
||||
against" means that new language must be written as
|
||||
well-defined modifications to the Specification being referenced. It
|
||||
should be possible for someone not involved with the development of
|
||||
an extension to sit down with a copy of the Specification and the
|
||||
extension and produce a merged document identical to that you
|
||||
intended.
|
||||
<li> Extension specifications may also be specified as Docbook XML
|
||||
documents, although we're still using plain text for the most part.
|
||||
Docbook is a very powerful structural representation of documents,
|
||||
but we're still feeling our way into using it. Known <a
|
||||
href="toolchain.html">Docbook tools and editors</a> are described
|
||||
elsewhere.
|
||||
</ul>
|
||||
|
||||
<p> One complete, shipping example to refer to is the
|
||||
<a href="../specs/EXT/fog_coord.txt">Fog Coordinate</a> OpenGL extension
|
||||
specification.
|
||||
<!-- (<a href="fog_coord.xml">Docbook source</a>). -->
|
||||
|
||||
<a name="spec_naming"></a>
|
||||
<h3>Naming Conventions</h3>
|
||||
|
||||
<p> API entry points and enumerants in an extension must be named
|
||||
according to the <a href="syntaxrules.txt">syntax rules</a> specific to
|
||||
that API. In particular, follow the sections "Extension name
|
||||
rules" and "Shared extensions".
|
||||
|
||||
<p> All extensions must be named and the name included in the extension
|
||||
specification. The extension name is of the form
|
||||
<tt>"api_category_name"</tt> where
|
||||
|
||||
<ul>
|
||||
<li> <tt>"api"</tt> identifies the API
|
||||
(<tt>"GL"</tt> for OpenGL and OpenGL ES;
|
||||
<tt>"EGL"</tt>, <tt>"GLX"</tt>, and
|
||||
<tt>"WGL"</tt> for the corresponding window-system
|
||||
abstraction APIs EGL, GLX, and WGL; <tt>"GLU"</tt> for the
|
||||
OpenGL Utility Library; and <tt>"OVG"</tt> for OpenVG.
|
||||
|
||||
(<b>Note</b>: OpenMAX, OpenSL, OpenML TBD).
|
||||
|
||||
<li> <tt>"category"</tt> identifies the extension category.
|
||||
For a vendor-specific extension, the category is a 2-3 letter string
|
||||
identifying the vendor: <tt>"NV"</tt> for NVIDIA,
|
||||
<tt>"ATI"</tt> for ATI, etc. For a multivendor extensions,
|
||||
the category is <tt>"EXT"</tt>. For Khronos-approved
|
||||
extensions, one of several API-specific categories is used
|
||||
(<tt>"ARB"</tt> for OpenGL extensions,
|
||||
<tt>"OES"</tt> for OpenGL ES extensions,
|
||||
<tt>"OML"</tt> for OpenML extensions, and so on).
|
||||
|
||||
<li> <tt>"name"</tt> is one or more words separated by
|
||||
underscores, providing a short label for the extension.
|
||||
Conventionally the name is entirely lower-case.
|
||||
</ul>
|
||||
|
||||
<p> For example, the extension name
|
||||
<tt>"GL_EXT_framebuffer_object"</tt> is used for a
|
||||
multivendor OpenGL extension adding support for framebuffer objects.
|
||||
|
||||
<p> Choose names that are
|
||||
|
||||
<ul>
|
||||
<li> Short.
|
||||
<li> Meaningful.
|
||||
<li> Not prefixes of any existing extension name (disregarding the
|
||||
category). For example, <tt>"GL_ARB_fog"</tt> is a prefix
|
||||
of <tt>"GL_EXT_fog_coord"</tt>, so should not be chosen.
|
||||
<li> Not prefixed by any existing extension name (again, disregarding
|
||||
the category).
|
||||
</ul>
|
||||
|
||||
<p> The goal is for names to be clear, but not at the cost of confusion
|
||||
or ambiguity.
|
||||
|
||||
|
||||
<h4> Advertising Extension Names to Applications </h4>
|
||||
|
||||
<p> Each Khronos API provides a way of describing the supported
|
||||
extensions at compile- and run-time. This is done by a combination
|
||||
of preprocessor tokens in header files, and queryable extension
|
||||
strings.
|
||||
|
||||
<p> <b>OpenGL and OpenGL ES</b> #define a preprocessor token
|
||||
corresponding to the extension name in <tt><GL/gl.h></tt> (or
|
||||
an include file that <tt>gl.h</tt> includes, such as the
|
||||
<tt>glext.h</tt> header provided in the registry). When this token
|
||||
is defined, it indicates that the function prototypes and enumerant
|
||||
definitions required to use the extension are available at compile
|
||||
time.
|
||||
|
||||
<p> If an OpenGL or OpenGL ES extension is supported at runtime, the
|
||||
extension name must also be included in the string returned by
|
||||
<tt>glGetString(GL_EXTENSIONS)</tt>.
|
||||
|
||||
<p> <b>GLX</b> #defines a preprocessor token corresponding to the
|
||||
extension name in <tt><GL/glx.h></tt> (or an include file that
|
||||
<tt>glx.h</tt> includes, such as the <tt>glxext.h</tt> header
|
||||
provided in the registry). When this token is defined, it indicates
|
||||
that the function prototypes and enumerant definitions required to
|
||||
use the extension are available at compile time.
|
||||
|
||||
<p> If a GLX extension is supported at runtime, the extension name must
|
||||
also be included in the strings returned by
|
||||
<b>glXQueryExtensionsString</b>, <b>glXGetClientString</b>, and/or
|
||||
<b>glXQueryServerString</b> (see below for a description of the
|
||||
different routines).
|
||||
|
||||
<p> <b>WGL</b> #defines a preprocessor token corresponding to the
|
||||
extension name in the <tt>wglext.h</tt> header provided in the
|
||||
registry (the wgl.h supplied with Microsoft Windows does not
|
||||
#include <tt>wglext.h</tt>, or define any extensions itself). When
|
||||
this token is defined, it indicates that the function prototypes and
|
||||
enumerant definitions required to use the extension are available at
|
||||
compile time.
|
||||
|
||||
<p> If a WGL extension is supported at runtime, the extension name must
|
||||
also be included in the string returned by
|
||||
<b>wglGetExtensionsStringEXT</b>.
|
||||
|
||||
<p> <b>OpenVG</b> extension conventions are <i>To Be Determined</i>.
|
||||
|
||||
<p> Note that extensions can have both OpenGL components and windowing
|
||||
system components. For example, the ARB multisampling extension
|
||||
modifies both GLX and OpenGL. In this case there will be two tokens
|
||||
associated with the extension (e.g., <tt>GL_ARB_multisample</tt> and
|
||||
<tt>GLX_ARB_multisample</tt>) and the extension will be advertised
|
||||
by both OpenGL and GLX.
|
||||
|
||||
<a name="spec_registry"></a>
|
||||
<h3>Extension Registry</h3>
|
||||
|
||||
<p> Khronos keeps a registry of extension specifications, enumerated
|
||||
type values, GLX codes (vendor private opcodes, vendor private with
|
||||
reply opcodes, new visual attribute type values, GLX error codes and
|
||||
GLX event codes), OpenGL rendering codes for GLX, and OpenGL
|
||||
rendering codes for GLS and extension numbers. Vendors shipping
|
||||
extensions using any of these values must obtain them from Khronos.
|
||||
|
||||
<p> If an extension defines new OpenGL enumerant names, values for those
|
||||
names must be requested in one or more blocks of 16 values. If an
|
||||
extension defines new OpenGL rendering commands then you need to
|
||||
register GLS rendering codes for it. If you want the extensions to
|
||||
work with the X windowing system (i.e., with GLX), then you must
|
||||
request GLX opcodes and define GLX protocol for it.
|
||||
|
||||
<p> There are detailed <a href="enums.html">enumerant allocation
|
||||
policies</a> for OpenGL, GLX, and WGL enumerants.
|
||||
|
||||
<p> All new extensions must have a number associated with them for
|
||||
documentation purposes. If an extension depends on another
|
||||
extension, the other extension must have a lower number. (Note that
|
||||
when an extension is deprecated, the number associated with it is
|
||||
not reassigned.) This number will also be assigned by Khronos when
|
||||
you register the extension.
|
||||
|
||||
<p> Include all new enumerated values, GLX codes, and the extension
|
||||
number in the specification.
|
||||
|
||||
<p> Once you have completed the extension, please make it available to
|
||||
other Khronos members and application developers, by submitting the
|
||||
extension specification to the Khronos Registrar for inclusion in
|
||||
the public registry.
|
||||
|
||||
<p><hr>
|
||||
|
||||
<a name="implementation"></a>
|
||||
<h2>Implementing and Advertising Extensions</h2>
|
||||
|
||||
<h4><u>Errors</u></h4>
|
||||
|
||||
<p> Whenever possible, extensions should use existing errors instead of
|
||||
defining new error returns. For GLX, if a new protocol error is
|
||||
introduced, then an error number must be obtained from and
|
||||
registered with Khronos.
|
||||
|
||||
<p> Vendors may ship a single OpenGL library, containing extensions, for
|
||||
a variety of platforms. It is possible that some of the extension
|
||||
routines defined in the library may not be supported on some of the
|
||||
platforms. If this is the case and an application calls a routine
|
||||
that is not supported by the current OpenGL renderer then a
|
||||
<tt>GL_INVALID_OPERATION</tt> error should be returned.
|
||||
|
||||
<h4><u>OpenGL Extension Availability</u></h4>
|
||||
|
||||
<p> OpenGL extensions must be advertised in the extension string
|
||||
returned by <b>glGetString</b>. Note that in a client-server
|
||||
environment, this call returns the set of extensions that can be
|
||||
supported on the connection. GLX client libraries must send a
|
||||
<b>glXClientInfo</b> request to the server at start up time (if the
|
||||
client libarary is 1.1 or later) indicating the version of the
|
||||
client library and the OpenGL extensions that it supports. Then,
|
||||
when <b>glGetString</b> is called, the client issues a GetString
|
||||
request. The server intersects the set of extensions that the client
|
||||
supports with the set of extensions that it supports (if a
|
||||
<b>glXClientInfo</b> request was never received then the server
|
||||
assumes that the client supports no OpenGL extensions) and returns
|
||||
the result to the client. The client library then appends any
|
||||
client-side only extensions to the list and returns the result.
|
||||
|
||||
<p> Extension names for all known OpenGL extensions are #defined in the
|
||||
<tt>glext.h</tt> header included in the registry.
|
||||
|
||||
<h4><u>EGL Extension Availability</u></h4>
|
||||
|
||||
<p> EGL extensions must be advertised in the extension string returned
|
||||
by <tt>eglQueryString(EGL_EXTENSIONS)</tt>. Extension names for all
|
||||
known EGL extensions are #defined in the <tt>eglext.h</tt> header
|
||||
included in the registry.
|
||||
|
||||
<h4><u>GLX Extension Availability</u></h4>
|
||||
|
||||
<p> GLX client-side extensions must be advertised in the extension
|
||||
string returned by <b>glXGetClientString</b>; server-side extensions
|
||||
must be advertised in the extension string returned by
|
||||
<b>glXQueryServerString</b>.
|
||||
|
||||
<p> <b>glXQueryExtensionsString</b> returns the list of extensions that
|
||||
can be supported on the connection. The client then issues a
|
||||
<b>glXQueryServerString</b> request, intersects the returned string
|
||||
with the set of extensions it can support and then appends any
|
||||
client-side only extensions to the list.
|
||||
|
||||
<p> Extension names for all known GLX extensions are #defined in the
|
||||
<tt>glxext.h</tt> header included in the registry.
|
||||
|
||||
<h4><u>WGL Extension Availability</u></h4>
|
||||
|
||||
<p> WGL initially had no mechanism for returning its own extensions
|
||||
string. For this reason, WGL extension names were initially
|
||||
advertised in the GL extensions string returned by
|
||||
<b>glGetString</b>. With the creation of a more formal WGL extension
|
||||
mechanism, all implementations offering WGL extensions should export
|
||||
the <tt>WGL_EXT_extensions_string</tt> extension, and should
|
||||
advertise WGL extensions in the extensions string returned by the
|
||||
<b>wglGetExtensionsStringEXT</b> interface defined by
|
||||
<tt>WGL_EXT_extensions_string</tt>, as well as via
|
||||
<b>glGetString</b>, for compatibility with older programs.</p>
|
||||
|
||||
<p> Extension names for all known WGL extensions are #defined in the
|
||||
<tt>wglext.h</tt> header included in the registry.
|
||||
|
||||
<p><hr>
|
||||
|
||||
<a name="using"></a>
|
||||
<h2>Use of Extensions</h2>
|
||||
|
||||
<h4><u>Using OpenGL Extensions</u></h4>
|
||||
|
||||
<p> Programmers that wish to use a particular OpenGL extension should
|
||||
check both compile-time defines (to ensure that the extension is
|
||||
supported by the library they are compiling against) and the
|
||||
extension string returned by <b>glGetString</b> (to ensure that the
|
||||
renderer supports the extension). For Windows, extensions usually
|
||||
are not defined at link time, and function pointers to extension
|
||||
APIs should be obtained by calling <b>wglGetProcAddress</b>.
|
||||
|
||||
<p> For example, the following code could be used to check whether the
|
||||
renderer supports an OpenGL extension called
|
||||
<tt>GL_EXT_new_extension</tt>. This code would need to be executed
|
||||
after the context had been made current:
|
||||
|
||||
<blockquote><pre><tt>
|
||||
static GLboolean CheckExtension(char *extName, const char *extString)
|
||||
{
|
||||
/*
|
||||
** Search for extName in the extensions string. Use of strstr()
|
||||
** is not sufficient because extension names can be prefixes of
|
||||
** other extension names. Could use strtok() but the constant
|
||||
** string returned by glGetString can be in read-only memory.
|
||||
*/
|
||||
char *p = (char *)extString;
|
||||
char *end;
|
||||
int extNameLen;
|
||||
|
||||
extNameLen = strlen(extName);
|
||||
end = p + strlen(p);
|
||||
|
||||
while (p < end) {
|
||||
int n = strcspn(p, " ");
|
||||
if ((extNameLen == n) && (strncmp(extName, p, n) == 0)) {
|
||||
return GL_TRUE;
|
||||
}
|
||||
p += (n + 1);
|
||||
}
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
const GLubyte *ext_string;
|
||||
int new_ext_supported = GL_FALSE;
|
||||
|
||||
if (CheckExtension("GL_EXT_new_extension", glGetString(GL_EXTENSIONS)))
|
||||
new_ext_supported = GL_TRUE;
|
||||
</tt></pre></blockquote>
|
||||
|
||||
<p> If the renderer supports the extension, then it is safe to use it at
|
||||
runtime. (Note that in a client-server environment,
|
||||
<b>glGetString</b> will only return the set of extensions that can
|
||||
be supported by the client and server.) However, compile time checks
|
||||
must be made to ensure that the library that you are linked against
|
||||
supports the extension. For example:
|
||||
|
||||
<blockquote><pre><tt>
|
||||
#ifdef GL_EXT_new_extension
|
||||
if (new_ext_supported)
|
||||
glNewExtensionEXT()
|
||||
#endif
|
||||
</tt></pre></blockquote>
|
||||
|
||||
<p> For a Windows OpenGL implementation, extensions are usually
|
||||
dynamically loaded from the device driver, rather than statically
|
||||
linked. Function pointers to extension APIs are obtained from
|
||||
<b>wglGetProcAddress</b> and use to invoke the extension. For
|
||||
example:
|
||||
|
||||
<blockquote><pre><tt>
|
||||
typedef void (WINAPI *PFNGLNEWEXTENSIONEXTPROC)();
|
||||
PFNGLNEWEXTENSIONEXTPROC *glNewExtensionEXT = NULL;
|
||||
|
||||
/* Do this once, after context creation */
|
||||
#ifdef GL_EXT_new_extension
|
||||
if (new_ext_supported)
|
||||
glNewExtensionEXT = (PFNGLNEWEXTENSIONEXTPROC)
|
||||
wglGetProcAddress("glNewExtensionEXT");
|
||||
#endif
|
||||
|
||||
/* Do this when calling the extension */
|
||||
#ifdef GL_EXT_new_extension
|
||||
if (new_ext_supported)
|
||||
(*glNewExtensionEXT)();
|
||||
#endif
|
||||
</tt></pre></blockquote>
|
||||
|
||||
<h4><u>Using EGL Extensions</u></h4>
|
||||
|
||||
<p> Before using an EGL extension, check for the extension name in both
|
||||
the compile-time #defines and the extension string returned by
|
||||
<tt>eglGetString(EGL_EXTENSIONS)</tt>. For example, this code could
|
||||
be used to check whether an extension called
|
||||
<tt>EGL_OES_new_extension</tt> can be used.
|
||||
|
||||
<blockquote><pre><tt>
|
||||
EGLDisplay dpy; // Initialized elsewhere
|
||||
int new_ext_supported = FALSE;
|
||||
|
||||
if (CheckExtension("EGL_OES_new_extension",
|
||||
eglGetString(display, EGL_EXTENSIONS));
|
||||
new_ext_supported = TRUE;
|
||||
#endif
|
||||
</tt></pre></blockquote>
|
||||
|
||||
<p> If the extension is supported, then it is safe to use it at runtime.
|
||||
However, compile time checks must be made to ensure that you can
|
||||
call the extension. For example:
|
||||
|
||||
<blockquote><pre><tt>
|
||||
#ifdef EGL_OES_new_extension
|
||||
if (new_ext_supported)
|
||||
eglNewExtensionEXT(...);
|
||||
#endif
|
||||
</tt></pre></blockquote>
|
||||
|
||||
<h4><u>Using GLX Extensions</u></h4>
|
||||
|
||||
<p> Before using a GLX extension, programmers should check the compile
|
||||
time defines and the extension string returned by
|
||||
<b>glXQueryExtensionsString</b>.
|
||||
|
||||
<p> The following code could be used to check whether an extension
|
||||
called <tt>GLX_EXT_new_extension</tt> can be used on the connection.
|
||||
This code would be executed after the connection had been opened and
|
||||
the existence of the GLX extension had been established.
|
||||
|
||||
<blockquote><pre><tt>
|
||||
Display *dpy;
|
||||
int new_ext_supported = GL_FALSE;
|
||||
int major, minor, screen;
|
||||
|
||||
if (!glXQueryVersion(dpy, &major, &minor))
|
||||
exit(1);
|
||||
screen = DefaultScreen(dpy);
|
||||
|
||||
#ifdef GLX_VERSION_1_1
|
||||
if (minor > 0 || major > 1)
|
||||
if (CheckExtension("GLX_EXT_new_extension",
|
||||
glXQueryExtensionsString(dpy, screen)))
|
||||
new_ext_supported = GL_TRUE;
|
||||
#endif
|
||||
</tt></pre></blockquote>
|
||||
|
||||
<p> If the extension is supported on the connection, then it is safe to
|
||||
use it at runtime. However, compile time checks must be made to
|
||||
ensure that the library that you are linked against supports the
|
||||
extension. For example:
|
||||
|
||||
<blockquote><pre><tt>
|
||||
#ifdef GLX_EXT_new_extension
|
||||
if (new_ext_supported)
|
||||
glXNewExtensionEXT(...);
|
||||
#endif
|
||||
</tt></pre></blockquote>
|
||||
|
||||
<h4><u>Using WGL Extensions</u></h4>
|
||||
|
||||
<p> Before using a WGL extension, check for its presence in the WGL
|
||||
extensions string. Note that the WGL extension string query is
|
||||
itself an extension; if not supported, WGL extensions are also
|
||||
advertised in the base GL extensions string.
|
||||
|
||||
<p> <i>Code snippet should go here</i>
|
||||
|
||||
<p> <hr>
|
||||
|
||||
<p> Last modified August 13, 2006 by Jon Leech
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,758 @@
|
||||
Syntax Rules for OpenGL Extensions
|
||||
|
||||
Based on a version edited by Kurt Akeley on September 10, 2003.
|
||||
Updates proposed by Eskil Steenberg, May 2006.
|
||||
Revised by Benj Lipchak under the direction of the Ecosystem TSG, December 2006.
|
||||
|
||||
|
||||
Reserved terms
|
||||
--------------
|
||||
|
||||
** NOTE **
|
||||
Whereas some of the other rules in subsequent sections of this document
|
||||
are intended to be strictly adhered to, this section is intended as a
|
||||
set of guidelines to assist in name decisions. The guidelines should
|
||||
be considered, and then accepted or rejected, on a case by case basis.
|
||||
** NOTE **
|
||||
|
||||
The terms used in OpenGL should have a consistent meaning. Any time
|
||||
new functionality is introduced it is desired to use terms that are
|
||||
previously established in GL. If no term exists that fits with the
|
||||
new functionality, a new term may be used. Whenever a new term is used,
|
||||
the precise meaning of that term should be specified and added to this
|
||||
text so that future functionality has the option of reusing the term
|
||||
with a consistent meaning.
|
||||
|
||||
A term in GL should encompass more then the meaning of the word found
|
||||
in a dictionary. It should encompass limitations and usages and give the
|
||||
reader a broader sense of the usage of the word in the context of OpenGL.
|
||||
|
||||
When choosing new words one should always name it for what it does and
|
||||
never name it for its intended usage. In a general programmable
|
||||
environment the naming should not suggest usage.
|
||||
|
||||
It is desired to keep data and the usage of data separated in the name
|
||||
space. "image" data can be used for "texturing." The two should not be
|
||||
named the same. This maintains consistency if in some future version
|
||||
something other than an image can be used for texturing, or if an image
|
||||
can be used for something other then texturing. This is why it is
|
||||
strongly encouraged to name any storage class for what it stores, not the
|
||||
usage of the data.
|
||||
|
||||
Whenever a procedure sets the state that is directly associated with
|
||||
something that can be found in the language grammar, it is preferred to
|
||||
use terms from the language like "attribute," "uniform" or "texture."
|
||||
|
||||
|
||||
1: Asking for information
|
||||
|
||||
"Get" is used as a prefix whenever the procedure returns state from the GL.
|
||||
|
||||
|
||||
2: Storage
|
||||
|
||||
"Create" is used for any procedure that creates an object. No other
|
||||
creations should be named "create."
|
||||
|
||||
"Delete" is used for any procedure that marks an object for
|
||||
destruction. No other destructions should be named "delete."
|
||||
|
||||
|
||||
4: Object content
|
||||
|
||||
TBD: Names must be chosen.
|
||||
|
||||
|
||||
5: Types of state setting
|
||||
|
||||
"Pname" is used to define what a subsequent parameter refers to. Pname
|
||||
is always followed by a "param."
|
||||
|
||||
"Param" is only used when a generic parameter or array of parameters is
|
||||
being passed in.
|
||||
|
||||
"Count" always refers to the length of an array.
|
||||
|
||||
"Size" always refers to size measured in units or number of bytes.
|
||||
|
||||
"Render" refers to the later parts of the pipeline that apply the
|
||||
resulting data of a computation to a storage container. (Examples of
|
||||
operations that can be refered to as rendering are sampling, depth test,
|
||||
blending, and resolve.)
|
||||
|
||||
"Draw" refers to the earlier part of the pipeline when results are
|
||||
being computed.
|
||||
|
||||
|
||||
6: References
|
||||
|
||||
Any time an object is referenced by the context or another object the
|
||||
following words should be used:
|
||||
|
||||
TBD: Names must be chosen.
|
||||
|
||||
|
||||
Accepted terms
|
||||
--------------
|
||||
|
||||
Notes:
|
||||
|
||||
1. Abbreviations are required for all usage unless otherwise noted.
|
||||
|
||||
2. Compound words (e.g. Doublebuffer) must always be used as
|
||||
compounds. Embedded words are not capitalized in function
|
||||
names, and are not separated by underscores in token names.
|
||||
(e.g. Doublebuffer, not DoubleBuffer. DOUBLEBUFFER, not
|
||||
DOUBLE_BUFFER.)
|
||||
|
||||
Exceptions:
|
||||
|
||||
(1) Abbreviation is used in function names, but not in token names.
|
||||
|
||||
(2) Abbreviation is used in token names, but not in function names.
|
||||
|
||||
(3) Abbreviation is used for GL and GL extensions, but not for
|
||||
WGL abbreviations.
|
||||
|
||||
(4) Abbreviation is used only as the last characters of token names
|
||||
that identify packed data types.
|
||||
(E.g. GL_UNSIGNED_BYTE_2_3_3_REV)
|
||||
|
||||
(5) Abbreviation is used only in interleaved vertex array token names.
|
||||
(e.g. GL_T4F_C4F_N3F_V4F)
|
||||
|
||||
(6) Abbreviation is used only for specific operations, such as
|
||||
logical operations (Logic Op) or stencil operations (Stencil Op).
|
||||
Abbreviation is not used for generic operations (e.g. Invalid
|
||||
Operation).
|
||||
|
||||
|
||||
|
||||
Abbrev. Term or phrase Specification(s) used in
|
||||
------- -------------- ------------------------
|
||||
Access 28
|
||||
Accum Accumulation Buffer GL, 9
|
||||
Active GL, 15
|
||||
Add GL, 6, 17
|
||||
Address 2, 26
|
||||
Aliased GL
|
||||
Alignment GL
|
||||
All GL
|
||||
Alpha GL, 5, 9, 12, 17
|
||||
Always GL
|
||||
Ambient GL
|
||||
ASCII American Standard ... 26, 27
|
||||
And GL
|
||||
Are GL
|
||||
ALU Arithmetic Logic Unit 27
|
||||
Array GL, 15, 16, 26, 28
|
||||
Attenuation GL, 14
|
||||
Attrib Attribute GL, 9, 20, 26, 27, 28
|
||||
Auto Automatic GL
|
||||
Aux Auxiliary GL, 9, 20
|
||||
Back GL, 20
|
||||
Base GL
|
||||
Begin GL
|
||||
Bias GL
|
||||
Bind GL, 20, 26, 27, 28
|
||||
Binding GL, 7, 26, 27, 28
|
||||
Bit GL, 9
|
||||
Bitfield GL
|
||||
Bitmap GL, 9
|
||||
Blend GL, 15
|
||||
Blue GL, 9
|
||||
BGR Blue Green Red GL
|
||||
BGRA Blue Green Red Alpha GL
|
||||
Boolean GL
|
||||
Border GL, 13
|
||||
Box GL
|
||||
Buffer GL, 4, 5, 9, 11, 28
|
||||
Byte GL
|
||||
Call GL
|
||||
Care GL
|
||||
Choose 9
|
||||
Clamp GL, 13
|
||||
Clear GL
|
||||
Client GL
|
||||
Clip Clipping GL
|
||||
CW Clockwise GL
|
||||
Coeff Coefficient GL
|
||||
C (5) Color GL, 3, 9, 17, 26, 28
|
||||
Index Color Index GL, 9, 28
|
||||
Combine GL, 17
|
||||
Compare GL, 23, 24
|
||||
Compile GL
|
||||
Component GL, 22
|
||||
Compressed GL, 12
|
||||
Compression GL, 12
|
||||
Constant GL, 17
|
||||
Control GL
|
||||
Convolution GL
|
||||
Context 10
|
||||
Coord Coordinate GL, 27
|
||||
Copy GL, 9, 28
|
||||
Correction GL
|
||||
CCW Counter Clockwise GL
|
||||
Coverage GL, 5
|
||||
Cube GL, 7, 20
|
||||
Cube Map 7, 20
|
||||
Cull GL
|
||||
Current GL, 10, 15, 16, 26, 27
|
||||
Cutoff GL
|
||||
Data 28
|
||||
Decal GL
|
||||
Decr Decrement GL
|
||||
Delete GL, 4, 26, 27, 28
|
||||
Density GL
|
||||
Depth GL, 9, 16, 22, 26, 27
|
||||
Dst Destination GL
|
||||
Destroy 11
|
||||
Diffuse GL
|
||||
Dim Dimension GL
|
||||
Direction GL
|
||||
Disable GL, 26
|
||||
List Display List
|
||||
Distance GL, 14
|
||||
Dither GL
|
||||
Dont Do Not GL
|
||||
Domain GL
|
||||
Dot 19
|
||||
Dot3 GL, 19
|
||||
Double GL
|
||||
Doublebuffer GL
|
||||
Draw GL, 9, 11, 28
|
||||
Dynamic 28
|
||||
Edge GL, 28
|
||||
Element GL, 28
|
||||
Emission GL
|
||||
Enable GL, 26
|
||||
Enabled GL
|
||||
End GL
|
||||
Enum Enumerant GL
|
||||
Env Environment GL, 26, 27
|
||||
Equal GL
|
||||
Equation GL
|
||||
Equiv Equivalent GL
|
||||
Error GL, 10, 26, 27
|
||||
Eval Evaluate GL
|
||||
XOR Exclusive OR GL
|
||||
Execute GL
|
||||
Exponent GL
|
||||
Exp Exponential GL
|
||||
Exp2 Exponential Squared GL
|
||||
Extension GL, 5
|
||||
Eye GL
|
||||
Face GL, 20
|
||||
Factor GL
|
||||
Fade GL, 14
|
||||
Fail GL, 24
|
||||
False GL
|
||||
Fan GL
|
||||
Fastest GL
|
||||
Feedback GL
|
||||
Fill GL
|
||||
Filter GL
|
||||
Finish GL
|
||||
First GL
|
||||
Flag GL
|
||||
Flat GL
|
||||
Float GL
|
||||
Flush GL
|
||||
Fog GL, 28
|
||||
Format GL, 9, 12, 20, 26, 27
|
||||
Fragment GL, 27
|
||||
Framebuffer (documentation only)
|
||||
Front GL, 20
|
||||
Frustum GL
|
||||
Func Function GL, 23
|
||||
Gen Generate GL, 26, 27, 28
|
||||
Get GL, 2, 5, 9, 10, 11, 26, 27, 28
|
||||
Granularity GL
|
||||
GL Graphics Library GL
|
||||
Greater GL
|
||||
Gequal Greater than or equal to GL
|
||||
Green GL, 9
|
||||
Grid GL
|
||||
Half GL
|
||||
Height GL, 11
|
||||
Hint GL, 12
|
||||
Histogram GL
|
||||
Identity GL
|
||||
Ignore GL
|
||||
Image GL, 12, 20, 27
|
||||
Incr Increment GL
|
||||
Index 16
|
||||
Indices GL
|
||||
Indirection 27
|
||||
Init Initial GL
|
||||
Init Initialize GL
|
||||
Instruction 26, 27
|
||||
Int (2) Integer GL
|
||||
Intensity GL, 12
|
||||
Interleaved GL
|
||||
Internal GL
|
||||
Interpolate GL, 17
|
||||
Invalid GL, 10
|
||||
Invert GL, 5
|
||||
Inverted GL
|
||||
Is GL, 26, 27, 28
|
||||
Keep GL
|
||||
LSB Least significant bit GL
|
||||
Left GL, 20
|
||||
Length GL, 26, 27
|
||||
Less GL
|
||||
Lequal Less than or equal to GL
|
||||
Level GL, 20
|
||||
LOD Level of Detail GL
|
||||
Light GL
|
||||
Light Model Lighting Model
|
||||
Line GL
|
||||
Linear GL
|
||||
List GL
|
||||
Limit 26, 27
|
||||
Load GL, 3
|
||||
Local GL, 26, 27
|
||||
Logic Op Logical Operation GL
|
||||
Loop GL
|
||||
Luminance GL, 12
|
||||
Mag Magnify GL
|
||||
Make 10
|
||||
Map GL, 7, 20, 28
|
||||
Mapped 3, 28
|
||||
Mask GL
|
||||
Material GL
|
||||
Matrix, Matrices GL, 16, 26, 27
|
||||
Max Maximum GL, 7, 11, 14, 15, 16, 26, 27
|
||||
Memory GL
|
||||
Mesh GL
|
||||
Win Microsoft Windows OS GL
|
||||
Min Minimum GL, 14
|
||||
Minmax Minimum Maximum GL
|
||||
Min Minify GL, 14
|
||||
Minus GL, 17
|
||||
Mirrored GL, 21
|
||||
Mode GL, 22, 23
|
||||
Model GL
|
||||
Modelview GL, 3, 15
|
||||
Modulate GL, 17
|
||||
Mipmap Multim in parvo map GL, 20
|
||||
Multi Multiple GL
|
||||
Mult Multiply GL, 3
|
||||
Multisample GL, 5
|
||||
Name GL
|
||||
Native 26, 27
|
||||
Nearest GL
|
||||
NAND Negated AND GL
|
||||
NOR Negated OR GL
|
||||
Negative GL, 7, 20
|
||||
Nesting GL
|
||||
Never GL
|
||||
New GL
|
||||
Nicest GL
|
||||
No GL, 9, 28
|
||||
Noop No Operation GL
|
||||
None GL
|
||||
N (5) Normal GL, 7, 28
|
||||
Normalize, Normalized GL, 26
|
||||
Notequal GL
|
||||
Num (3) Number Of GL
|
||||
Object GL
|
||||
Of GL
|
||||
Offset GL
|
||||
One GL, 17
|
||||
Only 28
|
||||
Operand GL, 17
|
||||
Op (6) Operation GL
|
||||
Or GL
|
||||
Order GL
|
||||
Ortho Orthographic GL
|
||||
Out GL
|
||||
Overflow GL
|
||||
Pack GL
|
||||
Palette 9, 16
|
||||
Param Parameter GL, 14, 26, 27, 28
|
||||
Pname Parameter Name GL
|
||||
Pass GL
|
||||
Pattern GL
|
||||
Perspective GL
|
||||
Phong GL
|
||||
Pixel GL, 9, 10, 11
|
||||
Pbuffer Pixel Buffer 11, 20
|
||||
Plane GL
|
||||
Point GL, 14, 26
|
||||
Pointer GL, 15, 16, 26, 28
|
||||
Polygon GL
|
||||
Pop GL
|
||||
Position GL
|
||||
Pos (1) Position GL, 25, 26, 27
|
||||
Positive GL, 7, 20
|
||||
Post GL
|
||||
Previous GL, 17
|
||||
Primary GL, 17
|
||||
Prioritize, Priority GL
|
||||
Proc Procedure 2
|
||||
Program 26, 27
|
||||
Projection GL, 3
|
||||
Proxy GL, 7
|
||||
Push GL
|
||||
Quad Quadrilateral GL
|
||||
Quadratic GL
|
||||
Query 11
|
||||
Range GL
|
||||
Raster GL
|
||||
Read GL, 10, 28
|
||||
Rect Rectangle GL
|
||||
Red GL, 9
|
||||
RGB Red Green Blue GL, 12, 17, 19, 20
|
||||
RGBA Red Green Blue Alpha GL, 9, 12, 19, 20
|
||||
Reduce GL
|
||||
Ref Reference GL
|
||||
Reflection GL, 7
|
||||
Region GL, 4
|
||||
Register 26
|
||||
Render GL
|
||||
Renderer GL
|
||||
Repeat GL, 21
|
||||
Replace GL, 17
|
||||
Replicate GL
|
||||
Rescale GL
|
||||
Reset GL
|
||||
Resident GL
|
||||
Return GL
|
||||
Rev (4) Reverse GL
|
||||
Right GL, 20
|
||||
Rotate, Rotated GL
|
||||
Row GL
|
||||
Sample GL, 5
|
||||
Saturate GL
|
||||
Scale, Scaled GL, 17
|
||||
Scissor GL
|
||||
Secondary GL, 28
|
||||
Segment GL
|
||||
Select GL
|
||||
Selection GL
|
||||
Separable GL
|
||||
Separate GL
|
||||
Set (noun only!) GL
|
||||
Shade GL
|
||||
Shade Model Shading Model
|
||||
Shift GL, 9
|
||||
Shininess GL
|
||||
Short GL
|
||||
Side GL, 26
|
||||
Signed GL, 17
|
||||
Single GL
|
||||
Sink GL
|
||||
Size GL, 7, 12, 14, 15, 16, 22, 26, 28
|
||||
Skip GL
|
||||
Smooth GL
|
||||
Src Source GL, 17
|
||||
Specular GL
|
||||
Sphere GL
|
||||
Spot GL
|
||||
Stack GL, 16, 26, 27
|
||||
Start GL
|
||||
State GL
|
||||
Static 28
|
||||
Stencil GL, 9
|
||||
Stereo GL, 9
|
||||
Stipple GL
|
||||
Store GL
|
||||
Stream 28
|
||||
Stride GL, 15, 16, 26
|
||||
String GL, 5, 26, 27
|
||||
Strip GL
|
||||
Sub GL, 12
|
||||
Subtract 17
|
||||
Sub Image 12
|
||||
Subpixel GL
|
||||
Sub Table GL
|
||||
Sum GL, 15, 26
|
||||
Swap GL, 9
|
||||
Table GL
|
||||
Target 20
|
||||
Temporary 26, 27
|
||||
Test GL
|
||||
Tex (1), Texture GL, 3, 7, 12, 17, 18, 20, 22, 23,
|
||||
T(5) 24, 27, 28
|
||||
Threshold GL, 14
|
||||
Through GL
|
||||
To GL, 9, 11, 13, 20, 23
|
||||
Token GL
|
||||
Transfer GL
|
||||
Transform GL
|
||||
Translate, Translated GL
|
||||
Transpose GL, 3, 26, 27
|
||||
Triangle GL
|
||||
True GL
|
||||
Two GL, 26
|
||||
Type GL, 9, 10, 15, 16, 26
|
||||
Under 26, 27
|
||||
Underflow GL
|
||||
Unit GL, 15, 27
|
||||
Unity 15
|
||||
Unmap 28
|
||||
Unpack GL
|
||||
Unsigned GL
|
||||
Ubyte Unsigned Byte GL
|
||||
Uint Unsigned Int GL
|
||||
Ushort Unsigned Short GL
|
||||
Usage 28
|
||||
Valid GL
|
||||
Value GL, 5, 9, 24
|
||||
Vendor GL
|
||||
Version GL
|
||||
V (5) Vertex GL, 15, 26, 28
|
||||
Vertices GL
|
||||
Viewer GL
|
||||
Viewport GL
|
||||
Weight 15, 28
|
||||
Width GL, 11
|
||||
Window GL, 25
|
||||
Wrap GL
|
||||
Write 28
|
||||
Writemask GL
|
||||
Zero GL
|
||||
Zoom GL
|
||||
|
||||
|
||||
|
||||
Abbreviations specifically not allowed
|
||||
--------------------------------------
|
||||
Bgn Begin
|
||||
Mat Matrix
|
||||
Pnt Point
|
||||
Poly Polygon
|
||||
Tri Triangle
|
||||
|
||||
|
||||
|
||||
Used in WGL specs only (or differently)
|
||||
---------------------------------------
|
||||
|
||||
Abbrev. Term or phrase Specification(s) used in
|
||||
------- -------------- ------------------------
|
||||
Acceleration 9
|
||||
Create 4, 11
|
||||
DC ??? 10
|
||||
Declare 11
|
||||
Device 10
|
||||
Exchange 9
|
||||
Full 9
|
||||
Generic 9
|
||||
GDI ??? 9
|
||||
Handle 11
|
||||
HP ??? 11
|
||||
Incompatible 10
|
||||
Largest 11
|
||||
Layer 9
|
||||
Lost 11
|
||||
Method 9
|
||||
Need 9
|
||||
Number Number Of 9
|
||||
OpenGL 9
|
||||
Overlay 9
|
||||
Release 20
|
||||
Restore 4
|
||||
Save 4
|
||||
Share 9
|
||||
Support 9
|
||||
System 9
|
||||
Transparent 9
|
||||
Undefined 9
|
||||
Underlay 9
|
||||
|
||||
|
||||
|
||||
Name rules (for all names)
|
||||
--------------------------
|
||||
|
||||
Always use the specified abbreviations. Never abbreviate terms
|
||||
that are already in the OpenGL API and are not abbreviated. If you
|
||||
add terms to your extensions, abbreviate consistently, maintaining
|
||||
a local version of additions to the list of abbreviations.
|
||||
|
||||
Use Depth, never Z.
|
||||
|
||||
The word "object" should not be used in a function name unless it
|
||||
operates on all object types.
|
||||
|
||||
Longer descriptive names are desired if they are believed to help
|
||||
developers identify the purpose of a name.
|
||||
|
||||
The opposite of "create" is "destroy." "delete" marks an object for
|
||||
later destruction.
|
||||
|
||||
All names should describe what functionality does, never its expected
|
||||
usage.
|
||||
|
||||
Begin each word with a capital letter, except the second word of
|
||||
compound words.
|
||||
|
||||
|
||||
Procedure name rules
|
||||
--------------------
|
||||
|
||||
Never use set, as in SetFeedbackBuffer. Set is implicit, unless
|
||||
otherwise specified.
|
||||
|
||||
Use Verb-noun (DeleteList) and adjective-noun (EdgeFlag) formats.
|
||||
|
||||
Append a corporate-specific suffix to all procedures. For example:
|
||||
glNewCommandSGI. All upper case is preferred for this suffix, but
|
||||
is not required. The suffix is always last, following OpenGL type
|
||||
and count suffixes. (e.g. glNewVertex3iSGI, not glNewVertexSGI3i.)
|
||||
|
||||
|
||||
Definition name rules
|
||||
---------------------
|
||||
|
||||
Use all capital letters.
|
||||
|
||||
Separate words with underscores, except words within compound words.
|
||||
|
||||
Append simple numeric suffixes directly to the end of definition
|
||||
tokens (LIGHT0). Begin these sequences with 0.
|
||||
|
||||
Use an underscore to separate complex suffixes from the token body
|
||||
(MAP_3V).
|
||||
|
||||
Append a corporate-specific suffix to the token, after any other
|
||||
suffixes. For example: GL_NEW_TOKEN0_SGI. All upper case is
|
||||
required.
|
||||
|
||||
All tokens that are used only for a single use should be grouped
|
||||
together using enum types.
|
||||
|
||||
|
||||
Parameter name rules
|
||||
--------------------
|
||||
|
||||
<target> is reserved for the notion of "which is affected", and for
|
||||
the corresponding "which is returned" get commands.
|
||||
|
||||
<params> is reserved for an array of parameters whose contents are
|
||||
defined by a second enumerated argument, called <pname>.
|
||||
|
||||
Begin number sequences with 1, not 0. (e.g. u1,u2, not u0,u1)
|
||||
|
||||
Any parameters that contain more then one word should have the
|
||||
second and subsequent words capitalized.
|
||||
|
||||
Long descriptive parameters are encouraged.
|
||||
|
||||
|
||||
Parameter order
|
||||
---------------
|
||||
|
||||
<X> precedes <Y> precedes <Z> precedes <W>.
|
||||
|
||||
<R> precedes <G> precedes <B> precedes <A>.
|
||||
|
||||
<S> precedes <T> precedes <R> precedes <Q>.
|
||||
|
||||
<U> precedes <V>.
|
||||
|
||||
The array being passed is always the last argument.
|
||||
|
||||
If a passed array has a type, the type specification argument immediately
|
||||
precedes the array.
|
||||
|
||||
<pname> always precedes <params>.
|
||||
|
||||
<x> and <y> precede <width> and <height>.
|
||||
|
||||
<format> precedes <type>.
|
||||
|
||||
<target> is first.
|
||||
|
||||
<face> is first.
|
||||
|
||||
<object> is first.
|
||||
|
||||
<count> always precedes the thing that it counts.
|
||||
|
||||
Any time the function parameters contain an address of what they
|
||||
operate on, the address is last.
|
||||
|
||||
Arrays are never terminated by NULL or any other termination but are
|
||||
always specified by length.
|
||||
|
||||
For variable length arrays passed into the GL, the parameter list should
|
||||
end with: "sizei count, const void* data"
|
||||
|
||||
For variable length arrays passed back from the GL, the parameter list
|
||||
should end with: "sizei maxCount, sizei* count, void* data"
|
||||
|
||||
|
||||
Parameter types
|
||||
---------------
|
||||
|
||||
All integer quantity parameters (widths, heights, array lengths, etc.)
|
||||
should be typed GLsizei, not GLint or GLuint. Note that GLsizei
|
||||
generates an error only for negative values, so all integer quantity
|
||||
parameters should accept the value zero.
|
||||
|
||||
Handles to specific object types are typed as pointers to the corresponding
|
||||
abstract structs. Generic objects are passed around as void pointers.
|
||||
|
||||
Generic masks that do not have explicitly defined bit values (e.g.
|
||||
color index write masks and stencil write masks) should be typed
|
||||
GLuint. GLuint is also used for unsigned integer components, such as
|
||||
color components and depth components.
|
||||
|
||||
Masks that do have explicitly defined bit values (e.g. attribute mask,
|
||||
clear mask) should be typed GLbitfield, not GLuint.
|
||||
|
||||
All floating point parameters that are clamped to the range [0,1] when
|
||||
received should be typed GLclampf or GLclampd, not GLfloat or GLdouble.
|
||||
|
||||
|
||||
Extension name rules
|
||||
--------------------
|
||||
|
||||
An extension name is prefixed with the same string that suffixes its
|
||||
procedures and definitions. The prefix and the individual words are
|
||||
separated with underscores, the prefix is all upper case, and the other
|
||||
text is all lower case. For example, extension ARB_cool_feature, which
|
||||
specifies glCoolProcedureARB() and defines GL_COOL_DEFINITION_ARB.
|
||||
|
||||
|
||||
Suffix codes
|
||||
------------
|
||||
|
||||
i signed 32-bit integer
|
||||
ui unsigned 32-bit integer
|
||||
s signed 16-bit integer
|
||||
us unsigned 16-bit integer
|
||||
b signed 8-bit integer
|
||||
ub unsigned 8-bit integer
|
||||
l signed 64-bit integer
|
||||
ul unsigned 64-bit integer
|
||||
f 32-bit float
|
||||
d 64-bit float
|
||||
t token enum
|
||||
v vector format
|
||||
N normalize values
|
||||
|
||||
# number of components (e.g. 3)
|
||||
#x# matrix dimensions (e.g. 2x4)
|
||||
|
||||
|
||||
Shared extensions
|
||||
-----------------
|
||||
|
||||
An OpenGL extension may be deemed a shared extension if either:
|
||||
|
||||
1. Two or more OpenGL licensees agree in good faith to implement
|
||||
and ship the extension, or
|
||||
|
||||
2. The OpenGL ARB determines that it is in the best interest of
|
||||
the licensees that the extension be shared.
|
||||
|
||||
The procedures and definitions that are defined by a shared extension
|
||||
are suffixed with EXT, rather than by a company-specific suffix.
|
||||
Likewise, the extension name is prefixed by EXT. To avoid name
|
||||
conflicts Silicon Graphics will maintain a registry of EXT extensions,
|
||||
including all their procedures and definitions, in a location that is
|
||||
accessible to all licensees.
|
||||
@@ -0,0 +1,723 @@
|
||||
* Template for specifying an extension to OpenGL, OpenGL ES,
|
||||
* and related APIs.
|
||||
*
|
||||
* Last Modified Date: January 20, 2010
|
||||
* Revision: 8
|
||||
*
|
||||
* Document Source: the OpenGL Extension Registry at
|
||||
*
|
||||
* http://www.opengl.org/registry/
|
||||
*
|
||||
* and the OpenGL ES Extension Registry at
|
||||
*
|
||||
* http://www.khronos.org/registry/gles/
|
||||
*
|
||||
* Notes:
|
||||
*
|
||||
* Comments in this template document are preceded by an asterisk.
|
||||
* This entire section is one big comment.
|
||||
*
|
||||
* Extension documents are simple fixed-width ASCII text, up to 132
|
||||
* characters wide. Here is a line of 132 characters for calibration:
|
||||
*
|
||||
*00000000011111111112222222222333333333344444444445555555555666666666677777777778888888888999999999900000000001111111111222222222233
|
||||
*
|
||||
* Lines should end with a hard newline. Do not assume that any
|
||||
* special formatting or interpretation will be made by software
|
||||
* displaying the specification.
|
||||
*
|
||||
* Although the extension file is formally 132 characters wide,
|
||||
* text is limited to 72 characters, and only tables that require
|
||||
* more than 72 character width extend to the full file width.
|
||||
* Here is a line of 72 characters for calibration:
|
||||
*
|
||||
*00000000011111111112222222222333333333344444444445555555555666666666677
|
||||
*
|
||||
* The extension is completely described by its specification, mostly
|
||||
* in the "Additions to <section name>" sections. These sections are
|
||||
* written as though the additions described by previous extensions
|
||||
* had actually been made to specified portions of the OpenGL, OpenGL
|
||||
* ES, OpenGL Shading Language, GLX, EGL, or other Specification
|
||||
* documents.
|
||||
*
|
||||
* The "Dependencies on Extension" sections are used to describe how
|
||||
* the extension semantics are modified if a previous extension is not
|
||||
* supported, or to indicate that a previous extension must be
|
||||
* supported.
|
||||
*
|
||||
* When changes are made to the contents of a table, new, changed,
|
||||
* and removed table entries must be identified. All fields of
|
||||
* changed table entires should be included, even if not all fields
|
||||
* have changed.
|
||||
*
|
||||
* An extension specification is always written against given
|
||||
* version(s) of Specifications, which must be identified in the
|
||||
* Dependencies section. That is, the references and modifications in
|
||||
* the extension are applied to that version of the Specification.
|
||||
*
|
||||
* The latest Khronos-approved version of Specifications should be
|
||||
* used when writing an extension. If it is possible for the extension
|
||||
* to be used with older versions of a Specification, this should also
|
||||
* be described in the Dependencies section.
|
||||
*
|
||||
* For consistency with OpenGL and ES Specifications, extension
|
||||
* documents omit gl prefixes on command names, GL_ prefixes on
|
||||
* token names, and GL prefixes on type names. Vendor-specific
|
||||
* suffixes are included in these files, however. The terms
|
||||
* "GL" and "ES" below should be taken to refer to OpenGL and
|
||||
* OpenGL ES, respectively.
|
||||
*
|
||||
* To be consistent with the GLX Specification, however, extensions
|
||||
* defining GLX functionality include glX prefixes on command names
|
||||
* and GLX_ prefixes on token names. Similarly, WGL extensions
|
||||
* include wgl and WGL_ prefixes on command and token names.
|
||||
*
|
||||
* An extension document should by preference include all the
|
||||
* sections in this template unless a particular section indicates
|
||||
* its inclusion is optional. If there is no text in a section,
|
||||
* this is indicated by the word "None", such as:
|
||||
*
|
||||
* Dependencies
|
||||
*
|
||||
* None
|
||||
*
|
||||
* While this may appear excessively verbose, the purpose is to ensure
|
||||
* that extension authors document all affected parts of Specifications.
|
||||
* An exception is that headers for sections of Specifications that
|
||||
* are not altered by the extension may be omitted, once the extension
|
||||
* has been completed. Thus for example a GLX extension need not
|
||||
* retain "Changes to Chapter <N> of the OpenGL 1.X Specification"
|
||||
* headers, and an OpenGL extension that does not affect per-vertex
|
||||
* processing in any way need not retain "Changes to Chapter 2...".
|
||||
*
|
||||
* Lower-case or numeric subscripts of upper-case variables are
|
||||
* simply appended to the variable. For example "R subscript t"
|
||||
* is written as Rt. If it is not easy to distinguish the variable
|
||||
* from the subscript, an underbar is used to separate them. For
|
||||
* example, "R subscript T" is written as R_T.
|
||||
*
|
||||
* Multiplication is indicated with an asterisk, not by adjacency
|
||||
* of two variables.
|
||||
*
|
||||
* In text, parameter names are distinguished by being surrounded
|
||||
* with angle brackets. For example, the pname parameter to
|
||||
* TexParameter is written as <pname>.
|
||||
*
|
||||
* Math symbols (such as the 'tau', 'lambda', and 'rho' defined
|
||||
* by the texturing section) should be completely written out
|
||||
* in ASCII as described, rather than assuming a non-ASCII
|
||||
* character set.
|
||||
*
|
||||
* The template proper follows.
|
||||
|
||||
************************************************************************
|
||||
|
||||
Name
|
||||
|
||||
* The formal name of the extension. The prefix of the name is a
|
||||
* vendor-specific tag. This is a short, capitalized string unique
|
||||
* to that vendor, such as "SGI" and "IBM" for those respective
|
||||
* companies. The prefix may also be "EXT" is two or more vendors
|
||||
* have agreed to support the extension, "ARB" if the OpenGL ARB
|
||||
* Working Group has voted to approve the extension, "OES" is the
|
||||
* OpenGL ES Working Group has voted to approve the extension,
|
||||
* and "KHR" if the EGL Working Group has voted to approve
|
||||
* the extension.
|
||||
*
|
||||
* Some vendors use an additional convention where the vendor
|
||||
* tag may be followed by "S" to indicate an extension
|
||||
* only supported on a subset of their supported platforms,
|
||||
* and may be followed by an "X" to indicate an experimental
|
||||
* extension, which may be changed or withdrawn in the future.
|
||||
*
|
||||
* The prefix is separated from the body of the name by an
|
||||
* underscore. Words within the name are also separated by
|
||||
* underscores. There is no capitalization used in the body of the
|
||||
* name. For example:
|
||||
|
||||
* Name
|
||||
*
|
||||
* SGI_new_extension
|
||||
|
||||
Name Strings
|
||||
|
||||
* Extensions may apply to several different APIs, and extension
|
||||
* names are prefixed accordingly. The possible categories are:
|
||||
*
|
||||
* Extension of String query function Name prefixed by
|
||||
* ------------ --------------------- ----------------
|
||||
* GL and/or ES glGetString GL_
|
||||
* GLU gluGetString GLU_
|
||||
* GLX glXQueryExtensionsString GLX_
|
||||
* EGL eglQueryString EGL_
|
||||
* WGL glGetString, WGL_
|
||||
* wglGetExtensionsStringEXT(*)
|
||||
* AGL ??? ???_
|
||||
*
|
||||
* (*) Note: WGL extension strings are returned by both glGetString
|
||||
* and (if the WGL_EXT_extensions_string extension is supported) by
|
||||
* wglGetExtensionsStringEXT.
|
||||
*
|
||||
* For example, an SGI-specific extension which adds entry points to
|
||||
* both GLX and OpenGL would be listed as:
|
||||
|
||||
* Name Strings
|
||||
*
|
||||
* GL_SGI_new_extension
|
||||
* GLX_SGI_new_extension
|
||||
|
||||
* A multivendor extension which adds an entry point to WGL would be
|
||||
* listed as:
|
||||
|
||||
* Name Strings
|
||||
*
|
||||
* WGL_EXT_new_extension
|
||||
|
||||
* The name strings are included in header files, and are returned
|
||||
* by the string query functions as shown in the table above.
|
||||
* In most cases the Name String is simply the Name prefixed
|
||||
* by the relevant API.
|
||||
|
||||
Contact
|
||||
|
||||
* Name, company, and email address of people responsible for the
|
||||
* extension. We suggest using 'at' instead of '@' in email
|
||||
* addresses, to help prevent spam. For multivendor extensions,
|
||||
* contacts from each vendor supporting the extension are preferred.
|
||||
* A backup contact, in case the principal moves on, will be
|
||||
* helpful. Example:
|
||||
|
||||
* Contact
|
||||
*
|
||||
* Jon Leech, Khronos (jon 'at' alumni.caltech.edu)
|
||||
|
||||
Contributors
|
||||
|
||||
* Name and company of other people who helped develop the
|
||||
* extension. Credit may be given to an entire Working
|
||||
* Group if contributions are too diffuse.
|
||||
|
||||
* Contributors
|
||||
* Members of the Khronos ARB-ES Convergence TSG
|
||||
|
||||
Status
|
||||
|
||||
* If the specification is incomplete, the Status section should
|
||||
* be something like
|
||||
*
|
||||
* XXX - Not complete yet. Do not ship!!!
|
||||
*
|
||||
* to indicate that nobody should ship the extension in its
|
||||
* current, unfinished state. Once it is complete, Status should be
|
||||
* changed to "Complete". For extensions approved by Khronos, this
|
||||
* should be extended to note when the extension was approved by
|
||||
* the relevant Working Group(s) and by the Khronos Promoters.
|
||||
*
|
||||
* Once the extension ships, its status should be changed to
|
||||
* indicate this, as well as what the version number at shipping
|
||||
* time is. Finally, if an extension is withdrawn (or never shipped
|
||||
* due to e.g. cancellation of a product), it should be marked
|
||||
* obsolete. Examples:
|
||||
|
||||
* Status
|
||||
*
|
||||
* XXX - Not complete yet!!!
|
||||
|
||||
* Status
|
||||
*
|
||||
* Complete. Approved by the Khronos Promoters on April 1, 2009.
|
||||
|
||||
* Status
|
||||
*
|
||||
* Shipping (version Major.minor)
|
||||
|
||||
* Status
|
||||
*
|
||||
* Obsolete
|
||||
|
||||
Version
|
||||
|
||||
* It's hard to generate good version numbers with version control
|
||||
* systems, since extension specs may live in many different source
|
||||
* trees. We now suggest including a manually-inserted date of last
|
||||
* modification and version number. These should be updated only
|
||||
* for meaningful changes to the extension, not just formatting.
|
||||
|
||||
* Version
|
||||
*
|
||||
* Last Modified Date: January 20, 2010
|
||||
* Revision: 8
|
||||
|
||||
* If you do not include a date and version number when submitting
|
||||
* an extension to the registry, Khronos will generate one based on
|
||||
* the date the specification was received.
|
||||
|
||||
Number
|
||||
|
||||
* Extensions are numbered for documentation purposes. Each
|
||||
* extension should document its interactions with the core
|
||||
* Specification and with all other extensions (that are also
|
||||
* supported by the vendors shipping this extension) that have lower
|
||||
* numbers. For example, extension 3 should document its interactions
|
||||
* with the core document and (if any) with extensions 1 and 2.
|
||||
*
|
||||
* The extension number has no meaning outside of the documentation.
|
||||
* In particular, it is not revealed to programmers who use OpenGL.
|
||||
* Extension numbers are assigned by Khronos when an extension is
|
||||
* submitted to the registry.
|
||||
*
|
||||
* ARB and ES extensions follow separate numbering schemes from
|
||||
* vendor extensions. If an extension can be implemented against
|
||||
* both GL and ES, assign numbers from both registries.
|
||||
|
||||
Examples:
|
||||
|
||||
* Number
|
||||
*
|
||||
* 12
|
||||
|
||||
* Number
|
||||
*
|
||||
* ARB Extension #12
|
||||
|
||||
* Number
|
||||
*
|
||||
* ARB Extension #23
|
||||
* OpenGL ES Extension #17
|
||||
|
||||
Dependencies
|
||||
|
||||
* List the oldest version of GL, ES, OpenGL Shading Language, GLX,
|
||||
* etc.) against which this extension can be implemented, as well
|
||||
* as the version and, if relevant, profile against which the
|
||||
* extension is written. Because specifications can be revised
|
||||
* after their initial release, affecting page and table numbering,
|
||||
* also include the release date of the specifications. It is
|
||||
* usually best to write the extension against the current
|
||||
* versions of Specifications even if it can be successfully
|
||||
* implemented against older versions).
|
||||
*
|
||||
* Separately list all API profiles and extensions that must be
|
||||
* present for this extension to be implemented, and all extensions
|
||||
* whose presence or absence modifies the operation of this
|
||||
* extension.
|
||||
*
|
||||
* If an extension can be implemented against both GL and ES,
|
||||
* document both requirements, and note if their are any
|
||||
* functionality differences (typically an extension which
|
||||
* works with both GL and ES will not support interactions
|
||||
* with GL features not present in ES in the ES version, but
|
||||
* it is still valuable to have a common extension spec).
|
||||
|
||||
* Dependencies
|
||||
* OpenGL 3.2 (either core or compatibility profiles) is
|
||||
* required.
|
||||
*
|
||||
* This extension is written against the OpenGL 3.2
|
||||
* (Core Profile) Specification (August 3, 2009).
|
||||
|
||||
* Dependencies
|
||||
* OpenGL 2.0 or OpenGL ES 2.0 are required.
|
||||
*
|
||||
* Some of the functionality of this extension is not supported
|
||||
* when implemented against OpenGL ES 2.0.
|
||||
*
|
||||
* This extension is written against the OpenGL 2.0
|
||||
* Specification (October 22, 2004).
|
||||
|
||||
* Dependencies
|
||||
* OpenGL 1.2 is required.
|
||||
*
|
||||
* ARB_texture_float affects the definition of this extension.
|
||||
*
|
||||
* This extension is written against the OpenGL 2.1
|
||||
* Specification (May 16, 2008).
|
||||
|
||||
Overview
|
||||
|
||||
* What does the extension do? What problem does it solve? This
|
||||
* can include background and rationale (unlike the specification
|
||||
* language proper). A common format is a single sentence
|
||||
* summarizing the extension, followed by greater levels of detail
|
||||
* which will help people understand the extension. Note that the
|
||||
* GL Specification explicitly does not include rationale, so the
|
||||
* overview is a good place to put it instead.
|
||||
|
||||
IP Status
|
||||
|
||||
* Document any known patents or other IP claims that may prohibit
|
||||
* royalty-free implementation of an extension, or impose other
|
||||
* constraints on implementations. It is better to write "No
|
||||
* known IP claims" rather than "None", since Khronos, or the
|
||||
* vendor for vendor extensions, may not know of relevant IP.
|
||||
*
|
||||
* Examples:
|
||||
|
||||
* IP Status
|
||||
*
|
||||
* ReallyBigCo has made unspecified IP claims against
|
||||
* all implementations of this extension.
|
||||
|
||||
* IP Status
|
||||
*
|
||||
* US Patent #7,654,321, owned by ReallyBigCo, may
|
||||
* be infringed by implementations of this extension.
|
||||
|
||||
* (note: extensions which have been approved by the Khronos
|
||||
* Promoters fall under the Khronos IP agreements, which
|
||||
* offer mutual protections to the members who implement
|
||||
* such extensions).
|
||||
|
||||
* IP Status
|
||||
*
|
||||
* No known IP claims.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
* List all the procedures and functions that are defined by this
|
||||
* extension. Each should be suffixed using the same string as was
|
||||
* chosen as the extension name prefix. All parameter names and
|
||||
* types must be included, including the return values of functions.
|
||||
* Follow the style used in the appropriate Specifications.
|
||||
* Example:
|
||||
|
||||
* New Procedures and Functions
|
||||
*
|
||||
* void NewCommandEXT(int arg1, float arg2);
|
||||
|
||||
New Types
|
||||
|
||||
* List all new GL types defined by this extension. Include enough
|
||||
* information to define a common underlying C-language binding
|
||||
* definition on a per-architecture basis. For example, instead
|
||||
* of saying "GLhandleARB", say:
|
||||
|
||||
* New Types
|
||||
*
|
||||
* typedef unsigned int GLhandleARB;
|
||||
|
||||
New Tokens
|
||||
|
||||
* This list should be complete. It should separate the new tokens
|
||||
* based on which procedures and parameters accept them, and
|
||||
* explicitly list those procedures and parameters. Token suffixes
|
||||
* must match the prefix chosen for the extension name. If
|
||||
* enumerant values have been assigned, include them; otherwise
|
||||
* list the values as "0x????". For example:
|
||||
|
||||
* New Tokens
|
||||
*
|
||||
* Accepted by the <pname> parameters of GetBooleanv, GetIntegerv,
|
||||
* GetInteger64v, GetFloatv, and GetDoublev:
|
||||
*
|
||||
* NEW_TOKEN_EXT 0x6042
|
||||
* ANOTHER_TOKEN_EXT 0x????
|
||||
|
||||
* Now, for each section of the relevant Specification (GL, ES, GLX,
|
||||
* EGL, etc.), show in detail all changes to the Specification
|
||||
* document required to completely describe this extension. Changes
|
||||
* should be written in the style of the specifications and should be
|
||||
* phrased as changes to specific, identifiable parts of the document.
|
||||
* In each section heading, include the version of the specification
|
||||
* being modified. If an extension is being written against both GL
|
||||
* and ES, it is usually best to show changes against the GL
|
||||
* Specification, then summarize differences when implemented with
|
||||
* ES in a "Dependencies" section following the changes (see below).
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 3.2 (Core Profile) Specification
|
||||
(OpenGL Operation)
|
||||
|
||||
* Include any new command suffixes here (section 2.3)
|
||||
* Include any new error types here (section 2.5)
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 3.2 (Core Profile) Specification
|
||||
(Rasterization)
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 3.2 (Core Profile) Specification
|
||||
(Per-Fragment Operations and the Frame Buffer)
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 3.2 (Core Profile) Specification
|
||||
(Special Functions)
|
||||
|
||||
* List commands that are not included in display lists
|
||||
* (typically, Get* commands)
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 3.2 (Core Profile) Specification
|
||||
(State and State Requests)
|
||||
|
||||
* The lists of state and implementation-dependent state are added
|
||||
* in the "New State" section. Add queries and new attributes here.
|
||||
|
||||
Additions to Appendix A of the OpenGL 3.2 (Core Profile) Specification
|
||||
(Invariance)
|
||||
|
||||
* If the utility of the extension would be increased by
|
||||
* specification of invariance relationships, note that here.
|
||||
|
||||
Additions to Appendix D of the OpenGL 3.2 (Core Profile) Specification
|
||||
(Shared Objects and Multiple Contexts)
|
||||
|
||||
* If object sharing behavior is affected by the extension,
|
||||
* describe that in the set of sharing rules in this section.
|
||||
|
||||
************************************************************************
|
||||
|
||||
* If this is an OpenGL Shading Language extension, include a separate
|
||||
* section for each affected chapter of the 1.50 (or specified version)
|
||||
* Specification.
|
||||
|
||||
Additions to Chapter 1 of the OpenGL Shading Language 1.50 Specification
|
||||
(Introduction)
|
||||
|
||||
Additions to Chapter 2 of the OpenGL Shading Language 1.50 Specification
|
||||
(Overview of OpenGL Shading)
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language 1.50 Specification
|
||||
(Basics)
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language 1.50 Specification
|
||||
(Variables and Types)
|
||||
|
||||
Additions to Chapter 5 of the OpenGL Shading Language 1.50 Specification
|
||||
(Operators and Expressions)
|
||||
|
||||
Additions to Chapter 6 of the OpenGL Shading Language 1.50 Specification
|
||||
(Statements and Structure)
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language 1.50 Specification
|
||||
(Built-in Variables)
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language 1.50 Specification
|
||||
(Built-in Functions)
|
||||
|
||||
Additions to Chapter 9 of the OpenGL Shading Language 1.50 Specification
|
||||
(Shading Language Grammar)
|
||||
|
||||
Additions to Chapter 10 of the OpenGL Shading Language 1.50 Specification
|
||||
(Issues)
|
||||
|
||||
************************************************************************
|
||||
|
||||
* If none of the window-system integration APIs are affected by
|
||||
* this extension, indicate this by
|
||||
|
||||
Additions to the AGL/EGL/GLX/WGL Specifications
|
||||
|
||||
None
|
||||
|
||||
* Otherwise, for a WGL or AGL extension, include a description of how
|
||||
* the extension affects those APIs. WGL and AGL don't have spec
|
||||
* documents, but we still phrase these sections as "Changes to the
|
||||
* Specification" in anticipation of specifications being written.
|
||||
|
||||
Additions to the WGL Specification
|
||||
|
||||
Additions to the AGL Specification
|
||||
|
||||
************************************************************************
|
||||
|
||||
* For a GLX extension (since GLX has a formal Specification),
|
||||
* include a separate section for each affected chapter of
|
||||
* the GLX Specification:
|
||||
|
||||
Additions to Chapter 1 of the GLX 1.4 Specification (Overview)
|
||||
|
||||
Additions to Chapter 2 of the GLX 1.4 Specification (GLX Operation)
|
||||
|
||||
Additions to Chapter 3 of the GLX 1.4 Specification
|
||||
(Functions and Errors)
|
||||
|
||||
Additions to Chapter 4 of the GLX 1.4 Specification
|
||||
(Encoding on the X Byte Stream)
|
||||
|
||||
Additions to Chapter 5 of the GLX 1.4 Specification (Extending OpenGL)
|
||||
|
||||
Additions to Chapter 6 of the GLX 1.4 Specification (GLX Versions)
|
||||
|
||||
************************************************************************
|
||||
|
||||
* Likewise for an EGL extension.
|
||||
|
||||
Additions to Chapter 1 of the EGL 1.4 Specification (Overview)
|
||||
|
||||
Additions to Chapter 2 of the EGL 1.4 Specification (EGL Operation)
|
||||
|
||||
Additions to Chapter 3 of the EGL 1.4 Specification
|
||||
(EGL Functions and Errors)
|
||||
|
||||
Additions to Chapter 4 of the EGL 1.4 Specification (Extending EGL)
|
||||
|
||||
Additions to Chapter 5 of the EGL 1.4 Specification
|
||||
(EGL Versions and Enumerants)
|
||||
|
||||
Additions to Chapter 6 of the EGL 1.4 Specification (Glossary)
|
||||
|
||||
************************************************************************
|
||||
|
||||
* For an extension of any type which is to be supported by GLX indirect
|
||||
* rendering, include additions to the GLX Protocol Specification.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
* Add protocol here using the same format as the GLX protocol
|
||||
* document. Be sure to specify the values of enumerated types.
|
||||
*
|
||||
* Use glXVendorPrivate for extended requests without a reply
|
||||
* (e.g., new GLX commands) :
|
||||
* glXVendorPrivate
|
||||
*
|
||||
* 1 CARD8 opcode (X assigned)
|
||||
* 1 16 GLX opcode
|
||||
* 2 2+(n+p)/4 request length
|
||||
* 4 CARD32 vendor-specific opcode
|
||||
* n LISTofBYTE vendor-specific data
|
||||
* p unused, p=pad(n)
|
||||
*
|
||||
* Make sure to reserve a vendor-specific opcode by request from
|
||||
* Khronos (just as enumerant values are assigned on request), then
|
||||
* define the layout of the vendor-specific data.
|
||||
*
|
||||
* Use glXVendorPrivateWithReply for extended requests with a reply
|
||||
* (e.g., new gets for OpenGL):
|
||||
*
|
||||
* glXVendorPrivateWithReply
|
||||
*
|
||||
* 1 CARD8 opcode (X assigned)
|
||||
* 1 17 GLX opcode
|
||||
* 2 2+(n+p)/4 request length
|
||||
* 4 CARD32 vendor-specific opcode
|
||||
* n LISTofBYTE vendor-specific data
|
||||
* p unused, p=pad(n)
|
||||
* =>
|
||||
* 1 1 reply
|
||||
* 1 unused
|
||||
* 2 CARD16 sequence number
|
||||
* 4 n reply length
|
||||
* 24 LISTofBYTE returned data
|
||||
* 4*n LISTofBYTE more returned data
|
||||
*
|
||||
* This is similar to glXVendorPrivate except you also need to
|
||||
* define the layout of the returned data.
|
||||
*
|
||||
* For extended OpenGL commands, be sure to specify whether it is a
|
||||
* rendering command or a non-rendering command, and if it is a
|
||||
* rendering command, whether or not it can be large.
|
||||
*
|
||||
* To specify an extended visual attribute, specify a property
|
||||
* type/property value pair to use with glXGetVisualConfigs.
|
||||
|
||||
********************************************************************
|
||||
|
||||
Dependencies on GL and ES profiles, versions, and other extensions
|
||||
|
||||
* Separately list each interaction which affects the behavior
|
||||
* of this extension depending on which other extensions
|
||||
* are present or on which version of Specifications this
|
||||
* extension is implemented against. Examples:
|
||||
|
||||
* Dependencies on ARB_texture_float
|
||||
*
|
||||
* If ARB_texture_float is not supported, then
|
||||
* delete all references to the R*F* pixel formats.
|
||||
|
||||
* Dependencies on OpenGL ES
|
||||
*
|
||||
* If implemented for OpenGL ES, this extension
|
||||
* behaves as specified, except:
|
||||
*
|
||||
* - Ignore all references to display lists and
|
||||
* immediate mode, including changes to section 5.4.
|
||||
* - Ignore all references to GLX and GLX Protocol.
|
||||
|
||||
Errors
|
||||
|
||||
* This list summarizes all possible errors generated by the
|
||||
* extension and should be complete (however, errors are best
|
||||
* described in the extension body text as well).
|
||||
|
||||
New State
|
||||
|
||||
* Include modifications to the state tables in chapter 6 of the
|
||||
* GL and/or ES Specifications (other Specifications do not
|
||||
* have state tables). For each affected table, identify the
|
||||
* table and describe all new or modified state values in the
|
||||
* format of that table. Client state (for e.g. vertex arrays or
|
||||
* pixel packing parameters) should have "client" listed in the
|
||||
* Attribute column. Example:
|
||||
|
||||
* Changes to table 6.99, p. 516 (Funky Geometry State)
|
||||
*
|
||||
* Initial
|
||||
* Get Value Type Get Command Value Description Sec. Attribute
|
||||
* --------- ---- ----------- ------- ----------- ---- ---------
|
||||
* RADIUS R GetFloatv 1.0 Disk radius 2.6 vertex
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
* Describe all implementation dependent state in the same
|
||||
* fashion. Example:
|
||||
|
||||
* (Changes to table 6.100, p. 518 (Implementation-Dependent State)
|
||||
*
|
||||
* Minimum
|
||||
* Get Value Type Get Command Value Description Sec. Attribute
|
||||
* --------- ---- ----------- ------- ----------- ---- ---------
|
||||
* MAX_DISKS Z+ GetIntegerv 1000 Max. # of 2.5 -
|
||||
* disks.
|
||||
|
||||
Sample Code
|
||||
|
||||
* For complex extensions, it may be worthwhile to include
|
||||
* code samples of how to use the extension.
|
||||
|
||||
Conformance Tests
|
||||
|
||||
* If a conformance test is defined for the extension,
|
||||
* summarize its basic purpose, if not necessarily its
|
||||
* source code, here. If no test has been defined, note that
|
||||
* they are needed.
|
||||
|
||||
Issues
|
||||
|
||||
* List remaining open issues, or closed issues whose resolution
|
||||
* set a precedent or was otherwise especially interesting.
|
||||
* Briefly describe each issue, options considered, the choice
|
||||
* made, and the reason for that choice. The Issues section
|
||||
* documents motivation, rationale, etc. while not being a
|
||||
* normative part of the extension. We suggest a numerically
|
||||
* order list so that issues can refer to other issues.
|
||||
*
|
||||
* We now recommend placing the Issues list near the end of
|
||||
* the extension, since it can grow very long yet is ancillary
|
||||
* to the specification itself.
|
||||
|
||||
Revision History
|
||||
|
||||
* Include important changes in the evolution of the extension.
|
||||
* It's especially important to include this section if the
|
||||
* extension is modified after a version has been shipped.
|
||||
*
|
||||
* Example (and actual revision history of the template):
|
||||
|
||||
* Revision 8, 2010/01/20
|
||||
* - Minor updates for completeness and consistency. Push updated
|
||||
* template to the public Registry.
|
||||
* Revision 7, 2009/12/07
|
||||
* - Generalize template to allow for ES and GL extensions
|
||||
* and change references from SGI to Khronos as the
|
||||
* Registry owner.
|
||||
* Revision 6, 2006/10/09
|
||||
* - Move registry URL to www.opengl.org.
|
||||
* Revision 5, 2004/06/22
|
||||
* - Update template to allow OpenGL Shading Language and EGL
|
||||
* extensions. Add "Sample Code" section. Include more examples
|
||||
* under "IP Status". Add the template's revision history.
|
||||
* Add state table examples. Cleanup overall formatting to make
|
||||
* clear what are the section headers which must be present,
|
||||
* in contrast to the examples which are just part of this
|
||||
* template. Add document source URL.
|
||||
* Revision 4, 2003/12/19
|
||||
* - Add "New Types" section.
|
||||
* Revision 3, 2000/04/26
|
||||
* - Add "Author Revision" field to Version section, instead of
|
||||
* relying on source code control versions.
|
||||
@@ -0,0 +1,95 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Docbook Toolchain for Khronos Documents</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>What is Docbook?</h1>
|
||||
|
||||
<p> <a href="http://www.docbook.org/">Docbook</a> is a widely used XML
|
||||
schema for technical documentation(*). It is an open source project
|
||||
with a great deal of supporting infrastructure and documentation.
|
||||
Start with the <a href="http://www.dpawson.co.uk/docbook/">Docbook
|
||||
FAQ</a> and the canonical text <a
|
||||
href="http://docbook.org/tdg/">DocBook: The Definitive Guide</a>
|
||||
(since we are using Docbook 4.x, read version 2.0 of the Guide).
|
||||
|
||||
|
||||
<p> Like LaTeX, Docbook is a structural description of a document.
|
||||
Docbook does <b>not</b> define formatting. Using XSL stylesheets,
|
||||
Docbook documents can be transformed into many other formats such as
|
||||
XHTML, PDF, Unix nroff man pages, and Windows HTML Help.
|
||||
|
||||
<p> Khronos has agreed to use Docbook as the format for new man pages
|
||||
and technical specifications created within the group.
|
||||
This document captures basic information about Docbook
|
||||
and the toolchain required to use it.
|
||||
|
||||
<p> (*) Actually, there are SGML and Relax NG schemas for Docbook
|
||||
as well. However, for Khronos' purposes we concentrate on
|
||||
the XML schema.
|
||||
|
||||
|
||||
<h1>Docbook Editors</h1>
|
||||
|
||||
<p> Since Docbook documents are XML, it is possible (and perhaps
|
||||
desirable for smaller documents) to simply use a text editor and
|
||||
mark up XML by hand. Emacs is reputed to have a Docbook and/or XML
|
||||
editing mode which may be useful.
|
||||
|
||||
<p> There are a variety of free and commercial XML editors. Some are
|
||||
described in the <a
|
||||
href="http://www.dpawson.co.uk/docbook/reference.html#d17e1366">Docbook
|
||||
FAQ</a>. We have experimented with the free Standard version of <a
|
||||
href="http://www.xmlmind.com/xmleditor/">XMLMind</a> with some
|
||||
success; unlike many of the other options, XMLMind understands the
|
||||
Docbook schema and can render Docbook documents in a WYSIWYG-like
|
||||
fashion, in addition to the straight XML structure editor.
|
||||
|
||||
|
||||
<h1>Docbook Schema</h1>
|
||||
|
||||
<p> There are many versions of the Docbook XML Schema. We are currently
|
||||
using Docbook 4.3 with MathML 2.0 support. See the DOCTYPE
|
||||
declaration in the sample documents for the specific DTDs.
|
||||
|
||||
|
||||
<h1>XSL Stylesheets</h1>
|
||||
|
||||
<p> To transform Docbook documents into final viewable formats, we use
|
||||
the standard <a
|
||||
href="http://wiki.docbook.org/topic/DocBookXslStylesheets"> Modular
|
||||
Docbook XSL stylesheets</a> (version 1.69). These are available
|
||||
prepackaged for modern Linux systems (although you may have to
|
||||
manually select the packages) as well as for the Cygwin environment
|
||||
on Windows. We are using version 1.69 of the stylesheets.
|
||||
|
||||
<p> (<b>Note:</b> need links to Cygwin / Red Hat / other Linux distro?
|
||||
packages).
|
||||
|
||||
|
||||
<h1>Tools</h1>
|
||||
|
||||
<p> The Docbook 4.3 DTD is also prepackaged for most systems. Some
|
||||
additional work is required to install the Docbook 4.3+MathML 2.0
|
||||
DTD (details to be added).
|
||||
|
||||
(<b>Note:</b> need links to Cygwin / Red Hat / other Linux distro? packages).
|
||||
|
||||
<p> To transform a Docbook document with the XSL Stylesheets,
|
||||
a processor like <a href="http://wiki.docbook.org/topic/xsltproc">
|
||||
xsltproc</a> or Saxon is required. Again, xsltproc
|
||||
is prepackaged.
|
||||
|
||||
(<b>Note:</b> again, need links to Cygwin / Red Hat / other Linux
|
||||
distro? packages).
|
||||
|
||||
<h1>Examples</h1>
|
||||
|
||||
<p> A simple example package containing a Docbook document (sample man
|
||||
page) and Makefile to transform it are <b>here (link TBD)</b>.
|
||||
|
||||
<p> Last modified August 13, 2006 by Jon Leech
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
$static_title = 'Khronos OpenGL Specification Update Policy';
|
||||
|
||||
include_once("../../../assets/static_pages/khr_page_top.php");
|
||||
?>
|
||||
|
||||
<p> This page describes policy of the Khronos OpenGL Working Group for
|
||||
updating API and Shading Language Specification documents, as well as
|
||||
extension documents. </p>
|
||||
|
||||
<p> This policy was last updated on 2019-03-13. </p>
|
||||
|
||||
<h2> Specification Updates </h2>
|
||||
|
||||
<p> The current core (OpenGL 4.6, OpenGL ES 3.2, OpenGL SC 2.0, GLSL 4.60,
|
||||
GLSL ES 3.20, and GLX 1.4) documents are updated in response to issues
|
||||
and bugs the OpenGL Working Group considers priorities. The update
|
||||
frequency is irregular and dependent on the accumulated backlog of
|
||||
issues, up to several times per year. </p>
|
||||
|
||||
<p> While Khronos publishes older (non-current) Specifications such as
|
||||
OpenGL 4.5 or OpenGL ES 3.0, such Specifications are usually <b>not</b>
|
||||
updated in response to issues and bugs unless there's a compelling
|
||||
reason. One such compelling reason has been to update older OpenGL ES
|
||||
Specifications on which WebGL is based, in response to requests from the
|
||||
WebGL Working Group. </p>
|
||||
|
||||
<h2> Extension Updates </h2>
|
||||
|
||||
<p> Khronos-approved (<tt>ARB</tt>, <tt>OES</tt>, or <tt>KHR</tt> vendor
|
||||
suffixed) extensions are usually updated when corresponding changes are
|
||||
made to a core Specification, but with some time lag. </p>
|
||||
|
||||
<p> This is a recent policy. Older bug fixes to core Specifications have not
|
||||
always been back-ported to the corresponding extensions, and we are
|
||||
unlikely to perform this exercise for closed issues and bugs without
|
||||
compelling reason. </p>
|
||||
|
||||
<p> We will tag each Khronos-approved extension with a link to this policy
|
||||
document and a recommendation to refer to the current core Specification
|
||||
for the latest wording. </p>
|
||||
|
||||
<?php include_once("../../../assets/static_pages/khr_page_bottom.php"); ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,538 @@
|
||||
Name
|
||||
|
||||
3DFX_multisample
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_3DFX_multisample
|
||||
GLX_3DFX_multisample
|
||||
WGL_3DFX_multisample
|
||||
|
||||
Contact
|
||||
|
||||
Paula Womack, 3dfx Interactive (paulaw 'at' 3dfx.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete.
|
||||
|
||||
Version
|
||||
|
||||
Date: April 18, 2000; Version 1.1
|
||||
|
||||
Number
|
||||
|
||||
207
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.1 is required.
|
||||
GLX 1.2 is required.
|
||||
WGL_ARB_extensions_string is required.
|
||||
WGL_ARB_pixel_format is required.
|
||||
GLX_EXT_fbconfig and GLX 1.3 affect the definition of this extension.
|
||||
This spec is written against OpenGL 1.2 and GLX 1.3
|
||||
|
||||
Overview
|
||||
|
||||
This extension provides a mechanism to antialias all GL primitives:
|
||||
points, lines, polygons, bitmaps, and images. The technique is to
|
||||
sample all primitives multiple times at each pixel. The color sample
|
||||
values are resolved to a single, displayable color each time a pixel
|
||||
is updated, so the antialiasing appears to be automatic at the
|
||||
application level. Because each sample includes depth and stencil
|
||||
information, the depth and stencil functions perform equivalently to
|
||||
the single-sample mode.
|
||||
|
||||
An additional buffer, called the multisample buffer, is added to the
|
||||
framebuffer. Pixel sample values, including color, depth, and
|
||||
stencil values, are stored in this buffer. When the framebuffer
|
||||
includes a multisample buffer, it does not also include separate
|
||||
depth or stencil buffers, even if the multisample buffer does not
|
||||
store depth or stencil values. Color buffers (left/right,
|
||||
front/back, and aux) do coexist with the multisample buffer,
|
||||
however.
|
||||
|
||||
Multisample antialiasing is most valuable for rendering polygons,
|
||||
because it requires no sorting for hidden surface elimination, and
|
||||
it correctly handles adjacent polygons, object silhouettes, and even
|
||||
intersecting polygons. If only points or lines are being rendered,
|
||||
the "smooth" antialiasing mechanism provided by the base GL may
|
||||
result in a higher quality image.
|
||||
|
||||
This extension is a subset of SGIS_multisample. It differs in these
|
||||
key ways:
|
||||
|
||||
* Fragment alpha values are not affected by the fragment sample mask
|
||||
* The sample locations may or may not be fixed. Thus, there is no
|
||||
support for rendering the scene multiple times with different
|
||||
sample points.
|
||||
* Fragment masks are not computed for images or for bitmasks.
|
||||
|
||||
Because of these differences a new extension was created. However,
|
||||
it is not expected that this extension will co-exist with
|
||||
SGIS_multisample. Because of this and the fact that there are only
|
||||
32 push/pop bits the MULTISAMPLE_BIT_SGIS state value is the same as
|
||||
MUTLISAMPLE_BIT_3DFX.
|
||||
|
||||
IP Status
|
||||
|
||||
No issues.
|
||||
|
||||
Issues
|
||||
|
||||
Should tbuffer be kept as a separate extension?
|
||||
|
||||
Yes. The ability to define a write mask for the fragment mask should
|
||||
be kept separate. This feature is orthogonal to SGIS_multisample,
|
||||
while 3DFX_multisample is not. 3DFX_multisample is a strict subset
|
||||
of SGIS_multisample.
|
||||
|
||||
Should the multisample buffer be defined as a separate buffer?
|
||||
|
||||
Yes. It does not need to be implemented this way though. Since GL
|
||||
rendering is done off screen and then blitted (to handle window
|
||||
clipping) the multisample buffer can actually be the same as the
|
||||
offscreen front and back buffers. The blit engine handles reads and
|
||||
writes to/from AA buffers so ReadPixels will work correctly.
|
||||
|
||||
Should we allow the depth values for the different samples to differ
|
||||
when AA is off?
|
||||
|
||||
No. This will be a bug on hardware that operates this way. In
|
||||
practice it should not be a big issue.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <attrib_list> parameter of glXChooseFBConfig and
|
||||
glXChooseVisual and by the <attribute> parameter of
|
||||
glXGetFBConfigAttrib and glXGetConfig:
|
||||
|
||||
GLX_SAMPLE_BUFFERS_3DFX 0x8050
|
||||
GLX_SAMPLES_3DFX 0x8051
|
||||
|
||||
Accepted in the <piAttributes> parameter array of
|
||||
wglGetPixelFormatAttribivARB, and wglGetPixelFormatAttribfvARB, and
|
||||
in the <piAttribIList> and <pfAttribFList> parameter arrays of
|
||||
wglChoosePixelFormatARB:
|
||||
|
||||
WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||
WGL_SAMPLES_3DFX 0x2061
|
||||
|
||||
Accepted by the <cap> parameter of Enable, Disable, and IsEnabled,
|
||||
and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
|
||||
and GetDoublev:
|
||||
|
||||
MULTISAMPLE_3DFX 0x86B2
|
||||
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetDoublev,
|
||||
GetIntegerv, and GetFloatv:
|
||||
|
||||
SAMPLE_BUFFERS_3DFX 0x86B3
|
||||
SAMPLES_3DFX 0x86B4
|
||||
|
||||
Accepted by the <mask> parameter of PushAttrib:
|
||||
|
||||
MULTISAMPLE_BIT_3DFX 0x20000000
|
||||
|
||||
Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 3 of the 1.2 Specification (Rasterization)
|
||||
|
||||
If SAMPLE_BUFFERS_3DFX is one, the rasterization of all GL
|
||||
primitives is changed, and is referred to as multisample
|
||||
rasterization. Otherwise primitive rasterization operates as it is
|
||||
described in the GL specification, and is referred to as
|
||||
single-sample rasterization. The value of SAMPLE_BUFFERS_3DFX is an
|
||||
implementation dependent constant, and is queried by calling
|
||||
GetIntegerv with pname set to SAMPLE_BUFFERS_3DFX.
|
||||
|
||||
During multisample rasterization the contents of a pixel fragment
|
||||
are changed in two ways. First, each fragment includes a coverage
|
||||
mask with SAMPLES_3DFX bits. The value of SAMPLES_3DFX is an
|
||||
implementation dependent constant, and is queried by calling
|
||||
GetIntegerv with pname set to SAMPLES_3DFX. Second, each fragment
|
||||
includes SAMPLES_3DFX depth values, instead of the single depth
|
||||
value that is maintained in single-sample rasterization mode. Each
|
||||
pixel fragment thus consists of integer x and y grid coordinates, a
|
||||
color, SAMPLES_3DFX depth values, texture coordinates, a coverage
|
||||
value, and the SAMPLES_3DFX-bit mask.
|
||||
|
||||
The behavior of multisample rasterization is a function of
|
||||
MULTISAMPLE_3DFX, which is enabled and disabled by calling Enable or
|
||||
Disable, with cap set to MULTISAMPLE_3DFX. Its value is queried
|
||||
using IsEnabled, with cap set to MULTISAMPLE_3DFX.
|
||||
|
||||
If MULTISAMPLE_3DFX is disabled, multisample rasterization of all
|
||||
primitives is equivalent to single-sample rasterization, except that
|
||||
the fragment coverage mask is set to all ones. The depth values may
|
||||
all be set to the single value that would have been assigned by
|
||||
single-sample rasterization, or they may be assigned as described
|
||||
below for MULTISAMPLE_3DFX-enabled multisample rasterization.
|
||||
|
||||
If MULTISAMPLE_3DFX is enabled, multisample rasterization of all
|
||||
primitives differs substantially from single-sample rasterization.
|
||||
It is understood that each pixel in the framebuffer has SAMPLES_3DFX
|
||||
locations associated with it. These locations are exact positions,
|
||||
rather than regions or areas, and each is referred to as a sample
|
||||
point. The sample points associated with a pixel may be located
|
||||
inside or outside of the unit square that is considered to bound the
|
||||
pixel. Furthermore, the pattern (relative location) of sample points
|
||||
may be identical for each pixel in the framebuffer, or it may
|
||||
differ. The locations of the sample points are fixed by the
|
||||
implementation and it is not possible to query the actual sample
|
||||
locations of a pixel.
|
||||
|
||||
If the sample patterns differ per pixel, they should be aligned to
|
||||
window, not screen, boundaries. Otherwise rendering results will be
|
||||
window-position specific. The invariance requirement described in
|
||||
section 3.1 is relaxed for all enabled multisample rasterization,
|
||||
because the sample patterns may be a function of pixel location.
|
||||
|
||||
3.3.2 Point Multisample Rasterization
|
||||
|
||||
If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then
|
||||
points are rasterized using the following algorithm, regardless of
|
||||
whether point antialiasing (POINT_SMOOTH) is enabled or disabled.
|
||||
Point rasterization produces a fragment for each framebuffer pixel
|
||||
with one or more sample points that intersect the region lying
|
||||
within the circle having diameter equal to the current point width
|
||||
and centered at the point's (Xw,Yw). The coverage value for each
|
||||
fragment is 1. Mask bits that correspond to sample points that
|
||||
intersect the circular region are 1, other mask bits are 0. All
|
||||
depth values of the fragment are assigned the depth value of the
|
||||
point being rasterized. The data associated with each fragment are
|
||||
otherwise the data associated with the point being rasterized.
|
||||
|
||||
Point size range and number of gradations are equivalent to those
|
||||
supported for antialiased points.
|
||||
|
||||
3.4.4 Line Multisample Rasterization
|
||||
|
||||
If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then
|
||||
lines are rasterized using the following algorithm, regardless of
|
||||
whether line antialiasing (LINE_SMOOTH) is enabled or disabled. Line
|
||||
rasterization produces a fragment for each framebuffer pixel with
|
||||
one or more sample points that intersect the rectangular region that
|
||||
is described in the Antialiasing section of 3.4.2 (Other Line
|
||||
Segment Features). If line stippling is enabled, the rectangular
|
||||
region is subdivided into adjacent unit-length rectangles, with some
|
||||
rectangles eliminated according to the procedure given under Line
|
||||
Stipple, where "fragment" is replaced by "rectangle".
|
||||
|
||||
The coverage value for each fragment is 1. Mask bits that correspond
|
||||
to sample points that intersect a retained rectangle are 1, other
|
||||
mask bits are 0. Each depth value is produced by substituting the
|
||||
corresponding sample location into equation 3.1, then using the
|
||||
result to evaluate equation 3.3. The data associated with each
|
||||
fragment are otherwise computed by evaluating equation 3.1 at the
|
||||
fragment center, then substituting into equation 3.2.
|
||||
|
||||
Line width range and number of gradations are equivalent to those
|
||||
supported for antialiased lines.
|
||||
|
||||
3.5.7 Polygon Multisample Rasterization
|
||||
|
||||
If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then
|
||||
polygons are rasterized using the following algorithm, regardless of
|
||||
whether polygon antialiasing (POLYGON_SMOOTH) is enabled or
|
||||
disabled. Polygon rasterization produces a fragment for each
|
||||
framebuffer pixel with one or more sample points that satisfy the
|
||||
point sampling criteria described in section 3.5.1, including the
|
||||
special treatment for sample points that lie on a polygon boundary
|
||||
edge. If a polygon is culled, based on its orientation and the
|
||||
CullFace mode, then no fragments are produced during rasterization.
|
||||
Fragments are culled by the polygon stipple just as they are for
|
||||
aliased and antialiased polygons.
|
||||
|
||||
The coverage value for each fragment is 1. Mask bits that correspond
|
||||
to sample points that satisfy the point sampling criteria are 1,
|
||||
other mask bits are 0. Each depth value is produced by substituting
|
||||
the corresponding sample location into the barycentric equations
|
||||
described in section 3.5.1, using the approximation to equation 3.4
|
||||
that omits w components. The data associated with each fragment are
|
||||
otherwise computed by barycentric evaluation using the fragment's
|
||||
center point.
|
||||
|
||||
If POLYGON_OFFSET_FILL is enabled then the offset value computed in
|
||||
equation 3.7 is added to all sample depth values.
|
||||
|
||||
The rasterization described above applies only to the FILL state of
|
||||
PolygonMode. For POINT and LINE, the rasterizations described in
|
||||
3.3.2 (Point Multisample Rasterization) and 3.4.4 (Line Multisample
|
||||
Rasterization) apply with the additional requirement that the sample
|
||||
depth values must be offset by the value computed in equation 3.7
|
||||
when POLYGON_OFFSET_POINT or POLYGON_OFFSET_LINE is enabled.
|
||||
|
||||
3.6.5 Multisample Rasterization of Pixel Rectangles
|
||||
|
||||
If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then
|
||||
pixel rectangles are rasterized using the following algorithm. Let
|
||||
(Xrp,Yrp) be the current raster position. (If the current raster
|
||||
position is invalid, then DrawPixels is ignored.) If a particular
|
||||
group (index or components) is the nth in a row and belongs to the
|
||||
mth row, consider the region in window coordinates bounded by the
|
||||
rectangle with corners
|
||||
|
||||
(Xrp + Zx*n, Yrp + Zy*m)
|
||||
|
||||
and
|
||||
|
||||
(Xrp + Zx*(n+1), Yrp + Zy*(m+1))
|
||||
|
||||
where Zx and Zy are the pixel zoom factors specified by PixelZoom,
|
||||
and may each be either positive or negative. A fragment representing
|
||||
group n,m is produced for each framebuffer pixel with one or more
|
||||
sample points that lie inside, or on the bottom or left boundary, of
|
||||
this rectangle. Each fragment so produced takes its associated data
|
||||
from the group and from the current raster position, in a manner
|
||||
consistent with SGIX_pixel_texture (if it is implemented) or in a
|
||||
manner consistent with the discussion in the Conversion to Fragments
|
||||
subsection of section 3.6.4 of the GL specification. All depth
|
||||
sample values are assigned the same value, taken either from the
|
||||
group (if it is a depth component group) or from the current raster
|
||||
position (if it is not).
|
||||
|
||||
A single pixel rectangle will generate multiple, perhaps very many
|
||||
fragments for the same framebuffer pixel, depending on the pixel
|
||||
zoom factors.
|
||||
|
||||
3.7.1 Bitmap Multisample Rasterization
|
||||
|
||||
If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, then
|
||||
bitmaps are rasterized using the following algorithm. If the current
|
||||
raster position is invalid, the bitmap is ignored. Otherwise, a
|
||||
screen-aligned array of pixel-size rectangles is constructed, with
|
||||
its lower-left corner at (Xrp,Yrp), and its upper right corner a
|
||||
(Xrp+w,Yrp+h), where w and h are the width and height of the bitmap.
|
||||
Rectangles in this array are eliminated if the corresponding bit in
|
||||
the bitmap is zero, and are retained otherwise. Bitmap rasterization
|
||||
produces a fragment for each framebuffer pixel with one or more
|
||||
sample points either inside or on the bottom or left edge of a
|
||||
retained rectangle.
|
||||
|
||||
Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
|
||||
and the Frame Buffer)
|
||||
|
||||
4.1.9 Multisample Fragment Operations
|
||||
|
||||
If the DrawBuffers mode is NONE, no change is made to any
|
||||
multisample or color buffer. Otherwise, fragment processing is as
|
||||
described below.
|
||||
|
||||
If MULTISAMPLE_3DFX is enabled, and SAMPLE_BUFFERS_3DFX is one, the
|
||||
stencil test, depth test, blending, and dithering operations
|
||||
described in sections 4.1.4, 4.1.5, 4.1.6, and 4.1.7 are performed
|
||||
for each pixel sample, rather than just once for each fragment.
|
||||
Failure of the stencil or depth test results in termination of the
|
||||
processing of that sample, rather than discarding of the fragment.
|
||||
All operations are performed on the color, depth, and stencil values
|
||||
stored in the multisample buffer (to be described in a following
|
||||
section). The contents of the color buffers are not modified at this
|
||||
point.
|
||||
|
||||
Stencil, depth, blending, and dithering operations are performed for
|
||||
a pixel sample only if that sample's fragment mask bit is 1. If the
|
||||
corresponding mask bit is 0, no operations are performed for that
|
||||
sample. Depth operations use the fragment depth value that is
|
||||
specific to each sample. The single fragment color value is used for
|
||||
all sample operations, however, as is the current stencil value.
|
||||
|
||||
If MULTISAMPLE_3DFX is disabled, and SAMPLE_BUFFERS_3DFX is one, the
|
||||
fragment may be treated exactly as described above, with
|
||||
optimization possible because the fragment mask must be all 1's.
|
||||
Further optimization is allowed, however. An implementation may
|
||||
choose to identify a centermost sample, and to perform stencil and
|
||||
depth tests on only that sample. Regardless of the outcome of the
|
||||
stencil test, all multisample buffer stencil sample values are set
|
||||
to the appropriate new stencil value. If the depth test passes, all
|
||||
multisample buffer depth sample values are set to the depth of the
|
||||
fragment's centermost sample's depth value, and all multisample
|
||||
buffer color sample values are set to the color value of the
|
||||
incoming fragment. Otherwise, no change is made to any multisample
|
||||
buffer color or depth value.
|
||||
|
||||
After all operations have been completed on the multisample buffer,
|
||||
the color sample values are combined to produce a single color
|
||||
value, and that value is written into each color buffer that is
|
||||
currently enabled, based on the DrawBuffers mode. The method of
|
||||
combination is not specified, though a simple average computed
|
||||
independently for each color component is recommended.
|
||||
|
||||
4.2.2.5 Fine Control of Multisample Buffer Updates
|
||||
|
||||
When SAMPLE_BUFFERS_3DFX is one, ColorMask, DepthMask, and
|
||||
StencilMask control the modification of values in the multisample
|
||||
buffer. The color mask has no effect on modifications to the color
|
||||
buffers. If the color mask is entirely disabled, the color sample
|
||||
values must still be combined (as described above) and the result
|
||||
used to replace the color values of the buffers enabled by
|
||||
DrawBuffers.
|
||||
|
||||
4.2.3.5 Clearing the Multisample Buffer
|
||||
|
||||
The color samples of the multisample buffer are cleared when one or
|
||||
more color buffers are cleared, as specified by the Clear mask bit
|
||||
COLOR_BUFFER_BIT and the DrawBuffers mode. If the DrawBuffers mode
|
||||
is NONE, the color samples of the multisample buffer cannot be
|
||||
cleared.
|
||||
|
||||
Clear mask bits DEPTH_BUFFER_BIT and STENCIL_BUFFER_BIT indicate
|
||||
that the depth and stencil samples of the multisample buffer are to
|
||||
be cleared. If Clear mask bit DEPTH_BUFFER_BIT is specified, and if
|
||||
the DrawBuffers mode is not NONE, then the multisample depth buffer
|
||||
samples are cleared. Likewise, if Clear mask bit STENCIL_BUFFER_BIT
|
||||
is specified, and if the DrawBuffers mode is not NONE, then the
|
||||
multisample stencil buffer is cleared.
|
||||
|
||||
4.3.2 Reading Pixels
|
||||
|
||||
[These changes are made to the text in section 4.3.2, following the
|
||||
subheading Obtaining Pixels from the Framebuffer.]
|
||||
|
||||
Follow the sentence "If there is no depth buffer, the error
|
||||
INVALID_OPERATION occurs." with: If there is a multisample buffer
|
||||
(SAMPLE_BUFFERS_3DFX is 1) then values are obtained from the depth
|
||||
samples in this buffer. It is recommended that the depth value of
|
||||
the centermost sample be used, though implementations may choose any
|
||||
function of the depth sample values at each pixel.
|
||||
|
||||
Follow the sentence "if there is no stencil buffer, the error
|
||||
INVALID_OPERATION occurs." with: If there is a multisample buffer,
|
||||
then values are obtained from the stencil samples in this buffer. It
|
||||
is recommended that the stencil value of the centermost sample be
|
||||
used, though implementations may choose any function of the stencil
|
||||
sample values at each pixel.
|
||||
|
||||
This extension makes no change to the way that color values are
|
||||
obtained from the framebuffer.
|
||||
|
||||
Additions to Chapter 5 of the 1.2 Specification (Special Functions)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 6 of the 1.2 Specification (State and State Requests)
|
||||
|
||||
An additional group of state variables, MULTISAMPLE_BIT_3DFX, is
|
||||
defined by this extension. When PushAttrib is called with bit
|
||||
MULTISAMPLE_BIT_3DFX set, the multisample group of state variables
|
||||
is pushed onto the attribute stack. When PopAttrib is called, these
|
||||
state variables are restored to their previous values if they were
|
||||
pushed. Some multisample state is included in the ENABLE_BIT group
|
||||
as well. In order to avoid incompatibility with GL implementations
|
||||
that do not support 3DFX_multisample, ALL_ATTRIB_BITS does not
|
||||
include MULTISAMPLE_BIT_3DFX.
|
||||
|
||||
Additions to the GLX 1.3 Specification
|
||||
|
||||
The parameter GLX_SAMPLE_BUFFERS_3DFX is added to
|
||||
glXGetFBConfigAttrib. When queried, by calling glXGetFBConfigAttrib
|
||||
with attribute set to GLX_SAMPLE_BUFFERS_3DFX, it returns the number
|
||||
of multisample buffers included in the visual. For a normal visual,
|
||||
the return value is zero. A return value of one indicates that a
|
||||
single multisample buffer is available. The number of samples per
|
||||
pixel is queried by calling glXGetFBConfigAttrib with attribute set
|
||||
to GLX_SAMPLES_3DFX. It is understood that the number of color,
|
||||
depth, and stencil bits per sample in the multisample buffer are as
|
||||
specified by the GLX_*_SIZE parameters. It is also understood that
|
||||
there are no single-sample depth or stencil buffers associated with
|
||||
this visual -- the only depth and stencil buffers are those in the
|
||||
multisample buffer. GLX_SAMPLES_3DFX is zero if
|
||||
GLX_SAMPLE_BUFFERS_3DFX is zero.
|
||||
|
||||
glXChooseFBConfig accepts GLX_SAMPLE_BUFFERS_3DFX in attrib_list,
|
||||
followed by the minimum number of multisample buffers that can be
|
||||
accepted. Visuals with the smallest number of multisample buffers
|
||||
that meets or exceeds the specified minimum number are preferred.
|
||||
Currently operation with more than one multisample buffer is
|
||||
undefined, so the returned value will be either zero or one.
|
||||
|
||||
glXChooseFBConfig accepts GLX_SAMPLES_3DFX in attrib_list, followed
|
||||
by the minimum number of samples that can be accepted in the
|
||||
multisample buffer. Visuals with the smallest number of samples that
|
||||
meets or exceeds the specified minimum number are preferred.
|
||||
|
||||
The multisample FBConfig attributes are added to table 3.4 as follows:
|
||||
|
||||
Attribute Default Selection Criteria Sort Priority
|
||||
--------- ------- ------------------ -------------
|
||||
GLX_SAMPLE_BUFFERS_3DFX 0 Smaller
|
||||
GLX_SAMPLES_3DFX 0 Smaller
|
||||
|
||||
If the GLX implementation is 1.2 or less, then
|
||||
GLX_SAMPLE_BUFFERS_3DFX and GLX_SAMPLES_3DFX are accepted by
|
||||
glXChooseVisual and glXGetConfig.
|
||||
|
||||
If the color samples in the multisample buffer store fewer bits than
|
||||
are stored in the color buffers, this fact will not be reported
|
||||
accurately. Presumably a compression scheme is being employed, and
|
||||
is expected to maintain an aggregate resolution equal to that of the
|
||||
color buffers.
|
||||
|
||||
Additions to WGL
|
||||
|
||||
The parameters WGL_SAMPLE_BUFFERS_3DFX and WGL_SAMPLES_3DFX are
|
||||
added to wglGetPixelFormatAttribivARB and
|
||||
wglGetPixelFormatAttribfvARB. WGL_SAMPLE_BUFFERS_3DFX indicates the
|
||||
number of multisample buffers included in the pixel format. For a
|
||||
normal pixel format, the return value is zero. A return value of one
|
||||
indicates that a single multisample buffer is available.
|
||||
WGL_SAMPLES_3DFX gives the number of samples per pixel. It is
|
||||
understood that the number of color, depth, and stencil bits per
|
||||
sample in the multisample buffer are as specified by the WGL_*_BITS
|
||||
parameters. It is also understood that there are no single-sample
|
||||
depth or stencil buffers associated with this pixel format -- the
|
||||
only depth and stencil buffers are those in the multisample buffer.
|
||||
WGL_SAMPLES_3DFX is zero if WGL_SAMPLE_BUFFERS_3DFX is zero.
|
||||
|
||||
wglChoosePixelFormatARB accepts WGL_SAMPLE_BUFFERS_3DFX in
|
||||
piAttribIList and/or pfAttribFList, followed by the minimum number
|
||||
of multisample buffers that can be accepted. Pixel formats with the
|
||||
smallest number of multisample buffers that meet or exceed the
|
||||
specified minimum number are preferred. Currently operation with
|
||||
more than one multisample buffer is undefined, so the returned value
|
||||
will be either zero or one.
|
||||
|
||||
wglChoosePixelFormatARB accepts WGL_SAMPLES_3DFX in piAttribIList
|
||||
and/or pfAttribFList, followed by the minimum number of samples that
|
||||
can be accepted in the multisample buffer. Pixel formats with the
|
||||
smallest number of samples that meet or exceed the specified minimum
|
||||
number are preferred.
|
||||
|
||||
Errors
|
||||
|
||||
None
|
||||
|
||||
New State
|
||||
|
||||
|
||||
Get Value Get Command Type Initial Value Attribute
|
||||
--------- ----------- ---- ------------- ---------
|
||||
MULTISAMPLE_3DFX IsEnabled B TRUE multisample/enable
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
Get Value Get Command Type Minimum Value
|
||||
--------- ----------- ---- -------------
|
||||
SAMPLE_BUFFERS_3DFX GetIntegerv Z+ 0
|
||||
SAMPLES_3DFX GetIntegerv Z+ 0
|
||||
|
||||
Dependencies on GLX 1.3 and GLX_EXT_fbconfig
|
||||
|
||||
If GLX 1.3 is not supported and GLX_EXT_fbconfig is not supported
|
||||
then all references to glXGetFBConfigAttrib and glXGetConfig are
|
||||
removed.
|
||||
|
||||
Revision History
|
||||
|
||||
Version 1.1 - April 18, 2000 (Jon Leech, SGI)
|
||||
|
||||
Specified value of MULTISAMPLE_BIT_3DFX. Assigned values to
|
||||
GLX_SAMPLE_BUFFERS_3DFX and GLX_SAMPLES_3DFX. Conversion from
|
||||
HTML -> text and formatting cleanup.
|
||||
@@ -0,0 +1,122 @@
|
||||
Name
|
||||
|
||||
3DFX_tbuffer
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_3DFX_tbuffer
|
||||
|
||||
Contact
|
||||
|
||||
Paula Womack, 3dfx Interactive (paulaw 'at' 3dfx.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete
|
||||
|
||||
Version
|
||||
|
||||
Date: April 13, 2000; Revision: 1.0
|
||||
|
||||
Number
|
||||
|
||||
208
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.1 is required.
|
||||
Either SGIS_multisample or 3DFX_multisample is required.
|
||||
This specification is written against OpenGL 1.2.
|
||||
|
||||
Overview
|
||||
|
||||
This extension allows a write mask to be defined for the fragment
|
||||
mask which is created during multisample rendering. This can be used
|
||||
to create effects such as motion blur and depth of field.
|
||||
|
||||
IP Status
|
||||
|
||||
3DFX has filed for patent protection for some of the techniques
|
||||
described in this extension document.
|
||||
|
||||
Issues
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void TbufferMask3DFX(uint mask);
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 3 of the 1.2 Specification (Rasterization)
|
||||
|
||||
The value of TBUFFER_WRITE_MASK_3DFX is specified by calling
|
||||
TbufferMask3DFX, with mask set to the desired mask value. If
|
||||
multisample rendering is enabled then the n least significant bits
|
||||
of TBUFFER_WRITE_MASK_3DFX are bitwise ANDed with the fragment
|
||||
sample mask, where n is equal to SAMPLES_3DFX.
|
||||
|
||||
Additions to 3.3.2 Point Multisample Rasterization:
|
||||
|
||||
Following the sentence "Mask bits that correspond to sample points
|
||||
that intersect the circular region are 1, other mask bits are 0."
|
||||
add "The fragment mask thus computed, is then bitwise ANDed with the
|
||||
SAMPLES_3DFX least significant bits of TBUFFER_WRITE_MASK_3DFX.
|
||||
|
||||
Additions to 3.4.4 Line Multisample Rasterization:
|
||||
|
||||
Following the sentence "Mask bits that correspond to sample points
|
||||
that intersect a retained rectangle are 1, other mask bits are 0."
|
||||
add "The fragment mask thus computed, is then bitwise ANDed with the
|
||||
SAMPLES_3DFX least significant bits of TBUFFER_WRITE_MASK_3DFX.
|
||||
|
||||
Additions to 3.5.6 Polygon Multisample Rasterization:
|
||||
|
||||
Following the sentence "Mask bits that correspond to sample points
|
||||
that satisfy the point sampling criteria are 1, other mask bits are
|
||||
0." add "The fragment mask thus computed, is then bitwise ANDed with
|
||||
the SAMPLES_3DFX least significant bits of TBUFFER_WRITE_MASK_3DFX.
|
||||
|
||||
Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations and
|
||||
the Frame Buffer)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 5 of the 1.2 Specification (Special Functions)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 6 of the 1.2 Specification (State and State Requests)
|
||||
|
||||
An additional group of multisample state variables is defined by the
|
||||
SGIS_multitexture and 3DFX_multitexture extensions. When PushAttrib
|
||||
is called with bit MULTISAMPLE_BIT_SGIS or MULTISAMPLE_BIT_3DFX set,
|
||||
the multisample group of state variables is pushed onto the
|
||||
attribute stack. When PopAttrib is called, these state variables are
|
||||
restored to their previous values if they were pushed. This
|
||||
extension adds state to the multisample group of state variables.
|
||||
|
||||
Additions to the GLX Specification
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated if TbufferWriteMask3DFX is called
|
||||
between the execution of Begin and the execution of the
|
||||
corresponding End.
|
||||
|
||||
New State
|
||||
|
||||
Get Value Get Command Type Initial Value Attribute
|
||||
--------- ----------- ---- ------------- ---------
|
||||
TBUFFER_WRITE_MASK_3DFX GetIntegerv Z+ 1's multisample
|
||||
|
||||
Revision History
|
||||
@@ -0,0 +1,619 @@
|
||||
Name
|
||||
|
||||
3DFX_texture_compression_FXT1
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_3DFX_texture_compression_FXT1
|
||||
|
||||
Contact
|
||||
|
||||
Don Mullis, 3dfx Interactive (dwm 'at' 3dfx.com)
|
||||
|
||||
Status
|
||||
|
||||
CANDIDATE FOR FINAL DRAFT -- NOT YET COMPLETE
|
||||
|
||||
Version
|
||||
|
||||
Draft 0.4, 12 Apr 2000
|
||||
|
||||
Number
|
||||
|
||||
206
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.1 is required.
|
||||
GL_ARB_texture_compression is required.
|
||||
This extension is written against the OpenGL 1.2.1 Specification.
|
||||
|
||||
Overview
|
||||
|
||||
This extension additional texture compression functionality 's FXT1
|
||||
format, specific to 3dfxsubject to all the requirements and
|
||||
limitations described by the extension GL_ARB_texture_compression.
|
||||
The FXT1 texture format supports only 2D and 3D images without
|
||||
borders.
|
||||
|
||||
Because 3dfx expects to make continual improvement to its FXT1
|
||||
compressor implementation, 3dfx recommends that to achieve best
|
||||
visual quality applications adopt the following procedure with
|
||||
respect to reuse of textures compressed by the GL:
|
||||
|
||||
1) Save the RENDERER and VERSION strings along with images
|
||||
compressed by the GL;
|
||||
2) Before reuse of the textures, compare the stored strings with
|
||||
strings newly returned from the current GL;
|
||||
3) If out-of-date, repeat the compression and storage steps.
|
||||
|
||||
IP Status
|
||||
|
||||
A royalty-free license is available from 3dfx Interactive
|
||||
(http://www.3dfx.com/).
|
||||
|
||||
Issues
|
||||
|
||||
(1) Two or only one internalformat tokens:
|
||||
GL_COMPRESSED_RGBA_FXT1_3DFX and GL_COMPRESSED_RGB_FXT1_3DFX, or
|
||||
GL_COMPRESSED_RGBA_FXT1_3DFX only. These names are placeholders,
|
||||
the point in question is whether there should be separate tokens
|
||||
reflecting extrinsic knowledge of whether the image contains any
|
||||
non-unity alpha values. This arises because the FXT1 image
|
||||
format distinguishes non-unity alpha only at the level of an
|
||||
individual 8x4 compression block. If there are two distinct
|
||||
tokens, passing GL_COMPRESSED_RGB_FXT1_3DFX to
|
||||
CompressedTexImage with an image that contained non-unity-alpha
|
||||
blocks would be an error.
|
||||
|
||||
RESOLVED. Two distinct tokens specified. This is largely to
|
||||
follow the usual usage by apps of non-compressed tokens.
|
||||
|
||||
(2) Support for borders.
|
||||
|
||||
RESOLVED. Not supported.
|
||||
|
||||
(3) Support for TexSubImage at a level more general than that
|
||||
guaranteed by ARB_texture_compression.
|
||||
|
||||
RESOLVED. Not supported; See issue (5) of the
|
||||
GL_ARB_texture_compression spec.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <internalformat> parameter of TexImage2D,
|
||||
CopyTexImage2D, TexImage3D, CopyTexImage3D, and by the
|
||||
<internalformat> and <format> parameters of
|
||||
CompressedTexImage2D_ARB, CompressedTexSubImage2D_ARB,
|
||||
CompressedTexImage3D_ARB, CompressedTexSubImage3D_ARB:
|
||||
|
||||
COMPRESSED_RGB_FXT1_3DFX 0x86B0
|
||||
COMPRESSED_RGBA_FXT1_3DFX 0x86B1
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization)
|
||||
|
||||
Add Table 3.16.1: Specific Compressed Internal Formats
|
||||
|
||||
Compressed Internal Format Base Internal Format
|
||||
========================== ====================
|
||||
COMPRESSED_RGB_FXT1_3DFX RGB
|
||||
COMPRESSED_RGBA_FXT1_3DFX RGBA
|
||||
|
||||
Add to Section 3.8.2, Alternate Image Specification (adding to the
|
||||
end of the CompressedTexImage section introduced by the
|
||||
ARB_texture_compression spec)
|
||||
|
||||
If <internalformat> is COMPRESSED_RGB_FXT1_3DFX,
|
||||
COMPRESSED_RGBA_FXT1_3DFX, the compressed texture is stored using
|
||||
one of several FXT1 compressed texture image formats. FXT1 texture
|
||||
compression supports only 2D images without borders.
|
||||
CompressedTexImage1DARB and CompressedTexImage3DARB produce an
|
||||
INVALID_ENUM error if <internalformat> is an FXT1 format.
|
||||
CompressedTexImage2DARB will produce an INVALID_OPERATION error if
|
||||
<border> is non-zero.
|
||||
|
||||
|
||||
Add to Section 3.8.2, Alternate Image Specification (adding to the
|
||||
end of the CompressedTexSubImage section introduced by the
|
||||
ARB_texture_compression spec)
|
||||
|
||||
If the internal format of the texture image being modified is
|
||||
COMPRESSED_RGB_FXT1_3DFX, COMPRESSED_RGBA_FXT1_3DFX, the texture is
|
||||
stored using one of the several FXT1 compressed texture image
|
||||
formats. Since the FXT1 texture compression algorithm supports only
|
||||
2D images, CompressedTexSubImage1DARB and CompressedTexSubImage3DARB
|
||||
produce an INVALID_ENUM error if <format> is an FXT1 format.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 1.2.1 Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_ENUM is generated by CompressedTexImage1DARB if
|
||||
<internalformat> is GL_COMPRESSED_RGB_FXT1_3DFX or
|
||||
GL_COMPRESSED_RGBA_FXT1_3DFX.
|
||||
|
||||
INVALID_OPERATION is generated by CompressedTexImage2DARB or
|
||||
CompressedTexImage3DARB if <internalformat> is
|
||||
GL_COMPRESSED_RGB_FXT1_3DFX or GL_COMPRESSED_RGBA_FXT1_3DFX and
|
||||
<border> is not equal to zero.
|
||||
|
||||
INVALID_ENUM is generated by CompressedTexSubImage1DARB if <format>
|
||||
is GL_COMPRESSED_RGB_FXT1_3DFX or GL_COMPRESSED_RGBA_FXT1_3DFX.
|
||||
|
||||
Appendix
|
||||
|
||||
FXT1 comprises four different compressed texture formats. Each of
|
||||
the formats compress an 8x4 texel blocks into 128 bits. During the
|
||||
compression phase, the encoder selects one of the four formats for
|
||||
each block based on which encoding scheme results in best overall
|
||||
visual quality. Unused pixel locations along the right or bottom
|
||||
edges within a block should contain a repetition of the values in
|
||||
used locations. The total size of an image is ceil(width/8) *
|
||||
ceil(height/4) * 16 bytes.
|
||||
|
||||
In each compression format, the 32 texels of the 8x4 block are
|
||||
partitioned into two 4x4 sub-blocks according to the following
|
||||
diagram:
|
||||
|
||||
t0 t1 t2 t3 t16 t17 t18 t19
|
||||
t4 t5 t6 t7 t20 t21 t22 t23
|
||||
t8 t9 t10 t11 t24 t25 t26 t27
|
||||
t12 t13 t14 t15 t28 t29 t30 t31
|
||||
|
||||
In the following bit-level descriptions, bits of increasing index
|
||||
are stored in bytes at likewise increasing offsets, i.e. the order
|
||||
is "little-endian".
|
||||
|
||||
|
||||
1. FXT1 Compressed Texture Format CC_HI:
|
||||
|
||||
(rgb555) (3-bit/texel)
|
||||
mode[1:0] color1 color0 texel 31 to 16 texel 15 to 0
|
||||
2 15 15 48 48
|
||||
|
||||
|
||||
[127:126] mode[1:0]
|
||||
[125:121] red of color1
|
||||
[120:116] green of color1
|
||||
[115:111] blue of color1
|
||||
[110:106] red of color0
|
||||
[105:101] green of color0
|
||||
[100:96] blue of color0
|
||||
[95:93] texel 31
|
||||
...
|
||||
[50:48] texel 16
|
||||
[47:45] texel 15
|
||||
...
|
||||
[2:0] texel 0
|
||||
|
||||
In CC_HI format, mode = 00b, the 15-bit color1 (RGB555 format) and
|
||||
color0 (RGB555 format) colors are converted into 24-bit RGB888
|
||||
colors by duplicating the upper 3 bits for the 3 LSBs. The 24-bit
|
||||
converted color1 and color0 are then used to linearly interpolate 5
|
||||
more levels of color to create seven total levels of colors and 1
|
||||
alpha (transparent) color. The first seven colors always have
|
||||
alpha=ffh (opaque), while the eighth color is defined to be
|
||||
transparent black (r,g,b=00h, alpha=00h).
|
||||
|
||||
These eight 32-bit colors are used as the contents of an 8-entry (3
|
||||
bit index) lookup table. For all 32 texels in the block, each
|
||||
texel's 3-bit index value is used to index the lookup table, the
|
||||
output from the lookup table representing the 32-bit color
|
||||
(ARGB8888) for that texel.
|
||||
|
||||
Generating RGB888 from RGB555:
|
||||
|
||||
Color1 (red) = {[125:121], [125:123]}
|
||||
Color1 (green) = {[120:116], [120:118]}
|
||||
Color1 (blue) = {[115:111], [115:113]}
|
||||
|
||||
Color0 (red) = {[110:106], [110:108]}
|
||||
Color0 (green) = {[105:101], [105:103]}
|
||||
Color0 (blue) = {[100:96], [100:98]}
|
||||
|
||||
Creating seven ARGB8888 colors from two RGB888 colors (operations
|
||||
performed individually for each color channel):
|
||||
|
||||
Color[0] = color0[r,g,b], alpha[0] = ffh
|
||||
Color[1] = (5*color0[r,g,b] + color1[r,g,b] +3 )/6 alpha[1] = ffh
|
||||
Color[2] = (4*color0[r,g,b] + 2*color1[r,g,b] +3 )/6 alpha[2] = ffh
|
||||
Color[3] = (3*color0[r,g,b] + 3*color1[r,g,b] +3 )/6 alpha[3] = ffh
|
||||
Color[4] = (2*color0[r,g,b] + 4*color1[r,g,b] +3 )/6 alpha[4] = ffh
|
||||
Color[5] = (color0[r,g,b] + 5*color1[r,g,b] +3 )/6 alpha[5] = ffh
|
||||
Color[6] = color1[r,g,b], alpha[6] = ffh
|
||||
Color[7] = where r,g,b = 00h, alpha[7]=00h
|
||||
|
||||
Table Lookup:
|
||||
3-bit index of Color for texel 31 to texel 0
|
||||
texel31 to texel0 (ARGB8888)
|
||||
|
||||
0 color[0] => {a[7:0], r[7:0], g[7:0], b[7:0]}
|
||||
1 color[1]
|
||||
2 color[2]
|
||||
3 color[3]
|
||||
4 color[4]
|
||||
5 color[5]
|
||||
6 color[6]
|
||||
7 color[7]
|
||||
|
||||
|
||||
2. FXT1 Compressed Texture Format CC_CHROMA:
|
||||
|
||||
(rgb555) (2-bit/texel)
|
||||
Mode[2:0] unused color3 color2 color1 color0 texel 31 to 16 texel 15 to 0
|
||||
3 1 15 15 15 15 32 32
|
||||
|
||||
[127:125] mode[2:0]
|
||||
[124] unused
|
||||
[123:119] color3(r5)
|
||||
[118:114] color3(g5)
|
||||
[113:109] color3(b5)
|
||||
[108:104] color2(r5)
|
||||
[103:99] color2(g5)
|
||||
[98:94] color2(b5)
|
||||
[93:89] color1(r5)
|
||||
[88:84] color1(g5)
|
||||
[83:79] color1(b5)
|
||||
[78:74] color0(r5)
|
||||
[73:69] color0(g5)
|
||||
[68:64] color0(b5)
|
||||
[63:62] texel 31
|
||||
...
|
||||
[33:32] texel 16
|
||||
[31:30] texel 15
|
||||
...
|
||||
[1:0] texel 0
|
||||
|
||||
In CC_CHROMA format, mode=010b, the 15-bit colors color[3:0]
|
||||
(RGB555) are converted into 24-bit RGB888 colors exactly the same as
|
||||
in the CC_HI format via bit replication. Color3 to Color0 are used
|
||||
as they are (after conversion to RGB888 format), but without
|
||||
interpolation. The 24-bit converted colors color3, color2, color1,
|
||||
and color0 are used as the contents of a 4-entry (2-bit index)
|
||||
lookup table. The Alpha channel of the output of the lookup table is
|
||||
always opaque(ffh), regardless of the 2-bit index value. The 32-bit
|
||||
(ARGB8888) color value for each texel is obtained by performing
|
||||
table lookup using that texel's 2-bit index.
|
||||
|
||||
Table Lookup:
|
||||
|
||||
2-bit index of Color for texel 31 to texel 0
|
||||
texel 31 to texel 0 (ARGB8888)
|
||||
|
||||
0 color0, alpha = ffh
|
||||
1 color1, alpha = ffh
|
||||
2 color2, alpha = ffh
|
||||
3 color3, alpha = ffh
|
||||
|
||||
|
||||
3. FXT1 Compressed Texture Format CC_MIXED:
|
||||
|
||||
(rgb555) (2-bit/texel)
|
||||
mode[0] glsb[1:0] alpha[0] color3 color2 color1 color0 texel 31to16 texel 15to0
|
||||
1 2 1 15 15 15 15 32 32
|
||||
|
||||
|
||||
[127] mode[0]
|
||||
[126:125] glsb[1:0] (lsbs of green for color 1 & color 3)
|
||||
[124] alpha[0]
|
||||
[123:119] color3(r5)
|
||||
[118:114] color3(g5)
|
||||
[113:109] color3(b5)
|
||||
[108:104] color2(r5)
|
||||
[103:99] color2(g5)
|
||||
[98:94] color2(b5)
|
||||
[93:89] color1(r5)
|
||||
[88:84] color1(g5)
|
||||
[83:79] color1(b5)
|
||||
[78:74] color0(r5)
|
||||
[73:69] color0(g5)
|
||||
[68:64] color0(b5)
|
||||
[63:62] texel 31
|
||||
...
|
||||
[33:32] texel 16
|
||||
[31:30] texel 15
|
||||
...
|
||||
[1:0] texel 0
|
||||
|
||||
In CC_MIXED format, mode[0]=1 (only one bit), color2 and color3 are
|
||||
used for texels 31 to 16, and color0 and color1 are used for texels
|
||||
15 to 0. When alpha[0] = 0, the two pairs of colors (colors 0 and 1
|
||||
for texels 15 to 0 and colors 2 and 3 for texels 31 to 16) are
|
||||
interpreted as 16-bit RGB565 colors. For color1 and color3, the LSB
|
||||
(bit 0) of the green channel comes from the glsb bits
|
||||
(color1.green[0] = bit 125, color3.green[0] = bit 126). For color0
|
||||
and color2, the LSB (bit 0) of the green channel comes from the
|
||||
upper select bit for texel 0 and texel 16, respectively
|
||||
(color0.green[0] = bit 1 xor bit 125, color2.green[0] = bit 33 xor
|
||||
bit 126). The two 16-bit colors are then expanded to a 24-bit RGB888
|
||||
format by bit replication (most significant bits replicated in the
|
||||
least significant bits), and are then used to create 2 more levels
|
||||
of color in between the color0/2 and color1/3 values through linear
|
||||
interpolation. A total of 4 colors are therefore available for 2-bit
|
||||
index per texel selection.
|
||||
|
||||
When alpha[0]=1, color0 and color2 are interpreted as 15-bit RGB555
|
||||
colors, and color 1 and color3 are interpreted as RGB565 colors. For
|
||||
color0 and color2, the 15-bit RGB555 colors are expanded to 24-bit
|
||||
RGB888 colors by bit replication. For color1 and color3, the LSB
|
||||
(bit 0) of the green channel comes from the glsb bits
|
||||
(color1.green[0] = bit 125, color3.green[0] = bit 126), and then bit
|
||||
replication is used to convert from the 16-bit RGB565 format to a
|
||||
24-bit RGB888 format. A third color is created by linear
|
||||
interpolation (interpolating between the converted 24-bit RGB888
|
||||
color0 and color1 for texels 15 to 0, and interpolating between the
|
||||
converted 24-bit RGB888 color2 and color3 for texels 31 to 16).
|
||||
Finally, a fourth color (texel index 0x3) is defined to be
|
||||
transparent black (r,g,b=00h, alpha=00h). A total of 4 colors are
|
||||
therefore available for 2-bit index per texel selection. The 32-bit
|
||||
(ARGB8888) color value for all texels is obtained by performing
|
||||
table lookup using each texel's 2-bit index.
|
||||
|
||||
Creating the 24-bit (RGB888) base colors color3 and color2:
|
||||
|
||||
Color3(red) = {[123:119], [123:121]}
|
||||
Color3(green) = {[118:114], [126], [118:117]}
|
||||
Color3(blue) = {[113:109], [113:111]}
|
||||
Color2(red) = {[108:104], [108:106]}
|
||||
Color2(green) = (alpha[0]=1) ? {[103:99],[103:101]}
|
||||
: {[103:99],[33]^[126],[103:102]}
|
||||
Color2(blue) = {[98:94], [98:96]}
|
||||
|
||||
Creating the 24-bit (RGB888) base colors color1 and color0:
|
||||
|
||||
Color1(red) = {[93:89], [93:91]}
|
||||
Color1(green) = {[88:84], [125], [88:87]}
|
||||
Color1(blue) = {[83:79], [83:81]}
|
||||
Color0(red) = {[78:74], [78:76]}
|
||||
Color0(green) = (alpha[0]=1) ? {[73:69, [73:71]}
|
||||
: {[73:69], [1]^[125], [73:72]}
|
||||
Color0(blue) = {[68:64], [68:66]}
|
||||
|
||||
When alpha[0]=0, because one of the texel select bits is used to
|
||||
determine a bit of color0 and color2, the software encoder must
|
||||
perform some very tricky operations. The method below describes how
|
||||
to generate color0 and color1 and the associated select bits (the
|
||||
same method applies to determining the lsb of green for color2 and
|
||||
color3):
|
||||
|
||||
1. Determine the 16-bit RGB565 color values for color0 & color1.
|
||||
|
||||
2. Determine the select bits for each pixel in the 4x4 sub-block.
|
||||
|
||||
3. If (pixel[0].select[1] != color0.green[0]^color1.green[0]) then
|
||||
swap color0 &color1, and invert all the select bits.
|
||||
|
||||
Below is a snippet of psuedo-C code to generate bits 0-31, bits
|
||||
64-93 & bit 125 based on the initial color0, color1 and pixel
|
||||
indices:
|
||||
|
||||
struct RGB565 {Byte red; Byte green; Byte blue};
|
||||
|
||||
struct CSels {Byte index[16]};
|
||||
|
||||
// cc_mixed_right_half derives bits[93:64] of the 128 bit data word of a
|
||||
// CC_MIXED non-alpha compression block and returns them in 'bits_64_to_31'.
|
||||
// Plus, as a bonus, you will receive bit 125, containing the lsb of
|
||||
// the green channel of color1, and bits_0_to_31, containing all of the pixel indices.
|
||||
void
|
||||
cc_mixed_right_half( RGB565 color0, RGB565 color1,
|
||||
CSels pix,
|
||||
Dword &bits_0_to_31,
|
||||
Dword &bits_64_to_93,
|
||||
Bit &bit125)
|
||||
{
|
||||
RGB565 o_color0;
|
||||
RGB565 o_color1;
|
||||
|
||||
// Determine if we need to switch color0 & color1
|
||||
if (((pix.index[0] >> 1) & 1) != ((color0.green ^ color1.green) & 1)) {
|
||||
o_color1 = color0;
|
||||
o_color0 = color1;
|
||||
|
||||
for (int i=0; i<16; i++)
|
||||
pix.index[i] = ~pix.index[i] & 3;
|
||||
} else {
|
||||
o_color0 = color0;
|
||||
o_color1 = color1;
|
||||
}
|
||||
|
||||
// Save lsb of color1.green in bit125
|
||||
bit125 = o_color1.green & 1;
|
||||
|
||||
// Convert color0 & color1 to RGB555, and then munge into bits 64 to 93
|
||||
o_color0.green >>= 1;
|
||||
o_color1.green >>= 1;
|
||||
|
||||
bits_64_to_93 = ( (o_color1.red<<25) | (o_color1.green<<20) | (o_color1.blue<<15)
|
||||
| (o_color0.red<<10) | (o_color0.green<<5) | (o_color0.blue) );
|
||||
|
||||
// Munge the pixel indices into bits 0 to 31
|
||||
bits_0_to_31 = 0;
|
||||
|
||||
for (int i=0; i<16; i++)
|
||||
bits_0_to_31 |= pix.index[i]<<(i*2);
|
||||
}
|
||||
|
||||
|
||||
Generating the 4-entry lookup table for texels 31 to 16:
|
||||
|
||||
If alpha[0]=0,
|
||||
Color[0] = color2[r,g,b] , alpha=ffh
|
||||
Color[1] = (2 * color2[r,g,b] + color3[r,g,b] + 1) / 3, alpha=ffh
|
||||
Color[2] = (color2[r,g,b] + 2 * color3[r,g,b] +1) / 3, alpha=ffh
|
||||
Color[3] = color3[r,g,b], alpha=ffh
|
||||
|
||||
If alpha[0]=1,
|
||||
Color[0] = color2[r,g,b], alpha=ffh
|
||||
Color[1] = (color2[r,g,b] + color3[r,g,b]) / 2, alpha=ffh
|
||||
Color[2] = color3[r,g,b], alpha=ffh
|
||||
Color[3] = [a,r,g,b] = 00h
|
||||
|
||||
Generating the 4-entry lookup table for texels 15 to 0:
|
||||
|
||||
If alpha[0]=0,
|
||||
Color[0] = color0[r,g,b] , alpha=ffh
|
||||
Color[1] = (2 * color0[r,g,b] + color1[r,g,b] + 1) / 3, alpha=ffh
|
||||
Color[2] = (color0[r,g,b] + 2 * color1[r,g,b] + 1) / 3, alpha=ffh
|
||||
Color[3] = color1[r,g,b], alpha=ffh
|
||||
|
||||
If alpha[0]=1,
|
||||
Color[0] = color0[r,g,b], alpha=ffh
|
||||
Color[1] = (color0[r,g,b] + color1[r,g,b]) / 2, alpha=ffh
|
||||
Color[2] = color1[r,g,b], alpha=ffh
|
||||
Color[3] = [a,r,g,b] = 00h
|
||||
|
||||
Table Lookup:
|
||||
2-bit index of Color for texel 31 to texel 0
|
||||
texel 31 to texel 0 ARGB8888
|
||||
|
||||
0 color[0], {a[7:0], r[7:0], g[7:0], b[7:0]}
|
||||
1 color[1]
|
||||
2 color[2]
|
||||
3 color[3]
|
||||
|
||||
|
||||
4. FXT1 Compressed Texture format CC_ALPHA:
|
||||
|
||||
(argb5555) (2-bit/texel)
|
||||
mode[2:0] lerp alpha2 alpha1 alpha0 color2 color1 color0 texel 31 to 16 texel 15 to 0
|
||||
3 1 5 5 5 15 15 15 32 32
|
||||
|
||||
[127:125] mode[2:0]
|
||||
[124] lerp
|
||||
[123:119] color2(a5)
|
||||
[118:114] color1(a5)
|
||||
[113:109] color0(a5)
|
||||
[108:104] color2(r5)
|
||||
[103:99] color2(g5)
|
||||
[98:94] color2(b5)
|
||||
[93:89] color1(r5)
|
||||
[88:84] color1(g5)
|
||||
[83:79] color1(b5)
|
||||
[78:74] color0(r5)
|
||||
[73:69] color0(g5)
|
||||
[68:64] color0(b5)
|
||||
[63:62] texel 31
|
||||
...
|
||||
[33:32] texel 16
|
||||
[31:30] texel 15
|
||||
...
|
||||
[1:0] texel 0
|
||||
|
||||
In CC_ALPHA format, mode[2:0]=011b, three 20-bit colors color2,
|
||||
color1 and color0 (ARGB5555) are converted to a 32-bit (ARGB8888)
|
||||
format by duplicating the upper 3-bits for the 3 LSBs (all the color
|
||||
channels and the alpha channel are converted from 5-bit formats to
|
||||
8-bit formats using this bit duplication).
|
||||
|
||||
Creating the 32-bit (RGB8888) base colors color2, color1, and color0:
|
||||
|
||||
Color2(alpha) = {[123:119], [123:121]}
|
||||
Color2(red) = {[108:104], [108:106]}
|
||||
Color2(green) = {[103:99], [103:101]}
|
||||
Color2(blue) = {[98:94], [98:96]}
|
||||
Color1(alpha) = {[118:114], [118:116]}
|
||||
Color1(red) = {[93:89], [93:91]}
|
||||
Color1(green) = {[88:84], [88:86]}
|
||||
Color1(blue) = {[83:79], [83:81]}
|
||||
Color0(alpha) = {[113:109], [113:111]}
|
||||
Color0(red) = {[78:74], [78:76]}
|
||||
Color0(green) = {[73:69], [73:71]}
|
||||
Color0(blue) = {[68:64], [68:66]}
|
||||
|
||||
When lerp = 0 (bit 124 = 0), the converted 32-bit colors color2,
|
||||
color1, and color0 are used directly as the first 3 entries in the
|
||||
4-entry lookup table. The last entry in the 4-entry lookup table,
|
||||
accessed with index=3, is defined to be transparent black (rgb=00h,
|
||||
alpha=00h). A total of 4 colors are therefore available for 2-bit
|
||||
index per texel selection, and the 32-bit (ARGB8888) color value for
|
||||
all texels is obtained by performing table lookup using each texel's
|
||||
2-bit index.
|
||||
|
||||
Table Lookup (when lerp = 0):
|
||||
|
||||
Index of texel 31 to 0 Color for texel 31 to texel 0
|
||||
(ARGB8888)
|
||||
|
||||
0 Color[0] = color0 alpha = alpha0
|
||||
1 Color[1] = color1 alpha = alpha1
|
||||
2 Color[2] = color2 alpha = alpha2
|
||||
3 Color[3] = 000000h alpha = 00h
|
||||
|
||||
When lerp = 1 (bit 124 = 1), the converted 32-bit colors color2 and
|
||||
color1 are used as the 32-bit base colors for texels 31 to 16, and
|
||||
the converted 32-bit colors color1 and color0 are used as the base
|
||||
colors for texels 15 to 0. The 32-bit base colors are then used to
|
||||
create 2 more levels of color through linear interpolation. A total
|
||||
of 4 colors are therefore available for 2-bit index per texel
|
||||
selection, and the 32-bit (ARGB8888) color value for all texels is
|
||||
obtained by performing table lookup using each texel's 2-bit index.
|
||||
|
||||
Creating the 4 colors used in the 4-entry lookup table from the
|
||||
32-bit base colors (when lerp = 1):
|
||||
|
||||
For texel 31 to texel 16
|
||||
Color[0] = color2[a,r,g,b]
|
||||
Color[1] = (2 * color2[a,r,g,b] + color1[a,r,g,b] + 1) / 3
|
||||
Color[2] = (color2[a,r,g,b] + 2 * color1[a,r,g,b] +1) / 3
|
||||
Color[3] = color1[a,r,g,b]
|
||||
|
||||
For texel 15 to texel 0
|
||||
Color[0] = color0[a,r,g,b]
|
||||
Color[1] = (2 * color0[a,r,g,b] + color1[a,r,g,b] +1) / 3
|
||||
Color[2] = (color0[a,r,g,b] + 2 * color1[a,r,g,b] +1) / 3
|
||||
Color[3] = color1[a,r,g,b]
|
||||
|
||||
Table Lookup (when lerp = 1):
|
||||
|
||||
Index of texel 31 to 0 Color for texel 31 to texel 0
|
||||
(ARGB8888)
|
||||
|
||||
0 color[0]
|
||||
1 color[1]
|
||||
2 color[2]
|
||||
3 color[3]
|
||||
|
||||
Revision History
|
||||
|
||||
0.1, 01/12/00 dwm: Initial revision.
|
||||
0.2, 02/09/00 dwm: Respond to feedback from Intel.
|
||||
0.3, 02/23/00 dwm: Respond to feedback from Intel.
|
||||
0.4, 04/12/00 dwm: Updated to reflect final version of the
|
||||
ARB_texture_compression extension.
|
||||
|
||||
|
||||
Copyright 1999-2000, 3dfx Interactive, Inc.
|
||||
All rights reserved.
|
||||
@@ -0,0 +1,148 @@
|
||||
Name
|
||||
|
||||
WGL_3DL_stereo_control
|
||||
|
||||
Name Strings
|
||||
|
||||
WGL_3DL_stereo_control
|
||||
|
||||
Contact
|
||||
|
||||
Seth Williams, 3Dlabs (seth.williams 'at' 3dlabs.com)
|
||||
Harald Smit, 3Dlabs (harald.smit 'at' 3dlabs.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete
|
||||
|
||||
Version
|
||||
|
||||
Date: 10/05/2005 Revision 1.0
|
||||
|
||||
Number
|
||||
|
||||
313
|
||||
|
||||
Dependencies
|
||||
|
||||
The extension is written against the OpenGL 2.0 Specification
|
||||
although it should work on any previous OpenGL specification.
|
||||
|
||||
The WGL_EXT_extensions_string extension is required.
|
||||
|
||||
Overview
|
||||
|
||||
The stereo extension provides an interface for manipulating the
|
||||
emitter signal from the video adapter used to drive lcd shutter
|
||||
glasses used for stereoscopic viewing.
|
||||
|
||||
IP Status
|
||||
|
||||
None
|
||||
|
||||
Issues
|
||||
|
||||
None
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
BOOL wglSetStereoEmitterState3DL(HDC hDC, UINT uState)
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <uState> parameter:
|
||||
|
||||
WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||
WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||
WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||
WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 2.0 Specification (State and
|
||||
State Requests)
|
||||
|
||||
None
|
||||
|
||||
Additions to Appendix A of the OpenGL 2.0 Specification (Invariance)
|
||||
|
||||
None
|
||||
|
||||
Additions to the WGL Specification
|
||||
|
||||
The state of the stereo emitter for video adapters that support
|
||||
stereoscopic headsets can be modified using the following function:
|
||||
|
||||
BOOL wglSetStereoEmitterState3DL(HDC hDC, UINT uState)
|
||||
|
||||
<hDC> is a device context for the graphics adapter or a window
|
||||
residing on a monitor whose graphics adapter supports the stereo
|
||||
extension.
|
||||
|
||||
<uState> is the new state requested and is one and only one of
|
||||
the following values:
|
||||
|
||||
WGL_STEREO_EMITTER_ENABLE_3DL
|
||||
Turn the stereo emitter output from the video adapter ON.
|
||||
|
||||
WGL_STEREO_EMITTER_DISABLE_3DL
|
||||
Turn the stereo emitter output from the video adapter OFF.
|
||||
|
||||
WGL_STEREO_POLARITY_NORMAL_3DL
|
||||
Generate an emitter signal for the stereoscopic headset to show
|
||||
the scene from the left eye's point of view while the right eye's
|
||||
shutter is closed and vice versa.
|
||||
|
||||
WGL_STEREO_POLARITY_INVERT_3DL
|
||||
Generate an emitter signal for the stereoscopic headset to show
|
||||
the scene from the left eye's point of view while the left eye's
|
||||
shutter is closed and vice versa.
|
||||
|
||||
A call to wglSetStereoEmitterState is necessary for each state transition
|
||||
required.
|
||||
|
||||
Dependencies on WGL_EXT_extensions_string
|
||||
|
||||
Because there is no way to extend wgl, these calls are defined in
|
||||
the ICD and can be called by obtaining the address with
|
||||
wglGetProcAddress. Because this extension is a WGL extension, it
|
||||
is not included in the GL_EXTENSIONS string. Its existence can be
|
||||
determined with the WGL_EXT_extensions_string extension.
|
||||
|
||||
Errors
|
||||
|
||||
If the function succeeds, a value of TRUE is returned. If the
|
||||
function fails, a value of FALSE is returned. To get extended
|
||||
error information, call GetLastError.
|
||||
|
||||
ERROR_DC_NOT_FOUND <hDC> is invalid.
|
||||
|
||||
ERROR_INVALID_DATA <uState> is invalid.
|
||||
|
||||
New State
|
||||
|
||||
None
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None
|
||||
|
||||
Revision History
|
||||
|
||||
09/28/2005 0.1 First draft.
|
||||
10/05/2005 1.0 Initial public release.
|
||||
@@ -0,0 +1,153 @@
|
||||
Name
|
||||
|
||||
AMD_blend_minmax_factor
|
||||
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_blend_minmax_factor
|
||||
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers
|
||||
Pierre Boudier
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
|
||||
Status
|
||||
|
||||
Shipping.
|
||||
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: April 8, 2011
|
||||
Author Revision: 3
|
||||
|
||||
|
||||
Number
|
||||
|
||||
404
|
||||
|
||||
Dependencies
|
||||
|
||||
The extension is written against the OpenGL 4.1 (Core) Specification.
|
||||
|
||||
OpenGL 1.0 is required.
|
||||
|
||||
Overview
|
||||
|
||||
The EXT_blend_minmax extension extended the GL's blending functionality
|
||||
to allow the blending equation to be specified by the application. That
|
||||
extension introduced the MIN_EXT and MAX_EXT blend equations, which caused the
|
||||
result of the blend equation to become the minimum or maximum of the source
|
||||
color and destination color, respectively.
|
||||
|
||||
The MIN_EXT and MAX_EXT blend equations, however, do not include the source
|
||||
or destination blend factors in the arguments to the min and max functions.
|
||||
This extension provides two new blend equations that produce the minimum
|
||||
or maximum of the products of the source color and source factor, and the
|
||||
destination color and destination factor.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <mode> parameter of BlendEquation and BlendEquationi, and by
|
||||
the <modeRGB> and <modeAlpha> parameters of BlendEquationSeparate and
|
||||
BlendEquationSeparatei:
|
||||
|
||||
FACTOR_MIN_AMD 0x901C
|
||||
FACTOR_MAX_AMD 0x901D
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.1 (Core) Specification (OpenGL Operation)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.1 (Core) Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.1 (Core) Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
|
||||
Modify the list of accepted tokens for <mode>, <modeRGB> and <modeAlpha>
|
||||
in the description of BlendEquation{i} and BlendEquationSeparate{i}, p.262:
|
||||
|
||||
"... <mode>, <modeRGB>, <modeAlpha> must be one of FUNC_ADD, FUNC_SUBTRACT,
|
||||
FUNC_REVERSE_SUBTRACT, MIN, MAX, FACTOR_MIN_AMD, or FACTOR_MAX_AMD. ..."
|
||||
|
||||
Add to Table 4.1: RGB and Alpha Blend Equations
|
||||
|
||||
+-----------------+---------------------------+-----------------------------+
|
||||
| Mode | RGB Components | Alpha Component |
|
||||
+-----------------+---------------------------+-----------------------------+
|
||||
| FACTOR_MIN_AMD | R = min(Rs * Sr, Rd * Dr) | A = min(As * Sa, Ad * Da) |
|
||||
| | G = min(Gs * Sg, Gd * Dg) | |
|
||||
| | B = min(Bs * Sb, Bd * Db) | |
|
||||
+-----------------+---------------------------+-----------------------------+
|
||||
| FACTOR_MAX_AMD | R = max(Rs * Sr, Rd * Dr) | A = max(As * Sa, Ad * Da) |
|
||||
| | G = max(Gs * Sg, Gd * Dg) | |
|
||||
| | B = max(Bs * Sb, Bd * Db) | |
|
||||
+-----------------+---------------------------+-----------------------------+
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.1 (Core) Specification (Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.1 (Core) Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Appendix A of the OpenGL 4.1 (Core) Specification (Invariance)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
Modify Table 6.21: Pixel Operations (cont.) p.343
|
||||
|
||||
Change entries for BLEND_EQUATION_ALPHA and BLEND_EQUATION_RGB to:
|
||||
|
||||
+----------------------+---------+---------------+---------------+-------------------------+-------+
|
||||
| Get Value | Type | Get Command | Initial Value | Description | Sec. |
|
||||
+----------------------+---------+---------------+---------------+-------------------------+-------+
|
||||
| BLEND_EQUATION_RGB | 8* x Z7 | GetIntegeri_v | FUNC_ADD | RGB Blending Equation | 4.1.7 |
|
||||
| | | | | for Draw Buffer i | |
|
||||
+----------------------+---------+---------------+---------------+-------------------------+-------+
|
||||
| BLEND_EQUATION_ALPHA | 8* x Z7 | GetIntegeri_v | FUNC_ADD | Alpha Blending Equation | 4.1.7 |
|
||||
| | | | | for Draw Buffer i | |
|
||||
+----------------------+---------+---------------+---------------+-------------------------+-------+
|
||||
|
||||
* Note that the only change change is that BLEND_EQUATION_RGB and
|
||||
BLEND_EQUATION_ALPHA are now Z7 rather than Z5.
|
||||
|
||||
Issues
|
||||
|
||||
None, so far.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
3 04/08/2011 gsellers Fix typo bug in Table 4.1 (caught by Brian Paul)
|
||||
2 09/15/2010 gsellers Update to stand against OpenGL 4.1
|
||||
Add token values.
|
||||
Rename to AMD_blend_minmax_factor.
|
||||
1 03/16/2010 gsellers Initial draft.
|
||||
@@ -0,0 +1,165 @@
|
||||
Name
|
||||
|
||||
AMD_compressed_3DC_texture
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_compressed_3DC_texture
|
||||
|
||||
Contributors
|
||||
|
||||
Aaftab Munshi
|
||||
|
||||
Contact
|
||||
|
||||
Benj Lipchak, AMD (benj.lipchak 'at' amd.com)
|
||||
|
||||
IP Status
|
||||
|
||||
Please contact AMD regarding any intellectual property questions/issues
|
||||
associated with this extension.
|
||||
|
||||
Status
|
||||
|
||||
Complete.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: February 26, 2008
|
||||
Revision: 6
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #39
|
||||
|
||||
Dependencies
|
||||
|
||||
Written based on the wording of the OpenGL ES 1.1 specification.
|
||||
|
||||
Overview
|
||||
|
||||
Two compression formats are introduced:
|
||||
|
||||
- A compression format for two component textures. When used to store
|
||||
normal vectors, the two components are commonly used with a fragment
|
||||
shader that derives the third component.
|
||||
|
||||
- A compression format for single component textures. The single component
|
||||
may be used as a luminance or an alpha value.
|
||||
|
||||
There are a large number of games that use luminance only and/or alpha only
|
||||
textures. For example, monochrome light maps used in a few popular games
|
||||
are 8-bit luminance textures. This extension describes a compression format
|
||||
that provides a 2:1 compression ratio for 8-bit single channel textures.
|
||||
|
||||
Normal maps are special textures that are used to add detail to 3D surfaces.
|
||||
They are an extension of earlier "bump map" textures, which contained per-
|
||||
pixel height values and were used to create the appearance of bumpiness on
|
||||
otherwise smooth surfaces. Normal maps contain more detailed surface
|
||||
information, allowing them to represent much more complex shapes.
|
||||
|
||||
Normal mapping is one of the key features that makes the current generation
|
||||
of games look so much better than earlier titles. A limitation to the
|
||||
effectiveness of this technique is the size of the textures required. In an
|
||||
ideal case where every surface has both a color texture map and a normal
|
||||
texture map, the texture memory and bandwidth requirements would double
|
||||
compared to using color maps alone.
|
||||
|
||||
In fact, the problem is much worse because existing block based compression
|
||||
methods such as DXTc, ETC, and S3TC are ineffective at compressing normal
|
||||
maps. They tend to have trouble capturing the small edges and subtle
|
||||
curvature that normal maps are designed to capture, and they also introduce
|
||||
unsightly block artifacts.
|
||||
|
||||
Because normal maps are used to capture light reflections and realistic
|
||||
surface highlights, these problems are amplified relative to their impact on
|
||||
color textures. The results are sufficiently poor that game artists and
|
||||
developers would rather not use normal map compression at all on most
|
||||
surfaces, and instead limit themselves to lower resolution maps on selected
|
||||
parts of the rendered scene.
|
||||
|
||||
3DC provides an ideal solution to the normal map compression problem. It
|
||||
provides up to 4:1 compression of normal maps, with image quality that is
|
||||
virtually indistinguishable from the uncompressed version. The technique is
|
||||
hardware accelerated, so the performance impact is minimal. Thus,
|
||||
developers are freed to use higher resolution, more detailed normal maps,
|
||||
and/or use them on all of the objects in a scene rather than just a select
|
||||
few.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <internalFormat> parameter of CompressedTexImage2D and
|
||||
CompressedTexImage3DOES:
|
||||
|
||||
3DC_X_AMD 0x87F9
|
||||
3DC_XY_AMD 0x87FA
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 1.3 Specification (Rasterization)
|
||||
|
||||
Add to Table 3.17: Specific Compressed Internal Formats
|
||||
|
||||
Compressed Internal Format Base Internal Format
|
||||
========================== ====================
|
||||
3DC_X_AMD RGB
|
||||
3DC_XY_AMD RGB
|
||||
|
||||
|
||||
Add to Section 3.8.3, Alternate Image Specification
|
||||
|
||||
If <internalFormat> is 3DC_X_AMD, the compressed texture is a
|
||||
single channel compressed texture. If <internalFormat> is 3DC_XY_AMD,
|
||||
the compressed textures contains two channels.
|
||||
|
||||
The details of these formats is not disclosed, so refer to AMD's
|
||||
Compressonator tool in order to encode your textures offline:
|
||||
http://ati.amd.com/developer/compressonator.html
|
||||
|
||||
3DC_X_AMD Format
|
||||
================
|
||||
|
||||
This format compresses a 128 bit block into 64 bits, representing a 2:1
|
||||
compression ratio. The texture lookup unit will return (x, 0, 0, 1): the
|
||||
decoded X value in the red component, 0.0 in the green and blue components,
|
||||
and 1.0 in the alpha component.
|
||||
|
||||
3DC_XY_AMD Format
|
||||
=================
|
||||
|
||||
This format compresses a 512 bit block into 128 bits, representing a 4:1
|
||||
compression ratio. The texture lookup unit will return (x, y, 0, 1): the
|
||||
decoded X value in the red component, the decoded Y value in the green
|
||||
component, 0.0 in the blue component, and 1.0 in the alpha component.
|
||||
|
||||
Using 3DC_XY_AMD to compress normal maps requires an additional step. This
|
||||
is because each value in a normal map is actually a 3D vector, consisting of
|
||||
3 components (x, y, z). These values must be reduced to 2-component values
|
||||
in order to work with 3DC_XY_AMD. Fortunately, this can be handled in a
|
||||
simple way by assuming that all of the normal vectors have a length of 1.
|
||||
Given the values of two components of a vector, the value of the third
|
||||
component can be found using the following mathematical relationship:
|
||||
z = sqrt(1 - (x*x + y*y)). This formula can be implemented using just a
|
||||
couple of fragment shader instructions.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated by TexImage2D, TexSubImage2D,
|
||||
CompressedTexSubImage2D, or CopyTexSubImage2D if <internalformat> or
|
||||
<format> is 3DC_X_AMD or 3DC_XY_AMD.
|
||||
|
||||
New State
|
||||
|
||||
The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
|
||||
COMPRESSED_TEXTURE_FORMATS include 3DC_X_AMD and 3DC_XY_AMD.
|
||||
|
||||
Revision History
|
||||
|
||||
02/26/2008 Benj Lipchak Throw INVALID_OPERATION on subimage updates.
|
||||
09/24/2007 Jon Leech Assign extension number.
|
||||
09/05/2007 Benj Lipchak Cosmetic changes.
|
||||
08/01/2007 Benj Lipchak Publication readiness.
|
||||
06/02/2006 Aaftab Munshi Added IP status.
|
||||
05/12/2006 Aaftab Munshi First Draft.
|
||||
@@ -0,0 +1,151 @@
|
||||
Name
|
||||
|
||||
AMD_compressed_ATC_texture
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_compressed_ATC_texture
|
||||
|
||||
Contributors
|
||||
|
||||
Aaftab Munshi
|
||||
Benj Lipchak
|
||||
|
||||
Contact
|
||||
|
||||
Maurice Ribble, Qualcomm (mribble 'at' qualcomm.com)
|
||||
|
||||
IP Status
|
||||
|
||||
Please contact AMD regarding any intellectual property questions/issues
|
||||
associated with this extension.
|
||||
|
||||
Status
|
||||
|
||||
Complete.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: February 26, 2008
|
||||
Revision: 7
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #40
|
||||
|
||||
Dependencies
|
||||
|
||||
Written based on the wording of the OpenGL ES 1.1 specification.
|
||||
|
||||
Overview
|
||||
|
||||
This extension enables support for ATC compressed texture formats. ATC is
|
||||
AMD's proprietary compression algorithm for compressing textures for
|
||||
handheld devices to save on power consumption, memory footprint and
|
||||
bandwidth.
|
||||
|
||||
Three compression formats are introduced:
|
||||
|
||||
- A compression format for RGB textures.
|
||||
- A compression format for RGBA textures using explicit alpha encoding.
|
||||
- A compression format for RGBA textures using interpolated alpha encoding.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <internalformat> parameter of CompressedTexImage2D and
|
||||
CompressedTexImage3DOES.
|
||||
|
||||
ATC_RGB_AMD 0x8C92
|
||||
ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
|
||||
ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 1.3 Specification (OpenGL Operation)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 1.3 Specification (Rasterization)
|
||||
|
||||
Add to Table 3.17: Specific Compressed Internal Formats
|
||||
|
||||
Compressed Internal Format Base Internal Format
|
||||
=============================== ====================
|
||||
ATC_RGB_AMD RGB
|
||||
ATC_RGBA_EXPLICIT_ALPHA_AMD RGBA
|
||||
ATC_RGBA_INTERPOLATED_ALPHA_AMD RGBA
|
||||
|
||||
|
||||
Add to Section 3.8.3, Alternate Image Specification
|
||||
|
||||
The details of these formats is not disclosed, so refer to AMD's
|
||||
Compressonator tool in order to encode your textures offline:
|
||||
http://ati.amd.com/developer/compressonator.html
|
||||
|
||||
OpenGL ES requires that all mip-levels have to be specified when
|
||||
CompressedTexImage2D is called to load a palettized texture. In this case
|
||||
the "level" value is either 0 or a negative number to indicate the number of
|
||||
mip-levels. This rule is not followed when loading an ATC texture. The
|
||||
"level" number in this case represents the actual mip-level number,
|
||||
so a negative number will raise an error.
|
||||
|
||||
Compressed texture images stored using the ATC compressed image formats are
|
||||
represented as a collection of 4x4 texel blocks.
|
||||
|
||||
ATC_RGB_AMD Format
|
||||
==================
|
||||
|
||||
This format compresses blocks of source texels down to 4 bits per texel.
|
||||
Assuming 8-bit component source texels, this represents a 8:1 compression
|
||||
ratio. This is the best format to use when no alpha channel is needed.
|
||||
|
||||
ATC_RGBA_EXPLICIT_ALPHA_AMD Format
|
||||
==================================
|
||||
|
||||
This format compresses blocks of source texels down to 8 bits per texel.
|
||||
Assuming 8-bit component source texels, this represents a 4:1 compression
|
||||
ratio. This is generally the best format to use when alpha transitions are
|
||||
sharp.
|
||||
|
||||
ATC_RGBA_INTERPOLATED_ALPHA_AMD Format
|
||||
======================================
|
||||
|
||||
This format compresses blocks of source texels down to 8 bits per texel.
|
||||
Assuming 8-bit component source texels, this represents a 4:1 compression
|
||||
ratio. This is generally the best format to use when alpha transitions are
|
||||
gradient.
|
||||
|
||||
The size in bytes of a compressed ATC_RGB_AMD image is:
|
||||
|
||||
((width_in_texels+3)/4) * ((height_in_texels+3)/4) * 8
|
||||
|
||||
The size in bytes of a compressed ATC_RGBA_EXPLICIT_ALPHA_AMD or
|
||||
ATC_RGBA_INTERPOLATED_ALPHA_AMD image is:
|
||||
|
||||
((width_in_texels+3)/4) * ((height_in_texels+3)/4) * 16
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated by TexImage2D, TexSubImage2D,
|
||||
CompressedTexSubImage2D, or CopyTexSubImage2D if <internalformat> or
|
||||
<format> is ATC_RGB_AMD, ATC_RGBA_EXPLICIT_ALPHA_AMD, or
|
||||
ATC_RGBA_INTERPOLATED_ALPHA_AMD.
|
||||
|
||||
New State
|
||||
|
||||
The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
|
||||
COMPRESSED_TEXTURE_FORMATS include ATC_RGB_AMD, ATC_RGBA_EXPLICIT_ALPHA_AMD,
|
||||
and ATC_RGBA_INTERPOLATED_ALPHA_AMD.
|
||||
|
||||
Revision History
|
||||
|
||||
09/06/2012 Maurice Ribble Update contact and add block size data.
|
||||
02/26/2008 Benj Lipchak Throw INVALID_OPERATION on subimage updates.
|
||||
10/24/2007 Benj Lipchak Add interpolated alpha RGBA format.
|
||||
09/24/2007 Jon Leech Assign extension number.
|
||||
09/05/2007 Benj Lipchak Cosmetic changes.
|
||||
08/01/2007 Benj Lipchak Publication readiness.
|
||||
07/07/2005 Aaftab Munshi Fixed typos.
|
||||
09/15/2004 Aaftab Munshi Created the document.
|
||||
@@ -0,0 +1,169 @@
|
||||
Name
|
||||
|
||||
AMD_conservative_depth
|
||||
|
||||
Name String
|
||||
|
||||
GL_AMD_conservative_depth
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Pierre Boudier, AMD
|
||||
Graham Sellers, AMD
|
||||
|
||||
Status
|
||||
|
||||
In Progress
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 10/25/2010
|
||||
Author Revision: 4
|
||||
|
||||
Number
|
||||
|
||||
385
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 3.0 is required.
|
||||
|
||||
This extension is written against the OpenGL Shading Language Version 4.00.
|
||||
|
||||
Overview
|
||||
|
||||
There is a common optimization for hardware accelerated implementation of
|
||||
OpenGL which relies on an early depth test to be run before the fragment
|
||||
shader so that the shader evaluation can be skipped if the fragment ends
|
||||
up being discarded because it is occluded.
|
||||
|
||||
This optimization does not affect the final rendering, and is typically
|
||||
possible when the fragment does not change the depth programmatically.
|
||||
(i.e.: it does not write to the built-in gl_FragDepth output). There are,
|
||||
however a class of operations on the depth in the shader which could
|
||||
still be performed while allowing the early depth test to operate.
|
||||
|
||||
This extension allows the application to pass enough information to the
|
||||
GL implementation to activate such optimizations safely.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
Modifications to the OpenGL Shading Language Specification version 1.50.9
|
||||
|
||||
Additions to Chapter 1 of the OpenGL Shading Language 4.00.08 Specification (Introduction)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL Shading Language 4.00.08 Specification (Overview of OpenGL Shading)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language 4.00.08 Specification (Basics)
|
||||
|
||||
Add a new Section 3.3.x, GL_AMD_conservative_depth Extension
|
||||
|
||||
Including the following line in a shader can be used to control the language
|
||||
features described in this extension:
|
||||
|
||||
#extension GL_AMD_conservative_depth: <behavior>
|
||||
|
||||
where <behavior> is as described in section 3.3.
|
||||
|
||||
A new preprocessor #define is added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_AMD_conservative_depth 1
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language 4.00.08 Specification (Variables and Types)
|
||||
|
||||
Modify Section 4.3.8.2 (Output Layout Qualifiers) page 47
|
||||
|
||||
Modify the paragraph beginning: "Fragment shaders allow output layout
|
||||
qualifiers only..."
|
||||
|
||||
Fragment shaders allow output layout qualifiers only on the interface
|
||||
out, or for the purposes of redeclaring the built-in variable
|
||||
gl_FragDepth (see Section 7.1, Built-In Language Variables).
|
||||
|
||||
Insert the following before the paragraph beginning: "Geometry shaders can
|
||||
have three types of output layout qualifiers..."
|
||||
|
||||
The built-in fragment shader variable gl_FragDepth may be redeclared
|
||||
using one of the following layout qualifiers.
|
||||
|
||||
layout-qualifier-id
|
||||
depth_any
|
||||
depth_greater
|
||||
depth_less
|
||||
depth_unchanged
|
||||
|
||||
For example:
|
||||
|
||||
layout (depth_greater) out float gl_FragDepth;
|
||||
|
||||
The layout qualifier for gl_FragDepth controls how the GL will interpret
|
||||
assignments to the gl_FragDepth out variable for the purpose of depth
|
||||
testing. Any assignment to gl_FragDepth will be honored by the shader
|
||||
and the updated value of gl_FragDepth will still be written to the
|
||||
depth buffer if it is determined that the depth write should occur.
|
||||
However, depending on the layout qualifier of gl_FragDepth and the
|
||||
current state of depth testing, the GL may perform optimizations or
|
||||
reordering of operations to depth test and writes to improve performance.
|
||||
|
||||
By default, gl_FragDepth assumes the <depth_any> layout qualifier. When
|
||||
the layout qualifier for gl_FragDepth is <depth_any>, the shader compiler
|
||||
will note any assignment to gl_FragDepth modifying it in an unknown way,
|
||||
and depth testing will always be performed after the shader has executed.
|
||||
When the layout qualifier is <depth_greater>, the GL will assume that
|
||||
any modification of gl_FragDepth will only increase its value. When the
|
||||
layout qualifier is <depth_less>, the GL will assume that any
|
||||
modification of gl_FragDepth will only decrease its value. When the
|
||||
layout qualifier is <depth_unchanged>, the shader compiler will honor
|
||||
any modification to gl_FragDepth, but the rest of the GL assume that
|
||||
gl_FragDepth is not assigned a new value.
|
||||
|
||||
If a shader redeclares gl_FragDepth using the <depth_greater>,
|
||||
<depth_less> or <depth_unchanged> and then violates this contract, the
|
||||
results of the depth test may be inaccurate and any resulting rendering
|
||||
will produce undefined results. However, no error is generated.
|
||||
|
||||
Redeclarations are performed as follows:
|
||||
|
||||
out float gl_FragDepth; // Redeclaration that changes nothing is allowed
|
||||
|
||||
layout (depth_any) out float gl_FragDepth; // Assume that gl_FragDepth may be modified in any way
|
||||
layout (depth_greater) out float gl_FragDepth; // Assume that gl_FragDepth may be modified such that its value will only increase
|
||||
layout (depth_less) out float gl_FragDepth; // Assume that gl_FragDepth may be modified such that its value will only decrease
|
||||
layout (depth_unchanged) out float gl_FragDepth; // Assume that gl_FragDepth will not be modified
|
||||
|
||||
If gl_FragDepth is redeclared in any fragment shader in a program, it must
|
||||
be redeclared in all fragment shaders in that program that have static
|
||||
assignments to gl_FragDepth. All redeclarations of gl_FragDepth in all
|
||||
fragment shaders in a single program must have the same set of qualifiers.
|
||||
Within any shader, the first redeclarations of gl_FragDepth must appear
|
||||
before any use of gl_FragDepth. The built-in gl_FragDepth is only
|
||||
predeclared in fragment shaders, so redeclaring it in any other shader
|
||||
language will be illegal.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
4 25/10/2010 gsellers Apply patch from idr.
|
||||
3 04/01/2010 gsellers Minor cleanup. Update to GLSL 4.00.
|
||||
2 12/01/2009 gsellers Internal updates
|
||||
1 11/03/2009 pboudier Initial draft
|
||||
@@ -0,0 +1,577 @@
|
||||
Name
|
||||
|
||||
AMD_debug_output
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_debug_output
|
||||
|
||||
Contact
|
||||
|
||||
Jaakko Konttinen (jaakko.konttinen 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers, AMD
|
||||
Mark Young, AMD
|
||||
Ahmet Oguz Akyuz, AMD
|
||||
|
||||
Status
|
||||
|
||||
Experimental
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: May 7, 2010
|
||||
Author Revision: 9
|
||||
|
||||
Number
|
||||
|
||||
395
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.1 is required.
|
||||
|
||||
WGL_ARB_create_context or GLX_ARB_create_context is required.
|
||||
|
||||
The extension is written against the OpenGL 3.0 specification.
|
||||
|
||||
This extension trivially interacts with ARB_vertex_program and
|
||||
ARB_fragment_program.
|
||||
|
||||
Overview
|
||||
|
||||
This extension allows the GL to notify applications when various
|
||||
debug events occur in contexts that have been created with the debug
|
||||
flag, as provided by WGL_ARB_create_context and GLX_ARB_create_context.
|
||||
|
||||
These events are represented in the form of enumerable messages with an
|
||||
included human-readable translation. Examples of debug events include
|
||||
incorrect use of the GL, warnings of undefined behavior, and performance
|
||||
warnings.
|
||||
|
||||
A message is uniquely identified by a category and an implementation-
|
||||
dependent ID within that category. Message categories are general and are
|
||||
used to organize large groups of similar messages together. Examples of
|
||||
categories include GL errors, performance warnings, and deprecated
|
||||
functionality warnings. Each message is also assigned a severity level
|
||||
that denotes roughly how "important" that message is in comparison to
|
||||
other messages across all categories. For example, notification of a GL
|
||||
error would have a higher severity than a performance warning due to
|
||||
redundant state changes.
|
||||
|
||||
Messages are communicated to the application through an application-defined
|
||||
callback function that is called by the GL implementation on each debug
|
||||
message. The motivation for the callback routine is to free application
|
||||
developers from actively having to query whether any GL error or other
|
||||
debuggable event has happened after each call to a GL function. With a
|
||||
callback, developers can keep their code free of debug checks, and only have
|
||||
to react to messages as they occur. In order to support indirect rendering,
|
||||
a message log is also provided that stores copies of recent messages until
|
||||
they are actively queried.
|
||||
|
||||
To control the volume of debug output, messages can be disabled either
|
||||
individually by ID, or entire groups of messages can be turned off based
|
||||
on category or severity.
|
||||
|
||||
The only requirement on the minimum quantity and type of messages that
|
||||
implementations of this extension must support is that a message must be
|
||||
sent notifying the application whenever any GL error occurs. Any further
|
||||
messages are left to the implementation. Implementations do not have
|
||||
to output messages from all categories listed by this extension
|
||||
in order to support this extension, and new categories can be added by
|
||||
other extensions.
|
||||
|
||||
This extension places no restrictions or requirements on any additional
|
||||
functionality provided by the debug context flag through other extensions.
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP claims.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void DebugMessageEnableAMD(enum category,
|
||||
enum severity,
|
||||
sizei count,
|
||||
const uint* ids,
|
||||
boolean enabled);
|
||||
|
||||
void DebugMessageInsertAMD(enum category,
|
||||
enum severity,
|
||||
uint id,
|
||||
sizei length,
|
||||
const char* buf);
|
||||
|
||||
void DebugMessageCallbackAMD(DEBUGPROCAMD callback,
|
||||
void* userParam);
|
||||
|
||||
uint GetDebugMessageLogAMD(uint count,
|
||||
sizei bufsize,
|
||||
enum* categories,
|
||||
uint* severities,
|
||||
uint* ids,
|
||||
sizei* lengths,
|
||||
char* message);
|
||||
|
||||
New Types
|
||||
|
||||
The callback function that applications can define, and
|
||||
is accepted by DebugMessageCallbackAMD, is defined as:
|
||||
|
||||
typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,
|
||||
GLenum category,
|
||||
GLenum severity,
|
||||
GLsizei length,
|
||||
const GLchar* message,
|
||||
GLvoid* userParam);
|
||||
|
||||
Note that this function pointer is defined as having the
|
||||
same calling convention as the GL functions.
|
||||
|
||||
New Tokens
|
||||
|
||||
Tokens accepted by GetIntegerv:
|
||||
|
||||
MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143
|
||||
MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144
|
||||
DEBUG_LOGGED_MESSAGES_AMD 0x9145
|
||||
|
||||
Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD,
|
||||
DebugMessageInsertAMD, and DEBUGPROCAMD callback function
|
||||
for <severity>:
|
||||
|
||||
DEBUG_SEVERITY_HIGH_AMD 0x9146
|
||||
DEBUG_SEVERITY_MEDIUM_AMD 0x9147
|
||||
DEBUG_SEVERITY_LOW_AMD 0x9148
|
||||
|
||||
Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD,
|
||||
and DEBUGPROCAMD callback function for <category>:
|
||||
|
||||
DEBUG_CATEGORY_API_ERROR_AMD 0x9149
|
||||
DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
|
||||
DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
|
||||
DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
|
||||
DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
|
||||
DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
|
||||
DEBUG_CATEGORY_APPLICATION_AMD 0x914F
|
||||
DEBUG_CATEGORY_OTHER_AMD 0x9150
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 3.0 Specification (OpenGL Operation)
|
||||
|
||||
In section 2.5 - GL Errors:
|
||||
Add to the end of the section (pg 19): "If an error is generated by a debug
|
||||
GL context (Section 2.20), the context will send a message to the application
|
||||
that a GL error has occurred. This message may contain more information
|
||||
about the nature of the error."
|
||||
|
||||
After section 2.19 - Primitive Clipping:
|
||||
Add new section: 2.20 - Debug Contexts
|
||||
|
||||
Application developers can obtain more information from the GL runtime using
|
||||
a debug-enabled context. This information can include details about
|
||||
GL errors, undefined behavior, implementation-dependent performance warnings,
|
||||
or other useful hints. This information is communicated through the
|
||||
generation of debug messages when GL commands are executed. The application
|
||||
can choose to either actively query for these messages, or allow the GL to
|
||||
call back to the application on each message via a function pointer.
|
||||
|
||||
2.20.1 - Debug Messages
|
||||
|
||||
A debug message is uniquely identified by its category and an unsigned
|
||||
integer message ID within that category. The category must be one of the
|
||||
symbolic constants listed in Table 2.12. Although every distinct message
|
||||
must have a unique number within a category, there is no enforcement by this
|
||||
extension for how GL implementations assign numbers to specific messages.
|
||||
|
||||
Each message also has a severity level that roughly describes its
|
||||
significance across all categories. The severity level of a message is
|
||||
one of the symbolic constants defined in Table 2.13. Because messages
|
||||
can be disabled across all categories by severity level, this feature can
|
||||
be used to quickly control the volume of debug output by the application.
|
||||
|
||||
Category Token Informs about
|
||||
-------------- -------------
|
||||
DEBUG_CATEGORY_API_ERROR_AMD GL errors caused by invalid API use
|
||||
|
||||
DEBUG_CATEGORY_WINDOW_SYSTEM_AMD Errors and notices from the
|
||||
windowing layer
|
||||
|
||||
DEBUG_CATEGORY_DEPRECATION_AMD Use of functionality that is either
|
||||
deprecated or marked for future
|
||||
deprecation
|
||||
|
||||
DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD Behavior undefined according to
|
||||
specification
|
||||
|
||||
DEBUG_CATEGORY_PERFORMANCE_AMD Implementation-dependent performance
|
||||
warnings
|
||||
|
||||
DEBUG_CATEGORY_SHADER_COMPILER_AMD Information from the GLSL or ARB
|
||||
shader compiler and linker
|
||||
|
||||
DEBUG_CATEGORY_APPLICATION_AMD Application-generated messages
|
||||
|
||||
DEBUG_CATEGORY_OTHER_AMD Messages that do not fit in any of
|
||||
the other categories
|
||||
----------------------------------------------------------------------------
|
||||
Table 2.12: Categories of debug messages. Each message is associated with
|
||||
one of these categories.
|
||||
|
||||
|
||||
Severity Level Token Suggested examples of messages
|
||||
-------------------- ------------------------------
|
||||
|
||||
DEBUG_SEVERITY_HIGH_AMD Any GL error; any undefined behavior;
|
||||
any GLSL or ARB shader compiler and
|
||||
linker errors;
|
||||
|
||||
DEBUG_SEVERITY_MEDIUM_AMD Severe performance warnings; GLSL
|
||||
or ARB shader compiler and linker
|
||||
warnings; use of currently deprecated
|
||||
behavior
|
||||
|
||||
DEBUG_SEVERITY_LOW_AMD Performance warnings from redundant
|
||||
state changes
|
||||
----------------------------------------------------------------------------
|
||||
Table 2.13: Severity levels of messagse. Each debug message is associated
|
||||
with one of these severity levels.
|
||||
|
||||
|
||||
Every message also has a null-terminated string representation that is used
|
||||
to describe the message. The contents of the string can change slightly
|
||||
between different instances of the same message (e.g. which parameter value
|
||||
caused a specific GL error to occur). The formatting of a message string is
|
||||
left as implementation-dependent, although it should give a concise and
|
||||
legible description of the message's purpose. Messages with different IDs
|
||||
should also have sufficiently distinguishable string representations to
|
||||
warrant their separation.
|
||||
|
||||
2.20.2 - Receiving Messages
|
||||
|
||||
Applications can listen for messages by providing the GL with a callback
|
||||
function pointer by calling:
|
||||
|
||||
void DebugMessageCallbackAMD(DEBUGPROCAMD callback,
|
||||
void* userParam);
|
||||
|
||||
With <callback> storing the address of the callback function. This
|
||||
function's signature must follow the type definition of DEBUGPROCAMD, and
|
||||
its calling convention must be the same as the calling convention of GL
|
||||
functions. Anything else will result in undefined behavior. Only one
|
||||
debug callback can be specified for the current context, and further calls
|
||||
overwrite the previous callback. Specifying zero as the value of <callback>
|
||||
clears the current callback and disables message output through callbacks.
|
||||
Applications can specify user-specified data through the pointer
|
||||
<userParam>. The context will store this pointer and will include it
|
||||
as one of the parameters of each call to the callback function. The error
|
||||
INVALID_OPERATION will be generated if this function is called for contexts
|
||||
created without the debug flag.
|
||||
|
||||
If the application has specified a callback function in a debug context,
|
||||
the implementation will call that function whenever any unfiltered message
|
||||
is generated. The ID, category, and severity of the message are specified
|
||||
by the callback parameters <id>, <category> and <severity>, respectively.
|
||||
The string representation of the message is stored in <message> and its length
|
||||
(excluding the null-terminator) is stored in <length>. The parameter
|
||||
<userParam> is the user-specified value that was passed when calling
|
||||
DebugMessageCallbackAMD. The memory for <message> is allocated, owned and
|
||||
released by the implementation, and should only be considered valid for
|
||||
the duration of the callback function call. While it is allowed to
|
||||
concurrently use multiple debug contexts with the same debug callback function,
|
||||
note that it is the application's responsibility to ensure that any work that
|
||||
occurs inside the debug callback function is thread-safe. Furthermore,
|
||||
calling any GL or window layer function from within the callback function
|
||||
results in undefined behavior.
|
||||
|
||||
If no callback is set, then messages are instead stored in an internal
|
||||
message log up to some maximum number of strings as defined by the
|
||||
implementation-dependent constant MAX_DEBUG_LOGGED_MESSAGES_AMD. Each
|
||||
context stores its own message log and will only store messages generated by
|
||||
commands operating in that context. If the message log is full, then the
|
||||
oldest messages will be removed from the log to make room for newer ones.
|
||||
The application can query the number of messages currently in the log by
|
||||
obtaining the value of DEBUG_LOGGED_MESSAGES_AMD, and can get the contents
|
||||
of those messages using the command:
|
||||
|
||||
uint GetDebugMessageLogAMD(uint count,
|
||||
sizei logSize,
|
||||
enum* categories,
|
||||
enum* severities,
|
||||
uint* ids,
|
||||
sizei* lengths,
|
||||
char* messageLog);
|
||||
|
||||
This function will fetch as many messages as possible from the message
|
||||
log up to <count> in order from oldest to newest, and will return the
|
||||
number of messages fetched. Those messages that were fetched will be
|
||||
removed from the log. The value of <count> must be greater than zero and
|
||||
less than MAX_DEBUG_LOGGED_MESSAGES_AMD or otherwise the error
|
||||
INVALID_VALUE will be generated. The value of <count> can be larger than
|
||||
the actual number of messages currently in the log. If <messageLog> is not
|
||||
a null pointer, then the string representations of all fetched messages will
|
||||
be stored in the buffer <messageLog> and will be separated by null-
|
||||
terminators. The maximum size of the buffer (including all null-
|
||||
terminators) is denoted by <logSize>, and strings of messages within <count>
|
||||
that do not fit in the buffer will not be fetched. If <logSize> is less
|
||||
than zero, the error INVALID_VALUE will be generated. If <messageLog>
|
||||
is a null pointer, then the value of <logSize> is ignored. The
|
||||
categories, severity levels, IDs, and string representation lengths of all
|
||||
(up to <count>) removed messages will be stored in the arrays <categories>,
|
||||
<severities>, <ids>, and <lengths>, respectively. The counts stored in the
|
||||
array <lengths> include the null-terminator of each string. Any and all of
|
||||
the output arrays, including <messageLog>, are optional, and no data is returned
|
||||
for those arrays that are specified with a null pointer. To simply delete up
|
||||
to <count> messages from the message log and ignoring, the application can call
|
||||
the function with null pointers for all output arrays. The error
|
||||
INVALID_OPERATION will be generated by GetDebugMessageLogAMD if it is
|
||||
called in a non-debug context.
|
||||
|
||||
2.20.3 - Controlling Debug Messages
|
||||
|
||||
Applications can control which messages are generated by calling
|
||||
|
||||
void DebugMessageEnableAMD(enum category,
|
||||
enum severity,
|
||||
sizei count,
|
||||
const uint* ids,
|
||||
boolean enabled);
|
||||
|
||||
This command allows disabling or enabling generation of subsets of
|
||||
messages. If <enabled> is TRUE, the referenced subset of messages
|
||||
is enabled. If FALSE, then those messages are disabled. This
|
||||
command can reference different subsets of messages by
|
||||
varying its parameter values in the following ways:
|
||||
|
||||
1. To reference all messages, let <category>, <severity>,
|
||||
and <count> all be zero. The value of <ids> is ignored
|
||||
in this case.
|
||||
|
||||
2. To reference all messages across all categories with
|
||||
a specific severity level, let <category> and <count>
|
||||
be zero and let <severity> identify the severity level.
|
||||
The value of <ids> is ignored in this case.
|
||||
|
||||
3. To reference all messages within a single category, let
|
||||
<category> identify the referenced category and let
|
||||
<severity> and <count> be zero. The value of <ids> is
|
||||
ignored in this case.
|
||||
|
||||
4. To reference all messages within a single category and
|
||||
at a specific severity level, let <category> identify the
|
||||
category and <severity> identify the severity level,
|
||||
and let <count> be zero. The value of <ids> is ignored
|
||||
in this case.
|
||||
|
||||
5. To reference specific messages by ID within a single
|
||||
category, let <category> identify the category, let
|
||||
<severity> be zero, let <count> be greater than zero
|
||||
and let <ids> identify the IDs of <count> messages within
|
||||
the identified category. Operations on message IDs that
|
||||
are not valid within the category are silently ignored.
|
||||
|
||||
In all of the above cases, if <category> is non-zero and specifies
|
||||
an invalid category, the error INVALID_ENUM is generated.
|
||||
Similarly if <severity> is non-zero and is an invalid severity level,
|
||||
the error INVALID_ENUM is generated. If <count> is less than
|
||||
zero, the error INVALID_VALUE is generated. If the parameters do
|
||||
not fall into one of the cases defined above, the error INVALID_VALUE
|
||||
is generated. The error INVALID_OPERATION is generated if this
|
||||
command is called in a non-debug context.
|
||||
|
||||
Although messages are grouped into categories and severities,
|
||||
and entire groups of messages can be turned off with a single
|
||||
call, there is no explicit per-category or per-severity enabled state.
|
||||
Instead the enabled state is stored individually for each message.
|
||||
There is no difference between disabling a category of messages with a
|
||||
single call, and enumerating all messages of that category and individually
|
||||
disabling each of them by their ID.
|
||||
|
||||
All messages of severity level DEBUG_SEVERITY_MEDIUM_AMD and
|
||||
DEBUG_SEVERITY_HIGH_AMD in all categories are initially enabled, and
|
||||
all messages at DEBUG_SEVERITY_LOW_AMD are initially disabled.
|
||||
|
||||
2.20.4 - Application Messages
|
||||
|
||||
To easily support custom application timestamps, applications can inject
|
||||
their own messages to the debug message stream through the command
|
||||
|
||||
void DebugMessageInsertAMD(enum category,
|
||||
enum severity,
|
||||
uint id,
|
||||
sizei length,
|
||||
const char* buf);
|
||||
|
||||
The value of <id> specifies the ID for the message and <severity> indicates
|
||||
its severity level as defined by the application. If <severity> is not a
|
||||
valid severity level, the error INVALID_ENUM will be generated. The value
|
||||
of <category> must be DEBUG_CATEGORY_APPLICATION_AMD, or the error
|
||||
INVALID_ENUM will be generated. The string <buf> contains the string
|
||||
representation of the message. The parameter <length> contains the size of
|
||||
the message's string representation, excluding the null-terminator. If
|
||||
<length> is zero, then its value is derived from the string-length of <buf>
|
||||
and <buf> must contain a null-terminated string. The error INVALID_VALUE
|
||||
will be generated if <length> is less than zero or its derived value is
|
||||
larger than or equal to MAX_DEBUG_MESSAGE_LENGTH_AMD. The error
|
||||
INVALID_OPERATION will be generated if this function is called in a
|
||||
non-debug context.
|
||||
|
||||
Additions to the OpenGL / GLX / GLX Protocol Specifications
|
||||
|
||||
None.
|
||||
|
||||
Additions to the WGL Specification
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
The error INVALID_OPERATION will be generated by DebugMessageCallbackAMD if
|
||||
the function is called in a non-debug context.
|
||||
|
||||
The error INVALID_ENUM will be generated by DebugMessageEnableAMD if
|
||||
<category> is non-zero and specifies an invalid category.
|
||||
|
||||
The error INVALID_ENUM will be generated by DebugMessageEnableAMD if
|
||||
<severity> is non-zero and an invalid severity level.
|
||||
|
||||
The error INVALID_VALUE will be generated by DebugMessageEnableAMD if
|
||||
if <count> is less than zero.
|
||||
|
||||
The error INVALID_VALUE will be generated by DebugMessageEnableAMD if
|
||||
if the combination of values for <category>, <severity> and <count> do not
|
||||
fall within one of the accepted combinations for referencing a subset of
|
||||
messages.
|
||||
|
||||
The error INVALID_OPERATION will be generated by GetDebugMessageLogAMD if
|
||||
it is called in a non-debug context.
|
||||
|
||||
The error INVALID_VALUE will be generated by GetDebugMessageLogAMD if the
|
||||
value of <count> is zero or greater than the value of
|
||||
MAX_DEBUG_LOGGED_MESSAGES_AMD.
|
||||
|
||||
The error INVALID_VALUE will be generated by GetDebugMessageLogAMD if
|
||||
<logSize> is less than zero.
|
||||
|
||||
The error INVALID_ENUM will be generated by DebugMessageInsertAMD if
|
||||
<severity> is not a valid debug severity level.
|
||||
|
||||
The error INVALID_ENUM will be generated by DebugMessageInsertAMD if the
|
||||
value of <category> is not DEBUG_CATEGORY_APPLICATION_AMD.
|
||||
|
||||
The error INVALID_VALUE will be generated by DebugMessageInsertAMD
|
||||
if <length> is less than zero.
|
||||
|
||||
The error INVALID_VALUE will be generated by DebugMessageInsertAMD
|
||||
if <length> or its derived value is larger than
|
||||
MAX_DEBUG_MESSAGE_LENGTH_AMD.
|
||||
|
||||
The error INVALID_OPERATION will be generated by DebugMessageInsertAMD if
|
||||
this function is called in a non-debug context.
|
||||
|
||||
New State
|
||||
Initial
|
||||
Get Value Type Get Command Value Description Sec Attribute
|
||||
-------------------------- ---- ----------- ----- ------------------------- ------ ---------
|
||||
DEBUG_LOGGED_MESSAGES_AMD Z+ GetIntegerv 0 The number of messages 2.20.2 -
|
||||
currently in the debug
|
||||
message log
|
||||
|
||||
New Implementation Dependent State
|
||||
Minimum
|
||||
Get Value Type Get Command Value Description Sec Attribute
|
||||
-------------------------------- -- ----------- ----- ------------------------- ------ ----------
|
||||
MAX_DEBUG_MESSAGE_LENGTH_AMD Z+ GetIntegerv 80 The maximum length of a 2.20.2 -
|
||||
debug message string
|
||||
|
||||
MAX_DEBUG_LOGGED_MESSAGES_AMD Z+ GetIntegerv 1 The maximum number of 2.20.2 -
|
||||
messages stored in the
|
||||
debug message log
|
||||
|
||||
Issues
|
||||
|
||||
01) Should we reserve tokens for arbitrary vendor-specific categories (e.g.
|
||||
DEBUG_CATEGORY_VENDOR0)?
|
||||
|
||||
RESOLVED: No. Since this is an AMD extension, there is no
|
||||
reason to do this now in the current version.
|
||||
|
||||
02) Should we allow explicit controls for printing to stderr or through
|
||||
OutputDebugString instead of the callback?
|
||||
|
||||
RESOLVED: No. It is up to the application to setup this
|
||||
behavior itself using the provided functionality.
|
||||
|
||||
|
||||
03) How do the different filtering rules interact? If a category is
|
||||
filtered, but a message in that same category is set to be unfiltered by
|
||||
ID or severity level, should that message still be filtered? If I
|
||||
specifically filter a category and then unfilter all messages globally
|
||||
with a later command, should that category still be filtered?
|
||||
|
||||
RESOLVED: Message enable state is stored individually for each
|
||||
message. There is no explicit group-wise enable state
|
||||
or different ordered levels of "enabledness" in the
|
||||
implied hierarchy of messages. Operations on groups
|
||||
of messages affect all messages within
|
||||
that group individually, and overwrite the previous
|
||||
and individual state of those messages.
|
||||
|
||||
04) Should applications be allowed to insert their own messages through
|
||||
a custom category? How would this be done?
|
||||
|
||||
RESOLVED: Yes. A new category will be provided for application-
|
||||
specific messages and an entry point will be provided to
|
||||
write messages in that category.
|
||||
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
(v9, 2010-05-07, jkontti)
|
||||
- Removed inconsistent language from New Tokens category for tokens
|
||||
that are no longer accepted by DebugMessageEnableAMD since
|
||||
revision v5.
|
||||
- Cleaned up some language and formatting issues.
|
||||
|
||||
(v8, 2010-04-09, jkontti)
|
||||
- Renamed extension string from AMDX to AMD.
|
||||
- Renamed new function, type and token suffixes from AMDX to AMD.
|
||||
- No changes in functionality between AMDX and AMD versions.
|
||||
|
||||
(v7, 2010-01-21, jkontti)
|
||||
- Added user-specifiable parameter to debug message callback function
|
||||
|
||||
(v6, 2010-01-15, jkontti)
|
||||
- Updated contact section
|
||||
- Updated contributor section
|
||||
- Updated status section
|
||||
- Updated enums
|
||||
|
||||
(v5, 2009-09-17, jkontti)
|
||||
- Message ID namespaces are now contained within categories instead of
|
||||
being in a single global namespace
|
||||
- Reworked DebugMessageEnable to allow disabling/enabling more
|
||||
combinations of messages
|
||||
- Resolved issue 01
|
||||
- Resolved issue 03
|
||||
|
||||
(v4, 2009-09-16, jkontti)
|
||||
- Added category as a parameter to DebugMessageInsert for
|
||||
future-proofing purposes
|
||||
- Added missing errors to DebugMessageInsert and GetDebugMessageLog
|
||||
- Added missing tokens to New Tokens
|
||||
- Renamed DebugMessageFilter to DebugMessageEnable
|
||||
|
||||
(v3, 2009-09-15, myoung)
|
||||
- Cleaned up some language
|
||||
- Added values using AMD reserved ranges. Values do not overlap so can
|
||||
be re-used.
|
||||
|
||||
(v2, 2009-09-15, jkontti)
|
||||
- Application-generated messages
|
||||
- More categories (window system, deprecation, profile, application)
|
||||
|
||||
(v1, 2009-09-09, jkontti)
|
||||
- Initial revision
|
||||
@@ -0,0 +1,159 @@
|
||||
Name
|
||||
|
||||
AMD_depth_clamp_separate
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_depth_clamp_separate
|
||||
|
||||
Contact
|
||||
|
||||
Pierre Boudier (pierre.boudier 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Pierre Boudier, AMD
|
||||
Graham Sellers, AMD
|
||||
|
||||
Status
|
||||
|
||||
In Progress
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 09/15/2010
|
||||
Author Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
401
|
||||
|
||||
Dependencies
|
||||
|
||||
The extension is written against the OpenGL 4.1 (Core) Specification.
|
||||
|
||||
Overview
|
||||
|
||||
The extension ARB_depth_clamp introduced the ability to control
|
||||
the clamping of the depth value for both the near and far plane.
|
||||
One limitation is that the control was for both planes at the
|
||||
same time; some applications can benefit from having clamping
|
||||
enabled for only one of the two planes, in order to save
|
||||
fillrate for the other plane by clipping the geometry.
|
||||
|
||||
This extension provides exactly such functionality.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <cap> parameter of Enable, Disable, and IsEnabled,
|
||||
and by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetFloatv, and GetDoublev:
|
||||
|
||||
DEPTH_CLAMP_NEAR_AMD 0x901E
|
||||
DEPTH_CLAMP_FAR_AMD 0x901F
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.1 (Core) Specification (OpenGL Operation)
|
||||
|
||||
Section 2.20 "Primitive Clipping"
|
||||
|
||||
Add to the end of the 3rd paragraph:
|
||||
|
||||
"Depth clamping is enabled with the generic Enable command and
|
||||
disabled with the Disable command. The value of the argument to
|
||||
either command may be DEPTH_CLAMP_NEAR_AMD or DEPTH_CLAMP_FAR_AMD to enable
|
||||
or disable depth clamping at the near and far planes, respectively. If near
|
||||
depth clamping is enabled, the "-w_c <= z_c" plane equation is ignored by
|
||||
view volume clipping. Effectively, there is no near plane. Likewise, if far
|
||||
clamping is enabled, the "z_c <= w_c" plane equation is ignored by view
|
||||
volume clipping, effectively removing the near plane."
|
||||
|
||||
"In addition to DEPTH_CLAMP_NEAR_AMD and DEPTH_CLAMP_FAR_AMD, the token
|
||||
DEPTH_CLAMP may be used to simultaneously enable or disable depth clamping
|
||||
at both the near and far planes."
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.1 (Core) Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.1 (Core) Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
|
||||
-- Section 4.1.5 "Depth buffer test"
|
||||
|
||||
Add to the end of the 2nd paragraph:
|
||||
|
||||
"If depth clamping (see section 2.20) is enabled, before the incoming
|
||||
fragment's z_w is compared z_w is clamped to the range [min(n,f),0] if
|
||||
clamping at the near plane is enabled, [0, max(n,f)] if clamping at the
|
||||
far plane is enabled, and [min(n,f), max(n,f)] if clamping is enabled at
|
||||
both the near and far planes, where n and f are the current near and far
|
||||
depth range values (see section 2.12.1)."
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.1 (Core) Specification (Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.1 (Core) Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Appendix A of the OpenGL 4.1 (Core) Specification (Invariance)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
Add to table 6.9, Transformation State - p.350
|
||||
|
||||
+----------------------+---------+---------------+---------------+-------------------------+-------+
|
||||
| Get Value | Type | Get Command | Initial Value | Description | Sec |
|
||||
+----------------------+---------+---------------+---------------+-------------------------+-------+
|
||||
| DEPTH_CLAMP_NEAR_AMD | B | IsEnabled | FALSE | Depth clamping enabled | 2.20 |
|
||||
| | | | | at the near plane | |
|
||||
| DEPTH_CLAMP_FAR_AMD | B | IsEnabled | FALSE | Depth clamping enabled | 2.20 |
|
||||
| | | | | at the far plane | |
|
||||
+----------------------+---------+---------------+---------------+-------------------------+-------+
|
||||
|
||||
* Note that DEPTH_CLAMP still exists. However, enabling it enables depth clamping for both
|
||||
the near and the far plane. Querying DEPTH_CLAMP will return TRUE if DEPTH_CLAMP_NEAR_AMD _or_
|
||||
DEPTH_CLAMP_FAR_AMD is enabled.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None
|
||||
|
||||
Issues
|
||||
|
||||
1) What should happen to GL_DEPTH_CLAMP? What happens if depth clamping is
|
||||
enabled at one plane, but not the other - what does glIsEnabled(GL_DEPTH_CLAMP)
|
||||
return?
|
||||
|
||||
DISCUSSION: Right now, glIsEnabled(GL_DEPTH_CLAMP) returns GL_TRUE if clamping
|
||||
is enabled at either plane. Other options are to return GL_TRUE only if clamping
|
||||
is enabled at both planes, or to maintain traditional depth clamping as
|
||||
separate state, and have yet another enable to control separate clamping.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
2 09/15/2010 gsellers Update to stand against OpenGL 4.1
|
||||
Add token values.
|
||||
Minor cleanup.
|
||||
Some clarifications.
|
||||
Add issue 1.
|
||||
1 11/19/2009 pboudier Initial draft based on ARB_depth_clamp
|
||||
@@ -0,0 +1,290 @@
|
||||
Name
|
||||
|
||||
AMD_draw_buffers_blend
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_draw_buffers_blend
|
||||
|
||||
Contributors
|
||||
|
||||
Mark Young
|
||||
Graham Sellers
|
||||
Timothy Lamb
|
||||
Pierre Boudier
|
||||
Nick Haemel
|
||||
|
||||
Contact
|
||||
|
||||
Mark Young, AMD (mark.young 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
In progress
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: July 10, 2009
|
||||
Author Revision: 3
|
||||
|
||||
Number
|
||||
|
||||
366
|
||||
|
||||
Dependencies
|
||||
|
||||
The extension is written against the OpenGL 2.0 Specification.
|
||||
|
||||
OpenGL 2.0 is required.
|
||||
|
||||
EXT_draw_buffers2 is required.
|
||||
|
||||
Overview
|
||||
|
||||
This extension builds upon the ARB_draw_buffers and EXT_draw_buffers2
|
||||
extensions. In ARB_draw_buffers (part of OpenGL 2.0), separate values
|
||||
could be written to each color buffer. This was further enhanced by
|
||||
EXT_draw_buffers2 by adding in the ability to enable blending and to set
|
||||
color write masks independently per color output.
|
||||
|
||||
This extension provides the ability to set individual blend equations and
|
||||
blend functions for each color output.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void BlendFuncIndexedAMD(uint buf, enum src, enum dst);
|
||||
|
||||
void BlendFuncSeparateIndexedAMD(uint buf, enum srcRGB, enum dstRGB,
|
||||
enum srcAlpha, enum dstAlpha);
|
||||
|
||||
void BlendEquationIndexedAMD(uint buf, enum mode);
|
||||
|
||||
void BlendEquationSeparateIndexedAMD(uint buf, enum modeRGB,
|
||||
enum modeAlpha);
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
|
||||
Modify the first two paragraphs of section 4.1.8 (Blending - Blending
|
||||
Equation), p206, to read as follows:
|
||||
|
||||
"Blending is controlled by the blend equation. This equation can be
|
||||
simultaneously set to the same value for all draw buffers using the
|
||||
commands:
|
||||
|
||||
void BlendEquation(enum mode);
|
||||
|
||||
void BlendEquationSeparate(enum modeRGB, enum modeAlpha);
|
||||
|
||||
or for an individual draw buffer using the indexed versions of the
|
||||
same commands:
|
||||
|
||||
void BlendEquationIndexedAMD(uint buf, enum mode);
|
||||
|
||||
void BlendEquationSeparateIndexedAMD(uint buf
|
||||
enum modeRGB,
|
||||
enum modeAlpha);
|
||||
|
||||
BlendEquationSeparate and BlendEquationSeparateIndexedAMD separate
|
||||
out the blend equations into an RGB argument and an Alpha argument.
|
||||
<modeRGB> determine the RGB blend function while <modeAlpha>
|
||||
determines the alpha equation. BlendEquation and
|
||||
BlendEquationIndexedAMD control both the RGB and Alpha blend
|
||||
equations with a single argument <mode>. <modeRGB> and <modeAlpha>
|
||||
must each be one of FUNC_ADD, FUNC_SUBTRACT, FUNC_REVERSE_SUBTRACT,
|
||||
MIN_MAX, or LOGIC_OP. BlendEquationIndexedAMD and
|
||||
BlendEquationSeparateIndexedAMD argument <buf> sets the blend
|
||||
equations for an individual draw buffer. The blend equations for
|
||||
DRAW_BUFFERi are modified by passing i as the parameter <buf>."
|
||||
|
||||
|
||||
Modify the first two paragraphs of section 4.1.8 (Blending - Blending
|
||||
Functions), p207, to read as follows:
|
||||
|
||||
"The weighting factors used by the blend equation are determined by
|
||||
the blend functions. Blend functions are simultaneously specified for
|
||||
all draw buffers using the commands:
|
||||
|
||||
void BlendFunc(enum src, enum dst);
|
||||
|
||||
void BlendFuncSeparate(enum srcRGB, enum dstRGB,
|
||||
enum srcAlpha, enum dstAlpha);
|
||||
|
||||
or for an individual draw buffer using the indexed versions of the
|
||||
same commands:
|
||||
|
||||
void BlendFuncIndexedAMD(uint buf, enum src, enum dst);
|
||||
|
||||
void BlendFuncSeparateIndexedAMD(uint buf, enum srcRGB,
|
||||
enum dstRGB, enum srcAlpha,
|
||||
enum dstAlpha);
|
||||
|
||||
BlendFuncSeparate and BlendFuncSeparateIndexedAMD arguments <srcRGB>
|
||||
and <dstRGB> determine the source and destination RGB blend functions,
|
||||
respectively, while <srcAlpha> and <dstAlpha> determine the source and
|
||||
destination alpha blend functions. BlendFunc and BlendFuncIndexedAMD
|
||||
arguments <src> determines both RGB and alpha source functions, while
|
||||
<dst> determines both RGB and alpha destination functions.
|
||||
BlendFuncSeparateIndexedAMD and BlendFuncIndexedAMD argument <buf>
|
||||
sets the blend functions for an indivual draw buffer. The blend
|
||||
functions for DRAW_BUFFERi are modified by passing i as the parameter
|
||||
<buf>."
|
||||
|
||||
|
||||
Modify the first paragraph of section 4.1.8 (Blending - Blending
|
||||
State), p209, to read as follows:
|
||||
|
||||
"For each of n draw buffers, the state required for blending is two
|
||||
integers for the RGB and alpha blend equations, four integers
|
||||
indicating the source and destination RGB and alpha blending functions,
|
||||
four floating-point values to store the RGBA constant blend color, and
|
||||
a bit indicating whether blending is enabled or disabled. For all draw
|
||||
buffers, the initial blend equations for RGB and alpha are both
|
||||
FUNC_ADD. The initial blending functions for all draw buffers are ONE
|
||||
for the source RGB and alpha functions, and ZERO for the destination
|
||||
RGB and alpha functions. For all draw buffers initial constant blend
|
||||
color is (R, G, B, A) = (0, 0, 0, 0). Initially, blending is disabled
|
||||
for all draw buffers."
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 2.0 Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Appendix A of the OpenGL 2.0 Specification (Invariance)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
The error INVALID_ENUM is generated if the <buf> parameter of
|
||||
BlendFuncIndexedAMD, BlendFuncSeparateIndexedAMD, BlendEquationIndexedAMD,
|
||||
or BlendEquatioSeparateIndexedAMD is outside the range
|
||||
[0, MAX_DRAW_BUFFERS-1].
|
||||
|
||||
The error INVALID_ENUM is generated by BlendFuncIndexedAMD
|
||||
if either <src>, or <dst> is not an accepted value.
|
||||
|
||||
The error INVALID_ENUM is generated by BlendFuncSeparateIndexedAMD
|
||||
if either <srcRGB>, <dstRGB>, <srcAlpha>, or <dstAlpha> is not
|
||||
an accepted value.
|
||||
|
||||
The error INVALID_ENUM is generated if the <mode> parameter of
|
||||
BlendEquationIndexedAMD is not one of FUNC_ADD, FUNC_SUBTRACT,
|
||||
FUNC_REVERSE_SUBTRACT, MAX, or MIN.
|
||||
|
||||
The error INVALID_ENUM is generated if either the <modeRGB> or <modeAlpha>
|
||||
parameter of BlendEquationSeparateIndexedAMD is not one of
|
||||
FUNC_ADD, FUNC_SUBTRACT, FUNC_REVERSE_SUBTRACT, MAX, or MIN.
|
||||
|
||||
The error INVALID_OPERATION is generated if any of these new entry-points
|
||||
are executed between the execution of glBegin and the corresponding
|
||||
execution of glEnd.
|
||||
|
||||
New State
|
||||
|
||||
Modify (table 6.20, p281), modifying the entries for BLEND_SRC_RGB,
|
||||
BLEND_SRC_ALPHA, BLEND_DST_RGB, BLEND_DST_ALPHA, BLEND_EQUATION_RGB,
|
||||
and BLEND_EQUATION_ALPHA and adding new indexed versions as well.
|
||||
|
||||
|
||||
Get Target Type Get Command Initial Value Description Section Attribute
|
||||
---------- ---- --------------------- -------------- ----------------------------------------------- ------- -------------------
|
||||
BLEND_SRC_RGB Z15 GetIntegerv ONE Blending source RGB function for draw buffer 0 4.1.8 color-buffer
|
||||
(v1.3:BLEND_SRC)
|
||||
|
||||
BLEND_SRC_RGB Z15 GetIntegerIndexedvEXT ONE Blending source RGB function for draw buffer i 4.1.8 color-buffer
|
||||
(v1.3:BLEND_SRC) where i is specified as <buf>
|
||||
|
||||
BLEND_SRC_ALPHA Z15 GetIntegerv ONE Blending source A function for draw buffer 0 4.1.8 color-buffer
|
||||
|
||||
BLEND_SRC_ALPHA Z15 GetIntegerIndexedvEXT ONE Blending source A function for draw buffer i 4.1.8 color-buffer
|
||||
where i is specified as <buf>
|
||||
|
||||
BLEND_DST_RGB Z14 GetIntegerv ZERO Blending dest. RGB function for draw buffer 0 4.1.8 color-buffer
|
||||
(v1.3:BLEND DST)
|
||||
|
||||
BLEND_DST_RGB Z14 GetIntegerIndexedvEXT ZERO Blending dest. RGB function for draw buffer i 4.1.8 color-buffer
|
||||
(v1.3:BLEND DST) where i is specified as <buf>
|
||||
|
||||
BLEND_DST_ALPHA Z14 GetIntegerv ZERO Blending dest. A function for draw buffer 0 4.1.8 color-buffer
|
||||
|
||||
BLEND_DST_ALPHA Z14 GetIntegerIndexedvEXT ZERO Blending dest. A function for draw buffer i 4.1.8 color-buffer
|
||||
where i is specified as <buf>
|
||||
|
||||
BLEND_EQUATION_RGB Z5 GetIntegerv FUNC_ADD RGB blending equation for draw buffer 0 4.1.8 color-buffer
|
||||
(v1.5: BLEND EQUATION)
|
||||
|
||||
BLEND_EQUATION_RGB Z5 GetIntegerIndexedvEXT FUNC_ADD RGB blending equation for draw buffer i 4.1.8 color-buffer
|
||||
(v1.5: BLEND EQUATION) where i is specified as <buf>
|
||||
|
||||
BLEND_EQUATION_ALPHA Z5 GetIntegerv FUNC_ADD Alpha blending equation for draw buffer 0 4.1.8 color-buffer
|
||||
|
||||
BLEND_EQUATION_ALPHA Z5 GetIntegerIndexedvEXT FUNC_ADD Alpha blending equation for draw buffer i 4.1.8 color-buffer
|
||||
where i is specified as <buf>
|
||||
|
||||
Issues
|
||||
|
||||
1. What should we call this?
|
||||
|
||||
PROPOSED: Suggestions currently are
|
||||
AMD_draw_buffers_blend
|
||||
AMD_drawbuffers_blend
|
||||
AMD_mrt_blend
|
||||
|
||||
|
||||
2. Should this be an AMDX extension or just AMD?
|
||||
|
||||
PROPOSED: We propose AMD since the functionality currently exists in
|
||||
DX 10.1 and is used by developers in that API.
|
||||
|
||||
|
||||
3. What effect does using the non-indexed versions of the blend function
|
||||
or equation entry-points have upon the new indexed per draw buffer
|
||||
versions?
|
||||
|
||||
RESOLVED: Similar to the way EXT_draw_buffers2 handles the indexed
|
||||
and non-indexed ColorMask interaction in issue 3. The non-indexed
|
||||
versions of the functions will set all buffers to the passed in
|
||||
parameters.
|
||||
|
||||
For example, BlendFunc will set all color buffer blend functions to
|
||||
the values passed in.
|
||||
|
||||
4. Should the new functions be ---Indexed (as in EXT_draw_buffers2) or
|
||||
---i (as in OpenGL 3.0 core)?
|
||||
|
||||
RESOLVED: For consistency with EXT_draw_buffers2, leave them as
|
||||
---Indexed. If this functionality is promoted to core in a later
|
||||
version of OpenGL, they can be changed to ---i.
|
||||
|
||||
Revision History
|
||||
|
||||
#3, July 10, 2009: Jon Leech
|
||||
Assign extension number, minor formatting cleanup for registry.
|
||||
|
||||
#2, March 26, 2009: myoung
|
||||
Tightened up language. Resolved some issues.
|
||||
|
||||
#1, March 25, 2009: myoung
|
||||
Internal spec development.
|
||||
@@ -0,0 +1,444 @@
|
||||
Name
|
||||
|
||||
AMD_framebuffer_multisample_advanced
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_framebuffer_multisample_advanced
|
||||
|
||||
Contact
|
||||
|
||||
Marek Olsak, AMD (marek.olsak 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: June 28, 2018
|
||||
Revision #1
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #523
|
||||
OpenGL ES Extension #303
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL dependencies:
|
||||
|
||||
Requires GL_ARB_framebuffer_object.
|
||||
|
||||
OpenGL ES dependencies:
|
||||
|
||||
Requires OpenGL ES 3.0.
|
||||
|
||||
This extension is written against the OpenGL 4.5 (Core Profile)
|
||||
specification.
|
||||
|
||||
Overview
|
||||
|
||||
This extension extends ARB_framebuffer_object by allowing compromises
|
||||
between image quality and memory footprint of multisample
|
||||
antialiasing.
|
||||
|
||||
ARB_framebuffer_object introduced RenderbufferStorageMultisample
|
||||
as a method of defining the parameters for a multisample render
|
||||
buffer. This function takes a <samples> parameter that has strict
|
||||
requirements on behavior such that no compromises in the final image
|
||||
quality are allowed. Additionally, ARB_framebuffer_object requires
|
||||
that all framebuffer attachments have the same number of samples.
|
||||
|
||||
This extension extends ARB_framebuffer_object by providing a new
|
||||
function, RenderbufferStorageMultisampleAdvancedAMD, that
|
||||
distinguishes between samples and storage samples for color
|
||||
renderbuffers where the number of storage samples can be less than
|
||||
the number of samples. This extension also allows non-matching sample
|
||||
counts between color and depth/stencil renderbuffers.
|
||||
|
||||
This extension does not require any specific combination of sample
|
||||
counts to be supported.
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP issues.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void RenderbufferStorageMultisampleAdvancedAMD(
|
||||
enum target, sizei samples, sizei storageSamples,
|
||||
enum internalformat, sizei width, sizei height );
|
||||
|
||||
void NamedRenderbufferStorageMultisampleAdvancedAMD(
|
||||
uint renderbuffer, sizei samples, sizei storageSamples,
|
||||
enum internalformat, sizei width, sizei height );
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of GetRenderbufferParameteriv:
|
||||
|
||||
RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2
|
||||
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetInteger64v, GetFloatv, GetDoublev:
|
||||
|
||||
MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3
|
||||
MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4
|
||||
MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5
|
||||
NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6
|
||||
SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7
|
||||
|
||||
Additions to Chapter 9 of the OpenGL 4.5 (Core Profile) Specification
|
||||
(Framebuffers and Framebuffer Objects)
|
||||
|
||||
In section 9.2.3.1, "Multisample Queries", remove the last paragraph
|
||||
beginning with "Otherwise" and add:
|
||||
|
||||
Otherwise, the value of SAMPLES is equal to the value of
|
||||
RENDERBUFFER_SAMPLES or TEXTURE_SAMPLES (depending on the type of
|
||||
attachments) of color attachments if any is present. If there is no
|
||||
color attachment, SAMPLES is equal to the same value from the depth or
|
||||
stencil attachment, whichever is present.
|
||||
|
||||
An implementation may only support a subset of the possible
|
||||
combinations of sample counts of textures and renderbuffers attached
|
||||
to a framebuffer object. The number of supported combinations is
|
||||
NUM_SUPPORTED_MULTISAMPLE_MODES_AMD. SUPPORTED_MULTISAMPLE_MODES_AMD
|
||||
is an array of NUM_SUPPORTED_MULTISAMPLE_MODES_AMD triples of integers
|
||||
where each triple contains a valid combination of sample counts in
|
||||
the form {color samples, color storage samples, depth and stencil
|
||||
samples}. The first element in each triple is at least 2. The second
|
||||
and third element in each triple are at least 1 and are not greater
|
||||
than the first element.
|
||||
|
||||
In section 9.2.4, "Renderbuffer Objects", replace the description of
|
||||
(Named)RenderbufferStorageMultisample:
|
||||
|
||||
The data storage, format, dimensions, number of samples, and number of
|
||||
storage samples of a renderbuffer object’s image are established with
|
||||
the commands
|
||||
|
||||
void RenderbufferStorageMultisampleAdvancedAMD( enum target,
|
||||
sizei samples, sizei storageSamples, enum internalformat,
|
||||
sizei width, sizei height );
|
||||
|
||||
void NamedRenderbufferStorageMultisampleAdvancedAMD(
|
||||
uint renderbuffer, sizei samples, sizei storageSamples,
|
||||
enum internalformat, sizei width, sizei height );
|
||||
|
||||
For RenderbufferStorageMultisampleAdvancedAMD, the renderbuffer object
|
||||
is that bound to <target>, which must be RENDERBUFFER.
|
||||
For NamedRenderbufferStorageMultisampleAdvancedAMD, <renderbuffer> is
|
||||
the name of the renderbuffer object.
|
||||
|
||||
<internalformat> must be color-renderable, depth-renderable, or
|
||||
stencil-renderable (as defined in section 9.4). <width> and <height>
|
||||
are the dimensions in pixels of the renderbuffer.
|
||||
|
||||
Upon success, *RenderbufferStorageMultisampleAdvancedAMD deletes any
|
||||
existing data store for the renderbuffer image, and the contents of
|
||||
the data store are undefined. RENDERBUFFER_WIDTH is set to <width>,
|
||||
RENDERBUFFER_HEIGHT is set to <height>, and RENDERBUFFER_INTERNAL_-
|
||||
FORMAT is set to <internalformat>.
|
||||
|
||||
If <samples> is zero, then <storageSamples> must be zero, and
|
||||
RENDERBUFFER_SAMPLES and RENDERBUFFER_STORAGE_SAMPLES_AMD are set to
|
||||
zero. Otherwise <samples> represents a request for a desired minimum
|
||||
number of samples and <storageSamples> represents a request for
|
||||
a desired minimum number of storage samples, where <storageSamples>
|
||||
must not be greater than <samples>. Since different implementations
|
||||
may support different sample counts for multisampled rendering,
|
||||
the actual number of samples and the actual number of storage samples
|
||||
allocated for the renderbuffer image are implementation-dependent.
|
||||
However, the resulting value for RENDERBUFFER_SAMPLES is guaranteed
|
||||
to be greater than or equal to <samples> and no more than the next
|
||||
larger sample count supported by the implementation, and the resulting
|
||||
value for RENDERBUFFER_STORAGE_SAMPLES_AMD is guaranteed to be greater
|
||||
than or equal to <storageSamples>, no more than the next larger
|
||||
storage sample count supported by the implementation, and no more than
|
||||
RENDERBUFFER_SAMPLES.
|
||||
|
||||
A GL implementation may vary its allocation of internal component
|
||||
resolution based on any *RenderbufferStorageMultisampleAdvancedAMD
|
||||
parameter (except <target> and <renderbuffer>), but the allocation and
|
||||
chosen internal format must not be a function of any other state and
|
||||
cannot be changed once they are established.
|
||||
|
||||
Remove the first 4 errors and add these errors:
|
||||
|
||||
An INVALID_ENUM error is generated by RenderbufferStorageMultisample-
|
||||
AdvancedAMD if <target> is not RENDERBUFFER.
|
||||
|
||||
An INVALID_OPERATION error is generated by NamedRenderbufferStorage-
|
||||
MultisampleAdvancedAMD if <renderbuffer> is not the name of
|
||||
an existing renderbuffer object.
|
||||
|
||||
An INVALID_VALUE error is generated if <samples>, <storageSamples>,
|
||||
<width>, or <height> is negative.
|
||||
|
||||
An INVALID_OPERATION error is generated if <internalformat> is a color
|
||||
format and <samples> is greater than the implementation-dependent
|
||||
limit MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD.
|
||||
|
||||
An INVALID_OPERATION error is generated if <internalformat> is a color
|
||||
format and <storageSamples> is greater than the implementation-
|
||||
dependent limit MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD.
|
||||
|
||||
An INVALID_OPERATION error is generated if <storageSamples> is greater
|
||||
than <samples>.
|
||||
|
||||
An INVALID_OPERATION error is generated if <internalformat> is a depth
|
||||
or stencil format and <samples> is greater than the maximum number of
|
||||
samples supported for <internalformat> (see GetInternalformativ
|
||||
in section 22.3).
|
||||
|
||||
An INVALID_OPERATION error is generated if <internalformat> is a depth
|
||||
or stencil format and <storageSamples> is not equal to <samples>.
|
||||
|
||||
Finish the section as follows:
|
||||
|
||||
The commands
|
||||
|
||||
void RenderbufferStorageMultisample( enum target,
|
||||
sizei samples, enum internalformat, sizei width,
|
||||
sizei height );
|
||||
void RenderbufferStorage( enum target, enum internalformat,
|
||||
sizei width, sizei height );
|
||||
|
||||
are equivalent to
|
||||
|
||||
RenderbufferStorageMultisampleAdvancedAMD(target, samples,
|
||||
samples, internalformat, width, height);
|
||||
|
||||
and
|
||||
|
||||
RenderbufferStorageMultisampleAdvancedAMD(target, 0, 0,
|
||||
internalformat, width, height);
|
||||
|
||||
respectively.
|
||||
|
||||
The commands
|
||||
|
||||
void NamedRenderbufferStorageMultisample( uint renderbuffer,
|
||||
sizei samples, enum internalformat, sizei width,
|
||||
sizei height );
|
||||
void NamedRenderbufferStorage( uint renderbuffer,
|
||||
enum internalformat, sizei width, sizei height );
|
||||
|
||||
are equivalent to
|
||||
|
||||
NamedRenderbufferStorageMultisampleAdvancedAMD(renderbuffer,
|
||||
samples, samples, internalformat, width, height);
|
||||
|
||||
and
|
||||
|
||||
NamedRenderbufferStorageMultisampleAdvancedAMD(renderbuffer,
|
||||
0, 0, internalformat, width, height);
|
||||
|
||||
respectively.
|
||||
|
||||
In section 9.2.5, "Required Renderbuffer Formats", replace the last
|
||||
paragraph with:
|
||||
|
||||
Implementations must support creation of renderbuffers in these
|
||||
required formats with sample counts up to and including:
|
||||
* MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD as color renderbuffer samples
|
||||
* MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD as color renderbuffer
|
||||
storage samples
|
||||
* MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD as depth and stencil
|
||||
samples
|
||||
|
||||
with the exception that the signed and unsigned integer formats are
|
||||
required only to support creation of renderbuffers with up to
|
||||
the value of MAX_INTEGER_SAMPLES samples and storage samples, which
|
||||
must be at least one.
|
||||
|
||||
In section 9.2.6, "Renderbuffer Object Queries", replace the paragraph
|
||||
mentioning RENDERBUFFER_SAMPLES with:
|
||||
|
||||
If <pname> is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT,
|
||||
RENDERBUFFER_INTERNAL_FORMAT, RENDERBUFFER_SAMPLES, or
|
||||
RENDERBUFFER_STORAGE_SAMPLES_AMD then <params> will contain the width
|
||||
in pixels, height in pixels, internal format, number of samples, or
|
||||
number of storage samples, respectively, of the image of
|
||||
the renderbuffer object.
|
||||
|
||||
In section 9.4.1, "Framebuffer Attachment Completeness", remove
|
||||
the bullet beginning with "If <image> has multisample samples" and
|
||||
replace the last 3 bullets about <attachment> with:
|
||||
|
||||
If <attachment> is COLOR_ATTACHMENTi, then <image> must have a color-
|
||||
renderable internal format, the sample count must be less than or
|
||||
equal to the value of the implementation-dependent limit
|
||||
MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD, and the storage sample count must
|
||||
be less than or equal to the value of the implementation-dependent
|
||||
limit MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD.
|
||||
|
||||
If <attachment> is DEPTH_ATTACHMENT, then <image> must have a depth-
|
||||
renderable internal format, and its sample count must be less than or
|
||||
equal to the value of the implementation-dependent limit
|
||||
MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD.
|
||||
|
||||
If <attachment> is STENCIL_ATTACHMENT, then <image> must have
|
||||
a stencil-renderable internal format, and its sample count must be
|
||||
less than or equal to the value of the implementation-dependent limit
|
||||
MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD.
|
||||
|
||||
In section 9.4.2, replace the bullet mentioning RENDERBUFFER_SAMPLES
|
||||
with:
|
||||
|
||||
* The value of RENDERBUFFER_SAMPLES of a color attachment defines its
|
||||
<number of color samples>; the value of RENDERBUFFER_STORAGE_SAMPLES
|
||||
of a color attachment defines its <number of color storage samples>;
|
||||
the value of RENDERBUFFER_SAMPLES of a depth or stencil attachment
|
||||
defines its <number of depth-stencil samples> for each separately;
|
||||
the value of TEXTURE_SAMPLES of a color attachment defines both its
|
||||
<number of color samples> and its <number of color storage samples>;
|
||||
the value of TEXTURE_SAMPLES of a depth or stencil attachment defines
|
||||
its <number of depth-stencil samples> for each separately. If any of
|
||||
the defined values is 0, it is treated as 1. Any undefined value is
|
||||
treated as equal to any number. For all attachment values that are
|
||||
defined, all values of <number of color samples> must be equal, all
|
||||
values of <number of color storage samples> must be equal, all values
|
||||
of <number of depth-stencil samples> must be equal, and the triple
|
||||
{<number of color samples>, <number of color storage samples>, <number
|
||||
of depth-stencil samples>} must be in SUPPORTED_MULTISAMPLE_MODES_AMD
|
||||
or must be equal to {1, 1, 1}.
|
||||
|
||||
{ FRAMEBUFFER_INCOMPLETE_MULTISAMPLE }
|
||||
|
||||
Additions to Chapter 17 of the OpenGL 4.5 (Core Profile) Specification
|
||||
(Writing Fragments and Samples to the Framebuffer)
|
||||
|
||||
In section 17.3.10, "Additional Multisample Fragment Operations", add
|
||||
this paragraph after the "If MULTISAMPLE is enabled" paragraph:
|
||||
|
||||
If there are fewer color storage samples (see section 9.2.4) than
|
||||
the value of SAMPLES, the number of color storage samples determines
|
||||
the number of unique color values that can be stored per pixel.
|
||||
The implementation must determine which samples within a pixel share
|
||||
the same color value, write that value into 1 color storage sample,
|
||||
and remember a mapping between color samples and color storage
|
||||
samples to be able to map color storage samples back to color samples.
|
||||
The color value equality determination is done in an implementation-
|
||||
specific manner, but the implementation must at least recognize a set
|
||||
of color samples coming from the same primitive as 1 storage sample if
|
||||
sample shading (see section 14.3.1.1) is disabled. If there are not
|
||||
enough color storage samples per pixel to store all incoming color
|
||||
values, the excessive color values are not stored and the color samples
|
||||
with unstored values are marked as having an unknown value. Color
|
||||
samples with an unknown value will not contribute to the final color
|
||||
value of the pixel when all color samples are resolved by
|
||||
BlitFramebuffer (see section 18.3.1).
|
||||
|
||||
If there are fewer depth and stencil samples than the value of SAMPLES
|
||||
and implementation-specific optimizations are unable to represent more
|
||||
depth and stencil samples within the given storage, the missing depth
|
||||
and stencil values should be pulled from or derived from the nearest
|
||||
existing depth and stencil samples within the same pixel. The mapping
|
||||
from missing to existing depth and stencil samples is implementation-
|
||||
specific, but the mapping must be at least:
|
||||
* injective if missing samples < existing samples
|
||||
* bijective if missing samples = existing samples
|
||||
* surjective if missing samples > existing samples
|
||||
Depth and stencil tests operate as if the number of depth and stencil
|
||||
samples was equal to the value of SAMPLES.
|
||||
|
||||
Errors
|
||||
|
||||
An INVALID_ENUM error is generated by RenderbufferStorageMultisample-
|
||||
AdvancedAMD if <target> is not RENDERBUFFER.
|
||||
|
||||
An INVALID_OPERATION error is generated by NamedRenderbufferStorage-
|
||||
MultisampleAdvancedAMD if <renderbuffer> is not the name of
|
||||
an existing renderbuffer object.
|
||||
|
||||
An INVALID_VALUE error is generated if <samples>, <storageSamples>,
|
||||
<width>, or <height> is negative.
|
||||
|
||||
An INVALID_OPERATION error is generated if <internalformat> is a color
|
||||
format and <samples> is greater than the implementation-dependent
|
||||
limit MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD.
|
||||
|
||||
An INVALID_OPERATION error is generated if <internalformat> is a color
|
||||
format and <storageSamples> is greater than the implementation-
|
||||
dependent limit MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD.
|
||||
|
||||
An INVALID_OPERATION error is generated if <storageSamples> is greater
|
||||
than <samples>.
|
||||
|
||||
An INVALID_OPERATION error is generated if <internalformat> is a depth
|
||||
or stencil format and <samples> is greater than the maximum number of
|
||||
samples supported for <internalformat> (see GetInternalformativ
|
||||
in section 22.3).
|
||||
|
||||
An INVALID_OPERATION error is generated if <internalformat> is a depth
|
||||
or stencil format and <storageSamples> is not equal to <samples>.
|
||||
|
||||
New State
|
||||
|
||||
Add to Table 23.27, "Renderbuffer (state per renderbuffer object)"
|
||||
Initial
|
||||
Get Value Type Get Command Value Description Section
|
||||
-------------------------------- ---- -------------------------- ------- ---------------------- -------
|
||||
RENDERBUFFER_STORAGE_SAMPLES_AMD Z+ GetRenderbufferParameteriv 0 No. of storage samples 9.2.4
|
||||
|
||||
New Implementation Dependent Values
|
||||
Minimum
|
||||
Get Value Type Get Command Value Description Section
|
||||
---------------------------------------- ---------- ----------- ------- --------------------------------------- -------
|
||||
MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD Z+ GetIntegerv 4 Max. no. of color samples supported by 9.2.4
|
||||
framebuffer objects.
|
||||
MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD Z+ GetIntegerv 4 Max. no. of color storage samples 9.2.4
|
||||
supported by framebuffer objects.
|
||||
MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD Z+ GetIntegerv 4 Max. no. of depth and stencil samples 9.2.4
|
||||
supported by framebuffer objects.
|
||||
NUM_SUPPORTED_MULTISAMPLE_MODES_AMD Z+ GetIntegerv 1 No. of supported combinations of color 9.2.4
|
||||
samples, color storage samples, and
|
||||
depth-stencil samples by framebuffer
|
||||
objects.
|
||||
SUPPORTED_MULTISAMPLE_MODES_AMD n * 3 x Z+ GetIntegerv - NUM_SUPPORTED_MULTISAMPLE_MODES_AMD (n) 9.2.4
|
||||
triples of integers. Each triple is
|
||||
a unique combination of color samples,
|
||||
color storage samples, and depth-stencil
|
||||
samples supported by framebuffer objects.
|
||||
|
||||
AMD Implementation Details
|
||||
|
||||
The following multisample modes are supported by AMD's open source
|
||||
OpenGL driver:
|
||||
|
||||
Color Depth &
|
||||
Color storage stencil
|
||||
samples samples samples
|
||||
======= ======= =======
|
||||
16 8 8
|
||||
16 4 8
|
||||
16 2 8
|
||||
16 4 4
|
||||
16 2 4
|
||||
16 2 2
|
||||
------- ------- -------
|
||||
8 8 8
|
||||
8 4 8
|
||||
8 2 8
|
||||
8 4 4
|
||||
8 2 4
|
||||
8 2 2
|
||||
------- ------- -------
|
||||
4 4 4
|
||||
4 2 4
|
||||
4 2 2
|
||||
------- ------- -------
|
||||
2 2 2
|
||||
|
||||
Issues
|
||||
|
||||
None.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- --------------------------------------------
|
||||
1 06/28/18 mareko Initial version
|
||||
@@ -0,0 +1,378 @@
|
||||
Name
|
||||
|
||||
AMD_framebuffer_sample_positions
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_framebuffer_sample_positions
|
||||
|
||||
Contact
|
||||
|
||||
Mais Alnasser, AMD (mais.alnasser 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Mais Alnasser, AMD
|
||||
Graham Sellers, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 11/10/16
|
||||
Revision: 4
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #454
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 3.2 is required.
|
||||
|
||||
This specification interacts with EXT_direct_state_access.
|
||||
|
||||
This extension is written against the OpenGL 4.4 (Core) specification.
|
||||
|
||||
Overview
|
||||
|
||||
In unextended GL, the sub-pixel loations of multisampled textures and
|
||||
renderbuffers are generally determined in an implementation dependent
|
||||
manner. Some algorithms -- in particular custom antialiasing functions --
|
||||
depend on the knowledge of, or even require control over the positions of
|
||||
samples within each pixel.
|
||||
|
||||
The AMD_sample_positions extension added some control over the positions
|
||||
of samples within a single framebuffer. However, it forced all pixels
|
||||
within a framebuffer to have the set of sample positions.
|
||||
|
||||
This extension provides a mechanism to explicitly set sample positions for
|
||||
a framebuffer object with multi-sampled attachments in a repeating pattern,
|
||||
allowing different pixels to use different sub-pixel locations for their
|
||||
samples. The sample locations used by the FBO can be fixed for all pixels
|
||||
in the FBO’s attachments or they can be fixed for a sampling pattern
|
||||
comprised of multiple pixels, where the sampling pattern is repeated over
|
||||
all pixels. The rate of repeat of this sampling pattern size itself is
|
||||
fixed and is implementation-dependent.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of GetFloatv:
|
||||
|
||||
SUBSAMPLE_DISTANCE_AMD 0x883F
|
||||
|
||||
Accepted by the <pname> parameter of GetIntegerv:
|
||||
|
||||
PIXELS_PER_SAMPLE_PATTERN_X_AMD 0x91AE
|
||||
PIXELS_PER_SAMPLE_PATTERN_Y_AMD 0x91AF
|
||||
|
||||
Accepted by the <pixelindex> parameter of FramebufferSamplePositionsfvAMD,
|
||||
NamedFramebufferSamplePositionsfvAMD, GetFramebufferParameterfvAMD
|
||||
and GetNamedFramebufferParameterfvAMD:
|
||||
|
||||
ALL_PIXELS_AMD 0xFFFFFFFF
|
||||
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void FramebufferSamplePositionsfvAMD(enum target, uint numsamples,
|
||||
uint pixelindex, const float *values)
|
||||
|
||||
void NamedFramebufferSamplePositionsfvAMD(uint framebuffer,
|
||||
uint numsamples, uint pixelindex, const float *values)
|
||||
|
||||
void GetFramebufferParameterfvAMD(enum target, enum pname,
|
||||
uint numsamples, uint pixelindex, sizei size, float *values)
|
||||
|
||||
void GetNamedFramebufferParameterfvAMD(uint framebuffer,
|
||||
enum pname, uint numsamples, uint pixelindex, sizei size,
|
||||
float *values)
|
||||
|
||||
|
||||
Additions to Chapter 9 of the OpenGL 4.4 (Core) Specification
|
||||
(Framebuffers and Framebuffer Objects)
|
||||
|
||||
Add section 9.2.9, Framebuffer Sample Positions, p. 287
|
||||
|
||||
Sample locations can be modified for all pixels in a multi-sampled
|
||||
framebuffer using the following command:
|
||||
|
||||
void FramebufferSamplePositionsfvAMD(enum target,
|
||||
uint numsamples,
|
||||
uint pixelindex,
|
||||
const float *values);
|
||||
|
||||
<target> must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER.
|
||||
<numsamples> is the number of samples to set and must be greater
|
||||
than 0 and less than or equal to the value of SAMPLES. The error
|
||||
INVALID_VALUE is generated if <numsamples> is outside this range.
|
||||
<pixelindex> is the index of the pixel to set the samples for and
|
||||
must be greater than or equal to 0 and less than the result of querying
|
||||
PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the result of
|
||||
querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD. The pixels are ordered left to
|
||||
right, top to bottom, where the origin is the upper left corner.
|
||||
<pixelindex> may also specify ALL_PIXELS_AMD, which sets samples of all
|
||||
pixels to the same set of locations. The error INVALID_VALUE is generated
|
||||
if <pixelindex> is less than zero or is greater than or equal to the
|
||||
result of querying PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the
|
||||
result of querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD and is not equal to
|
||||
ALL_PIXELS_AMD. The sample locations are set by passing floating point
|
||||
values of x and y in <values[2 * i]> and <values[2 * i + 1]> respectively,
|
||||
all in the range [0.0, 1.0), corresponding to the <x> and <y> locations in
|
||||
pixel space of that sample, respectively. (0.5, 0.5) thus corresponds to
|
||||
the pixel center. The range [0.0, 0.1) implies that sample locations cannot
|
||||
overlap at pixel boundaries.
|
||||
|
||||
FramebufferSamplePositionsfvAMD generates an INVALID_OPERATION error if the
|
||||
currently bound framebuffer is incomplete or is the default framebuffer.
|
||||
|
||||
If <values> is NULL, <numSamples> is ignored and all sample positions for
|
||||
<pixelindex> are returned to their default values. Passing ALL_PIXELS_AMD
|
||||
therefore resets the sample positions for all pixels in the sampling
|
||||
pattern.
|
||||
|
||||
The subpixel range [0,1) is discretized based on the implementation-
|
||||
dependent value of SUBSAMPLE_DISTANCE_AMD. GetFloatv can be used with
|
||||
SUBSAMPLE_DISTANCE_AMD as the pname parameter to query the subpixel
|
||||
precision, which is the same for both the vertical and horizontal
|
||||
directions. Given two sample positions (x0, y0) and (x1, y1), one can make
|
||||
sure they don't fall in the same subpixel if
|
||||
|
||||
abs(x0 - x1) >= ssd and abs(y0 - y1) >= ssd,
|
||||
|
||||
where ssd is the float value returned when querying SUBSAMPLE_DISTANCE_AMD.
|
||||
|
||||
The quantized sample positions can be retrieved via the new entry point:
|
||||
|
||||
void GetFramebufferParameterfvAMD(enum target,
|
||||
enum pname,
|
||||
uint numsamples,
|
||||
uint pixelindex,
|
||||
sizei size,
|
||||
float *values);
|
||||
|
||||
<target> must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER.
|
||||
FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. <pname> must be
|
||||
SAMPLE_POSITIONS. <numsamples> is the number of samples to get and must
|
||||
be greater than 0 and less than or equal to the value of SAMPLES. The
|
||||
error INVALID_VALUE is generated if <numsamples> is outside this range.
|
||||
<pixelindex> is the index of the pixel to set the samples for and must be
|
||||
less than the result of querying PIXELS_PER_SAMPLE_PATTERN_X_AMD
|
||||
multiplied by the result of querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD.
|
||||
Calling GetFramebufferParameterfvAMD with <pixelindex> within this
|
||||
range retrieves the set of sample positions for the pixel matching
|
||||
<pixelindex>. <pixelindex> can also be equal to ALL_PIXELS_AMD, which
|
||||
would cause the function to return an array of the requested <numsamples>
|
||||
per each pixel in the sampling pattern.
|
||||
|
||||
The error INVALID_VALUE is generated if <pixelindex> is less than
|
||||
zero or is greater than or equal to the result of querying
|
||||
PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the result of querying
|
||||
PIXELS_PER_SAMPLE_PATTERN_Y_AMD and is not equal to ALL_SAMPLES. The
|
||||
samples returned are ordered per pixel, and the order of the pixels would
|
||||
be left to right, then top to bottom, where the sampling pattern origin is
|
||||
the upper left corner. <size> is the requested size of the retrieved sample
|
||||
locations in bytes. <values> will contain the returned <x> and <y>
|
||||
coordinates of the requested samples in pixel space. The sample locations
|
||||
returned are all in the range [0, 1), corresponding to the <x> and <y>
|
||||
locations in pixel space of that sample, respectively. (0.5, 0.5) thus
|
||||
corresponds to the pixel center.
|
||||
|
||||
The commands:
|
||||
|
||||
void NamedFramebufferSamplePositionsfvAMD(uint framebuffer,
|
||||
uint numsamples,
|
||||
uint pixelindex,
|
||||
const float *values);
|
||||
|
||||
void GetNamedFramebufferParameterfvAMD(uint framebuffer,
|
||||
enum pname,
|
||||
uint numsamples,
|
||||
uint pixelindex,
|
||||
sizei size,
|
||||
float *value);
|
||||
|
||||
behave identically to FramebufferSamplePositionsfvAMD and
|
||||
GetFramebufferSampleParameterfvAMD, except that the target of the
|
||||
operation is the framebuffer object named <framebuffer> rather than
|
||||
the object bound to a specified target. If <framebuffer> is not the name
|
||||
of an existing framebuffer object an INVALID_OPERATION error is generated.
|
||||
|
||||
Additions to Chapter 14 of the OpenGL 4.4 (Core) Specification (Fixed-Function
|
||||
Primitive Assembly and Rasterization)
|
||||
|
||||
(Modify Section 14.3, Antialiasing, p. 412)
|
||||
|
||||
Add after the segment: "If the multisample mode does not have fixed sample
|
||||
locations, the returned values may only reflect the locations of samples
|
||||
within some pixels.", append:
|
||||
|
||||
If GetMultisamplefv is used to query the result of using
|
||||
FramebufferSamplePositionsfvAMD or NamedFramebufferSamplePositionsfvAMD
|
||||
with ALL_PIXELS_AMD, the returned sample position matches that of
|
||||
<pixelindex> equal to zero.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_VALUE is generated by FramebufferSamplePositionsfvAMD,
|
||||
NamedFramebufferSamplePositionsfvAMD, GetFramebufferParameterfvAMD
|
||||
and GetNamedFramebufferParameterfvAMD if numsamples is greater than
|
||||
the value of SAMPLES.
|
||||
|
||||
INVALID_VALUE is generated by FramebufferSamplePositionsfvAMD if
|
||||
pixelindex is greater than or equal to the value of
|
||||
NUM_PIXELS_PER_SAMPLE_PATTERN_X_AMD * NUM_PIXELS_PER_SAMPLE_PATTERN_Y_AMD
|
||||
and is not equal to ALL_SAMPLES_AMD.
|
||||
|
||||
INVALID_OPERATION is generated by FramebufferSamplePositionsfvAMD
|
||||
if the currently bound framebuffer is the default framebuffer.
|
||||
|
||||
INVALID_OPERATION is generated by NamedFramebufferSamplePositionsfvAMD
|
||||
if the <framebuffer> is not the name of an existing framebufer object.
|
||||
|
||||
INVALID_OPERATION is generated by FramebufferSamplePositionsfvAMD
|
||||
if the currently bound framebuffer is incomplete.
|
||||
|
||||
INVALID_OPERATION is generated by NamedFramebufferSamplePositionsfvAMD
|
||||
if the <framebuffer> is incomplete.
|
||||
|
||||
New State
|
||||
|
||||
Add to Table 23.24, Framebuffer (state per framebuffer object), p. 545:
|
||||
|
||||
Get Value Type Get Command Value Description Sec.
|
||||
--------- ---- ----------- ----- ------------------------------ -----
|
||||
SAMPLE_POSITIONS 2xR+ GetFramebufferParameterfvAMD The (x, y) sample locations in 9.2.9
|
||||
the range [0, 1)
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
Add to Table 23.11, Multisampling, p. 532:
|
||||
|
||||
Get Value Type Get Command Value Description Sec.
|
||||
--------- ------- ----------- ------- ------------------------ -----
|
||||
SUBSAMPLE_DISTANCE_AMD R+ GetFloatv precision step between 9.2.9
|
||||
subsamples
|
||||
PIXELS_PER_SAMPLE_PATTERN_X_AMD Z+ GetIntegerv number of pixels in the 9.2.9
|
||||
X direction
|
||||
PIXELS_PER_SAMPLE_PATTERN_Y_AMD Z+ GetIntegerv number of pixels in the 9.2.9
|
||||
Y direction
|
||||
|
||||
Interaction with ARB_texture_multisample
|
||||
|
||||
If ARB_texture_multisample is not supported, remove all references to
|
||||
GetMultisamplefv.
|
||||
|
||||
|
||||
Dependencies on EXT_direct_state_access
|
||||
|
||||
If EXT_direct_state_access is not supported, remove references to the
|
||||
Named* commands added by this extension.
|
||||
|
||||
|
||||
Issues
|
||||
|
||||
(1) What happens if an app just sets one sample position?
|
||||
|
||||
RESOLVED: Any attachment to the bound FBO will have the index 0
|
||||
position updated. All the rest of the positions will keep their
|
||||
original values. Any other FBOs will not be affected by this change.
|
||||
|
||||
|
||||
(2) Should we also expose the precision? Can an app use it in setting
|
||||
sample positions?
|
||||
|
||||
RESOLVED: SUBSAMPLE_DISTANCE_AMD is added as a new token. It can be
|
||||
used by GetFloatv to query the precision step, which will be the same
|
||||
for both the vertical and horizontal directions. The subpixel range
|
||||
[0,1) is discretized based on the value of SUBSAMPLE_DISTANCE_AMD.
|
||||
Let ssd be the float value returned when SUBSAMPLE_DISTANCE_AMD is
|
||||
queried, then one can infer the subpixilization to be 1/ssd+1. For
|
||||
example, if ssd = 0.06667 then the pixel is subdivided into
|
||||
1/0.0667+1 = 16 subpixels in each dimension.
|
||||
|
||||
One can also avoid using sample positions that would map to the same
|
||||
subpixel. A coordinate c will map to the greatest multiple of ssd that
|
||||
is less or equal to c. For example, given two sample positions,
|
||||
(x0, y0) and (x1, y1), if abs(x1-x0) < ssd and abs(y1-y0) < ssd, then
|
||||
both points will map to the same subpixel, which means the application
|
||||
might want to substitute one of these positions with another that is
|
||||
not redundant.
|
||||
|
||||
Using numerical values as an example, let a = (0.201, 0.0) and
|
||||
b = (0.25, 0.5) be sample positions and ssd = 0.06667. Both the
|
||||
x-coordinate values 0.201 and 0.25 fall between 0.06667*3=0.2 and
|
||||
0.06667*4 = 0.26667 and would therefore map to the same value of 0.2.
|
||||
The y-coordinates also map to the same value of 0 because they both
|
||||
belong in the range [0, 0.06667). This means the two points are
|
||||
redundant. Therefore, the application should choose a different point
|
||||
c = (0.3, 0.45) for example. c would be a good choice because the
|
||||
distance between its x-coordinate and a's x-coordinate is greater than
|
||||
ssd, that is 0.3-0.201 > 0.06667.
|
||||
|
||||
(3) What would be the expected results for the following scenarios:
|
||||
|
||||
Scenario 1
|
||||
The current number of samples in the framebuffer is 8.
|
||||
The application requests 5 sample positions and GL_ALL_PIXELS.
|
||||
The application passes 22*2*sizeof(GLuint) as the size in bytes
|
||||
(more than needed).
|
||||
|
||||
RESOLVED: The returned array would have a capped size of
|
||||
20*2*sizeof(GLuint) and will contain the first 5 samples of pixel
|
||||
(x0, y0), then the first 5 samples of pixel (x1, y0), then the first
|
||||
5 samples of pixel (x0, y1) and finally the first 5 samples of pixel
|
||||
(x1, y1).
|
||||
|
||||
Scenario 2
|
||||
The current number of samples in the framebuffer is 8.
|
||||
The application requests 5 sample positions and GL_ALL_PIXELS.
|
||||
The application passes 18*2*sizeof(GLuint) as the size in bytes
|
||||
(less than needed).
|
||||
|
||||
RESOLVED: The returned array would have a size of 18*2*sizeof(GLuint)
|
||||
and will contain the first 5 samples of pixel (x0, y0), then the first
|
||||
5 samples of pixel (x1, y0), then the first 5 samples of pixel
|
||||
(x0, y1) and finally the first 3 samples of pixel (x1, y1).
|
||||
|
||||
Scenario 3
|
||||
The current number of samples in the framebuffer is 8.
|
||||
The application requests 5 sample positions and GL_ALL_PIXELS.
|
||||
The application passes 12*2*sizeof(GLuint) as the size in bytes
|
||||
(less than needed).
|
||||
|
||||
RESOLVED: The returned array would have a size of 12*2*sizeof(GLuint)
|
||||
and will contain the first 5 samples of pixel (x0, y0), then the first
|
||||
5 samples of pixel (x1, y0), and the first 2 samples of pixel
|
||||
(x0, y1).
|
||||
|
||||
(4) What is the expected behavior of a multisampled texture is attached
|
||||
with <fixedsamplelocations> equal to TRUE and then the application
|
||||
attempts to set different samples per pixels in a sampling pattern?
|
||||
|
||||
RESOLVED: If <fixedsamplelocations> is set to TRUE, the sample
|
||||
positions in <pixelindex> equaling zero get replicated to all other
|
||||
pixels in the sampling pattern.
|
||||
|
||||
(5) What is the result of rendering to a framebuffer, changing its sample
|
||||
locations and then rendering again into that framebuffer without
|
||||
clearing it first?
|
||||
|
||||
RESOLVED: The result is effectively undefined. The result of rendering
|
||||
will not be consistent between the two passes. No ill effect should
|
||||
come of this, but the framebuffer content may appear corrupted.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
4 11/10/16 malnasse Modify the 'framebuffer' parameter in
|
||||
GetNamedFramebufferParameterfvAMD from
|
||||
GLenum to GLuint to match the DSA style.
|
||||
3 11/09/16 malnasse Update PIXELS_PER_SAMPLE_PATTERN_X_AMD and
|
||||
PIXELS_PER_SAMPLE_PATTERN_Y_AMD token values.
|
||||
2 04/18/14 gsellers Ready for posting.
|
||||
1 10/14/13 malnasse First revision.
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
Name
|
||||
|
||||
AMD_gcn_shader
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_gcn_shader
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers (graham.sellers 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers, AMD
|
||||
Daniel Rakos, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 06/24/2019
|
||||
Revision: 4
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #453
|
||||
|
||||
Dependencies
|
||||
|
||||
This extension is written against Revision 8 of the version 4.40 of the
|
||||
OpenGL Shading Language Specification, dated January 22, 2014.
|
||||
|
||||
This extension builds upon features introduced by the
|
||||
GL_ARB_shader_group_vote extension.
|
||||
|
||||
AMD_gpu_shader_int64 or NV_gpu_shader5 is required.
|
||||
|
||||
Overview
|
||||
|
||||
This extension exposes miscellaneous features of the AMD "Graphics Core
|
||||
Next" shader architecture that do not cleanly fit into other extensions
|
||||
and are not significant enough alone to warrant their own extensions.
|
||||
This includes cross-SIMD lane ballots, cube map query functions and
|
||||
a functionality to query the elapsed shader core time.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language Specification
|
||||
(Built-In Language Variables)
|
||||
|
||||
Modify Section 7.1, Built-In Language Variables
|
||||
|
||||
(add to the list of built-in constants for each shader stage listed in
|
||||
the chapter)
|
||||
|
||||
in int gl_SIMDGroupSizeAMD;
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language Specification
|
||||
(Built-in Functions)
|
||||
|
||||
Add New Section 8.9.5, Texture Cube Map Addressing Functions
|
||||
|
||||
Syntax:
|
||||
|
||||
float cubeFaceIndexAMD(vec3 P)
|
||||
|
||||
The function cubeFaceIndexAMD returns a single floating point value
|
||||
that represents the index of the cube map face that would be accessed
|
||||
by texture lookup functions for the cube map texture coordinates given
|
||||
as parameter. The returned value correspond to cube map faces as follows:
|
||||
|
||||
* 0.0 for the cube map face facing the positive X direction
|
||||
* 1.0 for the cube map face facing the negative X direction
|
||||
* 2.0 for the cube map face facing the positive Y direction
|
||||
* 3.0 for the cube map face facing the negative Y direction
|
||||
* 4.0 for the cube map face facing the positive Z direction
|
||||
* 5.0 for the cube map face facing the negative Z direction
|
||||
|
||||
Syntax:
|
||||
|
||||
vec2 cubeFaceCoordAMD(vec3 P)
|
||||
|
||||
The function cubeFaceCoordAMD returns a two-component floating point
|
||||
vector that represents the 2D texture coordinates that would be used for
|
||||
accessing the selected cube map face for the given cube map texture
|
||||
coordinates given as parameter P.
|
||||
|
||||
Modify Section 8.18, Shader Invocation Group Functions
|
||||
|
||||
(add to the end of the section)
|
||||
|
||||
Syntax:
|
||||
|
||||
uint64_t ballotAMD(bool value);
|
||||
|
||||
The function ballotAMD returns a bitfield containing the result of
|
||||
evaluating the expression <value> in all active invocations in the group.
|
||||
SIMD groups of up to 64 invocations may be represented by the return value
|
||||
of ballotAMD(). Invocations populate the result starting from the least
|
||||
significant bit. If <value> evaluates to true for an active invocation
|
||||
then the corresponding bit is set in the result, otherwise it is not set.
|
||||
Bits corresponding to invocations that are not active or that do not
|
||||
exist in the SIMD group (because, for example, they are at bit positions
|
||||
beyond the SIMD group size) are set to zero. The following trivial
|
||||
assumptions can be made:
|
||||
|
||||
* ballotAMD(true) returns bitfield where the corresponding bits are
|
||||
set for all active invocations in the SIMD group.
|
||||
* ballotAMD(false) returns 0ul.
|
||||
|
||||
|
||||
Add New Section 8.19, "Timing Functions"
|
||||
|
||||
Syntax:
|
||||
|
||||
uint64_t timeAMD(void);
|
||||
|
||||
The timeAMD function returns a 64-bit value representing the current
|
||||
execution clock as seen by the shader processor. Time monotonically
|
||||
increments as the processor executes instructions. The returned time will
|
||||
wrap after it exceeds the maximum value representable in 64 bits. The
|
||||
units of time are not defined and need not be constant. Time is not
|
||||
dynamically uniform. That is, shader invocations executing as part of a
|
||||
single draw or dispatch will not necessarily see the same value of time.
|
||||
Time is also not guaranteed to be consistent across shader stages. For
|
||||
example, there is no requirement that time sampled inside a fragment
|
||||
shader invocation will be greater than the time sampled in the vertex
|
||||
that lead to its execution.
|
||||
|
||||
Dependencies on GL_ARB_shader_group_vote:
|
||||
|
||||
This extension adds to sections introduced by GL_ARB_shader_group_vote.
|
||||
If GL_ARB_shader_group_vote is not supported, introduce the referenced
|
||||
sections, but do not introduce the functionality from that extension.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- ---------------------------------------------
|
||||
4 06/24/2019 dwitczak gl_SIMDGroupSizeAMD is no longer a built-in constant.
|
||||
3 03/17/2013 drakos Internal updates + ready to post
|
||||
2 10/08/2013 gsellers Internal updates
|
||||
1 09/20/2013 gsellers Initial revision
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,700 @@
|
||||
Name
|
||||
|
||||
AMD_gpu_shader_int16
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_gpu_shader_int16
|
||||
|
||||
Contact
|
||||
|
||||
Dominik Witczak, AMD (dominik.witczak 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Daniel Rakos, AMD
|
||||
Matthaeus G. Chajdas, AMD
|
||||
Quentin Lin, AMD
|
||||
Rex Xu, AMD
|
||||
Timothy Lottes, AMD
|
||||
Zhi Cai, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 03/28/2018
|
||||
Author Revision: #2
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #507
|
||||
|
||||
Dependencies
|
||||
|
||||
This extension is written against version 4.50 of the OpenGL Shading
|
||||
Language Specification.
|
||||
|
||||
GLSL 4.00 is required.
|
||||
|
||||
This extension interacts with AMD_gpu_shader_half_float.
|
||||
This extension interacts with ARB_gpu_shader_int64.
|
||||
This extension interacts with KHR_vulkan_glsl.
|
||||
|
||||
Overview
|
||||
|
||||
This extension was developed to allow implementations supporting 16-bit
|
||||
integers to expose the feature in GLSL.
|
||||
|
||||
The extension introduces the following features for all shader types:
|
||||
|
||||
* new built-in functions to pack and unpack 32-bit integer types into a
|
||||
two-component 16-bit integer vector;
|
||||
|
||||
* new built-in functions to convert half-precision floating-point
|
||||
values to or from their 16-bit integer bit encodings;
|
||||
|
||||
* vector relational functions supporting comparisons of vectors of
|
||||
16-bit integer types; and
|
||||
|
||||
* common functions abs, frexp, ldexp, sign, min, max, clamp, and mix
|
||||
supporting arguments of 16-bit integer types.
|
||||
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
NONE
|
||||
|
||||
|
||||
New Tokens
|
||||
|
||||
NONE
|
||||
|
||||
|
||||
Modifications to the OpenGL Shading Language Specification, Version 4.50
|
||||
|
||||
Including the following line in a shader can be used to control the
|
||||
language features described in this extension:
|
||||
|
||||
#extension GL_AMD_gpu_shader_int16 : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.3.
|
||||
|
||||
New preprocessor #defines are added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_AMD_gpu_shader_int16 1
|
||||
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language Specification (Basics)
|
||||
|
||||
Modify Section 3.6, Keywords
|
||||
|
||||
(add the following to the list of reserved keywords at p. 18)
|
||||
|
||||
int16_t i16vec2 i16vec3 i16vec4 uint16_t u16vec2 u16vec3 u16vec4
|
||||
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language Specification
|
||||
(Variables and Types)
|
||||
|
||||
Modify Section 4.1, Basic Types
|
||||
|
||||
(add to the basic "Transparent Types" table, p. 19)
|
||||
|
||||
+-----------+------------------------------------------------------------+
|
||||
| Type | Meaning |
|
||||
+-----------+------------------------------------------------------------+
|
||||
| int16_t | a 16-bit signed integer |
|
||||
| uint16_t | a 16-bit unsigned integer |
|
||||
| i16vec2 | a two-component 16-bit signed integer vector |
|
||||
| i16vec3 | a three-component 16-bit signed integer vector |
|
||||
| i16vec4 | a four-component 16-bit signed integer vector |
|
||||
| u16vec2 | a two-component 16-bit unsigned integer vector |
|
||||
| u16vec3 | a three-component 16-bit unsigned integer vector |
|
||||
| u16vec4 | a four-component 16-bit unsigned integer vector |
|
||||
+-----------+------------------------------------------------------------+
|
||||
|
||||
|
||||
Modify Section 4.1.3, Integers
|
||||
|
||||
(replace first paragraph of the section, p. 26)
|
||||
|
||||
Signed and unsigned integer variables are fully supported. In this
|
||||
document, the term integer is meant to generally include both signed and
|
||||
unsigned integers, including both 16-bit and 32-bit integers. Unsigned
|
||||
integers of type uint16_t, u16vec2, u16vec3, and u16vec4 have exactly 16 bits
|
||||
of precision, while unsigned integers of type uint, uvec2, uvec3, and
|
||||
uvec4 have exactly 32 bits of precision. Signed integers of type int16_t,
|
||||
i16vec2, i16vec3, and i16vec4 have exactly 16 bits of precision, while signed
|
||||
integers of type int, ivec2, ivec3, and ivec4 have exactly 32 bits of precision.
|
||||
Addition, subtraction, and shift operations resulting in overflow or underflow
|
||||
will not cause any exceptions, nor will they saturate, rather they will "wrap"
|
||||
to yield the low-order bits of the result. Divison and multiplication operations
|
||||
resulting in overflow or underflow will not cause any exception but will result in
|
||||
an undefined value.
|
||||
|
||||
Change "integer-suffix" definition:
|
||||
|
||||
"integer-suffix:
|
||||
unsigned-suffix short-suffixopt
|
||||
short-suffix
|
||||
|
||||
unsigned-suffix: one of
|
||||
u U
|
||||
short-suffix: one of
|
||||
s S
|
||||
|
||||
Modify the next paragraph to say:
|
||||
"No white space is allowed between the digits of an integer constant,
|
||||
including after the leading 0 or after the leading 0x or 0X of a constant,
|
||||
or before the integer-suffix. When tokenizing, the maximal token matching
|
||||
the above will be recognized before a new token is started.
|
||||
When the suffix is present, the literal type is determined as follows:
|
||||
-------------------------------------
|
||||
| suffix | type |
|
||||
-------------------------------------
|
||||
| no suffix | int |
|
||||
| u or U | uint |
|
||||
| s or S | int16_t |
|
||||
| both u/U and s/S | uint16_t |
|
||||
-------------------------------------
|
||||
A leading unary minus sign (-) is interpreted as an arithmetic
|
||||
unary negation, not as part of the constant. Hence, literals themselves
|
||||
are always expressed with non-negative syntax, though they could result
|
||||
in a negative value."
|
||||
|
||||
Modify subsection 4.1.10 Implicit Conversions to say:
|
||||
"In some situations, an expression and its type will be implicitly
|
||||
converted to a different type. Such conversion are classified into the
|
||||
following types: integral promotions, floating-point promotions,
|
||||
integral conversions, floating-point conversions, and
|
||||
floating-integral conversions.
|
||||
|
||||
The following table shows allowed integral promotions:
|
||||
--------------------------------------------------------
|
||||
| Type of | Can be implicitly promoted to |
|
||||
| expression | |
|
||||
--------------------------------------------------------
|
||||
| int16_t | int, int64_t, uint16_t |
|
||||
| uint16_t | uint, uint64_t |
|
||||
--------------------------------------------------------
|
||||
| i16vec2 | ivec2, i64vec2, u64vec2 |
|
||||
| u16vec2 | uvec2, u64vec2 |
|
||||
--------------------------------------------------------
|
||||
| i16vec3 | ivec3, i64vec3, u64vec3 |
|
||||
| u16vec3 | uvec3, u64vec3 |
|
||||
--------------------------------------------------------
|
||||
| i16vec4 | ivec4, i64vec4, u64vec4 |
|
||||
| u16vec4 | uvec4, u64vec4 |
|
||||
--------------------------------------------------------
|
||||
|
||||
The following table shows allowed integral conversions:
|
||||
-------------------------------------------------------------------------
|
||||
| Type of | Can be implicitly converted to |
|
||||
| expression | |
|
||||
-------------------------------------------------------------------------
|
||||
| int16_t | uint16_t, uint, uint64_t |
|
||||
| i16vec2 | u16vec2, uvec2, u64vec2 |
|
||||
| i16vec3 | u16vec3, uvec3, u64vec3 |
|
||||
| i16vec4 | u16vec4, uvec4, u64vec4 |
|
||||
| uint16_t | uint, uint64_t |
|
||||
| u16vec2 | uvec2, u64vec2 |
|
||||
| u16vec3 | uvec3, u64vec3 |
|
||||
| u16vec4 | uvec4, u64vec4 |
|
||||
| int | uint, uint64_t |
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
The following table shows allowed floating-integral conversions:
|
||||
--------------------------------------------------------
|
||||
| Type of | Can be implicitly converted to |
|
||||
| expression | |
|
||||
--------------------------------------------------------
|
||||
| int16_t | double, float16_t, float |
|
||||
| i16vec2 | dvec2, f16vec2, vec2 |
|
||||
| i16vec3 | dvec3, f16vec3, vec3 |
|
||||
| i16vec4 | dvec4, f16vec4, vec4 |
|
||||
| uint16_t | double, float16_t, float |
|
||||
| u16vec2 | dvec2, f16vec2, vec2 |
|
||||
| u16vec3 | dvec3, f16vec3, vec3 |
|
||||
| u16vec4 | dvec4, f16vec4, vec4 |
|
||||
| int | float |
|
||||
| ivec2 | vec2 |
|
||||
| ivec3 | vec3 |
|
||||
| ivec4 | vec4 |
|
||||
| uint | float |
|
||||
| uvec2 | vec2 |
|
||||
| uvec3 | vec3 |
|
||||
| uvec4 | vec4 |
|
||||
--------------------------------------------------------
|
||||
|
||||
When performing implicit conversion for binary operators, there may be
|
||||
multiple data types to which the two operands can be converted. For
|
||||
example, when adding an int32_t value to a uint32_t value, both values
|
||||
can be implicitly converted to uint32_t, float32_t, and double. In such
|
||||
cases conversion happens as defined as follows:
|
||||
(Note: In this paragraph vector and matrix types are referred to as
|
||||
types derived from scalar types with the same bit width and bit
|
||||
interpretation)
|
||||
- If either operand has type double or derived from double,
|
||||
the other shall be converted to double or derived type.
|
||||
- Otherwise, if either operand has type float32_t or derived from
|
||||
float32_t, the other shall be converted to float32_t or derived type.
|
||||
- Otherwise, if either operand has type float16_t or derived from
|
||||
float16_t, the other shall be converted to float16_t or derived type.
|
||||
- Otherwise, the integral promotions shall be performed on both
|
||||
operands. Then the following rules shall be applied to the promoted
|
||||
operands:
|
||||
- If both operands have the same type, no further conversion
|
||||
is needed.
|
||||
- Otherwise, if both operands have signed integer types or both
|
||||
have unsigned integer types, the operand with the type of lesser
|
||||
integer conversion rank shall be converted to the type of the
|
||||
operand with greater rank.
|
||||
- Otherwise, if the operand that has unsigned integer type has rank
|
||||
greater than or equal to the rank of the type of the other
|
||||
operand, the operand with signed integer type shall be converted
|
||||
to the type of the operand with unsigned integer type.
|
||||
- Otherwise, if the type of the operand with signed integer type can
|
||||
represent all of the values of the type of the operand with
|
||||
unsigned integer type, the operand with unsigned integer type
|
||||
shall be converted to the type of the operand with signed
|
||||
integer type.
|
||||
- Otherwise, both operands shall be converted to the unsigned
|
||||
integer type corresponding to the type of the operand with signed
|
||||
integer type.
|
||||
|
||||
The conversions listed in the following subsections are done only as
|
||||
indicated by other sections of this specification.
|
||||
|
||||
Every integer type has an integer conversion rank defined as follows:
|
||||
- No two signed integer types have the same rank.
|
||||
- The rank of a scalar signed integer type shall be greater than the rank
|
||||
of any scalar signed integer type with a smaller size.
|
||||
- The rank of any vector signed integer type is equal to the rank of the
|
||||
base scalar signed integer type.
|
||||
- The rank of int64_t shall be greater than the rank of int32_t, which
|
||||
shall be greater than the rank of int16_t.
|
||||
- The rank of any scalar unsigned integer type shall equal the rank of
|
||||
the corresponding scalar signed integer type.
|
||||
- The rank of any vector unsigned integer type is equal to the rank of
|
||||
the respective scalar unsigned integer type.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL Shading Language Specification
|
||||
(Operators and Expressions)
|
||||
|
||||
Modify Section 5.4.1, Conversion and Scalar Constructors
|
||||
|
||||
(add after first list of constructor examples on p. 97)
|
||||
|
||||
bool(int16_t) // converts a 16-bit signed integer value to a Boolean
|
||||
// value.
|
||||
bool(uint16_t) // converts a 16-bit unsigned integer value to a Boolean
|
||||
// value.
|
||||
double(int16_t) // converts a 16-bit signed integer value to a double
|
||||
// value.
|
||||
double(uint16_t) // converts a 16-bit unsigned integer value to a double
|
||||
// value.
|
||||
float(int16_t) // converts a 16-bit signed integer value to a float
|
||||
// value.
|
||||
float(uint16_t) // converts a 16-bit unsigned integer value to a float
|
||||
// value.
|
||||
float16_t(int16_t) // converts a 16-bit signed integer value to a 16-bit
|
||||
// float value.
|
||||
float16_t(uint16_t) // converts a 16-bit unsigned integer value to a 16-bit
|
||||
// float value.
|
||||
int16_t(bool) // converts a Boolean value to a 16-bit signed integer
|
||||
// value.
|
||||
int16_t(double) // converts a double value to a 16-bit signed integer
|
||||
// value.
|
||||
int16_t(float) // converts a float value to a 16-bit signed integer
|
||||
// value.
|
||||
int16_t(float16_t) // converts a 16-bit float value to a 16-bit signed
|
||||
// integer value.
|
||||
int16_t(int64_t) // converts a 64-bit signed integer value to a 16-bit
|
||||
// signed integer value.
|
||||
int16_t(int) // converts a signed integer value to a 16-bit signed
|
||||
// integer value.
|
||||
int16_t(uint) // converts an unsigned integer value to a 16-bit signed
|
||||
// integer value.
|
||||
int16_t(uint16_t) // converts a 16-bit unsigned integer value to a 16-bit
|
||||
// signed integer value.
|
||||
int16_t(uint64_t) // converts a 64-bit unsigned integer value to a 16-bit
|
||||
// signed integer value.
|
||||
int(int16_t) // converts a 16-bit signed integer value to a signed
|
||||
// integer value.
|
||||
int(uint16_t) // converts a 16-bit unsigned integer value to a signed
|
||||
// integer value.
|
||||
int64_t(int16_t) // converts a 16-bit signed integer value to a 64-bit
|
||||
// signed integer value.
|
||||
int64_t(uint16_t) // converts a 16-bit unsigned integer value to a 64-bit
|
||||
// signed integer value.
|
||||
uint16_t(bool) // converts a Boolean value to a 16-bit unsigned integer
|
||||
// value.
|
||||
uint16_t(double) // converts a double value to a 16-bit unsigned integer
|
||||
// value.
|
||||
uint16_t(float) // converts a float value to a 16-bit unsigned integer
|
||||
// value.
|
||||
uint16_t(float16_t) // converts a 16-bit float value to a 16-bit unsigned
|
||||
// integer value.
|
||||
uint16_t(int) // converts a signed integer value to a 16-bit unsigned
|
||||
// integer value.
|
||||
uint16_t(int16_t) // converts a 16-bit signed integer value to a 16-bit
|
||||
// unsigned integer value.
|
||||
uint16_t(uint) // converts an unsigned integer value to a 16-bit unsigned
|
||||
// integer value.
|
||||
uint16_t(int64_t) // converts a 64-bit signed integer value to a 16-bit
|
||||
// unsigned integer value.
|
||||
uint16_t(uint64_t) // converts a 64-bit unsigned integer value to a 16-bit
|
||||
// unsigned integer value.
|
||||
uint(int16_t) // converts a 16-bit signed integer value to an unsigned
|
||||
// integer value.
|
||||
uint(uint16_t) // converts a 16-bit unsigned integer value to an unsigned
|
||||
// integer value.
|
||||
uint64_t(int16_t) // converts a 16-bit signed integer value to a 64-bit
|
||||
// unsigned integer value.
|
||||
uint64_t(uint16_t) // converts a 16-bit unsigned integer value to a 64-bit
|
||||
// unsigned integer value.
|
||||
|
||||
(modify second sentence of first paragraph on p. 98)
|
||||
|
||||
... is dropped. It is undefined to convert a negative floating-point value
|
||||
to an uint or uint16_t.
|
||||
|
||||
(replace third paragraph on p. 98)
|
||||
|
||||
The constructors int(uint) and int16_t(uint16_t) preserve the bit pattern
|
||||
in the argument, which will change the argument's value if its sign bit is
|
||||
set. The constructor uint(int) and uint16_t(int16_t) preserve the bit
|
||||
pattern in the argument, which will change its value if it is negative.
|
||||
|
||||
|
||||
Additions to Chapter 6 of the OpenGL Shading Language Specification
|
||||
(Statements and Structure)
|
||||
|
||||
Modify Section 6.1, Function Defintions
|
||||
|
||||
(replace second rule in third paragraph on p. 113)
|
||||
|
||||
2. A match involving a conversion from a signed integer, unsigned
|
||||
integer, or floating-point type to a similar type having a larger
|
||||
number of bits is better than a match involving any other implicit
|
||||
conversion.
|
||||
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language Specification
|
||||
(Built-in Functions)
|
||||
|
||||
(insert after third sentence of last paragraph on p. 132)
|
||||
|
||||
... genUType is used as the argument. Where the input arguments (and
|
||||
corresponding output) can be int16_t, i16vec2, i16vec3, i16vec4,
|
||||
genI16Type is used as the argument. Where the input arguments (and
|
||||
corresponding output) can be uint16_t, u16vec2, u16vec3, u16vec4,
|
||||
genU16Type is used as the argument.
|
||||
|
||||
|
||||
Modify Section 8.3, Common Functions
|
||||
|
||||
(add to the table of common functions on p. 136)
|
||||
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| Syntax | Desciption |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genI16Type abs(genI16Type x) | Returns x if x >= 0; otherwise it returns -x. |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genI16Type sign(genI16Type x) | Returns 1 if x > 0, 0 if x = 0, or -1 if x < 0. |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genI16Type min(genI16Type x, | Returns y if y < x; otherwise it returns x. |
|
||||
| genI16Type y) | |
|
||||
| genI16Type min(genI16Type x, | |
|
||||
| int16_t y) | |
|
||||
| genU16Type min(genU16Type x, | |
|
||||
| genU16Type y) | |
|
||||
| genU16Type min(genU16Type x, | |
|
||||
| uint16_t y) | |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genI16Type max(genI16Type x, | Returns y if x < y; otherwise it returns x. |
|
||||
| genI16Type y) | |
|
||||
| genI16Type max(genI16Type x, | |
|
||||
| int16_t y) | |
|
||||
| genU16Type max(genU16Type x, | |
|
||||
| genU16Type y) | |
|
||||
| genU16Type max(genU16Type x, | |
|
||||
| uint16_t y) | |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genI16Type clamp(genI16Type x, | Returns min(max(x, minVal), maxVal). |
|
||||
| genI16Type minVal, | |
|
||||
| genI16Type maxVal) | Results are undefined if minVal > maxVal. |
|
||||
| genI16Type clamp(genI16Type x, | |
|
||||
| int16_t minVal, | |
|
||||
| int16_t maxVal) | |
|
||||
| genU16Type clamp(genU16Type x, | |
|
||||
| genU16Type minVal, | |
|
||||
| genU16Type maxVal) | |
|
||||
| genU16Type clamp(genU16Type x, | |
|
||||
| uint16_t minVal, | |
|
||||
| uint16_t maxVal) | |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genI16Type mix(genI16Type x, | Selects which vector each returned component comes |
|
||||
| genI16Type y, | from. For a component of a that is false, the |
|
||||
| genBType a) | corresponding component of x is returned. For a |
|
||||
| genU16Type mix(genU16Type x, | component of a that is true, the corresponding |
|
||||
| genU16Type y, | component of y is returned. |
|
||||
| genBType a) | |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genI16Type float16BitsToInt16(genF16Type value) | Returns a signed or unsigned 16-bit integer value |
|
||||
| genU16Type float16BitsToUint16(genF16Type value)| representing the encoding of a 16-bit float. The |
|
||||
| | half floating-point value's bit-level |
|
||||
| | representation is preserved |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genF16Type int16BitsToFloat16(genI16Type value) | Returns a half-floating point value corresponding |
|
||||
| genF16Type uint16BitsToFloat16(genU16Type value)| to a signed or unsigned 16-bit integer encoding of |
|
||||
| | a 16-bit float. If a NaN is passed in, it will not |
|
||||
| | signal, and the resulting value is unspecified. If |
|
||||
| | an Inf is passed in, the resulting value is the |
|
||||
| | corresponding Inf. |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genF16Type frexp(genF16Type x, | Splits x into a floating-point significand in the |
|
||||
| out genI16Type exp) | range [0.5, 1.0) and an integral exponent of two, |
|
||||
| | such that: |
|
||||
| | |
|
||||
| | x = significand * 2 ** exponent |
|
||||
| | |
|
||||
| | The significand is returned by the function and |
|
||||
| | the exponent is returned in the parameter exp. For |
|
||||
| | a floating-point value of zero, the significand |
|
||||
| | and exponent are both zero. For a floating-point |
|
||||
| | value that is an infinity or is not a number, the |
|
||||
| | results are undefined. |
|
||||
| | |
|
||||
| | If an implementation supports negative 0, |
|
||||
| | frexp(-0) should return -0; otherwise it will |
|
||||
| | return 0. |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
| genF16Type ldexp(genF16Type x, | Returns x * (2 ** exp). |
|
||||
| genI16Type exp) | |
|
||||
+-------------------------------------------------+----------------------------------------------------+
|
||||
|
||||
|
||||
Modify Section 8.4, Floating-Point and Integer Pack and Unpack Functions
|
||||
|
||||
(add to the table of pack and unpack functions on p. 149
|
||||
|
||||
+-----------------------------------+------------------------------------------------------+
|
||||
| Syntax | Desciption |
|
||||
+-----------------------------------+------------------------------------------------------+
|
||||
| | Returns an unsigned 32- or 64-bit integer obtained |
|
||||
| int packInt2x16 (i16vec2 v) | by packing the components of a two- or |
|
||||
| int64_t packInt4x16 (i16vec4 v) | four-component 16-bit signed or unsigned integer |
|
||||
| uint packUint2x16(u16vec2 v) | vector, respectively. The first vector component |
|
||||
| uint64_t packUint4x16(u16vec4 v) | specifies the 16 least significant bits; the |
|
||||
| | last component specifies the 16 most significant |
|
||||
| | bits. |
|
||||
+-----------------------------------+------------------------------------------------------+
|
||||
| | Returns a signed or unsigned integer vector built |
|
||||
| i16vec2 unpackInt2x16 (int v)| from a 32- or 64-bit signed or unsigned integer |
|
||||
| i16vec4 unpackInt4x16 (int64_t v)| scalar, respectively. The first component of the |
|
||||
| u16vec2 unpackUint2x16(uint v)| vector contains the 16 least significant bits of the |
|
||||
| u16vec4 unpackUint4x16(uint64_t v)| input; the last component specifies the 16 most |
|
||||
| | significant bits. |
|
||||
| | |
|
||||
+-----------------------------------+------------------------------------------------------+
|
||||
|
||||
|
||||
Modify Section, 8.7, Vector Relational Functions
|
||||
|
||||
Modify the first table to state:
|
||||
|
||||
+-------------+-----------------------------+
|
||||
| Placeholder | Specific Types Allowed |
|
||||
+-------------+-----------------------------+
|
||||
| i16vec | i16vec2, i16vec3, i16vec4 |
|
||||
| u16vec | u16vec2, u16vec3, u16vec4 |
|
||||
+-------------+-----------------------------+
|
||||
|
||||
(add to the table of vector relational functions at the bottom of p. 147)
|
||||
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| Syntax | Desciption |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec lessThan(i16vec x, i16vec y) | Returns the component-wise compare of x < y. |
|
||||
| bvec lessThan(u16vec x, u16vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec lessThanEqual(i16vec x, i16vec y) | Returns the component-wise compare of x <= y. |
|
||||
| bvec lessThanEqual(u16vec x, u16vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec greaterThan(i16vec x, i16vec y) | Returns the component-wise compare of x > y. |
|
||||
| bvec greaterThan(u16vec x, u16vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec greaterThanEqual(i16vec x, i16vec y) | Returns the component-wise compare of x >= y. |
|
||||
| bvec greaterThanEqual(u16vec x, u16vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec equal(i16vec x, i16vec y) | Returns the component-wise compare of x == y. |
|
||||
| bvec equal(u16vec x, u16vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec notEqual(i16vec x, i16vec y) | Returns the component-wise compare of x != y. |
|
||||
| bvec notEqual(u16vec x, u16vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
|
||||
|
||||
Modify language in the Overview section of GL_KHR_vulkan_glsl
|
||||
|
||||
Replace the following sentence:
|
||||
|
||||
The constant_id can only be applied to a scalar *int*, a scalar *float*
|
||||
or a scalar *bool*.
|
||||
|
||||
with:
|
||||
|
||||
The constant_id can only be applied to a scalar *int* (incl. 16-bit signed
|
||||
and unsigned integers), a scalar *float* or a scalar *bool*.
|
||||
|
||||
|
||||
Dependencies on AMD_gpu_shader_half_float
|
||||
|
||||
If the shader enables only AMD_gpu_shader_int16, but not AMD_gpu_shader_half_float
|
||||
then:
|
||||
|
||||
* the table describing floating-integral conversions is discarded.
|
||||
* the float16BitsTo{Int, Uint}16(), {int, uint}16BitsToFloat16(), frexp()
|
||||
and ldexp() functions are unavailable.
|
||||
|
||||
|
||||
Dependencies on ARB_gpu_shader_int64:
|
||||
|
||||
If the shader enables only AMD_gpu_shader_int16, but not ARB_gpu_shader_int64
|
||||
then:
|
||||
|
||||
* all references to int64_t and uint64_t should be ignored.
|
||||
|
||||
Dependencies on KHR_vulkan_glsl:
|
||||
|
||||
If the shader only enables AMD_gpu_shader_int16, but not KHR_vulkan_glsl,
|
||||
then any changes to the language of the latter specification should be discarded.
|
||||
|
||||
Dependencies on AMD_shader_trinary_minmax
|
||||
|
||||
If the shader enables AMD_shader_trinary_minmax, this extension adds
|
||||
additional common functions.
|
||||
|
||||
Modify Section 8.3, Common Functions
|
||||
|
||||
(add to the table of common functions on p. 144)
|
||||
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| genI16Type min3(genI16Type x, | Returns the per-component minimum value of x, |
|
||||
| genI16Type y, | y, and z. |
|
||||
| genI16Type z) | |
|
||||
| genU16Type min3(genU16Type x, | |
|
||||
| genU16Type y, | |
|
||||
| genU16Type z) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| genI16Type max3(genI16Type x, | Returns the per-component maximum value of x, |
|
||||
| genI16Type y, | y, and z. |
|
||||
| genI16Type z) | |
|
||||
| genU16Type max3(genU16Type x, | |
|
||||
| genU16Type y, | |
|
||||
| genU16Type z) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| genI16Type mid3(genI16Type x, | Returns the per-component median value of x, |
|
||||
| genI16Type y, | y, and z. |
|
||||
| genI16Type z) | |
|
||||
| genU16Type mid3(genU16Type x, | |
|
||||
| genU16Type y, | |
|
||||
| genU16Type z) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
(1) Should the new int16_t and uint16_t types support types as members of
|
||||
uniform blocks and shader storage buffer blocks?
|
||||
|
||||
RESOLVED: Yes, both types can be used in both SSBOs and UBOs, each consuming
|
||||
2 basic machine units.
|
||||
|
||||
|
||||
(2) Should we support int16_t and uint16_t types as members of uniform blocks,
|
||||
shader storage buffer blocks, or as transform feedback varyings?
|
||||
|
||||
RESOLVED: Yes, support all of them. both types consume two basic machine
|
||||
units. Some examples:
|
||||
|
||||
struct S {
|
||||
|
||||
uint16_t x; // rule 1: align = 2, takes offsets 0-1
|
||||
u16vec2 y; // rule 2: align = 4, takes offsets 4-7
|
||||
u16vec3 z; // rule 3: align = 8, takes offsets 8-13
|
||||
};
|
||||
|
||||
layout(std140) uniform B1 {
|
||||
|
||||
uint16_t a; // rule 1: align = 2, takes offsets 0-1
|
||||
u16vec2 b; // rule 2: align = 4, takes offsets 4-7
|
||||
u16vec3 c; // rule 3: align = 8, takes offsets 8-13
|
||||
uint16_t d[2]; // rule 4: align = 16, array stride = 16,
|
||||
// takes offsets 16-47
|
||||
S g; // rule 9: align = 16, g.x takes offsets
|
||||
// 48-49, g.y takes offsets 52-55,
|
||||
// g.z takes offsets 56-63
|
||||
S h[2]; // rule 10: align = 16, array stride = 16, h[0]
|
||||
// takes offsets 64-77, h[1] takes
|
||||
// offsets 78-93
|
||||
};
|
||||
|
||||
layout(std430) buffer B2 {
|
||||
|
||||
uint16_t o; // rule 1: align = 2, takes offsets 0-1
|
||||
u16vec2 p; // rule 2: align = 4, takes offsets 4-7
|
||||
u16vec3 q; // rule 3: align = 8, takes offsets 8-13
|
||||
uint16_t r[2]; // rule 4: align = 2, array stride = 2, takes
|
||||
// offsets 14-17
|
||||
S u; // rule 9: align = 8, u.x takes offsets
|
||||
// 24-25, u.y takes offsets 28-31, u.z
|
||||
// takes offsets 32-37
|
||||
S v[2]; // rule 10: align = 8, array stride = 16, v[0]
|
||||
// takes offsets 40-55, v[1] takes
|
||||
// offsets 56-71
|
||||
};
|
||||
|
||||
(3) Are interactions with GL_AMD_shader_ballot supported?
|
||||
(4) Are interactions with GL_AMD_shader_explicit_vertex_parameter supported?
|
||||
(5) Are interactions with GL_AMD_shader_trinary_minmax supported?
|
||||
|
||||
RESOLVED: Not yet. These will be resolved at a later time.
|
||||
|
||||
(6) Does this extension provide a new subpassLoad() function prototype which
|
||||
returns a(n) {u}int16 vector value?
|
||||
|
||||
RESOLVED: No. This functionality may be added at a later time in a separate
|
||||
extension.
|
||||
|
||||
(7) Can the new int16 and uint16 types be used as array indexes?
|
||||
|
||||
RESOLVED: No.
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
2 03/28/2018 rexu Add interactions with AMD_shader_trinary_minmax.
|
||||
New common functions are added to support
|
||||
16-bit integer type in these trinary operations.
|
||||
|
||||
1 06/08/2017 dwitczak First release.
|
||||
@@ -0,0 +1,796 @@
|
||||
Name
|
||||
|
||||
AMD_gpu_shader_int64
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_gpu_shader_int64
|
||||
|
||||
Contact
|
||||
|
||||
Daniel Rakos, AMD (daniel.rakos 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Daniel Rakos, AMD
|
||||
Graham Sellers, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 07/07/2014
|
||||
Author Revision: 3
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #451
|
||||
|
||||
Dependencies
|
||||
|
||||
This extension is written against the OpenGL 4.4 (Core Profile)
|
||||
Specification.
|
||||
|
||||
This extension is written against version 4.40 of the OpenGL Shading
|
||||
Language Specification.
|
||||
|
||||
OpenGL 4.0 and GLSL 4.00 are required.
|
||||
|
||||
This extension interacts with NV_gpu_shader5.
|
||||
|
||||
This extension interacts with NV_shader_buffer_load.
|
||||
|
||||
This extension interacts with EXT_direct_state_access.
|
||||
|
||||
This extension interacts with NV_vertex_attrib_integer_64bit.
|
||||
|
||||
This extension interacts with EXT_shader_integer_mix.
|
||||
|
||||
Overview
|
||||
|
||||
This extension was developed based on the NV_gpu_shader5 extension to
|
||||
allow implementations supporting 64-bit integers to expose the feature
|
||||
without the additional requirements that are present in NV_gpu_shader5.
|
||||
|
||||
The extension introduces the following features for all shader types:
|
||||
|
||||
* support for 64-bit scalar and vector integer data types, including
|
||||
uniform API, uniform buffer object, transform feedback, and shader
|
||||
input and output support;
|
||||
|
||||
* new built-in functions to pack and unpack 64-bit integer types into a
|
||||
two-component 32-bit integer vector;
|
||||
|
||||
* new built-in functions to convert double-precision floating-point
|
||||
values to or from their 64-bit integer bit encodings;
|
||||
|
||||
* vector relational functions supporting comparisons of vectors of
|
||||
64-bit integer types; and
|
||||
|
||||
* common functions abs, sign, min, max, clamp, and mix supporting
|
||||
arguments of 64-bit integer types.
|
||||
|
||||
This extension is designed to be a functional superset of the 64-bit
|
||||
integer support introduced by NV_gpu_shader5 and to be source code
|
||||
compatible with that, thus the new procedures, functions, and tokens
|
||||
are identical to those found in that extension.
|
||||
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
(The functions are identical to those defined in NV_gpu_shader5.)
|
||||
|
||||
void Uniform1i64NV(int location, int64EXT x);
|
||||
void Uniform2i64NV(int location, int64EXT x, int64EXT y);
|
||||
void Uniform3i64NV(int location, int64EXT x, int64EXT y, int64EXT z);
|
||||
void Uniform4i64NV(int location, int64EXT x, int64EXT y, int64EXT z,
|
||||
int64EXT w);
|
||||
void Uniform1i64vNV(int location, sizei count, const int64EXT *value);
|
||||
void Uniform2i64vNV(int location, sizei count, const int64EXT *value);
|
||||
void Uniform3i64vNV(int location, sizei count, const int64EXT *value);
|
||||
void Uniform4i64vNV(int location, sizei count, const int64EXT *value);
|
||||
|
||||
void Uniform1ui64NV(int location, uint64EXT x);
|
||||
void Uniform2ui64NV(int location, uint64EXT x, uint64EXT y);
|
||||
void Uniform3ui64NV(int location, uint64EXT x, uint64EXT y, uint64EXT z);
|
||||
void Uniform4ui64NV(int location, uint64EXT x, uint64EXT y, uint64EXT z,
|
||||
uint64EXT w);
|
||||
void Uniform1ui64vNV(int location, sizei count, const uint64EXT *value);
|
||||
void Uniform2ui64vNV(int location, sizei count, const uint64EXT *value);
|
||||
void Uniform3ui64vNV(int location, sizei count, const uint64EXT *value);
|
||||
void Uniform4ui64vNV(int location, sizei count, const uint64EXT *value);
|
||||
|
||||
void GetUniformi64vNV(uint program, int location, int64EXT *params);
|
||||
|
||||
|
||||
(The following function is also provided by NV_shader_buffer_load.)
|
||||
|
||||
void GetUniformui64vNV(uint program, int location, uint64EXT *params);
|
||||
|
||||
|
||||
(All of the following ProgramUniform* functions are supported if and only
|
||||
if EXT_direct_state_access is supported.)
|
||||
|
||||
void ProgramUniform1i64NV(uint program, int location, int64EXT x);
|
||||
void ProgramUniform2i64NV(uint program, int location, int64EXT x,
|
||||
int64EXT y);
|
||||
void ProgramUniform3i64NV(uint program, int location, int64EXT x,
|
||||
int64EXT y, int64EXT z);
|
||||
void ProgramUniform4i64NV(uint program, int location, int64EXT x,
|
||||
int64EXT y, int64EXT z, int64EXT w);
|
||||
void ProgramUniform1i64vNV(uint program, int location, sizei count,
|
||||
const int64EXT *value);
|
||||
void ProgramUniform2i64vNV(uint program, int location, sizei count,
|
||||
const int64EXT *value);
|
||||
void ProgramUniform3i64vNV(uint program, int location, sizei count,
|
||||
const int64EXT *value);
|
||||
void ProgramUniform4i64vNV(uint program, int location, sizei count,
|
||||
const int64EXT *value);
|
||||
|
||||
void ProgramUniform1ui64NV(uint program, int location, uint64EXT x);
|
||||
void ProgramUniform2ui64NV(uint program, int location, uint64EXT x,
|
||||
uint64EXT y);
|
||||
void ProgramUniform3ui64NV(uint program, int location, uint64EXT x,
|
||||
uint64EXT y, uint64EXT z);
|
||||
void ProgramUniform4ui64NV(uint program, int location, uint64EXT x,
|
||||
uint64EXT y, uint64EXT z, uint64EXT w);
|
||||
void ProgramUniform1ui64vNV(uint program, int location, sizei count,
|
||||
const uint64EXT *value);
|
||||
void ProgramUniform2ui64vNV(uint program, int location, sizei count,
|
||||
const uint64EXT *value);
|
||||
void ProgramUniform3ui64vNV(uint program, int location, sizei count,
|
||||
const uint64EXT *value);
|
||||
void ProgramUniform4ui64vNV(uint program, int location, sizei count,
|
||||
const uint64EXT *value);
|
||||
|
||||
|
||||
New Tokens
|
||||
|
||||
Returned by the <type> parameter of GetActiveAttrib, GetActiveUniform, and
|
||||
GetTransformFeedbackVarying:
|
||||
|
||||
(The tokens are identical to those defined in NV_gpu_shader5.)
|
||||
|
||||
INT64_NV 0x140E
|
||||
UNSIGNED_INT64_NV 0x140F
|
||||
|
||||
INT8_NV 0x8FE0
|
||||
INT8_VEC2_NV 0x8FE1
|
||||
INT8_VEC3_NV 0x8FE2
|
||||
INT8_VEC4_NV 0x8FE3
|
||||
INT16_NV 0x8FE4
|
||||
INT16_VEC2_NV 0x8FE5
|
||||
INT16_VEC3_NV 0x8FE6
|
||||
INT16_VEC4_NV 0x8FE7
|
||||
INT64_VEC2_NV 0x8FE9
|
||||
INT64_VEC3_NV 0x8FEA
|
||||
INT64_VEC4_NV 0x8FEB
|
||||
UNSIGNED_INT8_NV 0x8FEC
|
||||
UNSIGNED_INT8_VEC2_NV 0x8FED
|
||||
UNSIGNED_INT8_VEC3_NV 0x8FEE
|
||||
UNSIGNED_INT8_VEC4_NV 0x8FEF
|
||||
UNSIGNED_INT16_NV 0x8FF0
|
||||
UNSIGNED_INT16_VEC2_NV 0x8FF1
|
||||
UNSIGNED_INT16_VEC3_NV 0x8FF2
|
||||
UNSIGNED_INT16_VEC4_NV 0x8FF3
|
||||
UNSIGNED_INT64_VEC2_NV 0x8FF5
|
||||
UNSIGNED_INT64_VEC3_NV 0x8FF6
|
||||
UNSIGNED_INT64_VEC4_NV 0x8FF7
|
||||
FLOAT16_NV 0x8FF8
|
||||
FLOAT16_VEC2_NV 0x8FF9
|
||||
FLOAT16_VEC3_NV 0x8FFA
|
||||
FLOAT16_VEC4_NV 0x8FFB
|
||||
|
||||
|
||||
Additions to Chapter 7 of the OpenGL 4.4 (Core Profile) Specification
|
||||
(Program Objects)
|
||||
|
||||
Modify Section 7.3.1, Program Interfaces
|
||||
|
||||
(add to Table 7.3, OpenGL Shading Language type tokens, p. 107)
|
||||
|
||||
+----------------------------+--------------+--------+--------+--------+
|
||||
| Type Name Token | Keyword | Attrib | Xfb | Buffer |
|
||||
+----------------------------+--------------+--------+--------+--------+
|
||||
| INT64_NV | int64_t | * | * | * |
|
||||
| INT64_VEC2_NV | i64vec2 | * | * | * |
|
||||
| INT64_VEC3_NV | i64vec3 | * | * | * |
|
||||
| INT64_VEC4_NV | i64vec4 | * | * | * |
|
||||
| UNSIGNED_INT64_NV | uint64_t | * | * | * |
|
||||
| UNSIGNED_INT64_VEC2_NV | u64vec2 | * | * | * |
|
||||
| UNSIGNED_INT64_VEC3_NV | u64vec3 | * | * | * |
|
||||
| UNSIGNED_INT64_VEC4_NV | u64vec4 | * | * | * |
|
||||
+----------------------------+--------------+--------+--------+--------+
|
||||
|
||||
Modify Section 7.6, Uniform Variables
|
||||
|
||||
(modify second paragraph on p. 120)
|
||||
|
||||
Scalar, vector, and matrix uniforms with double-precision components,
|
||||
and scalar and vector uniforms with 64-bit integer components will consume
|
||||
no more than twice the number of components of equivalent uniforms with
|
||||
single-precision components.
|
||||
|
||||
|
||||
Modify Section 7.6.1, Loading Uniform Variables
|
||||
|
||||
(add to the list of commands in first paragraph on p. 125)
|
||||
|
||||
void Uniform{1,2,3,4}{i64,ui64}NV(int location, T value);
|
||||
void Uniform{1,2,3,4}{i64,ui64}vNV(int location, T value);
|
||||
|
||||
(insert after third paragraph on p. 127)
|
||||
|
||||
The Uniform*i64{v}NV and Uniform*ui{v}NV commands will load count sets
|
||||
of one to four 64-bit signed or unsigned integer values into a uniform
|
||||
location defined as a 64-bit signed or unsigned integer scalar or vector
|
||||
types.
|
||||
|
||||
|
||||
Modify Section 7.6.2.1, Uniform Buffer Object Storage
|
||||
|
||||
(modify the first two bullets of the first paragraph on p. 130)
|
||||
|
||||
* Members of type bool int, uint, float, double, int64_t, and uint64_t
|
||||
are respectively extracted from a buffer object by reading a single
|
||||
uint, int, uint, float, double, int64_t, or uint64_t value at the
|
||||
specified offset.
|
||||
|
||||
* Vectors with N elements with basic data types of bool, int, uint,
|
||||
float, double, int64_t, or uint64_t are extracted as N values in
|
||||
consecutive memory locations beginning at the specified offset, with
|
||||
components stored in order with the first (X) component at the
|
||||
lowest offset. The GL data type used for component extraction is
|
||||
derived according to the rules for scalar members above.
|
||||
|
||||
|
||||
Modify Section 7.13, Shader, Program, and Program Pipeline Queries
|
||||
|
||||
(add to the list of commands in last paragraph on p. 155)
|
||||
|
||||
void GetUniformi64vNV(uint program, int location, int64* params)
|
||||
void GetUniformui64vNV(uint program, int location, uint64* params)
|
||||
|
||||
|
||||
Additions to Chapter 11 of the OpenGL 4.4 (Core Profile) Specification
|
||||
(Programmable Vertex Processing)
|
||||
|
||||
Modify Section 11.1.1, Vertex Attributes
|
||||
|
||||
(modify third sentence of second paragraph on p. 344)
|
||||
|
||||
... hardware resources. For the purposes of this test, attribute variables
|
||||
of the type dvec3, dvec4, dmat2x3, dmat2x3, dmat3, dmat3x4, dmat4x3,
|
||||
dmat4, i64vec3, i64vec4, u64vec3, and u64vec4 may count as consuming twice
|
||||
as many attributes as equivalent single-precision types. While these types
|
||||
use the same number of generic attributes as their single-precision
|
||||
vectors of internal storage for each three- or four-component
|
||||
double-precision or 64-bit integer vector.
|
||||
|
||||
|
||||
Modify Section 11.1.2.1, Output Variables
|
||||
|
||||
(modify last sentence of fourth paragraph on p. 345)
|
||||
|
||||
... multiple components. Each component of variables declared as double-
|
||||
precision floating point scalars, vectors, or matrices, or declared as
|
||||
64-bit integer scalars or vectors may be counted as consuming two
|
||||
components.
|
||||
|
||||
(modify third bullet of the first paragraph on p. 349)
|
||||
|
||||
* any variable containing double-precision floating-point or 64-bit
|
||||
integer components
|
||||
|
||||
- has an xfb_offset layout qualifier that is not a multiple of eight;
|
||||
or
|
||||
- is associated with a binding point with an xfb_stride layout
|
||||
qualifier that is not a multiple of eight;
|
||||
|
||||
(modify second paragraph on p. 349)
|
||||
|
||||
For transform feedback purposes, each component of outputs declared as
|
||||
double-precision floating-point scalars, vectors, or matrices, or 64-bit
|
||||
integer scalars or vectors are considered to consume eight basic machine
|
||||
units, and each component of any other type is considered to consume four
|
||||
basic machine units.
|
||||
|
||||
|
||||
Modifications to the OpenGL Shading Language Specification, Version 4.40
|
||||
|
||||
Including the following line in a shader can be used to control the
|
||||
language features described in this extension:
|
||||
|
||||
#extension GL_AMD_gpu_shader_int64 : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.3.
|
||||
|
||||
New preprocessor #defines are added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_AMD_gpu_shader_int64 1
|
||||
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language Specification (Basics)
|
||||
|
||||
Modify Section 3.6, Keywords
|
||||
|
||||
(add the following to the list of reserved keywords at p. 15)
|
||||
|
||||
int64_t i64vec2 i64vec3 i64vec4 uint64_t u64vec2 u64vec3 u64vec4
|
||||
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language Specification
|
||||
(Variables and Types)
|
||||
|
||||
Modify Section 4.1, Basic Types
|
||||
|
||||
(add to the basic "Transparent Types" table, p. 19)
|
||||
|
||||
+-----------+------------------------------------------------------------+
|
||||
| Type | Meaning |
|
||||
+-----------+------------------------------------------------------------+
|
||||
| int64_t | a 64-bit signed integer |
|
||||
| uint64_t | a 64-bit unsigned integer |
|
||||
| i64vec2 | a two-component 64-bit signed integer vector |
|
||||
| i64vec3 | a three-component 64-bit signed integer vector |
|
||||
| i64vec4 | a four-component 64-bit signed integer vector |
|
||||
| u64vec2 | a two-component 64-bit unsigned integer vector |
|
||||
| u64vec3 | a three-component 64-bit unsigned integer vector |
|
||||
| u64vec4 | a four-component 64-bit unsigned integer vector |
|
||||
+-----------+------------------------------------------------------------+
|
||||
|
||||
|
||||
Modify Section 4.1.3, Integers
|
||||
|
||||
(replace first paragraph of the section, p. 23)
|
||||
|
||||
Signed and unsigned integer variables are fully supported. In this
|
||||
document, the term integer is meant to generally include both signed and
|
||||
unsigned integers, including both 32-bit and 64-bit integers. Unsigned
|
||||
integers of type uint, uvec2, uvec3, and uvec4 have exactly 32 bits of
|
||||
precision, while unsigned integers of type uint64_t, u64vec2, u64vec3, and
|
||||
u64vec4 have exactly 64 bits of precision. Signed integers of type int,
|
||||
ivec2, ivec3, and ivec4 have exactly 32 bits of precision, while signed
|
||||
integers of type int64_t, i64vec2, i64vec3, and i64vec4 have exactly
|
||||
64 bits of precision. Addition, subtraction, and shift operations
|
||||
resulting in overflow or underflow will not cause any exceptions, nor
|
||||
will they saturate, rather they will "wrap" to yield the low-order bits
|
||||
of the result. Divison and multiplication operations resulting in overflow
|
||||
or underflow will not cause any exception but will result in an undefined
|
||||
value.
|
||||
|
||||
(add after the first paragraph of the section, p. 23)
|
||||
|
||||
Variables with the types "int64_t" and "uint64_t" represent signed and
|
||||
unsigned integer values, respectively, with exactly 64 bits of precision.
|
||||
|
||||
(modify grammar rule for "integer-suffix", p. 24)
|
||||
|
||||
integer-suffix: one of
|
||||
u U l L ul UL
|
||||
|
||||
(modify first sentence of second paragraph on p. 24)
|
||||
|
||||
No white space is allowed between the digits of an integer constant,
|
||||
including after the leading 0 or after the leading 0x or 0X of a constant,
|
||||
or before the suffix u, U, l, L, ul, or UL.
|
||||
|
||||
(modify third sentence of second paragraph on p. 24)
|
||||
|
||||
When the suffix u or U is present, the literal has type uint. When the
|
||||
suffix l or L is present, the literal has type int64_t. When the suffix
|
||||
ul or UL is present, the literal has type uint64_t. Otherwise, the type is
|
||||
int.
|
||||
|
||||
|
||||
Modify Section 4.1.10, Implicit Conversions
|
||||
|
||||
(modify table of implicit conversions on p. 33)
|
||||
|
||||
+----------------------+-------------------------------------------------+
|
||||
| Type of expression | Can be implicitly converted to |
|
||||
+----------------------+-------------------------------------------------+
|
||||
| int | uint, int64_t, uint64_t, float, double |
|
||||
| uint | uint64_t, float, double |
|
||||
| int64_t | uint64_t, double |
|
||||
| uint64_t | double |
|
||||
| ivec2 | uvec2, i64vec2, u64vec2, vec2, dvec2 |
|
||||
| ivec3 | uvec3, i64vec3, u64vec3, vec3, dvec3 |
|
||||
| ivec4 | uvec4, i64vec4, u64vec4, vec4, dvec4 |
|
||||
| uvec2 | u64vec2, vec2, dvec2 |
|
||||
| uvec3 | u64vec3, vec3, dvec3 |
|
||||
| uvec4 | u64vec4, vec4, dvec4 |
|
||||
| i64vec2 | u64vec2, dvec2 |
|
||||
| i64vec3 | u64vec3, dvec3 |
|
||||
| i64vec4 | u64vec4, dvec4 |
|
||||
| u64vec2 | dvec2 |
|
||||
| u64vec3 | dvec3 |
|
||||
| u64vec4 | dvec4 |
|
||||
+----------------------+-------------------------------------------------+
|
||||
|
||||
|
||||
Modify Section 4.3.6, Output Variables
|
||||
|
||||
(modify third and fourth sentence of second paragraph on p. 46)
|
||||
|
||||
... in a fragment shader. Fragment outputs can only be float, single-
|
||||
precision floating-point vectors, signed or unsigned 32-bit integer
|
||||
vectors, or arrays of any these. It is a compile-time error to declare any
|
||||
double-precision type, 64-bit integer type, matrix, or structure as an
|
||||
output.
|
||||
|
||||
|
||||
Additions to Chapter 5 of the OpenGL Shading Language Specification
|
||||
(Operators and Expressions)
|
||||
|
||||
Modify Section 5.4.1, Conversion and Scalar Constructors
|
||||
|
||||
(add after first list of constructor examples on p. 91)
|
||||
|
||||
int64_t(double) // converts a double value to a 64-bit signed integer
|
||||
uint64_t(bool) // converts a Boolean value to a 64-bit unsigned integer
|
||||
|
||||
(modify second sentence of first paragraph on p. 92)
|
||||
|
||||
... is dropped. It is undefined to convert a negative floating-point value
|
||||
to an uint or uint64_t.
|
||||
|
||||
(replace third paragraph on p. 92)
|
||||
|
||||
The constructors int(uint) and int64_t(uint64_t) preserve the bit pattern
|
||||
in the argument, which will change the argument's value if its sign bit is
|
||||
set. The constructor uint(int) and uint64_t(int64_t) preserve the bit
|
||||
pattern in the argument, which will change its value if it is negative.
|
||||
|
||||
|
||||
Additions to Chapter 6 of the OpenGL Shading Language Specification
|
||||
(Statements and Structure)
|
||||
|
||||
Modify Section 6.1, Function Defintions
|
||||
|
||||
(replace second rule in third paragraph on p. 106)
|
||||
|
||||
2. A match involving a conversion from a signed integer, unsigned
|
||||
integer, or floating-point type to a similar type having a larger
|
||||
number of bits is better than a match involving any other implicit
|
||||
conversion.
|
||||
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language Specification
|
||||
(Built-in Functions)
|
||||
|
||||
(insert after third sentence of last paragraph on p. 132)
|
||||
|
||||
... genUType is used as the argument. Where the input arguments (and
|
||||
corresponding output) can be int64_t, i64vec2, i64vec3, i64vec4,
|
||||
genI64Type is used as the argument. Where the input arguments (and
|
||||
corresponding output) can be uint64_t, u64vec2, u64vec3, u64vec4,
|
||||
genU64Type is used as the argument.
|
||||
|
||||
|
||||
Modify Section 8.3, Common Functions
|
||||
|
||||
(add to the table of common functions on p. 136)
|
||||
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| Syntax | Desciption |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| genI64Type abs(genI64Type x) | Returns x if x >= 0; otherwise it returns -x. |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| genI64Type sign(genI64Type x) | Returns 1 if x > 0, 0 if x = 0, or -1 if x < 0. |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| genI64Type min(genI64Type x, | Returns y if y < x; otherwise it returns x. |
|
||||
| genI64Type y) | |
|
||||
| genI64Type min(genI64Type x, | |
|
||||
| int64_t y) | |
|
||||
| genU64Type min(genU64Type x, | |
|
||||
| genU64Type y) | |
|
||||
| genU64Type min(genU64Type x, | |
|
||||
| uint64_t y) | |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| genI64Type max(genI64Type x, | Returns y if x < y; otherwise it returns x. |
|
||||
| genI64Type y) | |
|
||||
| genI64Type max(genI64Type x, | |
|
||||
| int64_t y) | |
|
||||
| genU64Type max(genU64Type x, | |
|
||||
| genU64Type y) | |
|
||||
| genU64Type max(genU64Type x, | |
|
||||
| uint64_t y) | |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| genI64Type clamp(genI64Type x, | Returns min(max(x, minVal), maxVal). |
|
||||
| genI64Type minVal, | |
|
||||
| genI64Type maxVal) | Results are undefined if minVal > maxVal. |
|
||||
| genI64Type clamp(genI64Type x, | |
|
||||
| int64_t minVal, | |
|
||||
| int64_t maxVal) | |
|
||||
| genU64Type clamp(genU64Type x, | |
|
||||
| genU64Type minVal, | |
|
||||
| genU64Type maxVal) | |
|
||||
| genU64Type clamp(genU64Type x, | |
|
||||
| uint64_t minVal, | |
|
||||
| uint64_t maxVal) | |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| genI64Type mix(genI64Type x, | Selects which vector each returned component comes |
|
||||
| genI64Type y, | from. For a component of a that is false, the |
|
||||
| genBType a) | corresponding component of x is returned. For a |
|
||||
| genU64Type mix(genU64Type x, | component of a that is true, the corresponding |
|
||||
| genU64Type y, | component of y is returned. |
|
||||
| genBType a) | |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| genI64Type doubleBitsToInt64(genDType value) | Returns a signed or unsigned 64-bit integer value |
|
||||
| genU64Type doubleBitsToUint64(genDType value) | representing the encoding of a double. The double |
|
||||
| | value's bit-level representation is preserved |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
| genDType int64BitsToDouble(genI64Type value) | Returns a double value corresponding to a signed |
|
||||
| genDType uint64BitsToDouble(genU64Type value) | or unsigned integer encoding of a double. If a NaN |
|
||||
| | is passed in, it will not signal, and the |
|
||||
| | resulting value is unspecified. If an Inf is |
|
||||
| | passed in, the resulting value is the |
|
||||
| | corresponding Inf. |
|
||||
+------------------------------------------------+----------------------------------------------------+
|
||||
|
||||
|
||||
Rename Section 8.4, Floating-Point Pack and Unpack Functions to
|
||||
8.4, Floating-Point and Integer Pack and Unpack Functions
|
||||
|
||||
|
||||
Modify Section 8.4, Floating-Point and Integer Pack and Unpack Functions
|
||||
|
||||
(add to the table of pack and unpack functions on p. 141)
|
||||
|
||||
+-----------------------------------+------------------------------------------------------+
|
||||
| Syntax | Desciption |
|
||||
+-----------------------------------+------------------------------------------------------+
|
||||
| int64_t packInt2x32(ivec2 v) | Returns a signed or unsigned 64-bit integer obtained |
|
||||
| uint64_t packUint2x32(uvec2 v) | by packing the components of a two-component signed |
|
||||
| | or unsigned integer vector, respectively. The first |
|
||||
| | vector component specifies the 32 least significant |
|
||||
| | bits; the second component specifies the 32 most |
|
||||
| | significant bits. |
|
||||
+-----------------------------------+------------------------------------------------------+
|
||||
| ivec2 unpackInt2x32(int64_t v) | Returns a signed or unsigned integer vector built |
|
||||
| uvec2 unpackUint2x32(uint64_t v) | from a 64-bit signed or unsigned integer scalar, |
|
||||
| | respectively. The first component of the vector |
|
||||
| | contains the 32 least significant bits of the input; |
|
||||
| | the second component contains the 32 most |
|
||||
| | significant bits. |
|
||||
+-----------------------------------+------------------------------------------------------+
|
||||
|
||||
|
||||
Modify Section, 8.7, Vector Relational Functions
|
||||
|
||||
(add to the table of placeholders at the top of p. 147)
|
||||
|
||||
+-------------+-----------------------------+
|
||||
| Placeholder | Specific Types Allowed |
|
||||
+-------------+-----------------------------+
|
||||
| i64vec | i64vec2, i64vec3, i64vec4 |
|
||||
| u64vec | u64vec2, u64vec3, u64vec4 |
|
||||
+-------------+-----------------------------+
|
||||
|
||||
(add to the table of vector relational functions at the bottom of p. 147)
|
||||
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| Syntax | Desciption |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec lessThan(i64vec x, i64vec y) | Returns the component-wise compare of x < y. |
|
||||
| bvec lessThan(u64vec x, u64vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec lessThanEqual(i64vec x, i64vec y) | Returns the component-wise compare of x <= y. |
|
||||
| bvec lessThanEqual(u64vec x, u64vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec greaterThan(i64vec x, i64vec y) | Returns the component-wise compare of x > y. |
|
||||
| bvec greaterThan(u64vec x, u64vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec greaterThanEqual(i64vec x, i64vec y) | Returns the component-wise compare of x >= y. |
|
||||
| bvec greaterThanEqual(u64vec x, u64vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec equal(i64vec x, i64vec y) | Returns the component-wise compare of x == y. |
|
||||
| bvec equal(u64vec x, u64vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
| bvec notEqual(i64vec x, i64vec y) | Returns the component-wise compare of x != y. |
|
||||
| bvec notEqual(u64vec x, u64vec y) | |
|
||||
+-------------------------------------------+-----------------------------------------------+
|
||||
|
||||
|
||||
Modify Section 9, Shading Language Grammar for Core Profile
|
||||
|
||||
(add to the list of tokens on p. 180)
|
||||
|
||||
...
|
||||
INT64 UINT64 I64VEC2 I64VEC3 I64VEC4 U64VEC2 U64VEC3 U64VEC4
|
||||
...
|
||||
INT64CONSTANT UINT64CONSTANT
|
||||
|
||||
(add to the rule of "primary_expression" on p. 181)
|
||||
|
||||
primary_expression:
|
||||
...
|
||||
INT64CONSTANT
|
||||
UINT64CONSTANT
|
||||
...
|
||||
|
||||
(add to the rule of "type_specifier_nonarray" on p. 188)
|
||||
|
||||
type_specifier_nonarray:
|
||||
...
|
||||
INT64
|
||||
UINT64
|
||||
...
|
||||
I64VEC2
|
||||
I64VEC3
|
||||
I64VEC4
|
||||
U64VEC2
|
||||
U64VEC3
|
||||
U64VEC4
|
||||
...
|
||||
|
||||
|
||||
Dependencies on NV_gpu_shader5
|
||||
|
||||
If the shader enables only NV_gpu_shader5, but not AMD_gpu_shader_int64
|
||||
then implicit conversions from int and uint types to int64_t and uint64_t
|
||||
types are not allowed. Also, the overloaded built-in functions abs,
|
||||
sign, min, max, clamp, and mix are not available.
|
||||
|
||||
|
||||
Dependencies on NV_shader_buffer_load
|
||||
|
||||
If NV_shader_buffer_load is supported, that specification should be edited
|
||||
as follows, to allow pointers to dereference the new data types added by
|
||||
this extension.
|
||||
|
||||
Modify "Section 2.20.X, Shader Memory Access" from NV_shader_buffer_load.
|
||||
|
||||
(add rules for loads of variables having the new data types from this
|
||||
extension to the list of bullets following "When a shader dereferences a
|
||||
pointer variable")
|
||||
|
||||
- Data of type int64_t and uint64_t are read from or written to memory as
|
||||
a signel 64-bit signed and unsigned integer value, respectively, at the
|
||||
specified GPU address.
|
||||
|
||||
|
||||
Dependencies on EXT_direct_state_access
|
||||
|
||||
If EXT_direct_state_access is supported, that specification should be
|
||||
edited as follows to include new ProgramUniform* functions.
|
||||
|
||||
(add to the list of ProgramUniform* commands)
|
||||
|
||||
void ProgramUniform{1,2,3,4}{i64,ui64}NV
|
||||
(uint program int location, T value);
|
||||
void ProgramUniform{1,2,3,4}{i64,ui64}vNV
|
||||
(uint program, int location, const T *value);
|
||||
|
||||
Dependencies on NV_vertex_attrib_integer_64bit
|
||||
|
||||
This extension only provides the ability to specify 64-bit integer input
|
||||
variables in a GLSL vertex shader, but does not provide a way to specify
|
||||
the values of the corresponding vertex attributes via the OpenGL API.
|
||||
The NV_vertex_attrib_integer_64bit extension exactly provides that
|
||||
functionality.
|
||||
|
||||
|
||||
Dependencies on EXT_shader_integer_mix
|
||||
|
||||
If EXT_shader_integer_mix is not supported remove all references to the
|
||||
new overloaded built-in functions of mix.
|
||||
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
(1) How the functionality in this extension different than the 64-bit
|
||||
integer support introduced by NV_gpu_shader5?
|
||||
|
||||
RESOLVED: This extension is designed to be source code compatible with
|
||||
the 64-bit integer support in NV_gpu_shader5. However, it is a
|
||||
functional superset of that, as it adds the following additional
|
||||
features:
|
||||
|
||||
* support for overloaded versions of the functions abs, sign, min,
|
||||
max, clamp, and mix that accept 64-bit integers as parameters.
|
||||
|
||||
(2) How do the implicit conversions impact binary operators?
|
||||
|
||||
RESOLVED: For binary operators, we prefer converting to a common type
|
||||
that is as close as possible in size and type to the original
|
||||
expression.
|
||||
|
||||
(3) How do the implicit conversions impact function overloading rules?
|
||||
|
||||
RESOLVED: We extend the preference rules in core OpenGL to account
|
||||
for the new data types, adding a rule to favor conversion from 32-bit
|
||||
integers to 64-bit integers over coversions to floating-point values.
|
||||
|
||||
(4) What should be done to distinguish between 32- and 64-bit integer
|
||||
constants?
|
||||
|
||||
RESOLVED: We will use "L" and "UL" to identify signed and unsigned
|
||||
64-bit integer constants; the use of "L" matches a similar ("long")
|
||||
suffix in the C programming language. C leaves the size of integer
|
||||
types implementation-dependent, and many implementations require an "LL"
|
||||
suffix to declare 64-bit integer constants. With our size definitions,
|
||||
"L" will be considered sufficient to make an integer constant 64-bit.
|
||||
|
||||
(5) Should provide support for vertex attributes with 64-bit components,
|
||||
and if so, how should the support be provided in the OpenGL API?
|
||||
|
||||
RESOLVED: Yes, but in order to specify 64-bit vertex attribute values
|
||||
in the OpenGL API support for NV_vertex_attrib_integer_64bit or a
|
||||
similar extension is also required.
|
||||
|
||||
(6) Should we support 64-bit integer uniforms in the default uniform
|
||||
block?
|
||||
|
||||
DISCUSSION: There isn't much value in extending the standalone uniform
|
||||
API, as uniform buffers provide a way more efficient way to feed
|
||||
uniforms to the shaders, but in order to achieve feature parity with
|
||||
the 64-bit integer support in NV_gpu_shader5 it might be favorable to
|
||||
add support for it.
|
||||
|
||||
RESOLVED: Yes, for compatibility with NV_gpu_shader5.
|
||||
|
||||
(7) Should we support 64-bit integer types as members of uniform blocks,
|
||||
shader storage buffer blocks, or as transform feedback varyings?
|
||||
|
||||
RESOLVED: Yes, support all of them. 64-bit integers will consume eight
|
||||
basic machine units just like double-precision floating-point variables.
|
||||
|
||||
(8) How do the uniform loading commands introduced by this extension
|
||||
interact similar commands added by NV_shader_buffer_load?
|
||||
|
||||
RESOLVED: NV_shader_buffer_load provided the command Uniformui64NV to
|
||||
load pointer uniforms with a single 64-bit unsigned integer. This
|
||||
extension provides vectors of 64-bit unsigned integers, so we needed
|
||||
Uniform{2,3,4}ui64NV commands. We chose to provide a Uniform1ui64NV
|
||||
command, which will be functionally equivalent to Uniformui64NV.
|
||||
|
||||
(9) Should we provide distinct sized types for 32-bit integers, floats,
|
||||
and doubles?
|
||||
|
||||
RESOLVED: No. While NV_gpu_shader5 does add such types, it seems there
|
||||
isn't much value in adding those in this extension, especially because
|
||||
this extension strictly focuses on supporting 64-bit integers.
|
||||
|
||||
(10) Can the 64-bit uniform APIs be used to load values for uniforms of
|
||||
type "bool", "bvec2", "bvec3", or "bvec4"?
|
||||
|
||||
RESOLVED: No. OpenGL 2.0 and beyond did allow "bool" variable to be
|
||||
set with Uniform*i* and Uniform*f APIs, and OpenGL 3.0 extended that
|
||||
support to Uniform*ui* for orthogonality. But it seems pointless to
|
||||
extended this capability forward to 64-bit Uniform APIs as well.
|
||||
|
||||
(11) There exists both an UNSIGNED_INT64_AMD and UNSIGNED_INT64_NV token
|
||||
with different values (the former existed earlier) so which one
|
||||
this extension should use?
|
||||
|
||||
DISCUSSION: No functions in this extension accept these values as
|
||||
inputs, they only should return one of these in various scenarios.
|
||||
|
||||
RESOLVED: This extension will return the value of UNSIGNED_INT64_NV to
|
||||
stay source code compatible with NV_gpu_shader5. However, future
|
||||
extensions that should accept any of these tokens as inputs should
|
||||
accept both of them.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -------------------------------------------------
|
||||
3 07/07/14 drakos Fixed inconsistency in implicit conversion rules.
|
||||
2 31/04/14 gsellers Ready to post.
|
||||
1 10/09/13 drakos Initial revision.
|
||||
@@ -0,0 +1,347 @@
|
||||
Name
|
||||
|
||||
AMD_interleaved_elements
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_interleaved_elements
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers (graham.sellers 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Sergey Leontyev, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 2 May 2013
|
||||
Revision: 3
|
||||
|
||||
Number
|
||||
|
||||
431
|
||||
|
||||
Dependencies
|
||||
|
||||
This extension is written against version 4.3 of the Core Profile OpenGL
|
||||
Specification, dated August 6, 2012.
|
||||
|
||||
Overview
|
||||
|
||||
The glDrawElements function and its variants (instanced and indirect,
|
||||
for example) allow OpenGL to draw indexed arrays of vertices. Since its
|
||||
inception, OpenGL has supported unsigned bytes, unsigned shorts and
|
||||
unsigned integers as index types. However, all enabled vertex arrays may
|
||||
be represented by at most one shared index.
|
||||
|
||||
A common scenario in graphics rendering is that several faces share
|
||||
a vertex where, for each face some properties of a vertex (position and
|
||||
texture coordinates, for example) should be common but others must be
|
||||
unique (colors, normals, and so on). Consider a mesh of a cube with
|
||||
per-face normals, for example. There are 8 vertices and 6 normals, and 12
|
||||
triangles (where each face of the cube is represented as two triangles).
|
||||
To render this cube, we must compute the 24 unique permutations of
|
||||
position and normal and build a new element list to index into it. In
|
||||
fact, any advantage of indexed draw is lost here as the number of required
|
||||
permutations is equal to the final vertex count required to draw the
|
||||
object.
|
||||
|
||||
This extension allows OpenGL to process multi-component packed element
|
||||
data. The maximum size of a vertex's index data is not increased, but the
|
||||
facility to store 2 16-bit or 2 or 4 8-bit indices per vertex is introduced.
|
||||
Each vertex attribute is given a swizzle property to allow its index to
|
||||
be sourced from one of up to 4 channels of index data. This effectively
|
||||
allows an application to supply multiple interleaved streams of index data
|
||||
to OpenGL. Each vertex attribute is given a 'channel selector' to select
|
||||
one of the up to 4 channels of vertex index information presented to
|
||||
OpenGL. This enables the use-case described above and many more.
|
||||
The swizzle parameter is also applied to vertex indices passed to shaders,
|
||||
and updates to the definition of base vertex parameters and primitive
|
||||
restart are applied.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void VertexAttribParameteriAMD(uint index, enum pname, int param);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of VertexAttribParameteriAMD and
|
||||
GetVertexAttrib{iv|dv|fv|Iiv|Iuiv|Ldv}:
|
||||
|
||||
VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
|
||||
|
||||
Selected by the <pname> parameter of ProgramParameteri and GetProgramiv:
|
||||
|
||||
VERTEX_ID_SWIZZLE_AMD 0x91A5
|
||||
|
||||
Accepted by the <param> parameter of VertexAttribParameteriAMD:
|
||||
|
||||
RED 0x1903
|
||||
GREEN 0x1904
|
||||
BLUE 0x1905
|
||||
ALPHA 0x1906
|
||||
|
||||
Accepted by the <type> parameter of DrawElements, DrawElementsInstanced,
|
||||
DrawElementsInstancedBaseInstance and DrawElementsIndirect:
|
||||
|
||||
RG8UI 0x8238
|
||||
RG16UI 0x823A
|
||||
RGBA8UI 0x8D7C
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Core Profile Specification, Version 4.3,
|
||||
"Programs and Shaders"
|
||||
|
||||
Add to the parameters accepted by ProgramParameteri, p.82:
|
||||
|
||||
If <pname> is VERTEX_ID_SWIZZLE_AMD, <value> should be set to
|
||||
RED, GREEN, BLUE or ALPHA to indicate that the first, second, third
|
||||
or fourth component of the vertex element vector be propagated to the
|
||||
gl_VertexID vertex shader input as described in subsection 11.1.3.9.
|
||||
The initial value of VERTEX_ID_SWIZZLE_AMD is RED.
|
||||
|
||||
Additions to Chapter 10 of the OpenGL Core Profile Specification, Version 4.3,
|
||||
"Vertex Specification and Drawing Commands"
|
||||
|
||||
Insert Subsection 10.3.2, "Vertex Attribute Parameters", renumber
|
||||
subsequent sections:
|
||||
|
||||
Each vertex attribute possesses a set of parameters that control
|
||||
its behavior. Parameters for a vertex attribute may be set by calling:
|
||||
|
||||
void VertexAttribParameteriAMD(uint index,
|
||||
enum pname,
|
||||
int param);
|
||||
|
||||
where <index> identifies the generic vertex attribute array whose parameter
|
||||
to modify. If <pname> is VERTEX_ELEMENT_SWIZZLE_AMD, then <param>
|
||||
specifies the component of the vertex element that is to be used to
|
||||
source the vertex indices for the selected vertex attribute. Its value
|
||||
may be RED, GREEN, BLUE or ALPHA to select the first, second, third or
|
||||
fourth component of the vertex element.
|
||||
|
||||
In section 10.3.2, "Primitive Restart", modify the language describing
|
||||
how the restart index is compared to the vertex element index, p.302
|
||||
as follows:
|
||||
|
||||
When one of the Draw* commands transfers a set of generic attribute
|
||||
array elements to the GL, if all present index channels in the passed
|
||||
element index are equal to the primitive restart index, then the GL
|
||||
does not process those elements as a vertex. Instead ... *include
|
||||
remainder of section verbatim.*
|
||||
|
||||
In the description of DrawElementsOneInstance (p. 311), replace the
|
||||
sentence beginning "The ith element transferred by..." with:
|
||||
|
||||
For each enabled vertex attribute, the ith element transferred by
|
||||
DrawElementsOneInstance will be taken from that attribute's selected
|
||||
channel of the element whose values are stored currently bound element
|
||||
array buffer at offset indices + i.
|
||||
|
||||
Replace the paragraph explaining the <type> parameter to
|
||||
DrawElementsOneIntance (p. 311):
|
||||
|
||||
<type> may be UNSIGNED_BYTE, UNSIGNED_SHORT or UNSIGNED_INT,
|
||||
indicating that the index values are of GL type ubyte, ushort or uint,
|
||||
respectively, RG8UI or RG16UI, indicating that the index values are pairs
|
||||
of GL type ubyte or ushort, respectively, or RGBA8UI, indicating that
|
||||
index values are quadruplets of GL type ubyte. ...
|
||||
|
||||
Modify the language describing the DrawElements*BaseVertex* functions
|
||||
on p.314 as follows:
|
||||
|
||||
... are equivalent to the commands with the same base name (without
|
||||
the BaseVertex suffix), except that the ith element transferred by
|
||||
the corresponding draw call will be taken from the selected channel
|
||||
of the element vector indices[i] + <basevertex>. That is, the value of
|
||||
<basevertex> is added to the vertex index after channel selection.
|
||||
... *include remainder of description verbatim.*
|
||||
|
||||
Add to the list of accepted values for the <pname> parameter to
|
||||
GetVertexAttrib* in Section 10.6, "Vertex Array and Vertex Array Object
|
||||
Queries", p. 317:
|
||||
|
||||
... VERTEX_ELEMENT_SWIZZLE_AMD.
|
||||
|
||||
Additions to Chapter 11 of the OpenGL Core Profile Specification, Version 4.3,
|
||||
"Programmable Vertex Processing"
|
||||
|
||||
In Subsection 11.1.3.9, "Shader Inputs", p.338, modify the description
|
||||
of gl_VertexID as follows:
|
||||
|
||||
gl_VertexID holds the integer index i stored in the selected component
|
||||
of the element implicitly passed by DrawArrays or one of the other drawing
|
||||
commands defined in section 10.5. The component of the element data
|
||||
stored in gl_VertexID may be specified by calling ProgramParameteri with
|
||||
<pname> set to VERTEX_ID_SWIZZLE_AMD as specified in section 7.3.
|
||||
|
||||
New State
|
||||
|
||||
Append to Table 23.4, "Vertex Array Object State (cont.)":
|
||||
|
||||
+------------------------------+----------+---------------------+----------------+---------------------------------------------+----------+
|
||||
| Get Value | Type | Get Command | Initial Value | Description | Sec |
|
||||
+------------------------------+----------+---------------------+----------------+---------------------------------------------+----------+
|
||||
| VERTEX_ELEMENT_SWIZZLE_AMD | 16 * x E | GetVertexAttribiv | RED | Channel selector for vertex attribute index | 10.3.2 |
|
||||
+------------------------------+----------+---------------------+----------------+---------------------------------------------+----------+
|
||||
|
||||
Append to Table 23.39, "Program Object State (cont.)":
|
||||
|
||||
+------------------------+-------+---------------+----------------+------------------------------------+----------+
|
||||
| Get Value | Type | Get Command | Initial Value | Description | Sec |
|
||||
+------------------------+-------+---------------+----------------+------------------------------------+----------+
|
||||
| VERTEX_ID_SWIZZLE_AMD | E | GetProgramiv | RED | Channel selector for gl_VertexID | 11.1.3.9 |
|
||||
+------------------------+-------+---------------+----------------+------------------------------------+----------+
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_ENUM is generated by VertexAttribParameteri if <pname> is not an
|
||||
accepted token.
|
||||
|
||||
INVALID_VALUE is generated by VertexAttribParameteri if <value> is not an
|
||||
acceptable value for the specified value of <pname>.
|
||||
|
||||
Examples
|
||||
|
||||
// Basic per-face normals
|
||||
|
||||
// Normal data
|
||||
static const float normals[] =
|
||||
{
|
||||
0.0f, 0.0f, 1.0f, // Positive Z
|
||||
0.0f, 0.0f, -1.0f, // Negative Z
|
||||
0.0f, 1.0f, 0.0f, // Positive Y
|
||||
0.0f, -1.0f, 0.0f, // Negative Y
|
||||
1.0f, 0.0f, 0.0f, // Positive X
|
||||
-1.0f, 0.0f, 0.0f, // Negative X
|
||||
};
|
||||
|
||||
// Position data
|
||||
static const float positions[] =
|
||||
{
|
||||
-1.0f, -1.0f, -1.0f,
|
||||
// <More data here>
|
||||
1.0f, 1.0f, 1.0f
|
||||
};
|
||||
|
||||
// Put the above data into a buffer and bind them as separate vertex
|
||||
// attributes.
|
||||
GLuint vertex_buffer;
|
||||
glGenBuffers(1, &vertex_buffer);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, sizeof(positions) + sizeof(normals),
|
||||
NULL, GL_STATIC_DRAW);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(positions), positions);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, sizeof(positions),
|
||||
sizeof(normals), normals);
|
||||
// ... etc. Set up vertex attributes.
|
||||
|
||||
// Index data
|
||||
static const unsigned short indices[] =
|
||||
{
|
||||
0, 0, // vertex 0: position index, normal index
|
||||
1, 0, // vertex 1: position index, normal index
|
||||
2, 0, // vertex 2: position index, normal index
|
||||
1, 0, // vertex 3: position index, normal index
|
||||
2, 0, // ... six vertices, forming
|
||||
3, 0, // ... two complete triangles, all using normals[0]
|
||||
0, 1,
|
||||
2, 1,
|
||||
3, 1,
|
||||
3, 1,
|
||||
4, 1, // ... six more vertices, forming
|
||||
2, 1, // ... two more triangles, all using normals[1]
|
||||
// etc...
|
||||
};
|
||||
|
||||
GLuint index_buffer;
|
||||
glGenBuffers(1, &index_buffer);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer);
|
||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices),
|
||||
indices, GL_STATIC_DRAW);
|
||||
|
||||
// Okay... here's the new code. Set up vertex attribute 0 (position) to
|
||||
// consume the RED channel of the vertex index and attribute 1 (normal)
|
||||
// to consume the GREEN (second) channel of the vertex index. Then
|
||||
// draw with GL_RG16UI (two channel, 16-bit unsigned int) as the index
|
||||
// type.
|
||||
glVertexAttribParameteriAMD(0, GL_VERTEX_ELEMENT_SWIZZLE_AMD, GL_RED);
|
||||
glVertexAttribParameteriAMD(1, GL_VERTEX_ELEMENT_SWIZZLE_AMD, GL_GREEN);
|
||||
|
||||
glDrawElements(GL_TRIANGLES,
|
||||
sizeof(indices) / (2 * sizeof(unsigned short)),
|
||||
GL_RG16UI,
|
||||
NULL);
|
||||
|
||||
Issues
|
||||
|
||||
1) What is the effect of multi-channel vertex indices on gl_VertexID?
|
||||
|
||||
RESOLVED: The VERTEX_ID_SWIZZLE_AMD program parameter selects the
|
||||
channel of vector element types to be passed to gl_VertexID. By
|
||||
default, this is RED, which is backwards compatible with single-channel
|
||||
types.
|
||||
|
||||
2) How does this interact with primitive-restart indices?
|
||||
|
||||
RESOLVED: If all present channels of the vertex index vector match the
|
||||
restart index, then the element index is considered to match.
|
||||
|
||||
3) How does baseVertex affect this?
|
||||
|
||||
RESOLVED: The same base vertex value is added to each each vertex
|
||||
element component after channel selection for each of the enabled
|
||||
vertex attributes. This choice is primarily motivated by the behavior
|
||||
of base vertex elements encoded in indirect draw commands.
|
||||
|
||||
4) Does this feature disable potential optimizations such as vertex
|
||||
reuse?
|
||||
|
||||
RESOVLED: No, vertex reuse should continue to function correctly.
|
||||
Each unique vector of indices should produce a unique set of vertex
|
||||
shader outputs (modulo side effects) and will hit a naive vertex
|
||||
reuse cache. Nothing precludes more advanced optimization strategies
|
||||
from being implemented, however.
|
||||
|
||||
5) Is it possible to get at all two or four channels of the vertex index
|
||||
using a built-in input to the vertex shader?
|
||||
|
||||
RESOLVED: No. A single channel selection is provided. Providing more
|
||||
data could be implemented by introducing a new built-in integer vector
|
||||
input to the shader, but we have chosen not to do at this time.
|
||||
|
||||
6) What is the value of missing channels? For example, if we render with
|
||||
GL_RG16UI indices but set certain attributes to GL_BLUE or GL_ALPHA
|
||||
swizzle, what index value is used for those channels?
|
||||
|
||||
RESOLVED: Zero.
|
||||
|
||||
7) Are the traditional GL_RED, GL_GREEN, GL_BLUE, and GL_ALPHA terms
|
||||
appropriate for this use?
|
||||
|
||||
RESOLVED: Not really, but are they appropriate for normals? g-buffers?
|
||||
Any other arbitrary data that might be in a buffer or texture?
|
||||
It's not worth introducing new enumerants just for this - we'll use
|
||||
R, G, B, A.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
3 05/02/2013 gsellers Shipping. Finalize spec ready for posting.
|
||||
2 01/25/2013 gsellers Resolve issues 1, 2, 3. Polish spec.
|
||||
1 01/17/2013 gsellers Initial draft
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
Name
|
||||
|
||||
AMD_multi_draw_indirect
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_multi_draw_indirect
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers
|
||||
|
||||
Status
|
||||
|
||||
Complete, shipping.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: Febuary 14, 2011
|
||||
Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
408
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 4.0 or ARB_draw_indirect is required.
|
||||
|
||||
The extension is written against the OpenGL 4.1 Specification, Core Profile,
|
||||
July 25, 2010
|
||||
|
||||
Overview
|
||||
|
||||
The ARB_draw_indirect extension (included in OpenGL 4.0) introduced
|
||||
mechanisms whereby the parameters for a draw function may be provided in
|
||||
a structure contained in a buffer object rather than as parameters to the
|
||||
drawing procedure. This is known as an indirect draw and is exposed as two
|
||||
new functions, glDrawArraysIndirect and glDrawElementsIndirect. Each of
|
||||
these functions generates a single batch of primitives.
|
||||
|
||||
This extension builds on this functionality by providing procedures to
|
||||
invoke multiple draws from a single procedure call. This allows large
|
||||
batches of drawing commands to be assembled in server memory (via a buffer
|
||||
object) which may then be dispatched through a single function call.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void MultiDrawArraysIndirectAMD(enum mode,
|
||||
const void *indirect,
|
||||
sizei primcount,
|
||||
sizei stride);
|
||||
|
||||
void MultiDrawElementsIndirectAMD(enum mode,
|
||||
enum type,
|
||||
const void *indirect,
|
||||
sizei primcount,
|
||||
sizei stride);
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.1 (Core) Specification (OpenGL Operation)
|
||||
|
||||
Additions to Section 2.8.3, "Drawing Commands"
|
||||
|
||||
After the description of MultiDrawArrays and before the introduction of
|
||||
DrawElementsInstanced, insert the following on p.36:
|
||||
|
||||
The command
|
||||
|
||||
void MultiDrawArraysIndirectAMD(enum mode,
|
||||
const void *indirect,
|
||||
sizei primcount,
|
||||
sizei stride);
|
||||
|
||||
behaves identically to DrawArraysIndirect, except that <indirect> is
|
||||
treated as an array of <primcount> DrawArraysIndirectCommand structures.
|
||||
<indirect> contains the offset of the first element of the array within the
|
||||
buffer currently bound to the DRAW_INDIRECT buffer binding.<stride>
|
||||
specifies the distance, in basic machine units, between the elements of the
|
||||
array. If <stride> is zero, the array elements are treated as tightly
|
||||
packed. <stride> must be a multiple of four, otherwise an INVALID_VALUE
|
||||
error is generated.
|
||||
|
||||
It has the same effect as:
|
||||
|
||||
if (<mode> is invalid)
|
||||
generate appropriate error
|
||||
else {
|
||||
const ubyte * ptr = (const ubyte *)indirect;
|
||||
for (i = 0; i < primcount; i++) {
|
||||
DrawArraysIndirect(mode,
|
||||
(DrawArraysIndirectCommand*)ptr);
|
||||
if (stride == 0)
|
||||
{
|
||||
ptr += sizeof(DrawArraysIndirectCommand);
|
||||
} else
|
||||
{
|
||||
ptr += stride;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<primcount> must be positive, otherwise an INVALID_VALUE error will be
|
||||
generated.
|
||||
|
||||
After the description of DrawElementsIndirect and before the introduction
|
||||
of MultiDrawElementsBaseVertex, insert the following on p.39:
|
||||
|
||||
The command
|
||||
|
||||
void MultiDrawElementsIndirectAMD(enum mode,
|
||||
enum type,
|
||||
const void *indirect,
|
||||
sizei primcount,
|
||||
sizei stride);
|
||||
|
||||
behaves identically to DrawElementsIndirect, except that <indirect> is
|
||||
treated as an array of <primcount> DrawElementsIndirectCommand structures.
|
||||
<indirect> contains the offset of the first element of the array within the
|
||||
buffer currently bound to the DRAW_INDIRECT buffer binding. <stride>
|
||||
specifies the distance, in basic machine units, between the elements of the
|
||||
array. If <stride> is zero, the array elements are treated as tightly
|
||||
packed. <stride> must be a multiple of four, otherwise an INVALID_VALUE
|
||||
error is generated.
|
||||
|
||||
It has the same effect as:
|
||||
|
||||
if (<mode> or <type> is invalid)
|
||||
generate appropriate error
|
||||
else {
|
||||
const ubyte * ptr = (const ubyte *)indirect;
|
||||
for (i = 0; i < primcount; i++) {
|
||||
DrawElementsIndirect(mode,
|
||||
type,
|
||||
(DrawElementsIndirectCommand*)ptr);
|
||||
if (stride == 0)
|
||||
{
|
||||
ptr += sizeof(DrawElementsIndirectCommand);
|
||||
} else
|
||||
{
|
||||
ptr += stride;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Modifications to Section 2.9.8 "Indirect Commands in Buffer Objects"
|
||||
|
||||
Modify both instances of "DrawArraysIndirect and DrawElementsIndirect" on
|
||||
p.51 to read "DrawArraysIndirect, DrawElementsIndirect,
|
||||
MultiDrawArraysIndirect and MultiDrawElementsIndirect".
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.1 (Core) Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.1 (Core) Specification (Per-Fragment Operations
|
||||
and the Framebuffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.1 (Core) Specification (Special
|
||||
Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.1 (Core) Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_VALUE is generated by MultiDrawArraysIndirect or
|
||||
MultiDrawElementsIndirect if <primcount> is negative.
|
||||
|
||||
INVALID_VALUE is generated by MultiDrawArraysIndirect or
|
||||
MultiDrawElementsIndirect if <stride> is not a multipe of four.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
None, so far.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
2 02/14/2011 gsellers Add stride parameters
|
||||
1 01/06/2011 gsellers Initial draft
|
||||
@@ -0,0 +1,751 @@
|
||||
Name
|
||||
|
||||
AMD_name_gen_delete
|
||||
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_name_gen_delete
|
||||
|
||||
|
||||
Contributors
|
||||
|
||||
Balaji Calidas
|
||||
Mark Young
|
||||
Murat Balci
|
||||
Benedikt Kessler
|
||||
|
||||
Contact
|
||||
|
||||
Mark Young (mark.young 'at' amd.com)
|
||||
|
||||
|
||||
Status
|
||||
|
||||
In Progress.
|
||||
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: February 10, 2010
|
||||
Author Revision: 1
|
||||
|
||||
|
||||
Number
|
||||
|
||||
394
|
||||
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 2.1 is required.
|
||||
|
||||
ARB_framebuffer_object affects this spec.
|
||||
|
||||
ARB_vertex_array_object affects this spec.
|
||||
|
||||
EXT_transform_feedback affects this spec.
|
||||
|
||||
EXT_transform_feedback2 affects this spec.
|
||||
|
||||
AMD_performance_monitor affects this spec
|
||||
|
||||
ARB_sampler_objects affects this spec
|
||||
|
||||
|
||||
Overview
|
||||
|
||||
This extension simply creates 2 new entry-points that name generic
|
||||
creation and deletion of names. The intent is to go away from API
|
||||
functionality that provides a create/delete function for each specific
|
||||
object.
|
||||
|
||||
For example:
|
||||
glGenTextures/glDeleteTextures/glIsTexture
|
||||
glGenBuffers/glDeleteBuffers/IsBuffer
|
||||
glGenFramebuffers/glDeleteFramebuffers/IsFramebuffer
|
||||
|
||||
Instead, everything is created using one entry-point GenNamesAMD and
|
||||
everything is now deleted with another entry-point DeleteNamesAMD with
|
||||
the appropriate identifier set. In addition, everything can now be
|
||||
queried with IsNameAMD.
|
||||
|
||||
This alleviates the problem we may eventually encounter where we have
|
||||
many Gen/Delete/Is functions where 3 might suffice. All that is needed
|
||||
in the new case is to add a valid identifier to the accepted parameters
|
||||
list.
|
||||
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP claims.
|
||||
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void GenNamesAMD(enum identifier, uint num, uint *names);
|
||||
|
||||
void DeleteNamesAMD(enum identifier, uint num, const uint *names);
|
||||
|
||||
boolean IsNameAMD(enum identifier, uint name);
|
||||
|
||||
New Types
|
||||
|
||||
None.
|
||||
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted as the <identifier> parameter of GenNamesAMD and DeleteNamesAMD:
|
||||
|
||||
DATA_BUFFER_AMD 0x9151
|
||||
PERFORMANCE_MONITOR_AMD 0x9152
|
||||
QUERY_OBJECT_AMD 0x9153
|
||||
VERTEX_ARRAY_OBJECT_AMD 0x9154
|
||||
SAMPLER_OBJECT_AMD 0x9155
|
||||
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 2.1 Specification (OpenGL Operation)
|
||||
|
||||
Insert a new section before section 2.9 "Buffer Objects" titled
|
||||
"Object Name Handling"
|
||||
----------------------------------------------------------------
|
||||
|
||||
2.x Object Name Handling
|
||||
|
||||
2.x.1 Name Generation
|
||||
|
||||
Objects in OpenGL are created, modified, and deleted using names. These
|
||||
names are unique per object type, but can be common across multiple types.
|
||||
For example, a texture and a query object may both be named 127, but two
|
||||
query different query objects cannot have the name 127 in the same context.
|
||||
These names are generated using each types own specific GenXXX command, but
|
||||
can also be created using the more generic command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
where <identifier> indicates the type of object that is to be created, <n>
|
||||
is used to indicate how many objects to create, and <names> is a previously
|
||||
allocated array that the new generated names will be supplied in. These
|
||||
names for marked as used for the purposes of the type of object specified by
|
||||
<identifier> (and their own individual GenXXX command), but they do not
|
||||
typically acquire any state until they are first bound, just as if they were
|
||||
unused.
|
||||
|
||||
Valid values for <identifier> currently are:
|
||||
- DATA_BUFFER_AMD (For ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER,
|
||||
PIXEL_PACK_BUFFER, and PIXEL_UNPACK_BUFFER)
|
||||
- FRAMEBUFFER
|
||||
- RENDERBUFFER
|
||||
- TEXTURE
|
||||
- TRANSFORM_FEEDBACK_EXT
|
||||
- VERTEX_ARRAY_OBJECT_AMD (For VAOs instead of VERTEX_ARRAY_BINDING)
|
||||
- QUERY_OBJECT_AMD (For query objects)
|
||||
- PERFORMANCE_MONITOR_AMD (For a performance monitor object)
|
||||
- SAMPLER_OBJECT_AMD (For a sampler object)
|
||||
|
||||
If <identifier> is not one of these valid values, the error INVALID_ENUM
|
||||
will be triggered. If <n> is a number zero or <names> is NULL, the error
|
||||
INVALID_VALUE is triggered.
|
||||
|
||||
|
||||
2.x.2 Name Deletion
|
||||
|
||||
Object names can be deleted when they are no longer needed using the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
where <identifier> indicates one of the above valid types, and <n> indicates
|
||||
how many object names are provided in the <names> array. Similar to
|
||||
GenNamesAMD, each object type also has its own DeleteXXX command.
|
||||
DeleteNamesAMD with a given object type behaves in the same way that the
|
||||
object types specific DeleteXXX command does.
|
||||
|
||||
If <identifier> is not one of these valid values, the error INVALID_ENUM
|
||||
will be triggered. If <n> is a number zero or <names> is NULL, the error
|
||||
INVALID_VALUE is triggered.
|
||||
|
||||
|
||||
2.x.3 Name Querying
|
||||
|
||||
Object names can be queried to make sure that an object of the given type
|
||||
exists using the command
|
||||
|
||||
boolean IsNameAMD( enum identifier, uint name );
|
||||
|
||||
where <identifier> indicates one of the above valid types, and <name>
|
||||
is the name that is being identified as a valid name for that object
|
||||
type. Similar to GenNamesAMD and DeleteNamesAMD, each object type also
|
||||
has its own IsXXX command. IsNameAMD with a given object type behaves in
|
||||
the same way that the object types specific IsXXX command does.
|
||||
|
||||
If <identifier> is not one of these valid values, the error INVALID_ENUM
|
||||
will be triggered.
|
||||
|
||||
|
||||
2.x.4 Name Binding
|
||||
|
||||
Objects are typically enabled for usage through a Bind call or something
|
||||
similar. The process for binding objects for usage is handled differently
|
||||
per object type. For further information on how to use each object, refer
|
||||
to its section later in this spec.
|
||||
|
||||
|
||||
|
||||
Modify section 2.9 "Buffer Objects", page 33.
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
After the paragraphs talking about 'DeleteBuffers' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to DATA_BUFFER_AMD behaves the same as using the
|
||||
DeleteBuffers command.
|
||||
|
||||
|
||||
Modify the paragraphs talking about 'GenBuffers':
|
||||
----------------------------------------------------------------
|
||||
|
||||
The commands
|
||||
|
||||
void GenBuffers( sizei n, uint *buffers );
|
||||
|
||||
returns <n> previously unused buffer object names in <buffers>. These names
|
||||
are marked as used, for the purposes of GenBuffers and GenNamesAMD when used
|
||||
with <identifier> set to DATA_BUFFER_AMD only, but they acquire buffer state
|
||||
only when they are first bound, just as if they were unused.
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to DATA_BUFFER_AMD behaves the same as using the
|
||||
GenBuffers command.
|
||||
|
||||
While a buffer object is bound, any GL operations on that object affect any
|
||||
other bindings of that object. If a buffer object is deleted while it is
|
||||
bound, all bindings to that object in the current context (i.e. in the
|
||||
thread that called DeleteBuffers or DeleteNamesAMD with <identifier> set to
|
||||
DATA_BUFFER_AMD) are reset to zero. Bindings to that buffer in other
|
||||
contexts and other threads are not affected, but attempting to use a deleted
|
||||
buffer in another thread...
|
||||
|
||||
|
||||
|
||||
Modify the new section 2.y "Vertex Array Objects".
|
||||
Added by ARB_vertex_array_object
|
||||
----------------------------------------------------------------
|
||||
|
||||
Modify the paragraphs talking about 'GenVertexArrays':
|
||||
----------------------------------------------------------------
|
||||
|
||||
The commands
|
||||
|
||||
void GenVertexArrays( sizei n, uint *arrays );
|
||||
|
||||
returns <n> previous unused vertex array object names in <arrays>. These
|
||||
names are marked as used, for the purposes of GenVertexArrays and
|
||||
GenNamesAMD (when <identifier> is set to VERTEX_ARRAY_OBJECT_AMD) only,
|
||||
and are initialized with the state listed in tables 6.6 (except for
|
||||
the CLIENT_ACTIVE_TEXTURE selector state), 6.7 and 6.8.
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to VERTEX_ARRAY_OBJECT_AMD behaves the same as using
|
||||
the GenVertexArrays command.
|
||||
|
||||
|
||||
After the paragraphs talking about 'DeleteVertexArrays' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to VERTEX_ARRAY_OBJECT_AMD behaves the same as using
|
||||
the DeleteVertexArrays command.
|
||||
|
||||
|
||||
Modify the paragraph that starts with
|
||||
'BindVertexArray fails and an INVALID_OPERATION error'... to:
|
||||
----------------------------------------------------------------
|
||||
BindVertexArray fails and an INVALID_OPERATION error is generated if
|
||||
array is not a name returned from a previous call to
|
||||
GenVertexArrays (or GenNamesAMD with <identifier> set to
|
||||
VERTEX_ARRAY_OBJECT), or if such a name has since been deleted with
|
||||
either DeleteVertexArrays or DeleteNamesAMD (with <identifier> set to
|
||||
VERTEX_ARRAY_OBJECT). An INVALID_OPERATION error is generated
|
||||
if VertexAttribPointer or VertexAttribIPointer is called while a
|
||||
non-zero vertex array object is bound and zero is bound to the
|
||||
ARRAY_BUFFER buffer object binding point[fn].
|
||||
|
||||
|
||||
|
||||
Modify the new section 2.z.1 "Transform Feedback Objects"
|
||||
Added by EXT_transform_feedback2
|
||||
----------------------------------------------------------------
|
||||
|
||||
Add after the paragraphs talking about 'DeleteTransformFeedbacksEXT':
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to TRANSFORM_FEEDBACK_EXT behaves the same as using
|
||||
the DeleteTransformFeedbacksEXT command.
|
||||
|
||||
|
||||
Modify the paragraphs talking about 'GenTransformFeedbacksEXT':
|
||||
----------------------------------------------------------------
|
||||
|
||||
The command
|
||||
|
||||
void GenTransformFeedbacksEXT(sizei n, uint *ids)
|
||||
|
||||
returns <n> previously unused transform feedback object names in <ids>.
|
||||
These names are marked as used, for the purposes of
|
||||
GenTransformFeedbacksEXT and GenNamesAMD (when <identifier> is set to
|
||||
TRANSFORM_FEEDBACK_EXT) only, but they acquire transform feedback state
|
||||
only when they are first bound, just as if they were unused.
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to TRANSFORM_FEEDBACK_EXT behaves the same as using
|
||||
the GenTransformFeedbacksEXT command.
|
||||
|
||||
|
||||
Modify the paragraph that starts with
|
||||
'BindVertexArray fails and an INVALID_OPERATION error'... to:
|
||||
----------------------------------------------------------------
|
||||
BindVertexArray fails and an INVALID_OPERATION error is generated if
|
||||
array is not a name returned from a previous call to
|
||||
GenVertexArrays (or GenNamesAMD with <identifier> set to
|
||||
VERTEX_ARRAY_OBJECT), or if such a name has since been deleted with
|
||||
either DeleteVertexArrays or DeleteNamesAMD (with <identifier> set to
|
||||
VERTEX_ARRAY_OBJECT). An INVALID_OPERATION error is generated
|
||||
if VertexAttribPointer or VertexAttribIPointer is called while a
|
||||
non-zero vertex array object is bound and zero is bound to the
|
||||
ARRAY_BUFFER buffer object binding point[fn].
|
||||
|
||||
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 2.1 Specification (Rasterization)
|
||||
|
||||
Modify section 3.8.12 "Texture Objects", page 182.
|
||||
----------------------------------------------------------------
|
||||
|
||||
After the paragraphs talking about 'DeleteTextures' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to TEXTURE behaves the same as using the
|
||||
DeleteTextures command.
|
||||
|
||||
|
||||
Modify the paragraphs talking about 'GenTextures':
|
||||
----------------------------------------------------------------
|
||||
|
||||
The commands
|
||||
|
||||
void GenTextures( sizei n, uint *textures );
|
||||
|
||||
returns <n> previously unused texture object names in <textures>. These names
|
||||
are marked as used, for the purposes of GenTextures and GenNamesAMD when used
|
||||
with <identifier> set to TEXTURE only, but they acquire texture state and
|
||||
dimensionality only when they are first bound, just as if they were unused.
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to TEXTURE behaves the same as using the
|
||||
GenBuffers command.
|
||||
|
||||
|
||||
|
||||
Modify section 3.9.2 "Sampler Objects".
|
||||
----------------------------------------------------------------
|
||||
|
||||
After the paragraphs talking about 'GenSamplers' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to SAMPLER_OBJECT_AMD behaves the same as using the
|
||||
GenSamplers command.
|
||||
|
||||
After the paragraphs talking about 'DeleteSamplers' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to SAMPLER_OBJECT_AMD behaves the same as using the
|
||||
DeleteSamplers command.
|
||||
|
||||
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 2.1 Specification (Per-Fragment Operations
|
||||
and the Framebuffer)
|
||||
|
||||
Modify section 4.1.7 "Occlusion Queries", page 207.
|
||||
----------------------------------------------------------------
|
||||
|
||||
Insert after the paragraph talking about 'GenQueries':
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to QUERY_OBJECT_AMD behaves the same as using the
|
||||
GenQueries command.
|
||||
|
||||
|
||||
After the paragraphs talking about 'DeleteQueries' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to QUERY_OBJECT_AMD behaves the same as using the
|
||||
DeleteTextures command.
|
||||
|
||||
|
||||
Modify the paragraph that talks about GenQueries and DeleteQueries errors
|
||||
after that:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling either GenQueries, DeleteQueries, GenNamesAMD(QUERY_OBJECT_AMD),
|
||||
or DeleteNamesAMD(QUERY_OBJECT_AMD), while any query of any target is
|
||||
active causes an INVALID OPERATION error to be generated.
|
||||
|
||||
|
||||
Modify section 4.4.1 "Binding and Managing Framebuffer Objects"
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
Modify the 2nd paragraph to read:
|
||||
----------------------------------------------------------------
|
||||
|
||||
A framebuffer object is created by binding a name returned by
|
||||
GenFramebuffers or GenNamesAMD (see below) to DRAW_FRAMEBUFFER or
|
||||
READ_FRAMEBUFFER. The binding is effected by calling
|
||||
|
||||
|
||||
Modify the 5th paragraph to read:
|
||||
----------------------------------------------------------------
|
||||
|
||||
BindFramebuffer fails and an INVALID_OPERATION error is generated if
|
||||
<framebuffer> is not zero or a name returned from a previous call to
|
||||
GenFramebuffers or GenNamesAMD, or if such a name has since been
|
||||
deleted with DeleteFramebuffers or DeleteNamesAMD.
|
||||
|
||||
|
||||
After the paragraphs talking about 'DeleteFramebuffers' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to FRAMEBUFFER behaves the same as using the
|
||||
DeleteFramebuffers command.
|
||||
|
||||
|
||||
After the paragraphs talking about 'GenFramebuffers' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to FRAMEBUFFER behaves the same as using the
|
||||
GenFramebuffers command.
|
||||
|
||||
|
||||
Modify section 4.4.2.1 "Renderbuffer Objects"
|
||||
----------------------------------------------------------------
|
||||
|
||||
Modify the 2nd paragraph to read:
|
||||
----------------------------------------------------------------
|
||||
|
||||
The name space for renderbuffer objects is the unsigned integers,
|
||||
with zero reserved for the GL. A renderbuffer object is created by
|
||||
binding a name returned by GenRenderbuffers or GenNamesAMD (see below)
|
||||
to RENDERBUFFER. The binding is effected by calling
|
||||
|
||||
Modify the 9th paragraph to read:
|
||||
----------------------------------------------------------------
|
||||
|
||||
BindRenderbuffer fails and an INVALID_OPERATION error is generated
|
||||
if <renderbuffer> is not a name returned from a previous call to
|
||||
GenRenderbuffers or GenNamesAMD, or if such a name has since been
|
||||
deleted with DeleteRenderbuffers or DeleteNamesAMD.
|
||||
|
||||
|
||||
After the paragraphs talking about 'DeleteRenderbuffers' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to RENDERBUFFER behaves the same as using the
|
||||
DeleteFramebuffers command.
|
||||
|
||||
|
||||
After the paragraphs talking about 'GenRenderbuffers' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to RENDERBUFFER behaves the same as using the
|
||||
GenFramebuffers command.
|
||||
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 2.1 Specification (Special
|
||||
Functions)
|
||||
|
||||
Modify section 5.4 "Display Lists", page 240.
|
||||
----------------------------------------------------------------
|
||||
|
||||
Add the following to the list of things not allowed inside of a
|
||||
display list:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Name generation: GenNamesAMD and DeleteNamesAMD
|
||||
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 2.1 Specification (State and
|
||||
State Requests)
|
||||
|
||||
Modify section 6.1.4 "Texture Queries"
|
||||
----------------------------------------------------------------
|
||||
|
||||
After the paragraphs talking about 'IsTexture' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void IsNameAMD( enum identifier, uint name );
|
||||
|
||||
with <identifier> set to TEXTURE behaves the same as using the
|
||||
IsTexture command.
|
||||
|
||||
|
||||
Modify section 6.1.12 "Occlusion Queries"
|
||||
----------------------------------------------------------------
|
||||
|
||||
After the paragraphs talking about 'IsQuery' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void IsNameAMD( enum identifier, uint name );
|
||||
|
||||
with <identifier> set to QUERY_OBJECT_AMD behaves differently from
|
||||
calling IsQuery. IsQuery only returns if an object is a
|
||||
query once it has been used. However, IsName returns TRUE if
|
||||
a QUERY_OBJECT_AMD object had been created either through
|
||||
GenQueries or GenNamesAMD.
|
||||
|
||||
|
||||
Modify section 6.1.13 "Buffer Object Queries"
|
||||
----------------------------------------------------------------
|
||||
|
||||
After the paragraphs talking about 'IsBuffer' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void IsNameAMD( enum identifier, uint name );
|
||||
|
||||
with <identifier> set to DATA_BUFFER_AMD behaves the same as using the
|
||||
IsBuffer command.
|
||||
|
||||
|
||||
Additions to new section for Performance Monitoring (added by
|
||||
AMD_performance_monitor)
|
||||
|
||||
|
||||
After the paragraphs talking about 'GenPerfMonitorsAMD' insert:
|
||||
----------------------------------------------------------------
|
||||
|
||||
Calling the command
|
||||
|
||||
void GenNamesAMD( enum identifier, sizei n, uint *names );
|
||||
|
||||
with <identifier> set to PERFORMANCE_MONITOR_AMD behaves the same as
|
||||
using the GenPerfMonitorsAMD command.
|
||||
|
||||
|
||||
Modify the paragraphs talking about 'DeletePerfMonitorsAMD' to:
|
||||
----------------------------------------------------------------
|
||||
|
||||
The command
|
||||
|
||||
void DeletePerfMonitorsAMD(sizei n, uint *monitors)
|
||||
|
||||
is used to delete the list of monitors created by a previous call to
|
||||
GenPerfMonitors or GenNamesAMD (with <identifier> set to
|
||||
PERFORMANCE_MONITOR_AMD). If a monitor ID in the list <monitors> does not
|
||||
reference a previously generated performance monitor, an INVALID_VALUE
|
||||
error is generated.
|
||||
|
||||
Calling the command
|
||||
|
||||
void DeleteNamesAMD( enum identifier, sizei n, const uint *names );
|
||||
|
||||
with <identifier> set to PERFORMANCE_MONITOR_AMD behaves the same as using
|
||||
the DeletePerfMonitors command.
|
||||
|
||||
|
||||
Modify the paragraph after the protoype for SelectPerfMonitorCountersAMD
|
||||
to read:
|
||||
----------------------------------------------------------------
|
||||
|
||||
is used to enable or disable a list of counters from a group to be monitored
|
||||
as identified by <monitor>. The <enable> argument determines whether the
|
||||
counters should be enabled or disabled. <group> specifies the group
|
||||
ID under which counters will be enabled or disabled. The <numCounters>
|
||||
argument gives the number of counters to be selected from the list
|
||||
<counterList>. If <monitor> is not a valid monitor created by either
|
||||
GenPerfMonitorsAMD or GneNamesAMD (with <identifier> set to
|
||||
PERFORMANCE_MONITOR_AMD), then INVALID_VALUE error will be generated. If
|
||||
<group> is not a valid group, the INVALID_VALUE error will be generated. If
|
||||
<numCounters> is less than 0, an INVALID_VALUE error will be generated.
|
||||
|
||||
|
||||
Additions to the OpenGL / GLX / GLX Protocol Specifications
|
||||
|
||||
None.
|
||||
|
||||
|
||||
Additions to the WGL Specification
|
||||
|
||||
None.
|
||||
|
||||
|
||||
Errors
|
||||
|
||||
The error INVALID_ENUM is generated by GenNamesAMD, DeleteNamesAMD, or
|
||||
IsNameAMD if <identifier> is not one of:
|
||||
- DATA_BUFFER_AMD (For ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER,
|
||||
PIXEL_PACK_BUFFER, and PIXEL_UNPACK_BUFFER)
|
||||
- FRAMEBUFFER
|
||||
- RENDERBUFFER
|
||||
- TEXTURE
|
||||
- TRANSFORM_FEEDBACK_EXT
|
||||
- VERTEX_ARRAY_OBJECT_AMD (For VAOs instead of VERTEX_ARRAY_BINDING)
|
||||
- QUERY_OBJECT_AMD (For query objects)
|
||||
- PERFORMANCE_MONITOR_AMD (For a performance monitor object)
|
||||
- SAMPLER_OBJECT_AMD (For a sampler object)
|
||||
|
||||
The error INVALID_VALUE is generated by GenNamesAMD or DeleteNamesAMD
|
||||
if <num> is 0.
|
||||
|
||||
The error INVALID_VALUE is generated by GenNamesAMD or DeleteNamesAMD
|
||||
if <names> is NULL.
|
||||
|
||||
|
||||
New State
|
||||
|
||||
None
|
||||
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
If ARB_vertex_array_object is not present, remove any reference to
|
||||
VERTEX_ARRAY or VERTEX_ARRAY_BINDING and VAOs.
|
||||
|
||||
|
||||
Sample Code
|
||||
|
||||
glGenTextures/glDeleteTextures
|
||||
|
||||
Before:
|
||||
|
||||
GLuint texID[12];
|
||||
glGenTextures(12, &texID[0]);
|
||||
...
|
||||
// Use textures
|
||||
...
|
||||
glDeleteTextures(12, &texID[0]);
|
||||
|
||||
After:
|
||||
|
||||
GLuint texID[12];
|
||||
glGenNames(GL_TEXTURE, 12, &texID[0]);
|
||||
...
|
||||
// Use textures
|
||||
...
|
||||
glDeleteNames(GL_TEXTURE, 12, &texID[0]);
|
||||
|
||||
|
||||
Issues
|
||||
|
||||
01) What is the main benefit of these new entry-points?
|
||||
|
||||
To reduce the requirement of new entry-points for generating and
|
||||
deleting names.
|
||||
|
||||
|
||||
02) Do we want to use VERTEX_ARRAY_BINDING for a vertex array object?
|
||||
|
||||
RECOMMENDATION - I suggest using a new variable called
|
||||
VERTEX_ARRAY_OBJECT_AMD. This makes it clear
|
||||
what's being generated.
|
||||
|
||||
|
||||
03) What do we want the generic buffer object name to be called
|
||||
|
||||
RESOLVED - Use DATA_BUFFER_AMD.
|
||||
|
||||
|
||||
04) Do we want to include display list generation?
|
||||
|
||||
RECOMMENDATION - No. There is additional restrictions on display list
|
||||
name generation specifically items being
|
||||
consecutively generated.
|
||||
|
||||
|
||||
05) Should DeleteNamesAMD verify that the names exist and throw an error
|
||||
if not?
|
||||
|
||||
RECOMMENDATION - I think not since it might cause issues with multi-
|
||||
context multi-thread cases where sharing is enabled
|
||||
and one context deletes them follwed by another
|
||||
context deleting items.
|
||||
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
1) September 11, 2009: myoung
|
||||
- Initial revision of AMDX extension
|
||||
|
||||
2) February 10, 2010: myoung
|
||||
- Change from AMDX to AMD extension
|
||||
|
||||
2) February 12, 2010: myoung
|
||||
- Add in IsNameAMD functionality requested by Benedikt
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
Name
|
||||
|
||||
AMD_occlusion_query_event
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_occlusion_query_event
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers (graham.sellers 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers, AMD
|
||||
Daniel Rakos, AMD
|
||||
|
||||
Status
|
||||
|
||||
SHIPPING
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 11/20/2013
|
||||
Author Revision: 3
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #442
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.5 is required.
|
||||
|
||||
This extension is written against the OpenGL 4.4 (core) specification.
|
||||
|
||||
This extension depends on the definition of OpenGL 3.3 and
|
||||
GL_ARB_occlusion_query2.
|
||||
|
||||
This extension depends on the definition of OpenGL 4.3 and
|
||||
GL_ARB_ES3_compatibility.
|
||||
|
||||
This extension depends on the definition of GL_EXT_depth_bounds_test.
|
||||
|
||||
Overview
|
||||
|
||||
Occlusion queries provide a means to count the number of fragments that
|
||||
pass the depth and stencil tests and that may contribute to a rendered
|
||||
image. In unextended OpenGL, an occlusion query increments its
|
||||
samples-passed count whenever a sample passes both the stencil test and
|
||||
the depth test (if enabled). However, there is no way to count fragments
|
||||
that fail the stencil test, or pass the stencil test and then subsequently
|
||||
fail the depth test.
|
||||
|
||||
This extension introduces the concept of occlusion query events and changes
|
||||
the concept of an occlusion query from counting passed fragments to counting
|
||||
fragments that generate any of a user-selectable set of events. Provided
|
||||
events include passing the depth test, and passing or failing the stencil
|
||||
test. For a given occlusion query object, counting of these events may be
|
||||
enabled or disabled, allowing any combination to be counted.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void QueryObjectParameteruiAMD(enum target,
|
||||
uint id,
|
||||
enum pname,
|
||||
uint param);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> argument to QueryObejctParameteruiAMD,
|
||||
GetQueryObjectiv, GetQueryObjectuiv, GetQueryObjecti64v, and
|
||||
GetQueryObjectui64v:
|
||||
|
||||
OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
|
||||
|
||||
Accepted by the <param> argument to QueryObjectParameteruiAMD:
|
||||
|
||||
QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
|
||||
QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
|
||||
QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
|
||||
QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
|
||||
QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.4 (core) Specification (Event Model)
|
||||
|
||||
Insert Section 4.2.1, "Query Object Parameters", p.42. Renumber subsequent
|
||||
sections.
|
||||
|
||||
Query object parameters control the behavior of the query object. Changing
|
||||
the value of a query object parameter is done by calling
|
||||
|
||||
void QueryObjectParameteruiAMD(enum target,
|
||||
uint id,
|
||||
enum pname,
|
||||
uint param);
|
||||
|
||||
with <target> set to a valid query target, <id> set to a value returned
|
||||
from a previous call to GenQueries. <pname> specifies the parameter to
|
||||
modify and <param> contains its new value. If <id> is an unused query object
|
||||
name then the name is marked as used and associated with a new query object
|
||||
of the type specified by <target>. Otherwise, <id> must be the name of an
|
||||
existing query object of that type.
|
||||
|
||||
Additions to Chapter 17 of the OpenGL 4.3 (core) Specification (Writing Fragments
|
||||
and Samples to the Framebuffer)
|
||||
|
||||
Modify the first paragraph of Subection 17.3.7, "Occlusion Queries" as
|
||||
follows:
|
||||
|
||||
Occlusion queries use query objects to track fragments as they pass through
|
||||
the depth bounds test, stencil test and depth test, in that order. Each
|
||||
stage may generate an event. An event is generated if a fragment fails
|
||||
the depth bounds test. If a fragment passes the depth bounds test, it then
|
||||
undergoes the stencil test and generates an event should it fail that.
|
||||
Should it pass the stencil test, it undergoes the depth test, upon which
|
||||
it will generate an event indicating whether it passed or failed the depth
|
||||
test. An occlusion query can be started and finished by calling BeginQuery
|
||||
and EndQuery, respectively, with a <target> of SAMPLES_PASSED,
|
||||
ANY_SAMPLES_PASSED, or ANY_SAMPLES_PASSED_CONSERVATIVE.
|
||||
|
||||
In the remainder of the Subsection, replace any occurrence of "passes the
|
||||
depth test" with "generates an enabled event". Add the following to the end
|
||||
of the subsection:
|
||||
|
||||
Counting of occlusion query events are enabled and disabled for a query
|
||||
object by calling QueryObjectParameteruiAMD with <target> set to
|
||||
SAMPLES_PASSED, ANY_SAMPLES_PASSED or ANY_SAMPLES_PASSED_CONSERVATIVE, with
|
||||
<id> set to the name of an existing query object of the appropriate type, or
|
||||
to a name returned from a call to GenQueries but not yet associated with a
|
||||
query object, with <pname> set to OCCLUSION_QUERY_EVENT_MASK_AMD and with
|
||||
<param> set to the bitwise or of the set of the following flags:
|
||||
|
||||
+---------------------------------------+---------------------------------------------------------+
|
||||
| QUERY_DEPTH_PASS_EVENT_BIT_AMD | Indicates that the fragment passed all tests. |
|
||||
| QUERY_DEPTH_FAIL_EVENT_BIT_AMD | Indicates that the fragment passed the depth bounds and |
|
||||
| | stencil tests, but failed the depth test. |
|
||||
| QUERY_STENCIL_FAIL_EVENT_BIT_AMD | Indicates that the fragment passed the depth bounds |
|
||||
| | test but failed the stencil test. |
|
||||
| QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD | Indicates that the fragment failed the depth bounds |
|
||||
| | test. |
|
||||
| QUERY_ALL_EVENT_BITS_AMD | Indicates that any event generated by the fragment |
|
||||
| | should be counted. |
|
||||
+---------------------------------------+---------------------------------------------------------+
|
||||
|
||||
By default, the value of OCCLUSION_QUERY_EVENT_MASK_AMD for a newly created
|
||||
occlusion query object is QUERY_DEPTH_PASS_EVENT_BIT_AMD.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated by GetQueryObjectiv, GetQueryObjectuiv,
|
||||
GetQueryObjecti64v, and GetQueryObjectui64v if <pname> is
|
||||
OCCLUSION_QUERY_EVENT_MASK_AMD and the target of the query object
|
||||
specified by <id> is not SAMPLES_PASSED, ANY_SAMPLES_PASSED, or
|
||||
ANY_SAMPLES_PASSED_CONSERVATIVE.
|
||||
|
||||
INVALID_ENUM is generated by QueryObjectParameteruiAMD if <target> is not
|
||||
an accepted query target.
|
||||
|
||||
INVALID_ENUM is generated by QueryObjectParameteruiAMD if <pname> is not
|
||||
OCCLUSION_QUERY_EVENT_MASK_AMD.
|
||||
|
||||
INVALID_VALUE is generated by QueryObjectParameteruiAMD if <id> is not a
|
||||
name returned from a previous call to GenQueries, or if such a name has
|
||||
since been deleted with DeleteQueries.
|
||||
|
||||
INVALID_OPERATION is generated by QueryObjectParameteruiAMD if <id> is the
|
||||
name of an existing query object whose target does not match <target>, or
|
||||
an active query object name for <target>.
|
||||
|
||||
INVALID_OPERATION is generated by QueryObjectParameteruiAMD if <pname> is
|
||||
OCCLUSION_QUERY_EVENT_MASK_AMD and <target> is not SAMPLES_PASSED,
|
||||
ANY_SAMPLES_PASSED, or ANY_SAMPLES_PASSED_CONSERVATIVE.
|
||||
|
||||
INVALID_VALUE is generated by QueryObjectParameteruiAMD if <pname> is
|
||||
OCCLUSION_QUERY_EVENT_MASK_AMD and <param> contains any unsupported bits,
|
||||
except in the case when <param> is equal to the special value,
|
||||
QUERY_ALL_EVENT_BITS_AMD.
|
||||
|
||||
New State
|
||||
|
||||
Append to Table 23.44, "Query Object State"
|
||||
|
||||
+-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+--------+
|
||||
| Get Value | Type | Get Command | Initial Value | Description | Sec. |
|
||||
+-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+--------+
|
||||
| OCCLUSION_QUERY_EVENT_MASK_AMD | Z+ | GetQueryObjectuiv | QUERY_DEPTH_PASS_EVENT_BIT_AMD | Bitmask of events to count in an | 17.3.7 |
|
||||
| | | | | occlusion query | |
|
||||
+-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+--------+
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Usage Examples
|
||||
|
||||
TBD
|
||||
|
||||
Dependencies on GL_EXT_depth_bounds_test
|
||||
|
||||
If GL_EXT_depth_bounds_test is not supported, remove any reference to
|
||||
the depth bounds test and the QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD token.
|
||||
The value of the QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD remains reserved, however.
|
||||
This extension shall behave as if all fragments pass the depth bounds
|
||||
test.
|
||||
|
||||
Dependencies on OpenGL 3.3 and GL_ARB_occlusion_query2
|
||||
|
||||
If GL_ARB_occlusion_query2 is not present, and the GL version is less than
|
||||
3.3, then remove any reference to the ANY_SAMPLES_PASSED target.
|
||||
|
||||
Dependencies on OpenGL 4.3 and GL_ARB_ES3_compatibility
|
||||
|
||||
If GL_ARB_ES3_compatility is not present, and the GL version is less than
|
||||
4.3, then remove any reference to the ANY_SAMPLES_PASSED_CONSERVATIVE
|
||||
target.
|
||||
|
||||
Issues
|
||||
|
||||
1) Why is there no QUERY_STENCIL_PASS_BIT_AMD or
|
||||
QUERY_DEPTH_BOUNDS_PASS_BIT_AMD?
|
||||
|
||||
Fragments that pass the depth bounds test proceed to the stencil test
|
||||
and subsequently to the depth test. The sum of depth pass, depth fail
|
||||
and stencil fail is, by definition, the number of fragments that pass
|
||||
the depth bounds test. Likewise, the sum of depth pass and depth fail
|
||||
is the number of fragments that pass the stencil test. Thus, setting
|
||||
the event mask to (QUERY_DEPTH_PASS_EVENT_BIT_AMD |
|
||||
QUERY_DEPTH_FAIL_EVENT_BIT_AMD | QUERY_STENCIL_FAIL_EVENT_BIT_AMD)
|
||||
allows counting of fragments that pass the depth bounds test. Similarly,
|
||||
setting the event mask to (QUERY_DEPTH_PASS_EVENT_BIT_AMD |
|
||||
QUERY_DEPTH_FAIL_EVENT_BIT_AMD) provides the count of fragments that pass
|
||||
the stencil test.
|
||||
|
||||
2) Will fragments that fail the stencil test generate a depth pass or fail
|
||||
event as if they were depth tested? Will fragments that fail the depth
|
||||
bounds test generate stencil fail events?
|
||||
|
||||
RESOLVED: No. Once a fragment fails testing at a particular stage, it
|
||||
is discarded and cannot generate any more events.
|
||||
|
||||
3) What happens if the implementation doesn't support EXT_depth_bounds.
|
||||
|
||||
RESOLVED: It is as if all fragments pass the depth bounds test. No
|
||||
depth bounds failed events are generated.
|
||||
|
||||
4) What is the purpose of QUERY_ALL_EVENT_BITS_AMD?
|
||||
|
||||
RESOLVED: It allows the counting of all fragments that are subjected to
|
||||
any test regardless of the outcome of those tests.
|
||||
|
||||
5) What should the new query state setter function be called?
|
||||
|
||||
DISCUSSION: Unfortunately, the query object API doesn't really follow
|
||||
the naming conventions of object state getters already, as
|
||||
GetQueryObject should have been rather called GetQueryParameter.
|
||||
We considered the following options:
|
||||
|
||||
(a) QueryObjectuiAMD
|
||||
(b) QueryParameteruiAMD
|
||||
(c) QueryObjectParameteruiAMD
|
||||
|
||||
Option (a) follows the existing naming convention of the query object
|
||||
API, but is too general.
|
||||
Option (b) follows the naming convention of other object types, but
|
||||
because the getter of existing query states is called GetQueryObject,
|
||||
while there is also a GetQuery getter that returns context state,
|
||||
not per-query object state.
|
||||
Option (c) doesn't follow either the naming convention of the query
|
||||
object API or any other object type's, but rather a mixture of the two,
|
||||
however, it makes explicit both the fact that the setter operates
|
||||
on a query object and that it modifies its parameter.
|
||||
|
||||
RESOLVED: QueryObjectParameteruiAMD, because the function modifies
|
||||
a state/parameter of a query object.
|
||||
|
||||
6) Should there be also a GetQueryObjectParameteruiAMD?
|
||||
|
||||
RESOLVED: No. GetQueryObject is already defined to query the state of
|
||||
a query object (see also issue #5).
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- ---------------------------------------------
|
||||
3 11/20/2013 gsellers Make ready for posting
|
||||
2 08/20/2013 drakos Internal revision
|
||||
1 10/08/2012 gsellers Initial revision
|
||||
@@ -0,0 +1,586 @@
|
||||
Name
|
||||
|
||||
AMD_performance_monitor
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_performance_monitor
|
||||
|
||||
Contributors
|
||||
|
||||
Dan Ginsburg
|
||||
Aaftab Munshi
|
||||
Dave Oldcorn
|
||||
Maurice Ribble
|
||||
Jonathan Zarge
|
||||
|
||||
Contact
|
||||
|
||||
Dan Ginsburg (dan.ginsburg 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
???
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 11/29/2007
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #360
|
||||
OpenGL ES Extension #50
|
||||
|
||||
Dependencies
|
||||
|
||||
None
|
||||
|
||||
Overview
|
||||
|
||||
This extension enables the capture and reporting of performance monitors.
|
||||
Performance monitors contain groups of counters which hold arbitrary counted
|
||||
data. Typically, the counters hold information on performance-related
|
||||
counters in the underlying hardware. The extension is general enough to
|
||||
allow the implementation to choose which counters to expose and pick the
|
||||
data type and range of the counters. The extension also allows counting to
|
||||
start and end on arbitrary boundaries during rendering.
|
||||
|
||||
Issues
|
||||
|
||||
1. Should this be an EGL or OpenGL/OpenGL ES extension?
|
||||
|
||||
Decision - Make this an OpenGL/OpenGL ES extension
|
||||
|
||||
Reason - We would like to expose this extension in both OpenGL and
|
||||
OpenGL ES which makes EGL an unsuitable choice. Further, support for
|
||||
EGL is not a requirement and there are platforms that support OpenGL ES
|
||||
but not EGL, making it difficult to make this an EGL extension.
|
||||
|
||||
2. Should the API support multipassing?
|
||||
|
||||
Decision - No.
|
||||
|
||||
Reason - Multipassing should really be left to the application to do.
|
||||
This makes the API unnecessarily complicated. A major issue is that
|
||||
depending on which counters are to be sampled, the # of passes and which
|
||||
counters get selected in each pass can be difficult to determine. It is
|
||||
much easier to give a list of counters categorized by groups with
|
||||
specific information on the number of counters that can be selected from
|
||||
each group.
|
||||
|
||||
3. Should we define a 64-bit data type for UNSIGNED_INT64_AMD?
|
||||
|
||||
Decision - No.
|
||||
|
||||
Reason - While counters can be returned as 64-bit unsigned integers, the
|
||||
data is passed back to the application inside of a void*. Therefore,
|
||||
there is no need in this extension to define a 64-bit data type (e.g.,
|
||||
GLuint64). It will be up the application to declare a native 64-bit
|
||||
unsigned integer and cast the returned data to that type.
|
||||
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void GetPerfMonitorGroupsAMD(int *numGroups, sizei groupsSize,
|
||||
uint *groups)
|
||||
|
||||
void GetPerfMonitorCountersAMD(uint group, int *numCounters,
|
||||
int *maxActiveCounters, sizei countersSize,
|
||||
uint *counters)
|
||||
|
||||
void GetPerfMonitorGroupStringAMD(uint group, sizei bufSize, sizei *length,
|
||||
char *groupString)
|
||||
|
||||
void GetPerfMonitorCounterStringAMD(uint group, uint counter, sizei bufSize,
|
||||
sizei *length, char *counterString)
|
||||
|
||||
void GetPerfMonitorCounterInfoAMD(uint group, uint counter,
|
||||
enum pname, void *data)
|
||||
|
||||
void GenPerfMonitorsAMD(sizei n, uint *monitors)
|
||||
|
||||
void DeletePerfMonitorsAMD(sizei n, uint *monitors)
|
||||
|
||||
void SelectPerfMonitorCountersAMD(uint monitor, boolean enable,
|
||||
uint group, int numCounters,
|
||||
uint *counterList)
|
||||
|
||||
void BeginPerfMonitorAMD(uint monitor)
|
||||
|
||||
void EndPerfMonitorAMD(uint monitor)
|
||||
|
||||
void GetPerfMonitorCounterDataAMD(uint monitor, enum pname, sizei dataSize,
|
||||
uint *data, int *bytesWritten)
|
||||
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pame> parameter of GetPerfMonitorCounterInfoAMD
|
||||
|
||||
COUNTER_TYPE_AMD 0x8BC0
|
||||
COUNTER_RANGE_AMD 0x8BC1
|
||||
|
||||
Returned as a valid value in <data> parameter of
|
||||
GetPerfMonitorCounterInfoAMD if <pname> = COUNTER_TYPE_AMD
|
||||
|
||||
UNSIGNED_INT 0x1405
|
||||
FLOAT 0x1406
|
||||
UNSIGNED_INT64_AMD 0x8BC2
|
||||
PERCENTAGE_AMD 0x8BC3
|
||||
|
||||
Accepted by the <pname> parameter of GetPerfMonitorCounterDataAMD
|
||||
|
||||
PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
|
||||
PERFMON_RESULT_SIZE_AMD 0x8BC5
|
||||
PERFMON_RESULT_AMD 0x8BC6
|
||||
|
||||
Addition to the GL specification
|
||||
|
||||
Add a new section called Performance Monitoring
|
||||
|
||||
A performance monitor consists of a number of hardware and software counters
|
||||
that can be sampled by the GPU and reported back to the application.
|
||||
Performance counters are organized as a single hierarchy where counters are
|
||||
categorized into groups. Each group has a list of counters that belong to
|
||||
the counter and can be sampled, and a maximum number of counters that can be
|
||||
sampled.
|
||||
|
||||
The command
|
||||
|
||||
void GetPerfMonitorGroupsAMD(int *numGroups, sizei groupsSize,
|
||||
uint *groups);
|
||||
|
||||
returns the number of available groups in <numGroups>, if <numGroups> is
|
||||
not NULL. If <groupsSize> is not 0 and <groups> is not NULL, then the list
|
||||
of available groups is returned. The number of entries that will be
|
||||
returned in <groups> is determined by <groupsSize>. If <groupsSize> is 0,
|
||||
no information is copied. Each group is identified by a unique unsigned int
|
||||
identifier.
|
||||
|
||||
The command
|
||||
|
||||
void GetPerfMonitorCountersAMD(uint group, int *numCounters,
|
||||
int *maxActiveCounters,
|
||||
sizei countersSize,
|
||||
uint *counters);
|
||||
|
||||
returns the following information. For each group, it returns the number of
|
||||
available counters in <numCounters>, the max number of counters that can be
|
||||
active at any time in <maxActiveCounters>, and the list of counters in
|
||||
<counters>. The number of entries that can be returned in <counters> is
|
||||
determined by <countersSize>. If <countersSize> is 0, no information is
|
||||
copied. Each counter in a group is identified by a unique unsigned int
|
||||
identifier. If <group> does not reference a valid group ID, an
|
||||
INVALID_VALUE error is generated.
|
||||
|
||||
|
||||
The command
|
||||
|
||||
void GetPerfMonitorGroupStringAMD(uint group, sizei bufSize,
|
||||
sizei *length, char *groupString)
|
||||
|
||||
|
||||
returns the string that describes the group name identified by <group> in
|
||||
<groupString>. The actual number of characters written to <groupString>,
|
||||
excluding the null terminator, is returned in <length>. If <length> is
|
||||
NULL, then no length is returned. The maximum number of characters that
|
||||
may be written into <groupString>, including the null terminator, is
|
||||
specified by <bufSize>. If <bufSize> is 0 and <groupString> is NULL, the
|
||||
number of characters that would be required to hold the group string,
|
||||
excluding the null terminator, is returned in <length>. If <group>
|
||||
does not reference a valid group ID, an INVALID_VALUE error is generated.
|
||||
|
||||
|
||||
The command
|
||||
|
||||
void GetPerfMonitorCounterStringAMD(uint group, uint counter,
|
||||
sizei bufSize, sizei *length,
|
||||
char *counterString);
|
||||
|
||||
|
||||
returns the string that describes the counter name identified by <group>
|
||||
and <counter> in <counterString>. The actual number of characters written
|
||||
to <counterString>, excluding the null terminator, is returned in <length>.
|
||||
If <length> is NULL, then no length is returned. The maximum number of
|
||||
characters that may be written into <counterString>, including the null
|
||||
terminator, is specified by <bufSize>. If <bufSize> is 0 and
|
||||
<counterString> is NULL, the number of characters that would be required to
|
||||
hold the counter string, excluding the null terminator, is returned in
|
||||
<length>. If <group> does not reference a valid group ID, or <counter>
|
||||
does not reference a valid counter within the group ID, an INVALID_VALUE
|
||||
error is generated.
|
||||
|
||||
The command
|
||||
|
||||
void GetPerfMonitorCounterInfoAMD(uint group, uint counter,
|
||||
enum pname, void *data);
|
||||
|
||||
returns the following information about a counter. For a <counter>
|
||||
belonging to <group>, we can query the counter type and counter range. If
|
||||
<pname> is COUNTER_TYPE_AMD, then <data> returns the type. Valid type
|
||||
values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT.
|
||||
If type value returned is PERCENTAGE_AMD, then this describes a float
|
||||
value that is in the range [0.0 .. 100.0]. If <pname> is COUNTER_RANGE_AMD,
|
||||
<data> returns two values representing a minimum and a maximum. The
|
||||
counter's type is used to determine the format in which the range values
|
||||
are returned. If <group> does not reference a valid group ID, or <counter>
|
||||
does not reference a valid counter within the group ID, an INVALID_VALUE
|
||||
error is generated.
|
||||
|
||||
|
||||
The command
|
||||
|
||||
void GenPerfMonitorsAMD(sizei n, uint *monitors)
|
||||
|
||||
returns a list of monitors. These monitors can then be used to select
|
||||
groups/counters to be sampled, to start multiple monitoring sessions and to
|
||||
return counter information sampled by the GPU. At creation time, the
|
||||
performance monitor object has all counters disabled. The value of the
|
||||
PERFMON_RESULT_AVAILABLE_AMD, PERFMON_RESULT_AMD, and
|
||||
PERFMON_RESULT_SIZE_AMD queries will all initially be 0.
|
||||
|
||||
The command
|
||||
|
||||
void DeletePerfMonitorsAMD(sizei n, uint *monitors)
|
||||
|
||||
is used to delete the list of monitors created by a previous call to
|
||||
GenPerfMonitors. If a monitor ID in the list <monitors> does not
|
||||
reference a previously generated performance monitor, an INVALID_VALUE
|
||||
error is generated.
|
||||
|
||||
The command
|
||||
|
||||
void SelectPerfMonitorCountersAMD(uint monitor, boolean enable,
|
||||
uint group, int numCounters,
|
||||
uint *counterList);
|
||||
|
||||
is used to enable or disable a list of counters from a group to be monitored
|
||||
as identified by <monitor>. The <enable> argument determines whether the
|
||||
counters should be enabled or disabled. <group> specifies the group
|
||||
ID under which counters will be enabled or disabled. The <numCounters>
|
||||
argument gives the number of counters to be selected from the list
|
||||
<counterList>. If <monitor> is not a valid monitor created by
|
||||
GenPerfMonitorsAMD, then INVALID_VALUE error will be generated. If <group>
|
||||
is not a valid group, the INVALID_VALUE error will be generated. If
|
||||
<numCounters> is less than 0, an INVALID_VALUE error will be generated.
|
||||
|
||||
When SelectPerfMonitorCountersAMD is called on a monitor, any outstanding
|
||||
results for that monitor become invalidated and the result queries
|
||||
PERFMON_RESULT_SIZE_AMD and PERFMON_RESULT_AVAILABLE_AMD are reset to 0.
|
||||
|
||||
The command
|
||||
|
||||
void BeginPerfMonitorAMD(uint monitor);
|
||||
|
||||
is used to start a monitor session. Note that BeginPerfMonitor calls cannot
|
||||
be nested. In addition, it is quite possible that given the list of groups
|
||||
and counters/group enabled for a monitor, it may not be able to sample the
|
||||
necessary counters and so the monitor session will fail. In such a case,
|
||||
an INVALID_OPERATION error will be generated.
|
||||
|
||||
While BeginPerfMonitorAMD does mark the beginning of performance counter
|
||||
collection, the counters do not begin collecting immediately. Rather, the
|
||||
counters begin collection when BeginPerfMonitorAMD is processed by
|
||||
the hardware. That is, the API is asynchronous, and performance counter
|
||||
collection does not begin until the graphics hardware processes the
|
||||
BeginPerfMonitorAMD command.
|
||||
|
||||
The command
|
||||
|
||||
void EndPerfMonitorAMD(uint monitor);
|
||||
|
||||
ends a monitor session started by BeginPerfMonitorAMD. If a performance
|
||||
monitor is not currently started, an INVALID_OPERATION error will be
|
||||
generated.
|
||||
|
||||
Note that there is an implied overhead to collecting performance counters
|
||||
that may or may not distort performance depending on the implementation.
|
||||
For example, some counters may require a pipeline flush thereby causing a
|
||||
change in the performance of the application. Further, the frequency at
|
||||
which an application samples may distort the accuracy of counters which are
|
||||
variant (e.g., non-deterministic based on the input). While the effects
|
||||
of sampling frequency are implementation dependent, general guidance can
|
||||
be given that sampling at a high frequency may distort both performance
|
||||
of the application and the accuracy of variant counters.
|
||||
|
||||
The command
|
||||
|
||||
void GetPerfMonitorCounterDataAMD(uint monitor, enum pname,
|
||||
sizei dataSize,
|
||||
uint *data, sizei *bytesWritten);
|
||||
|
||||
is used to return counter values that have been sampled for a monitor
|
||||
session. If <pname> is PERFMON_RESULT_AVAILABLE_AMD, then <data> will
|
||||
indicate whether the result is available or not. If <pname> is
|
||||
PERFMON_RESULT_SIZE_AMD, <data> will contain actual size of all counter
|
||||
results being sampled. If <pname> is PERFMON_RESULT_AMD, <data> will
|
||||
contain results. For each counter of a group that was selected to be
|
||||
sampled, the information is returned as group ID, followed by counter ID,
|
||||
followed by counter value. The size of counter value returned will depend
|
||||
on the counter value type. The argument <dataSize> specifies the number of
|
||||
bytes available in the <data> buffer for writing. If <bytesWritten> is not
|
||||
NULL, it gives the number of bytes written into the <data> buffer. It is an
|
||||
INVALID_OPERATION error for <data> to be NULL. If <pname> is
|
||||
PERFMON_RESULT_AMD and <dataSize> is less than the number of bytes required
|
||||
to store the results as reported by a PERFMON_RESULT_SIZE_AMD query, then
|
||||
results will be written only up to the number of bytes specified by
|
||||
<dataSize>.
|
||||
|
||||
If no BeginPerfMonitorAMD/EndPerfMonitorAMD has been issued for a monitor,
|
||||
then the result of querying for PERFMON_RESULT_AVAILABLE and
|
||||
PERFMON_RESULT_SIZE will be 0. When SelectPerfMonitorCountersAMD is called
|
||||
on a monitor, the results stored for the monitor become invalidated and
|
||||
the value of PERFMON_RESULT_AVAILABLE and PERFMON_RESULT_SIZE queries should
|
||||
behave as if no BeginPerfMonitorAMD/EndPerfMonitorAMD has been issued for
|
||||
the monitor.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION error will be generated if BeginPerfMonitorAMD is unable
|
||||
to begin monitoring with the currently selected counters.
|
||||
|
||||
INVALID_OPERATION error will be generated if BeginPerfMonitorAMD is called
|
||||
when a performance monitor is already active.
|
||||
|
||||
INVALID_OPERATION error will be generated if EndPerfMonitorAMD is called
|
||||
when a performance monitor is not currently started.
|
||||
|
||||
INVALID_VALUE error will be generated if the <group> parameter to
|
||||
GetPerfMonitorCountersAMD, GetPerfMonitorCounterStringAMD,
|
||||
GetPerfMonitorCounterStringAMD, GetPerfMonitorCounterInfoAMD, or
|
||||
SelectPerfMonitorCountersAMD does not reference a valid group ID.
|
||||
|
||||
INVALID_VALUE error will be generated if the <counter> parameter to
|
||||
GetPerfMonitorCounterInfoAMD does not reference a valid counter ID
|
||||
in the group specified by <group>.
|
||||
|
||||
INVALID_VALUE error will be generated if any of the monitor IDs
|
||||
in the <monitors> parameter to DeletePerfMonitorsAMD do not reference
|
||||
a valid generated monitor ID.
|
||||
|
||||
INVALID_VALUE error will be generated if the <monitor> parameter to
|
||||
SelectPerfMonitorCountersAMD does not reference a monitor created by
|
||||
GenPerfMonitorsAMD.
|
||||
|
||||
INVALID_VALUE error will be generated if the <numCounters> parameter to
|
||||
SelectPerfMonitorCountersAMD is less than 0.
|
||||
|
||||
|
||||
|
||||
New State
|
||||
|
||||
Sample Usage
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GLuint *counterList;
|
||||
int numCounters;
|
||||
int maxActiveCounters;
|
||||
} CounterInfo;
|
||||
|
||||
void
|
||||
getGroupAndCounterList(GLuint **groupsList, int *numGroups,
|
||||
CounterInfo **counterInfo)
|
||||
{
|
||||
GLint n;
|
||||
GLuint *groups;
|
||||
CounterInfo *counters;
|
||||
|
||||
glGetPerfMonitorGroupsAMD(&n, 0, NULL);
|
||||
groups = (GLuint*) malloc(n * sizeof(GLuint));
|
||||
glGetPerfMonitorGroupsAMD(NULL, n, groups);
|
||||
*numGroups = n;
|
||||
|
||||
*groupsList = groups;
|
||||
counters = (CounterInfo*) malloc(sizeof(CounterInfo) * n);
|
||||
for (int i = 0 ; i < n; i++ )
|
||||
{
|
||||
glGetPerfMonitorCountersAMD(groups[i], &counters[i].numCounters,
|
||||
&counters[i].maxActiveCounters, 0, NULL);
|
||||
|
||||
counters[i].counterList = (GLuint*)malloc(counters[i].numCounters *
|
||||
sizeof(int));
|
||||
|
||||
glGetPerfMonitorCountersAMD(groups[i], NULL, NULL,
|
||||
counters[i].numCounters,
|
||||
counters[i].counterList);
|
||||
}
|
||||
|
||||
*counterInfo = counters;
|
||||
}
|
||||
|
||||
static int countersInitialized = 0;
|
||||
|
||||
int
|
||||
getCounterByName(char *groupName, char *counterName, GLuint *groupID,
|
||||
GLuint *counterID)
|
||||
{
|
||||
int numGroups;
|
||||
GLuint *groups;
|
||||
CounterInfo *counters;
|
||||
int i = 0;
|
||||
|
||||
if (!countersInitialized)
|
||||
{
|
||||
getGroupAndCounterList(&groups, &numGroups, &counters);
|
||||
countersInitialized = 1;
|
||||
}
|
||||
|
||||
for ( i = 0; i < numGroups; i++ )
|
||||
{
|
||||
char curGroupName[256];
|
||||
glGetPerfMonitorGroupStringAMD(groups[i], 256, NULL, curGroupName);
|
||||
if (strcmp(groupName, curGroupName) == 0)
|
||||
{
|
||||
*groupID = groups[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( i == numGroups )
|
||||
return -1; // error - could not find the group name
|
||||
|
||||
for ( int j = 0; j < counters[i].numCounters; j++ )
|
||||
{
|
||||
char curCounterName[256];
|
||||
|
||||
glGetPerfMonitorCounterStringAMD(groups[i],
|
||||
counters[i].counterList[j],
|
||||
256, NULL, curCounterName);
|
||||
if (strcmp(counterName, curCounterName) == 0)
|
||||
{
|
||||
*counterID = counters[i].counterList[j];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1; // error - could not find the counter name
|
||||
}
|
||||
|
||||
void
|
||||
drawFrameWithCounters(void)
|
||||
{
|
||||
GLuint group[2];
|
||||
GLuint counter[2];
|
||||
GLuint monitor;
|
||||
GLuint *counterData;
|
||||
|
||||
// Get group/counter IDs by name. Note that normally the
|
||||
// counter and group names need to be queried for because
|
||||
// each implementation of this extension on different hardware
|
||||
// could define different names and groups. This is just provided
|
||||
// to demonstrate the API.
|
||||
getCounterByName("HW", "Hardware Busy", &group[0],
|
||||
&counter[0]);
|
||||
getCounterByName("API", "Draw Calls", &group[1],
|
||||
&counter[1]);
|
||||
|
||||
// create perf monitor ID
|
||||
glGenPerfMonitorsAMD(1, &monitor);
|
||||
|
||||
// enable the counters
|
||||
glSelectPerfMonitorCountersAMD(monitor, GL_TRUE, group[0], 1,
|
||||
&counter[0]);
|
||||
glSelectPerfMonitorCountersAMD(monitor, GL_TRUE, group[1], 1,
|
||||
&counter[1]);
|
||||
|
||||
glBeginPerfMonitorAMD(monitor);
|
||||
|
||||
// RENDER FRAME HERE
|
||||
// ...
|
||||
|
||||
glEndPerfMonitorAMD(monitor);
|
||||
|
||||
// read the counters
|
||||
GLint resultSize;
|
||||
glGetPerfMonitorCounterDataAMD(monitor, GL_PERFMON_RESULT_SIZE_AMD,
|
||||
sizeof(GLint), &resultSize, NULL);
|
||||
|
||||
counterData = (GLuint*) malloc(resultSize);
|
||||
|
||||
GLsizei bytesWritten;
|
||||
glGetPerfMonitorCounterDataAMD(monitor, GL_PERFMON_RESULT_AMD,
|
||||
resultSize, counterData, &bytesWritten);
|
||||
|
||||
// display or log counter info
|
||||
GLsizei wordCount = 0;
|
||||
|
||||
while ( (4 * wordCount) < bytesWritten )
|
||||
{
|
||||
GLuint groupId = counterData[wordCount];
|
||||
GLuint counterId = counterData[wordCount + 1];
|
||||
|
||||
// Determine the counter type
|
||||
GLuint counterType;
|
||||
glGetPerfMonitorCounterInfoAMD(groupId, counterId,
|
||||
GL_COUNTER_TYPE_AMD, &counterType);
|
||||
|
||||
if ( counterType == GL_UNSIGNED_INT64_AMD )
|
||||
{
|
||||
unsigned __int64 counterResult =
|
||||
*(unsigned __int64*)(&counterData[wordCount + 2]);
|
||||
|
||||
// Print counter result
|
||||
|
||||
wordCount += 4;
|
||||
}
|
||||
else if ( counterType == GL_FLOAT )
|
||||
{
|
||||
float counterResult = *(float*)(&counterData[wordCount + 2]);
|
||||
|
||||
// Print counter result
|
||||
|
||||
wordCount += 3;
|
||||
}
|
||||
// else if ( ... ) check for other counter types
|
||||
// (GL_UNSIGNED_INT and GL_PERCENTAGE_AMD)
|
||||
}
|
||||
}
|
||||
|
||||
Revision History
|
||||
11/29/2007 - dginsburg
|
||||
+ Clarified the default state of a performance monitor object on creation
|
||||
|
||||
11/09/2007 - dginsbur
|
||||
+ Clarify what happens if SelectPerfMonitorCountersAMD is called on
|
||||
a monitor with outstanding query results.
|
||||
+ Rename counterSize to countersSize
|
||||
+ Remove some ';' typos
|
||||
|
||||
06/13/2007 - dginsbur
|
||||
+ Add language on the asynchronous nature of the API and
|
||||
counter accuracy/performance distortion.
|
||||
+ Add myself as the contact
|
||||
+ Remove INVALID_OPERATION error when countersList is NULL
|
||||
+ Clarify 64-bit issue
|
||||
+ Make PERCENTAGE_AMD counters float rather than uint
|
||||
+ Clarify accuracy distortion on variant counters only
|
||||
+ Tweak to overview language
|
||||
|
||||
06/09/2007 - dginsbur
|
||||
+ Fill in errors section and make many more errors explicit
|
||||
+ Fix the example code so it compiles
|
||||
|
||||
06/08/2007 - dginsbur
|
||||
+ Modified GetPerfMonitorGroupString and GetPerfMonitorCounterString to
|
||||
be more client/server friendly.
|
||||
+ Modified example.
|
||||
+ Renamed parameters/variables to follow GL conventions.
|
||||
+ Modified several 'int' param types to 'sizei'
|
||||
+ Modifid counters type from 'int' to 'uint'
|
||||
+ Renamed argument 'cb' and 'cbret'
|
||||
+ Better documented GetPerfMonitorCounterData
|
||||
+ Add AMD adornment in many places that were missing it
|
||||
|
||||
06/07/2007 - dginsbur
|
||||
+ Cleanup formatting, remove tabs, make fit in proper page width
|
||||
+ Add FLOAT and UNSIGNED_INT to list of COUNTER_TYPEs
|
||||
+ Fix some bugs in the example code
|
||||
+ Rewrite introduction
|
||||
+ Clarified Issue 1 reasoning
|
||||
+ Added Issue 3 regarding use of 64-bit data types
|
||||
+ Added revision history
|
||||
|
||||
03/21/2007 - Initial version written. Written by amunshi.
|
||||
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
Name
|
||||
|
||||
AMD_pinned_memory
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_pinned_memory
|
||||
|
||||
Contributors
|
||||
|
||||
Pierre Boudier
|
||||
Graham Sellers
|
||||
|
||||
Contact
|
||||
|
||||
Pierre Boudier, AMD (pierre.boudier 'at' amd.com)
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: June 4, 2013
|
||||
Revision: 2.0
|
||||
|
||||
Number
|
||||
|
||||
411
|
||||
|
||||
Dependencies
|
||||
|
||||
This specification is written against the OpenGL 4.2 (Core) Specification,
|
||||
dated August 8, 2011.
|
||||
|
||||
Overview
|
||||
|
||||
This extension defines an interface that allows improved control
|
||||
of the physical memory used by the graphics device.
|
||||
|
||||
It allows an existing page of system memory allocated by the application
|
||||
to be used as memory directly accessible to the graphics processor. One
|
||||
example application of this functionality would be to be able to avoid an
|
||||
explicit synchronous copy with sub-system of the application; for instance
|
||||
it is possible to directly draw from a system memory copy of a video
|
||||
image.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <target> parameters of BindBuffer, BufferData,
|
||||
BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData,
|
||||
GetBufferParameteriv, GetBufferPointerv, MapBufferRange:
|
||||
|
||||
EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(OpenGL Operation)
|
||||
|
||||
Additions to the table Table 2.8: Buffer object binding targets.
|
||||
|
||||
+-------------------------------------+---------------------------------+-------------------------+
|
||||
| Target name | Purpose | Described in section(s) |
|
||||
+-------------------------------------+---------------------------------+-------------------------+
|
||||
| EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD | Application-owned memory buffer | 2.9.2 |
|
||||
+-------------------------------------+---------------------------------+-------------------------+
|
||||
|
||||
Modifications to Section 2.9.2, "Creating Buffer Object Data Stores"
|
||||
|
||||
2.9.2 Creating Buffer Object Data Stores
|
||||
|
||||
The data store of a buffer object is created and initialized by calling
|
||||
|
||||
void BufferData( enum target, sizeiptr size, const void *data, enum usage );
|
||||
|
||||
with <target> set to one of the targets listed in table 2.8, <size> set to
|
||||
the size of the data store in basic machine units, and data pointing to the
|
||||
source data in client memory. If <target> is not
|
||||
EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, then if <data> is non-null, the source
|
||||
data is copied to the buffer object's data store. If <data> is null, then
|
||||
the contents of the buffer object's data store are undefined. If <target>
|
||||
is EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, then the client's memory is used
|
||||
directly by the GL for all subsequent operations on the buffer object's
|
||||
data store. In this case, the application must guarantee the existence of
|
||||
the buffer for the lifetime of the buffer object, or until its data store
|
||||
is re-specified by another call to BufferData. <usage> is specified as one
|
||||
of nine enumerated values, indicating the expected application usage
|
||||
pattern of the data store. The values are: ...
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(Per-Fragment Operations and the Framebuffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(State and State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated by BufferData if <target> is
|
||||
EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, and the store cannot be mapped to the
|
||||
GPU address space.
|
||||
|
||||
Issues
|
||||
|
||||
1) When a system memory is shared with the GL, do we need extra
|
||||
synchronization for the application to update the content?
|
||||
|
||||
RESOLVED: NO. once the memory page has been shared with the GL,
|
||||
then all the regular OpenGL commands can be used to ensure
|
||||
proper synchronization. the newly created buffer object is
|
||||
no different from the ones that were allocated by GL, except
|
||||
that the physical pages cannot be changed (but virtual mapping
|
||||
can change).
|
||||
|
||||
2) Can the application still use the buffer using the CPU address?
|
||||
|
||||
RESOLVED: YES. However, this access would be completely
|
||||
non synchronized to the OpenGL pipeline, unless explicit
|
||||
synchronization is being used (for example, through glFinish or by using
|
||||
sync objects).
|
||||
|
||||
3) Can the application free the memory?
|
||||
|
||||
RESOLVED: YES. However, the underlying buffer object should
|
||||
have been deleted from the OpenGL to prevent any access by
|
||||
the GPU, or the result is undefined, including program or even system
|
||||
termination.
|
||||
|
||||
4) Is glMapBuffer on a shared buffer guaranteed to return the same system
|
||||
address which was specified at creation time?
|
||||
|
||||
RESOLVED: NO. The GL implementation might return a different virtual
|
||||
mapping of that memory, although the same physical page will be used.
|
||||
|
||||
5) Is there any limitation on offset/size?
|
||||
|
||||
RESOLVED: YES. Since the pinning of system memory is eventually handled
|
||||
by the OS, there might be different restriction. It is recommended to
|
||||
align the offset/size to the underlying page size (4k seems to be
|
||||
widespread).
|
||||
|
||||
6) What happens if you use this extension on two separate buffers which are
|
||||
sharing the same underlying physical page?
|
||||
|
||||
RESOLVED: The behavior is undefined. some OS will not refcount how
|
||||
many times a physical page is locked for GPU access, and may therefore
|
||||
either fail to lock, or fail to properly unlock.
|
||||
|
||||
7) Should there be a query for the alignment value of offset/size?
|
||||
|
||||
RESOLVED: NO. on the same system, it is possible to have several
|
||||
different page sizes.
|
||||
|
||||
8) Why is the error produced for failure to pin memory INVALID_OPERATION?
|
||||
Why not OUT_OF_MEMORY?
|
||||
|
||||
OUT_OF_MEMORY invalidates OpenGL context state. Failure to pin memory
|
||||
does not upset the state of the context, and so an error that does not
|
||||
have this semantic was chosen. The exact cause of the failure may be
|
||||
reported by a debug context.
|
||||
|
||||
Example Usage
|
||||
|
||||
The GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD target is used simply for the
|
||||
purposes of allocation through BufferData. It is otherwise not referenced
|
||||
by the GL (much like GL_COPY_READ_BUFFER, for example). Once the buffer's
|
||||
data store has been associated with client memory, that memory may be used
|
||||
for any purpose such as vertex attributes (GL_ARRAY_BUFFER), TBO
|
||||
(GL_TEXTURE_BUFFER), pixel reads and writes (GL_PIXEL_UNPACK_BUFFER,
|
||||
GL_PIXEL_PACK_BUFFER) or transform feedback (GL_TRANSFORM_FEEDBACK_BUFFER).
|
||||
|
||||
As an example, consider the following example, which performs an
|
||||
asynchronous pixel readback to client memory:
|
||||
|
||||
GLuint buffer;
|
||||
glGenBuffers(1, &buffer);
|
||||
glBindBuffer(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, buffer);
|
||||
|
||||
void * memory = malloc(1024 * 1024 * 4);
|
||||
glBufferData(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, 1024 * 1024 * 4, GL_STREAM_COPY, memory);
|
||||
|
||||
glBindBuffer(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, 0);
|
||||
glBindBuffer(GL_PIXEL_PACK_BUFFER_AMD, buffer);
|
||||
glReadPixels(0, 0, 1024, 1024, GL_RGBA, GL_UNSIGNED_BYTE, 0);
|
||||
|
||||
GLsync s = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
|
||||
// Data will eventually end up in 'memory'. Other processing may occur
|
||||
// during the transfer time.
|
||||
|
||||
glClientWaitSync(s, GL_SYNC_FLUSH_COMMANDS_BIT, ~0ull);
|
||||
|
||||
// It is now safe to use 'memory'
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
2 04/05/2013 gsellers Fixed a couple of typos.
|
||||
1 11/30/2011 gsellers Cleanup and minor updates.
|
||||
xx 03/22/2011 pboudier Initial draft.
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
Name
|
||||
|
||||
AMD_program_binary_Z400
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_program_binary_Z400
|
||||
|
||||
Contributors
|
||||
|
||||
Joey Blankenship
|
||||
|
||||
Contact
|
||||
|
||||
Benj Lipchak, AMD (benj.lipchak 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: April 9, 2008
|
||||
Revision: #6
|
||||
|
||||
Number
|
||||
|
||||
48
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL ES 2.0 is required.
|
||||
|
||||
OES_get_program_binary is required.
|
||||
|
||||
Written based on the wording of the OpenGL ES 2.0 specification.
|
||||
|
||||
Overview
|
||||
|
||||
AMD provides an offline shader compiler as part of its suite of SDK tools
|
||||
for AMD's Z400 family of embedded graphics accelerator IP. This extension
|
||||
makes available a program binary format, Z400_BINARY_AMD.
|
||||
|
||||
The offline shader compiler accepts a pair of OpenGL Shading Language
|
||||
(GLSL) source shaders: one vertex shader and one fragment shader. It
|
||||
outputs a compiled, optimized, and pre-linked program binary which can then
|
||||
be loaded into a program objects via the ProgramBinaryOES command.
|
||||
|
||||
Applications are recommended to use the OES_get_program_binary extension's
|
||||
program binary retrieval mechanism for install-time shader compilation where
|
||||
applicable. That cross-vendor extension provides the performance benefits
|
||||
of loading pre-compiled program binaries, while providing the portability of
|
||||
deploying GLSL source shaders with the application rather than vendor-
|
||||
specific binaries. The details of this extension are obviated by the use
|
||||
of that extension.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <binaryFormat> parameter of ProgramBinaryOES:
|
||||
|
||||
Z400_BINARY_AMD 0x8740
|
||||
|
||||
Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation)
|
||||
|
||||
Add the following paragraph to the end of section 2.15.4:
|
||||
|
||||
"Z400_BINARY_AMD, returned in the list of PROGRAM_BINARY_FORMATS_OES, is a
|
||||
format that may be loaded into a program object via ProgramBinaryOES."
|
||||
|
||||
An implementation may reject a Z400_BINARY_AMD program binary by setting the
|
||||
LINK_STATUS to FALSE and updating the program object's info log if it
|
||||
determines the binary was produced by an incompatible or outdated version of
|
||||
the shader compiler."
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
Sample Usage
|
||||
|
||||
void loadPrecompiledZ400ProgramBinary(const char* myZ400BinaryFileName,
|
||||
GLuint progObj)
|
||||
{
|
||||
GLint binaryLength;
|
||||
GLvoid* binary;
|
||||
GLint success;
|
||||
FILE* infile;
|
||||
|
||||
//
|
||||
// Read the program binary
|
||||
//
|
||||
infile = fopen(myZ400BinaryFileName, "rb");
|
||||
fseek(infile, 0, SEEK_END);
|
||||
binaryLength = (GLint)ftell(infile);
|
||||
binary = (GLvoid*)malloc(binaryLength);
|
||||
fseek(infile, 0, SEEK_SET);
|
||||
fread(binary, binaryLength, 1, infile);
|
||||
fclose(infile);
|
||||
|
||||
//
|
||||
// Load the binary into the program object -- no need to link!
|
||||
//
|
||||
glProgramBinaryOES(progObj, GL_Z400_BINARY_AMD, binary, binaryLength);
|
||||
free(binary);
|
||||
|
||||
glGetProgramiv(progObj, GL_LINK_STATUS, &success);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
//
|
||||
// Fallback to source shaders or gracefully exit.
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
Revision History
|
||||
|
||||
#06 04/09/2008 Benj Lipchak Remove INVALID_OPERATION error in favor
|
||||
of just LINK_STATUS and info log.
|
||||
Also improve sample code.
|
||||
#05 03/12/2008 Benj Lipchak Reformulate as program binary.
|
||||
#04 01/02/2008 Benj Lipchak Split GetProgramBinary into its own
|
||||
multi-vendor extension proposal.
|
||||
#03 11/26/2007 Benj Lipchak Add sample usage and define tokens.
|
||||
#02 10/22/2007 Benj Lipchak Add error conditions.
|
||||
#01 10/14/2007 Benj Lipchak First draft.
|
||||
@@ -0,0 +1,401 @@
|
||||
Name
|
||||
|
||||
AMD_query_buffer_object
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_query_buffer_object
|
||||
|
||||
Contact
|
||||
|
||||
Daniel Rakos (daniel.rakos 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Daniel Rakos, AMD
|
||||
Graham Sellers, AMD
|
||||
Christophe Riccio, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping in Catalyst 12.6
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 03/07/2016
|
||||
Author Revision: 6
|
||||
|
||||
Number
|
||||
|
||||
420
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.5 is required.
|
||||
|
||||
This extension is written against the OpenGL 4.2 (core) specification.
|
||||
|
||||
Overview
|
||||
|
||||
Statistics about the operation of the OpenGL pipeline, such as the number
|
||||
of samples that passed the depth test, the elapsed time between two events
|
||||
or the number of vertices written to a transform feedback buffer may
|
||||
be retrieved from the GL through query objects. The current value of a
|
||||
query object may be retrieved by the application through the OpenGL API.
|
||||
Should the result returned by the API be required for use in a shader,
|
||||
it must be passed back to the GL via a program uniform or some other
|
||||
mechanism. This requires a round-trip from the GPU to the CPU and back.
|
||||
|
||||
This extension introduces a mechanism whereby the current value of a query
|
||||
result may be retrieved into a buffer object instead of client memory.
|
||||
This allows the query result to be made available to a shader without a
|
||||
round-trip to the CPU for example by subsequently using the buffer object
|
||||
as a uniform buffer, texture buffer or other data store visible to the
|
||||
shader. This functionality may also be used to place the results of
|
||||
many query objects into a single, large buffer and then map or otherwise
|
||||
read back the entire buffer at a later point in time, avoiding a per-query
|
||||
CPU-GPU synchronization event.
|
||||
|
||||
The result of any query object type supported by the GL implementation
|
||||
may be retrieved into a buffer object. The implementation will determine
|
||||
the most efficient method of copying the query result to the buffer.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of GetQueryObjectiv, GetQueryObjectuiv,
|
||||
GetQueryObjecti64v and GetQueryObjectui64v:
|
||||
|
||||
QUERY_RESULT_NO_WAIT_AMD 0x9194
|
||||
|
||||
Accepted by the <target> parameters of BindBuffer, BufferData,
|
||||
BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData,
|
||||
GetBufferParameteriv
|
||||
and GetBufferPointerv:
|
||||
|
||||
QUERY_BUFFER_AMD 0x9192
|
||||
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
|
||||
and GetDoublev:
|
||||
|
||||
QUERY_BUFFER_BINDING_AMD 0x9193
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.2 (core) Specification (OpenGL Operation)
|
||||
|
||||
Modify Section 2.9, Buffer Objects
|
||||
|
||||
Add to Table 2.8: Buffer object binding targets (p. 43)
|
||||
|
||||
+---------------------+--------------------------+-------------------------+
|
||||
| Target name | Purpose | Described in section(s) |
|
||||
+---------------------+--------------------------+-------------------------+
|
||||
| QUERY_BUFFER_AMD | Query result buffer | 6.1.7 |
|
||||
+---------------------+--------------------------+-------------------------+
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 3.2 (core) Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 3.2 (core) Specification (Per-Fragment Operations and the Frame Buffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 3.2 (core) Specification (Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 3.2 (core) Specification (State and State Requests)
|
||||
|
||||
Modify Section 6.1.7, Asynchronous Queries
|
||||
|
||||
Add new paragraph before the third paragraph on p. 358
|
||||
|
||||
Initially, zero is bound for the QUERY_BUFFER_AMD, indicating that
|
||||
<params> is a pointer into client memory. However, if a non-zero buffer
|
||||
object is bound as the current query result buffer, then <params> is
|
||||
treated as an offset into the designated buffer object.
|
||||
|
||||
Replace last sentence of the third paragraph on p. 358
|
||||
beginning with "The state of a query object can be queried with ..."
|
||||
|
||||
pname must be QUERY_RESULT, QUERY_RESULT_NO_WAIT_AMD
|
||||
or QUERY_RESULT_AVAILABLE.
|
||||
|
||||
Add new paragraph before the last paragraph on p. 358
|
||||
|
||||
If <pname> is QUERY_RESULT_NO_WAIT_AMD, then the query object's
|
||||
result value is returned as a single integer in <params> if the result
|
||||
is available at the time of the state query. If the result is not
|
||||
available then the destination memory location is not overwritten.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated by GetQueryObjectiv, GetQueryObjectuiv,
|
||||
GetQueryObjecti64v, or GetQueryObjectui64v if the command would cause data
|
||||
to be written beyond the bounds of the buffer currently currently bound
|
||||
to the QUERY_BUFFER_AMD target.
|
||||
|
||||
New State
|
||||
|
||||
Append to Table 6.41, "Query Object State"
|
||||
|
||||
+----------------------------+-------+-------------------+---------------+-------------------------------------------+-------+
|
||||
| Get Value | Type | Get Command | Initial Value | Description | Sec. |
|
||||
+----------------------------+-------+-------------------+---------------+-------------------------------------------+-------+
|
||||
| QUERY_BUFFER_BINDING_AMD | Z+ | GetIntegeriv | 0 | Query result buffer binding. | 6.1.7 |
|
||||
+----------------------------+-------+-------------------+---------------+-------------------------------------------+-------+
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Usage Examples
|
||||
|
||||
Convenient macro definition for specifying buffer offsets:
|
||||
|
||||
#define BUFFER_OFFSET(i) ((void*)NULL + (i))
|
||||
|
||||
Example 1: Using occlusion query result in shader
|
||||
|
||||
// Create a buffer object for the query result
|
||||
glGenBuffers(1, &queryBuffer);
|
||||
glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer);
|
||||
glBufferData(GL_QUERY_BUFFER_AMD, sizeof(GLuint),
|
||||
NULL, GL_DYNAMIC_COPY);
|
||||
|
||||
// Perform occlusion query
|
||||
glBeginQuery(GL_SAMPLES_PASSED, queryId)
|
||||
...
|
||||
glEndQuery(GL_SAMPLES_PASSED);
|
||||
|
||||
// Get query results to buffer object
|
||||
glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer);
|
||||
glGetQueryObjectuiv(queryId, GL_QUERY_RESULT, BUFFER_OFFSET(0));
|
||||
|
||||
// Bind query result buffer as uniform buffer
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 0, queryBuffer);
|
||||
...
|
||||
|
||||
--- Shader ---
|
||||
|
||||
...
|
||||
uniform queryResult {
|
||||
uint samplesPassed;
|
||||
};
|
||||
...
|
||||
void main() {
|
||||
...
|
||||
if (samplesPassed > threshold) {
|
||||
// complex processing
|
||||
...
|
||||
} else {
|
||||
// simplified processing
|
||||
...
|
||||
}
|
||||
...
|
||||
}
|
||||
|
||||
Example 2: Using occlusion query result in shader only if result is available
|
||||
|
||||
// Create a buffer object for the query result
|
||||
glGenBuffers(1, &queryBuffer);
|
||||
glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer);
|
||||
glBufferData(GL_QUERY_BUFFER_AMD, 2 * sizeof(GLuint),
|
||||
NULL, GL_DYNAMIC_COPY);
|
||||
|
||||
// Perform occlusion query
|
||||
glBeginQuery(GL_SAMPLES_PASSED, queryId)
|
||||
...
|
||||
glEndQuery(GL_SAMPLES_PASSED);
|
||||
|
||||
// Get query availability and result (if available) to buffer object
|
||||
glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer);
|
||||
glGetQueryObjectuiv(queryId, GL_QUERY_RESULT_AVAILABLE, BUFFER_OFFSET(0));
|
||||
glGetQueryObjectuiv(queryId, GL_QUERY_RESULT_NO_WAIT_AMD, BUFFER_OFFSET(4));
|
||||
|
||||
// Bind query result buffer as uniform buffer
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 0, queryBuffer);
|
||||
...
|
||||
|
||||
--- Shader ---
|
||||
|
||||
...
|
||||
uniform queryResult {
|
||||
uint resultAvailable;
|
||||
uint samplesPassed;
|
||||
};
|
||||
...
|
||||
void main() {
|
||||
...
|
||||
if (resultAvailable) {
|
||||
if (samplesPassed > threshold) {
|
||||
// complex processing
|
||||
...
|
||||
} else {
|
||||
// simplified processing
|
||||
...
|
||||
}
|
||||
} else {
|
||||
// default processing if no query result is available
|
||||
...
|
||||
}
|
||||
...
|
||||
}
|
||||
|
||||
Example 3: Using a default value and QUERY_RESULT_NO_WAIT_AMD
|
||||
|
||||
// Create a buffer object for the query result
|
||||
// Store a default value in the buffer that will be used
|
||||
// if the query results are not available
|
||||
glGenBuffers(1, &queryBuffer);
|
||||
glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer);
|
||||
GLuint defaultValue = 42;
|
||||
glBufferData(GL_QUERY_BUFFER_AMD, sizeof(GLuint),
|
||||
&defaultValue, GL_DYNAMIC_COPY);
|
||||
|
||||
// Perform occlusion query
|
||||
glBeginQuery(GL_SAMPLES_PASSED, queryId)
|
||||
...
|
||||
glEndQuery(GL_SAMPLES_PASSED);
|
||||
|
||||
// Get query results to buffer object with no wait
|
||||
// Default value remains untouched if results are not available
|
||||
glBindBuffer(GL_QUERY_BUFFER_AMD, queryBuffer);
|
||||
glGetQueryObjectuiv(queryId, GL_QUERY_RESULT_NO_WAIT_AMD, BUFFER_OFFSET(0));
|
||||
...
|
||||
|
||||
Example 4: Using transform feedback query result to fill indirect draw buffer
|
||||
|
||||
// Create a buffer object for the indirect draw command
|
||||
glGenBuffers(1, &drawIndirectBuffer);
|
||||
|
||||
// Initialize draw command
|
||||
DrawArraysIndirectCommand cmd = { ... };
|
||||
glBindBuffer(GL_DRAW_INDIRECT_BUFFER, drawIndirectBuffer);
|
||||
glBufferData(GL_DRAW_INDIRECT_BUFFER, sizeof(DrawArraysIndirectCommand),
|
||||
&cmd, GL_DYNAMIC_COPY);
|
||||
|
||||
// Perform transform feedback query
|
||||
glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, queryId)
|
||||
...
|
||||
glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN);
|
||||
|
||||
// Write query result to the primCount field of the indirect draw command
|
||||
glBindBuffer(GL_QUERY_BUFFER_AMD, drawIndirectBuffer);
|
||||
glGetQueryObjectuiv(queryId, GL_QUERY_RESULT,
|
||||
BUFFER_OFFSET(offsetof(DrawArraysIndirectCommand, primCount)));
|
||||
|
||||
// Execute the indirect draw command
|
||||
glDrawArraysIndirect(GL_TRIANGLES, BUFFER_OFFSET(0));
|
||||
...
|
||||
|
||||
Issues
|
||||
|
||||
1) What is QUERY_RESULT_NO_WAIT_AMD useful for?
|
||||
|
||||
RESOLVED: The application may decide that it does not want to wait for the
|
||||
result of the query object if it's not available at the time. This is not
|
||||
a problem without this extension as the application can always query the
|
||||
availability using QUERY_RESULT_AVAILABLE and decide to actually get the
|
||||
results using QUERY_RESULT only if the result is available. However, when
|
||||
using query buffers, QUERY_RESULT_AVAILABLE and QUERY_RESULT alone cannot
|
||||
provide the same flexibility for shader based decision making as the
|
||||
results are either always available (if QUERY_RESULT was used) or never.
|
||||
QUERY_RESULT_NO_WAIT_AMD provides a way to query the result only if it's
|
||||
available. Combined with QUERY_RESULT_AVAILABLE, the shader can decide
|
||||
to use the result or not based on the availability (see usage example 2).
|
||||
|
||||
2) Should QUERY_RESULT_NO_WAIT_AMD be accepted by GetQueryObjectiv,
|
||||
GetQueryObjectuiv, GetQueryObjecti64v and GetQueryObjectui64v in case
|
||||
there is no buffer bound to QUERY_BUFFER_AMD?
|
||||
|
||||
RESOLVED: YES, for completeness.
|
||||
|
||||
3) Is there any guarantee that GetQueryObject* will not wait for the
|
||||
query results to become available if <pname> is QUERY_RESULT_NO_WAIT_AMD?
|
||||
|
||||
RESOLVED: There is no need to have such guarantee. An implementation may
|
||||
choose to wait for the results even in case of QUERY_RESULT_NO_WAIT_AMD,
|
||||
however, that may incur a potential performance hit in case the application
|
||||
expects it to not wait.
|
||||
|
||||
4) Should the INVALID_OPERATION error be generated if a GetQueryObject*
|
||||
command would access data outside the rage of the bound query buffer?
|
||||
|
||||
RESOLVED: YES. This requires considering the value of <params> and the
|
||||
size of the type of the written value to determine the maximum addressed
|
||||
byte for the state query command.
|
||||
|
||||
Note: This follows the precedence of the language introduced by
|
||||
ARB_pixel_buffer_object.
|
||||
|
||||
5) Should we support 64 bit versions of the state query commands
|
||||
(GetQueryObjecti64v and GetQueryObjectui64v)?
|
||||
|
||||
RESOLVED: YES, both for completeness and to support timer queries. In this
|
||||
case a 64 bit integer value is written to the buffer.
|
||||
|
||||
6) Should the extension support all query types supported by the current
|
||||
GL implementation?
|
||||
|
||||
RESOLVED: YES. There is not much value in providing additional capability
|
||||
queries that would allow the application to find out which query object
|
||||
types are supported. Also, the GL implementation can always choose to
|
||||
implement the functionality in software for query types that cannot be
|
||||
supported in hardware.
|
||||
|
||||
7) Is there any precedence that the pointer parameter of a glGet* command
|
||||
is treated as an offset into a bound buffer object?
|
||||
|
||||
RESOLVED: YES, glGetTexImage accepts an offset into the pixel pack buffer
|
||||
in case a pixel pack buffer is bound. As pixel buffer objects are part of
|
||||
the core specification since version 2.1, no precedence is introduced by
|
||||
this extension.
|
||||
|
||||
8) What should be written to the query buffer when QUERY_RESULT_NO_WAIT_AMD
|
||||
is used but the results are not available?
|
||||
|
||||
DISCUSSION: Leaving the written value undefined is an option, however
|
||||
in many cases the application can benefit from having a default value in
|
||||
the query buffer if the results are not available. The following options
|
||||
were considered to support such use cases:
|
||||
|
||||
a. Write a predefined fixed value to the buffer.
|
||||
b. Write a user specified value to the buffer.
|
||||
c. Don't write anything to the buffer, leave the current value
|
||||
untouched.
|
||||
|
||||
The problem with option a. is that it may be difficult to select such
|
||||
a predefined value that would not potentially conflict with a valid
|
||||
value. Option b. could be fine, however it requires new API to specify
|
||||
this default value. Thus, option c. is considered to most preferable.
|
||||
|
||||
RESOLVED: Nothing, the current value in the specified offset of the
|
||||
query buffer is leaved untouched.
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- ---------------------------------------------
|
||||
|
||||
6 03/07/2016 drakos Fixed typo in example #4
|
||||
5 06/01/2012 gsellers Minor cleanup. Shipped and ready for posting.
|
||||
4 03/21/2012 drakos Removed undefined behavior when using
|
||||
QUERY_RESULT_NO_WAIT and added issue #8
|
||||
based on Graham's comments
|
||||
3 03/12/2012 drakos Assigned enums
|
||||
2 03/07/2012 drakos Clarified issues #4 and #5
|
||||
Added issue #7 based on Christophe's comments
|
||||
1 02/28/2012 drakos Initial revision
|
||||
@@ -0,0 +1,231 @@
|
||||
Name
|
||||
|
||||
AMD_sample_positions
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_sample_positions
|
||||
|
||||
Contact
|
||||
|
||||
Mais Alnasser, AMD (mais.alnasser 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Mais Alnasser, AMD
|
||||
Graham Sellers, AMD
|
||||
Nick Haemel, AMD
|
||||
|
||||
Status
|
||||
|
||||
Complete, shipping.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 04/06/11
|
||||
Revision: 7
|
||||
|
||||
Number
|
||||
|
||||
405
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.1 is required.
|
||||
|
||||
EXT_framebuffer_multisample or OpenGL 3.2 is required.
|
||||
|
||||
This extension interacts with the ARB_texture_multisample extension.
|
||||
|
||||
This extension is written against the OpenGL 3.2 (Core) specification.
|
||||
|
||||
Overview
|
||||
|
||||
This extension provides a mechanism to explicitly set sample positions for a
|
||||
FBO with multi-sampled attachments. The FBO will use identical sample locations
|
||||
for all pixels in each attachment. This forces TEXTURE_FIXED_SAMPLE_LOCATIONS
|
||||
to TRUE if a multi-sampled texture is specified using TexImage2DMultisample
|
||||
or TexImage3DMultisample. That is, using GetTexLevelParameter to query
|
||||
TEXTURE_FIXED_SAMPLE_LOCATIONS will always return TRUE if the mechanism is
|
||||
explicitly used to set the sample positions.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of GetFloatv:
|
||||
|
||||
SUBSAMPLE_DISTANCE_AMD 0x883F
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void SetMultisamplefvAMD(enum pname, uint index, const float *val);
|
||||
|
||||
Modifications to Chapter 2 of the OpenGL 3.2 (Core) Specification (OpenGL
|
||||
Operation)
|
||||
|
||||
None.
|
||||
|
||||
Modifications to Chapter 3 of the OpenGL 3.2 Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 3.2 (Core) Specification
|
||||
(Per-Fragment Operations and the Frame Buffer)
|
||||
|
||||
Modify Section 4.1.3, Multisample Fragment Operations
|
||||
|
||||
Modify the discussion of SampleMaski to start with "Next" instead
|
||||
of "Finally".
|
||||
|
||||
Add after the discussion of SampleMaski:
|
||||
|
||||
Finally, a single sample location can be modified for all pixels in
|
||||
a multi-sampled framebuffer using the following call:
|
||||
|
||||
void SetMultisamplefvAMD(enum pname, uint index, clampf *val);
|
||||
|
||||
<pname> must be SAMPLE_POSITION. <index> corresponds to the
|
||||
sample for which the location should be set. The sample location
|
||||
is set by passing two floating point values in <val[0]> and
|
||||
<val[1]>, each between 0.0 and 1.0, inclusive, corresponding to the <x>
|
||||
and <y> locations in pixel space of that sample, respectively . (0.5, 0.5)
|
||||
thus corresponds to the pixel center. The error INVALID_VALUE is generated
|
||||
if <index> is greater than or equal to the value of SAMPLES.
|
||||
|
||||
SetMultisamplefvAMD generates an INVALID_OPERATION error if the currently
|
||||
bound framebuffer is incomplete or is the default framebuffer.
|
||||
|
||||
Using SetMultisamplefvAMD will cause any multisampled texture attached
|
||||
to the currently bound FBO to use identical sample locations for all
|
||||
of its pixels forcing <fixedsamplelocations> to TRUE. That is, using
|
||||
GetTexLevelParameter to query TEXTURE_FIXED_SAMPLE_LOCATIONS will
|
||||
always return TRUE if the new mechanism is used to explicitly set
|
||||
the sample positions.
|
||||
|
||||
If <val> is NULL, <index> is ignored and all sample positions are returned
|
||||
to their default values.
|
||||
|
||||
The subpixel range [0,1] is discretized based on the implementation-
|
||||
dependent value of SUBSAMPLE_DISTANCE_AMD. GetFloatv can be used with
|
||||
SUBSAMPLE_DISTANCE_AMD as the pname parameter to query the subpixel
|
||||
precision, which is the same for both the vertical and horizontal
|
||||
directions. Given two sample positions (x0, y0) and (x1, y1), one can make
|
||||
sure they don't fall in the same subpixel if
|
||||
|
||||
abs(x0-x1) >= ssd and abs(y0-y1) >= ssd,
|
||||
|
||||
where ssd is the float value returned when querying SUBSAMPLE_DISTANCE_AMD.
|
||||
|
||||
The quantized sample positions may be queried by calling GetMultisamplefv.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 3.2 (Core) Specification (Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 3.2 (Core) Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
The error INVALID_VALUE is generated by SetMultisamplefvAMD if index
|
||||
is greater than or equal to the value of SAMPLES.
|
||||
|
||||
The error INVALID_OPERATION is generated by SetMultisamplefvAMD if
|
||||
the currently bound framebuffer is the default framebuffer.
|
||||
|
||||
The error INVALID_OPERATION is generated by SetMultisamplefvAMD if
|
||||
the currently bound framebuffer is incomplete.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
Add to Table 6.12, Multisampling, p.277:
|
||||
|
||||
Get Value Type Get Command Value Description Sec.
|
||||
--------- ------- ----------- ------- ------------------------ ------
|
||||
SUBSAMPLE_DISTANCE_AMD R+ GetFloatv - precision step between 4.1.3
|
||||
subsamples
|
||||
|
||||
Interaction with ARB_texture_multisample
|
||||
|
||||
If ARB_texture_multisample is not supported, remove all references to
|
||||
TEXTURE_FIXED_SAMPLE_LOCATIONS and to <fixedsamplelocations>. Also, should
|
||||
ARB_texture_multisample not be supported, the GetMultisamplefv entry point
|
||||
must be added as described in the specification of ARB_texture_multisample
|
||||
for the sake of completeness.
|
||||
|
||||
Issues
|
||||
|
||||
(1) What happens if an app just sets one sample position,
|
||||
index 3 for example?
|
||||
|
||||
RESOLVED: Any attachment to the bound FBO will have the index 3
|
||||
position updated. All the rest of the positions will keep their
|
||||
original values. Any other fbos will not be affected by this change.
|
||||
|
||||
(2) How does an app get back to the default state after setting
|
||||
sample positions?
|
||||
|
||||
RESOLVED: SetMultisamplefvAMD(SAMPLE_POSITION, 0, NULL) will restore
|
||||
all the sample positions to their default state.
|
||||
|
||||
(3) Should we also expose the precision? An app can use it in setting
|
||||
sample positions?
|
||||
|
||||
RESOLVED: SUBSAMPLE_DISTANCE_AMD is added as a new token. It can be used
|
||||
by GetFloatv to query the precision step, which will be the same for
|
||||
both the vertical and horizontal directions. The subpixel range [0,1]
|
||||
is discretized based on the value of SUBSAMPLE_DISTANCE_AMD. Let ssd be the
|
||||
float value returned when SUBSAMPLE_DISTANCE_AMD is queried, then one can
|
||||
infer the subpixilization to be 1/ssd+1. For example, if ssd = 0.06667
|
||||
then the pixel is subdivided into 1/0.0667+1=16 subpixels in each
|
||||
dimension.
|
||||
|
||||
One can also avoid using sample positions that would map to the same
|
||||
subpixel. A coordinate c will map to the greatest multiple of ssd that
|
||||
is less or equal to c. For example, given two sample positions, (x0, y0)
|
||||
and (x1, y1), if abs(x1-x0) < ssd and abs(y1-y0) < ssd, then both points
|
||||
will map to the same subpixel, which means the application might want to
|
||||
substitute one of these positions with another that is not redundant.
|
||||
Using numerical values as an example, let a=(0.201, 0.0) and b=(0.25, 0.5)
|
||||
be sample positions and ssd = 0.06667. Both the x-coordinate values 0.201
|
||||
and 0.25 fall between 0.06667*3=0.2 and 0.06667*4=0.26667 and would
|
||||
therefore map to the same value of 0.2. The y-coordinates also map to the
|
||||
same value of 0 because they both belong in the range [0, 0.06667). This
|
||||
means the two points are redundant. Therefore, the application should
|
||||
choose a different point c=(0.3, 0.45) for example. c would be a good
|
||||
choice because the distance between its x-coordinate and a's x-coordinate
|
||||
is greater than ssd, that is 0.3-0.201 > 0.06667.
|
||||
|
||||
(4) Aside from evaluating the above equations, how can an application tell
|
||||
what subsample positions the hardware is using?
|
||||
|
||||
RESOLVED: GetMultisamplefv will return the quantized sample positions,
|
||||
not the original positions sent to SetMultisamplefvAMD.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
7 4/06/11 gsellers Clean up for posting on public registry.
|
||||
6 6/30/10 gsellers Assign enumerant value for SUBSAMPLE_DISTANCE_AMD.
|
||||
5 3/18/10 malnasse Generate INVALID_OPERATION error if attempting
|
||||
to set sample positions for an incomplete framebuffer
|
||||
4 2/23/10 malnasse Generate INVALID_OPERATION error if attempting
|
||||
to set sample positions for the default framebuffer
|
||||
3 2/05/10 gsellers Minor cleanup. Submission to AMD repository.
|
||||
2 2/02/10 malnasse - Added a mechanism to restore the sample
|
||||
positions to their default state.
|
||||
- Added the issues section.
|
||||
- Added new token to help query the subsample precision
|
||||
1 1/27/10 malnasse First revision.
|
||||
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
Name
|
||||
|
||||
AMD_seamless_cubemap_per_texture
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_seamless_cubemap_per_texture
|
||||
|
||||
Contributors
|
||||
|
||||
Pierre Boudier
|
||||
Graham Sellers
|
||||
Ahmet Oguz Akyuz
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
In Progress.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: February 3, 2017
|
||||
Author revision: 7
|
||||
|
||||
Number
|
||||
|
||||
383
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.1 is required.
|
||||
|
||||
ARB_texture_cube_map is required.
|
||||
|
||||
ARB_seamless_cube_map affects the definition of this extension.
|
||||
|
||||
This extension is written against the OpenGL 1.5 Specification.
|
||||
|
||||
Overview
|
||||
|
||||
In unextended OpenGL, cube maps are treated as sets of six, independent
|
||||
texture images. Once a face is selected from the set, it is treated exactly
|
||||
as any other two-dimensional texture would be. When sampling linearly from
|
||||
the texture, all of the individual texels that would be used to to create
|
||||
the final, bilinear sample values are taken from the same cube face. The
|
||||
normal, two-dimensional texture coordinate wrapping modes are honored.
|
||||
This sometimes causes seams to appear in cube maps.
|
||||
|
||||
ARB_seamless_cube_map addresses this issue by providing a mechanism whereby
|
||||
an implementation could take each of the taps of a bilinear sample from
|
||||
a different face, spanning face boundaries and providing seamless filtering
|
||||
from cube map textures. However, in ARB_seamless_cube_map, this feature was
|
||||
exposed as a global state, affecting all bound cube map textures. It was not
|
||||
possible to mix seamless and per-face cube map sampling modes during
|
||||
multisampling. Furthermore, if an application included cube maps that were
|
||||
meant to be sampled seamlessly and non-seamlessly, it would have to track
|
||||
this state and enable or disable seamless cube map sampling as needed.
|
||||
|
||||
This extension addresses this issue and provides an orthogonal method for
|
||||
allowing an implementation to provide a per-texture setting for enabling
|
||||
seamless sampling from cube maps.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of TexParameterf, TexParameteri,
|
||||
TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv:
|
||||
|
||||
TEXTURE_CUBE_MAP_SEAMLESS 0x884F (Previously defined in
|
||||
ARB_seamless_cubemap)
|
||||
|
||||
Additions to Chapter 2 of the 1.5 Specification (OpenGL Operation)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the 1.5 Specification (Rasterization)
|
||||
|
||||
Section 3.8.4, Texture Parameters, p. 144, append table 3.19 with the
|
||||
following:
|
||||
|
||||
Name Type Legal Values
|
||||
------------------------------ ----- --------------------
|
||||
TEXTURE_CUBE_MAP_SEAMLESS boolean FALSE,
|
||||
TRUE
|
||||
|
||||
Section 3.8.4, Texture Parameters, p. 143, append the last paragraph with:
|
||||
|
||||
"The TEXTURE_CUBE_MAP_SEAMLESS parameter is specific to cube maps
|
||||
and may be used to control the way that the GL handles sampling from
|
||||
coordinates that lie outside the determined cube map face (see section
|
||||
3.8.6)."
|
||||
|
||||
Section 3.8.6, Cube Map Texture Selection, p. 145, change the last
|
||||
paragraph from
|
||||
|
||||
"This new ( s t ) is used to find a texture value in the determined face's
|
||||
two-dimensional texture image using the rules given in sections 3.8.7
|
||||
through 3.8.9."
|
||||
|
||||
to:
|
||||
|
||||
"If TEXTURE_CUBE_MAP_SEAMLESS is disabled globally and the value of the
|
||||
the texture's TEXTURE_CUBE_MAP_SEAMLESS parameter is FALSE, the new
|
||||
( s t ) is used to find a texture value in the determined face's
|
||||
two-dimensional image using the rules given in sections 3.8.7 through
|
||||
3.8.9. If TEXTURE_CUBE_MAP_SEAMLESS is emabled globally or the value
|
||||
of the texture's TEXTURE_CUBE_MAP_SEAMLESS parameter is TRUE, seamless
|
||||
cube map sampling is enabled, and texels are read from adjacent faces as
|
||||
described in the ARB_seamless_cube_map extension."
|
||||
|
||||
Additions to Chapter 4 of the 1.5 Specification (Per-Fragment Operations
|
||||
and the Frame Buffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the 1.5 Specification (Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the 1.5 Specification (State and State Requests)
|
||||
|
||||
Section 6.1.3, Enumerated Queries, p. 216, modify the first paragraph
|
||||
on page 216 to read:
|
||||
|
||||
"... For GetTexParameter, value must be either TEXTURE_RESIDENT or one
|
||||
of the symbolic values in table 3.19. The TEXTURE_CUBE_MAP_SEAMLESS
|
||||
value may only be used when target is TEXTURE_CUBE_MAP. The lod argument
|
||||
to GetTexLevelParameter ..."
|
||||
|
||||
Additions to the GLX Specification
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_ENUM is generated by TexParameter if <pname> is
|
||||
TEXTURE_CUBE_MAP_SEAMLESS and <target> is not TEXTURE_CUBE_MAP.
|
||||
|
||||
INVALID_ENUM is generated by TexParameter if <target> is TEXTURE_CUBE_MAP,
|
||||
<pname> is TEXTURE_CUBE_MAP_SEAMLESS and <value> is not either TRUE
|
||||
or FALSE.
|
||||
|
||||
INVALID_ENUM is generated by GetTexParameter if <pname> is
|
||||
TEXTURE_CUBE_MAP_SEAMLESS and <target> is not TEXTURE_CUBE_MAP.
|
||||
|
||||
Dependencies on ARB_seamless_cube_map
|
||||
|
||||
If ARB_seamless_cube_map is not supported, the value of the
|
||||
TEXTURE_CUBE_MAP_SEAMLESS token is still used by this extension.
|
||||
However, seamless cubemap filtering can only be enabled or disabled on a
|
||||
per-texture basis as glEnable and glDisable will not accept
|
||||
TEXTURE_CUBE_MAP_SEAMLESS. Even if ARB_seamless_cube_map is not
|
||||
supported, the behavior of seamless cube map sampling is as described in
|
||||
that extension. The logic to enable seamless filtering will behave as if
|
||||
TEXTURE_CUBE_MAP_SEAMLESS were disabled (the default state).
|
||||
|
||||
New State
|
||||
|
||||
In table 6.16, Texture Objects, p. 242, add the following:
|
||||
|
||||
Get Value Type Get Command Init Val Description Sec. Attribute
|
||||
------------------------- ------ -------------------- -------- -------------------------- ------ ---------
|
||||
TEXTURE_CUBE_MAP_SEAMLESS n x B GetTexParameter[if]v FALSE Seamless cubemap sampling 3.8.6 texture
|
||||
is enabled.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
1) How does this extension affect ARB_seamless_cube_map? Which takes
|
||||
priority? Explain, in plain English, how seamless filtering gets enabled.
|
||||
|
||||
RESOLVED: These two extensions are orthogonal and neither requires the
|
||||
other to function. Seamless filtering is enabled for a cube map texture
|
||||
either when TEXTURE_CUBE_MAP_SEAMLESS is enabled globally or when the
|
||||
value of the individual texture's TEXTURE_CUBE_MAP_SEAMLESS parameter
|
||||
is TRUE. The default for both extensions is to leave cube map sampling as
|
||||
described in unextended OpenGL. Thus, an application may use either
|
||||
extension and its behavior will be the same, regardless of the presence
|
||||
of support for or use of the other.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
7 02/03/17 Jon Leech Remove ARB suffix from TEXTURE_CUBE_MAP_SEAMLESS
|
||||
(public bug 337).
|
||||
6 08/18/09 gsellers Renamed from AMD_texture_cube_face_select to
|
||||
AMD_seamless_cubemap_per_texture to better follow
|
||||
ARB version.
|
||||
Use ARB token, GL_TRUE and GL_FALSE rather than
|
||||
SAME_FACE and NEXT_FACE.
|
||||
Change type of texture parameter to boolean.
|
||||
Change wording of resolution to issue 1 to reflect
|
||||
the new token names.
|
||||
5 05/08/09 gsellers Large rewrite after splitting global and
|
||||
per-texture support into two extensions.
|
||||
4 05/05/09 gsellers Change token names for consistency. Include
|
||||
interaction with EXT_texture_filter_anisotropic.
|
||||
3 04/09/09 gsellers Fix 'selected' language. Suggest behavior for
|
||||
cases where ( s, t ) lies directly at a cube map
|
||||
corner
|
||||
2 04/07/09 gsellers Minor updates
|
||||
1 04/06/09 gsellers Initial draft
|
||||
@@ -0,0 +1,282 @@
|
||||
Name
|
||||
|
||||
AMD_shader_atomic_counter_ops
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_shader_atomic_counter_ops
|
||||
|
||||
Contact
|
||||
|
||||
Daniel Rakos (daniel.rakos 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Daniel Rakos, AMD
|
||||
Graham Sellers, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 02/01/2013
|
||||
Author Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #435
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 4.2 or ARB_shader_atomic_counters is required.
|
||||
|
||||
This extension is written against the OpenGL 4.3 (core) specification
|
||||
and the GLSL 4.30.7 specification.
|
||||
|
||||
Overview
|
||||
|
||||
The ARB_shader_atomic_counters extension introduced atomic counters, but
|
||||
it limits list of potential operations that can be performed on them to
|
||||
increment, decrement, and query. This extension extends the list of GLSL
|
||||
built-in functions that can operate on atomic counters. The list of new
|
||||
operations include:
|
||||
|
||||
* Increment and decrement with wrap
|
||||
* Addition and subtraction
|
||||
* Minimum and maximum
|
||||
* Bitwise operators (AND, OR, XOR, etc.)
|
||||
* Masked OR operator
|
||||
* Exchange, and compare and exchange operators
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 8 of the GLSL 4.30.7 Specification (Built-in Functions)
|
||||
|
||||
Modify Section 8.10, Atomic-Counter Functions
|
||||
|
||||
Remove second paragraph ("The value returned by...")
|
||||
|
||||
Modify third paragraph ("The underlying...")
|
||||
|
||||
The underlying counter is a 32-bit unsigned integer. The result of
|
||||
operations will wrap to [0, 2^32-1].
|
||||
|
||||
Additions to the table listing atomic counter built-in functions:
|
||||
|
||||
Syntax Description
|
||||
------------------------------------ ------------------------------------------------------------------
|
||||
uint atomicCounterIncWrap( Atomically
|
||||
atomic_uint c, 1. increments the counter for c, then forces it to zero if and
|
||||
uint wrap only if the incremented value is greater than or equal to
|
||||
) <wrap>, and
|
||||
2. returns its value prior to the operation.
|
||||
These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterDecWrap( Atomically
|
||||
atomic_uint c, 1. decrements the counter for c, then forces it to <wrap>-1 if
|
||||
uint wrap and only if the original value of the counter was either
|
||||
) zero or greater than <wrap>, and
|
||||
2. returns its value resulting from the operation.
|
||||
These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterAdd( Atomically
|
||||
atomic_uint c, 1. adds the value of <data> to the counter for c, and
|
||||
uint data 2. returns its value prior to the operation.
|
||||
) These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterSubtract( Atomically
|
||||
atomic_uint c, 1. subtracts the value of <data> from the counter for c, and
|
||||
uint data 2. returns the value resulting from the operation.
|
||||
) These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterReverseSubtract( Atomically
|
||||
atomic_uint c, 1. subtracts the value of the counter for c from the value of
|
||||
uint data <data> and sets the counter for c to the result of the
|
||||
) operation, and
|
||||
2. returns the value prior to the operation.
|
||||
These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterMin( Atomically
|
||||
atomic_uint c, 1. sets the counter for c to the minimum of the value of the
|
||||
uint data counter and the value of <data>, and
|
||||
) 2. returns the value prior to the operation.
|
||||
These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterMax( Atomically
|
||||
atomic_uint c, 1. sets the counter for c to the maximum of the value of the
|
||||
uint data counter and the value of <data>, and
|
||||
) 2. returns the value prior to the operation.
|
||||
These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterAnd( Atomically
|
||||
atomic_uint c, 1. sets the counter for c to the result of the bitwise AND of
|
||||
uint data the value of the counter and the value of <data>, and
|
||||
) 2. returns the value prior to the operation.
|
||||
These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterOr( Atomically
|
||||
atomic_uint c, 1. sets the counter for c to the result of the bitwise OR of
|
||||
uint data the value of the counter and the value of <data>, and
|
||||
) 2. returns the value prior to the operation.
|
||||
These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterXor( Atomically
|
||||
atomic_uint c, 1. sets the counter for c to the result of the bitwise XOR of
|
||||
uint data the value of the counter and the value of <data>, and
|
||||
) 2. returns the value prior to the operation.
|
||||
These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterMaskOr( Atomically
|
||||
atomic_uint c, 1. sets the counter for c to the result of the operation:
|
||||
uint mask, (counter ^ ~mask) | data
|
||||
uint data 2. returns the value prior to the operation.
|
||||
) These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterExchange( Atomically
|
||||
atomic_uint c, 1. sets the counter value for c to the value of <data>, and
|
||||
uint data 2. returns its value prior to the operation.
|
||||
) These two steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
uint atomicCounterCompSwap( Atomically
|
||||
atomic_uint c, 1. compares the value of <compare> and the counter value for c,
|
||||
uint compare, 2. if the values are equal, sets the counter value for c to
|
||||
uint data the value of <data>, and
|
||||
) 3. returns its value prior to the operation.
|
||||
These three steps are done atomically with respect to the atomic
|
||||
counter functions in this table.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Usage Examples
|
||||
|
||||
Example 1: Appending/consuming data to/from a ring buffer using a compute shader
|
||||
|
||||
// Here we use increment/decrement with wrap to account for the wrapping at the
|
||||
// end of the ring buffer.
|
||||
// Using regular increment/decrement and performing a modulo manually is not
|
||||
// satisfactory for non-power-of-two sized buffers as when the 32-bit counter
|
||||
// wraps around we get incorrect results.
|
||||
|
||||
// Append shader
|
||||
layout(binding=0, offset=0) uniform atomic_uint ringCounter;
|
||||
layout(binding=0, r32ui) uniform imageBuffer ringBuffer;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint myBufferData = ...;
|
||||
|
||||
imageStore(ringBuffer,
|
||||
atomicCounterIncWrap(ringCounter, imageSize(ringBuffer)),
|
||||
myBufferData);
|
||||
}
|
||||
|
||||
// Consume shader
|
||||
layout(binding=0, offset=0) uniform atomic_uint ringCounter;
|
||||
layout(binding=0, r32ui) uniform imageBuffer ringBuffer;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint myBufferData =
|
||||
imageLoad(ringBuffer,
|
||||
atomicCounterDecWrap(ringCounter, imageSize(ringBuffer))).x;
|
||||
}
|
||||
|
||||
Example 2: Appending variable length records to a buffer using a compute shader
|
||||
|
||||
// Here we use atomicCounterAdd to ensure that we "allocate" a contiguous list of
|
||||
// elements in the buffer.
|
||||
// Using atomicCounterIncrement cannot mimic this behavior as there is no guarantee
|
||||
// that subsequent calls to atomicCounterIncrement return subsequent counter values.
|
||||
|
||||
layout(binding=0, offset=0) uniform atomic_uint vlrCounter;
|
||||
layout(binding=0, r32ui) uniform imageBuffer vlrBuffer;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint data[...] = ...;
|
||||
uint recordLength = ...;
|
||||
|
||||
uint recordStart = atomicCounterAdd(vlrCounter, recordLength);
|
||||
|
||||
for (uint i = 0; i < recordLength; ++i)
|
||||
{
|
||||
imageStore(vlrBuffer, recordStart + i, data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Issues
|
||||
|
||||
1) Should the new decrement with wrap and subtract operators match the
|
||||
behavior of the existing decrement operator and return the post-operation
|
||||
value of the counter?
|
||||
|
||||
RESOLVED: Yes, for consistency with the existing functionality.
|
||||
|
||||
2) Most of the new operations introduced by this extension are already
|
||||
supported on load/store images and shader storage buffers. What benefit
|
||||
the application developer could get from using this extension?
|
||||
|
||||
DISCUSSION: Atomic counter operations can have different performance
|
||||
characteristics than load/store images or shader storage buffers. It is
|
||||
expected that implementations can do atomic counter operations faster.
|
||||
Also, there is no increment/decrement with wrap, reverse subtract and
|
||||
mask-or operation for these storages (though the EXT version of load/store
|
||||
image extension does provide a increment/decrement with wrap operators).
|
||||
|
||||
RESOLVED: It enables existing operations for atomic counters and also
|
||||
adds completely new operations that are not available for load/store
|
||||
images and shader storage buffers.
|
||||
|
||||
3) What should be the result of the increment/decrement with wrap
|
||||
operations if the original counter value is greater than the <wrap>
|
||||
parameter?
|
||||
|
||||
RESOLVED: Increment with wrap will force the value of the counter to zero,
|
||||
decrement with wrap will force the value of the counter to <wrap>-1.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- ---------------------------------------------
|
||||
|
||||
2 02/01/2013 drakos Added issue #2 and #3
|
||||
Cleaned up naming convention
|
||||
1 11/13/2012 drakos Initial revision
|
||||
@@ -0,0 +1,687 @@
|
||||
Name
|
||||
|
||||
AMD_shader_ballot
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_shader_ballot
|
||||
|
||||
Contact
|
||||
|
||||
Qun Lin, AMD (quentin.lin 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Qun Lin, AMD
|
||||
Graham Sellers, AMD
|
||||
Daniel Rakos, AMD
|
||||
Rex Xu, AMD
|
||||
Dominik Witczak, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 03/28/2018
|
||||
Author Revision: 5
|
||||
|
||||
Number
|
||||
|
||||
???
|
||||
|
||||
Dependencies
|
||||
|
||||
This extension is written against the OpenGL Shading Language
|
||||
Specification, Version 4.50.
|
||||
|
||||
This extension requires ARB_shader_group_vote and ARB_shader_ballot.
|
||||
|
||||
This extension interacts with ARB_gpu_shader_int64.
|
||||
|
||||
This extension interacts with AMD_gpu_shader_half_float.
|
||||
|
||||
This extension interacts with AMD_gpu_shader_int16.
|
||||
|
||||
Overview
|
||||
|
||||
The extensions ARB_shader_group_vote and ARB_shader_ballot introduced the
|
||||
concept of sub-groups and a set of operations that allow data exchange
|
||||
across shader invocations within a sub-group.
|
||||
|
||||
This extension further extends the capabilities of these extensions with
|
||||
additional sub-group operations.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Modifications to the OpenGL Shading Language Specification, Version 4.50
|
||||
|
||||
Including the following line in a shader can be used to control the
|
||||
language features described in this extension:
|
||||
|
||||
#extension GL_AMD_shader_ballot : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.3.
|
||||
|
||||
New preprocessor #defines are added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_AMD_shader_ballot 1
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30 (Built-in functions)
|
||||
|
||||
Add Section 8.18, Shader Invocation Group Functions
|
||||
|
||||
The <min>, <max>, <add> group invocation functions process values of the
|
||||
specified value <v> across all active shader invocations in the sub-group
|
||||
with three special group operatons according to the following table:
|
||||
|
||||
Group Operation Description
|
||||
--------------- ---------------------------------------------------------
|
||||
Reduce A reduction operation for values of the specified value
|
||||
<v> in the sub-group
|
||||
|
||||
InclusiveScan A binary operation with an identity <I> and <n> (where
|
||||
<n> is the size of the sub-group) elements { a[0], a[1],
|
||||
.., a[n] } resulting in { a[0], (a[0] op a[1]), .., (a[0]
|
||||
op a[1] op .. op a[n-1]) }. <op> could be any of <min>,
|
||||
<max>, <add>.
|
||||
|
||||
ExclusiveScan A binary operation with an identity <I> and <n> (where
|
||||
<n> is the size of the sub-group) elements { a[0], a[1],
|
||||
.., a[n] } resulting in { I, a[0], (a[0] op a[1]), ..,
|
||||
(a[0] op a[1] op .. op a[n-2]) }. <op> could be any of
|
||||
<min>, <max>, <add>.
|
||||
|
||||
The identity <I> in the group operations <InclusiveScan> and <ExclusiveScan>
|
||||
is decided according to the following table:
|
||||
|
||||
Function Data Type Identity
|
||||
-------- ----------------------------------- ----------
|
||||
Min 32-bit signed integer INT_MAX
|
||||
64-bit signed integer INT64_MAX
|
||||
32-bit unsigned integer UINT_MAX
|
||||
64-bit unsigned integer UINT64_MAX
|
||||
16-bit/32-bit/64-bit floating-point +INF
|
||||
|
||||
Max 32-bit signed integer INT_MIN
|
||||
64-bit signed integer INT64_MIN
|
||||
32-bit/64-bit unsigned integer 0
|
||||
floating-point -INF
|
||||
|
||||
Add 32-bit/64-bit signed integer 0
|
||||
32-bit/64-bit unsigned integer 0
|
||||
16-bit/32-bit/64-bit floating-point 0
|
||||
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType minInvocationsAMD(genType v) | Returns the minimum value of <v> across all active shader |
|
||||
| genIType minInvocationsAMD(genIType v) | invocations in the sub-group with <Reduce> group |
|
||||
| genUType minInvocationsAMD(genUType v) | operation. These functions must be used in uniform |
|
||||
| genDType minInvocationsAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType minInvocationsNonUniformAMD(genType v) | Returns the minimum value of <v> across all active shader |
|
||||
| genIType minInvocationsNonUniformAMD(genIType v) | invocations in the sub-group with <Reduce> group |
|
||||
| genUType minInvocationsNonUniformAMD(genUType v) | operation. These functions could be used in non-uniform |
|
||||
| genDType minInvocationsNonUniformAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType minInvocationsInclusiveScanAMD(genType v) | Returns the minimum value of <v> across all active shader |
|
||||
| genIType minInvocationsInclusiveScanAMD(genIType v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genUType minInvocationsInclusiveScanAMD(genUType v) | operation. These functions must be used in uniform |
|
||||
| genDType minInvocationsInclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType minInvocationsInclusiveScanNonUniformAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genType v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genType minInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genIType v) | control flow. These functions operate component-wise. |
|
||||
| genUType minInvocationsInclusiveScanNonUniformAMD( | |
|
||||
| genUType v) | |
|
||||
| genDType minInvocationsInclusiveScanNonUniformAMD( | |
|
||||
| genDType v) | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType minInvocationsExclusiveScanAMD(genType v) | Returns the minimum value of <v> across all active shader |
|
||||
| genIType minInvocationsExclusiveScanAMD(genIType v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genUType minInvocationsExclusiveScanAMD(genUType v) | operation. These functions must be used in uniform |
|
||||
| genDType minInvocationsExclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType minInvocationsExclusiveScanNonUniformAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genType v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genIType minInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genIType v) | control flow. These functions operate component-wise. |
|
||||
| genUType minInvocationsExclusiveScanNonUniformAMD( | |
|
||||
| genUType v) | |
|
||||
| genDType minInvocationsExclusiveScanNonUniformAMD( | |
|
||||
| genDType v) | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType maxInvocationsAMD(genType v) | Returns the maximum value of <v> across all active shader |
|
||||
| genIType maxInvocationsAMD(genIType v) | invocations in the sub-group with <Reduce> group |
|
||||
| genUType maxInvocationsAMD(genUType v) | operation. These functions must be used in uniform |
|
||||
| genDType maxInvocationsAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType maxInvocationsNonUniformAMD(genType v) | Returns the maximum value of <v> across all active shader |
|
||||
| genIType maxInvocationsNonUniformAMD(genIType v) | invocations in the sub-group with <Reduce> group |
|
||||
| genUType maxInvocationsNonUniformAMD(genUType v) | operation. These functions could be used in non-uniform |
|
||||
| genDType maxInvocationsNonUniformAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType maxInvocationsInclusiveScanAMD(genType v) | Returns the maximum value of <v> across all active shader |
|
||||
| genIType maxInvocationsInclusiveScanAMD(genIType v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genUType maxInvocationsInclusiveScanAMD(genUType v) | operation. These functions must be used in uniform |
|
||||
| genDType maxInvocationsInclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType maxInvocationsInclusiveScanNonUniformAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genType v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genType maxInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genIType v) | control flow. These functions operate component-wise. |
|
||||
| genUType maxInvocationsInclusiveScanNonUniformAMD( | |
|
||||
| genUType v) | |
|
||||
| genDType maxInvocationsInclusiveScanNonUniformAMD( | |
|
||||
| genDType v) | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType maxInvocationsExclusiveScanAMD(genType v) | Returns the maximum value of <v> across all active shader |
|
||||
| genIType maxInvocationsExclusiveScanAMD(genIType v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genUType maxInvocationsExclusiveScanAMD(genUType v) | operation. These functions must be used in uniform |
|
||||
| genDType maxInvocationsExclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType maxInvocationsExclusiveScanNonUniformAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genType v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genIType maxInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genIType v) | control flow. These functions operate component-wise. |
|
||||
| genUType maxInvocationsExclusiveScanNonUniformAMD( | |
|
||||
| genUType v) | |
|
||||
| genDType maxInvocationsExclusiveScanNonUniformAMD( | |
|
||||
| genDType v) | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType addInvocationsAMD(genType v) | Returns the sum of the value of <v> across all active |
|
||||
| genIType addInvocationsAMD(genIType v) | shader invocations in the sub-group with <Reduce> group |
|
||||
| genUType addInvocationsAMD(genUType v) | operation. These functions must be used in uniform |
|
||||
| genDType addInvocationsAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType addInvocationsNonUniformAMD(genType v) | Returns the sum of the value of <v> across all active |
|
||||
| genIType addInvocationsNonUniformAMD(genIType v) | shader invocations in the sub-group with <Reduce> group |
|
||||
| genUType addInvocationsNonUniformAMD(genUType v) | operation. These functions could be used in non-uniform |
|
||||
| genDType addInvocationsNonUniformAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType addInvocationsInclusiveScanAMD(genType v) | Returns the sum of the value of <v> across all active |
|
||||
| genIType addInvocationsInclusiveScanAMD(genIType v) | shader invocations in the sub-group with <InclusiveScan> |
|
||||
| genUType addInvocationsInclusiveScanAMD(genUType v) | group operation. These functions must be used in uniform |
|
||||
| genDType addInvocationsInclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType addInvocationsInclusiveScanNonUniformAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genType v) | shader invocations in the sub-group with <InclusiveScan> |
|
||||
| genIType addInvocationsInclusiveScanNonUniformAMD( | group operation. These functions could be used in |
|
||||
| genIType v) | non-uniform control flow. These functions operate |
|
||||
| genUType addInvocationsInclusiveScanNonUniformAMD( | component-wise. |
|
||||
| genUType v) | |
|
||||
| genDType addInvocationsInclusiveScanNonUniformAMD( | |
|
||||
| genDType v) | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType addInvocationsExclusiveScanAMD(genType v) | Returns the sum of the value of <v> across all active |
|
||||
| genIType addInvocationsExclusiveScanAMD(genIType v) | shader invocations in the sub-group with <ExclusiveScan> |
|
||||
| genUType addInvocationsExclusiveScanAMD(genUType v) | group operation. These functions must be used in uniform |
|
||||
| genDType addInvocationsExclusiveScanAMD(genDType v) | control flow. These functions operate component-wise. |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType addInvocationsExclusiveScanNonUniformAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genType v) | shader invocations in the sub-group with <ExclusiveScan> |
|
||||
| genIType addInvocationsExclusiveScanNonUniformAMD( | group operation. These functions could be used in |
|
||||
| genIType v) | non-uniform control flow. These functions operate |
|
||||
| genUType addInvocationsExclusiveScanNonUniformAMD( | component-wise. |
|
||||
| genUType v) | |
|
||||
| genDType addInvocationsExclusiveScanNonUniformAMD( | |
|
||||
| genDType v) | |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType swizzleInvocationsAMD( | Swizzles data within a group of 4 consecutive invocations |
|
||||
| genType data, uvec4 offset) | of the sub-group based on <offset> as described below: |
|
||||
| genIType swizzleInvocationsAMD( | |
|
||||
| genIType data, uvec4 offset) | for (i = 0; i < gl_SubGroupSizeARB; i+=4) { |
|
||||
| genUType swizzleInvocationsAMD( | dataOut[i+0] = isActive[i+offset.x] ? |
|
||||
| genUType data, uvec4 offset) | dataIn[i+offset.x] : 0; |
|
||||
| | dataOut[i+1] = isActive[i+offset.y] ? |
|
||||
| | dataIn[i+offset.y] : 0; |
|
||||
| | dataOut[i+2] = isActive[i+offset.z] ? |
|
||||
| | dataIn[i+offset.z] : 0; |
|
||||
| | dataOut[i+3] = isActive[i+offset.w] ? |
|
||||
| | dataIn[i+offset.w] : 0; |
|
||||
| | } |
|
||||
| | |
|
||||
| | Where: |
|
||||
| | - isActive[i] tells whether the invocation with the index |
|
||||
| | <i> is currently active in the sub-group. |
|
||||
| | - dataIn[i] is the value of <data> for invocation index |
|
||||
| | <i>. |
|
||||
| | - dataOut[i] is the return value of the function for |
|
||||
| | invocation index <i>. |
|
||||
| | |
|
||||
| | Components of <offset> must be constant integer |
|
||||
| | expression with a value in the range [0, 3]. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType swizzleInvocationsMaskedAMD( | Swizzles data within a group of 32 consecutive |
|
||||
| genType data, uvec3 mask) | invocations with a limited mask as described below: |
|
||||
| genIType swizzleInvocationsMaskedAMD( | |
|
||||
| genIType data, uvec3 mask) | for (i = 0; i < gl_SubGroupSizeARB; i++) { |
|
||||
| genUType swizzleInvocationsMaskedAMD( | j = (((i & 0x1f) & mask.x) | mask.y) ^ mask.z; |
|
||||
| genIType data, uvec3 mask) | j |= (i & 0x20); // which group of 32 |
|
||||
| | dataOut[i] = isActive[j] ? dataIn[j] : 0; |
|
||||
| | } |
|
||||
| | |
|
||||
| | Where: |
|
||||
| | - isActive[i] tells whether the invocation with the index |
|
||||
| | <i> is currently active in the sub-group. |
|
||||
| | - dataIn[i] is the value of <data> for invocation index |
|
||||
| | <i>. |
|
||||
| | - dataOut[i] is the return value of the function for |
|
||||
| | invocation index <i>. |
|
||||
| | |
|
||||
| | Components of <mask> must be constant integer expression |
|
||||
| | with a value in the range [0, 31]. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genType writeInvocationAMD( | Returns <inputValue> for all active invocations in the |
|
||||
| genType inputValue, | sub-group except for the invocation whose invocation |
|
||||
| genType writeValue, | index within the sub-group is <invocationIndex> for which |
|
||||
| uint invocationIndex) | <writeValue> is returned as described below: |
|
||||
| genIType writeInvocationAMD( | |
|
||||
| genIType inputValue, | for (i = 0; i < gl_SubGroupSizeARB; i++) { |
|
||||
| genIType writeValue, | out[i] = (i == invocationIndex) ? |
|
||||
| uint invocationIndex) | writeValue:inputValue; |
|
||||
| genUType writeInvocationAMD( | } |
|
||||
| genUType inputValue, | |
|
||||
| genUType writeValue, | Where out[i] is the return value of the function for |
|
||||
| uint invocationIndex) | invocation index <i>. |
|
||||
| | |
|
||||
| | <writeValue> and <invocationIndex> must be dynamically |
|
||||
| | uniform within the sub-group, otherwise the return value |
|
||||
| | of the function is undefined. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
|
||||
Dependencies on ARB_gpu_shader_int64
|
||||
|
||||
If the shader enables ARB_gpu_shader_int64, this extension adds additional
|
||||
shader invocation group functions.
|
||||
|
||||
Add Section 8.18, Shader Invocation Group Functions
|
||||
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type minInvocationsAMD(genI64Type v) | Returns the minimum value of <v> across all active shader |
|
||||
| genU64Type minInvocationsAMD(genU64Type v) | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type minInvocationsNonUniformAMD(genI64Type v) | Returns the minimum value of <v> across all active shader |
|
||||
| genU64Type minInvocationsNonUniformAMD(genU64Type v) | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type minInvocationsInclusiveScanAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genI64Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genU64Type minInvocationsInclusiveScanAMD( | operation. These functions must be used in uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type minInvocationsInclusiveScanNonUniformAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genI64Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genU64Type minInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type minInvocationsExclusiveScanAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genI64Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genU64Type minInvocationsExclusiveScanAMD( | operation. These functions must be used in uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type minInvocationsExclusiveScanNonUniformAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genI64Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genU64Type minInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type maxInvocationsAMD(genI64Type v) | Returns the maximum value of <v> across all active shader |
|
||||
| genU64Type maxInvocationsAMD(genU64Type v) | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type maxInvocationsNonUniformAMD(genI64Type v) | Returns the maximum value of <v> across all active shader |
|
||||
| genU64Type maxInvocationsNonUniformAMD(genU64Type v) | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type maxInvocationsInclusiveScanAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genI64Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genU64Type maxInvocationsInclusiveScanAMD( | operation. These functions must be used in uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type maxInvocationsInclusiveScanNonUniformAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genI64Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genU64Type maxInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type maxInvocationsExclusiveScanAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genI64Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genU64Type maxInvocationsExclusiveScanAMD( | operation. These functions must be used in uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type maxInvocationsExclusiveScanNonUniformAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genI64Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genU64Type maxInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type addInvocationsAMD(genI64Type v) | Returns the sum of the value of <v> across all active |
|
||||
| genU64Type addInvocationsAMD(genU64Type v) | shader invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type addInvocationsNonUniformAMD(genI64Type v) | Returns the sum of the value of <v> across all active |
|
||||
| genU64Type addInvocationsNonUniformAMD(genU64Type v) | shader invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type addInvocationsInclusiveScanAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genI64Type v) | shader invocations in the sub-group with <InclusiveScan> |
|
||||
| genU64Type addInvocationsInclusiveScanAMD( | group operation. These functions must be used in uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type addInvocationsInclusiveScanNonUniformAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genI64Type v) | shader invocations in the sub-group with <InclusiveScan> |
|
||||
| genU64Type addInvocationsInclusiveScanNonUniformAMD( | group operation. These functions could be used in |
|
||||
| genU64Type v) | non-uniform control flow. These functions operate |
|
||||
| | component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type addInvocationsExclusiveScanAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genI64Type v) | shader invocations in the sub-group with <ExclusiveScan> |
|
||||
| genU64Type addInvocationsExclusiveScanAMD( | group operation. These functions must be used in uniform |
|
||||
| genU64Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI64Type addInvocationsExclusiveScanNonUniformAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genI64Type v) | shader invocations in the sub-group with <ExclusiveScan> |
|
||||
| genU64Type addInvocationsExclusiveScanNonUniformAMD( | group operation. These functions could be used in |
|
||||
| genU64Type v) | non-uniform control flow. These functions operate |
|
||||
| | component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| uint mbcntAMD(uint64_t mask) | Returns the bit count of gl_SubGroupLtMaskARB with <mask> |
|
||||
| | as described below: |
|
||||
| | |
|
||||
| | bitCount(gl_SubGroupLtMaskARB & mask). |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
|
||||
Dependencies on AMD_gpu_shader_half_float
|
||||
|
||||
If the shader enables AMD_gpu_shader_half_float, this extension adds
|
||||
additional shader invocation group functions.
|
||||
|
||||
Add Section 8.18, Shader Invocation Group Functions
|
||||
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type minInvocationsAMD(genF16Type v) | Returns the minimum value of <v> across all active shader |
|
||||
| | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type minInvocationsNonUniformAMD(genF16Type v) | Returns the minimum value of <v> across all active shader |
|
||||
| | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type minInvocationsInclusiveScanAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genF16Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type minInvocationsInclusiveScanNonUniformAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genF16Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type minInvocationsExclusiveScanAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genF16Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type minInvocationsExclusiveScanNonUniformAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genF16Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type maxInvocationsAMD(genF16Type v) | Returns the maximum value of <v> across all active shader |
|
||||
| | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type maxInvocationsNonUniformAMD(genF16Type v) | Returns the maximum value of <v> across all active shader |
|
||||
| | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type maxInvocationsInclusiveScanAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genF16Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type maxInvocationsInclusiveScanNonUniformAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genF16Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type maxInvocationsExclusiveScanAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genF16Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type maxInvocationsExclusiveScanNonUniformAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genF16Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type addInvocationsAMD(genF16Type v) | Returns the sum of the value of <v> across all active |
|
||||
| | shader invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type addInvocationsNonUniformAMD(genF16Type v) | Returns the sum of the value of <v> across all active |
|
||||
| | shader invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type addInvocationsInclusiveScanAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genF16Type v) | shader invocations in the sub-group with <InclusiveScan> |
|
||||
| | group operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type addInvocationsInclusiveScanNonUniformAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genF16Type v) | shader invocations in the sub-group with <InclusiveScan> |
|
||||
| | group operation. These functions could be used in |
|
||||
| | non-uniform control flow. These functions operate |
|
||||
| | component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type addInvocationsExclusiveScanAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genF16Type v) | shader invocations in the sub-group with <ExclusiveScan> |
|
||||
| | group operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genF16Type addInvocationsExclusiveScanNonUniformAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genF16Type v) | shader invocations in the sub-group with <ExclusiveScan> |
|
||||
| | group operation. These functions could be used in |
|
||||
| | non-uniform control flow. These functions operate |
|
||||
| | component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
|
||||
Dependencies on AMD_gpu_shader_int16
|
||||
|
||||
If the shader enables AMD_gpu_shader_int16, this extension adds
|
||||
additional shader invocation group functions.
|
||||
|
||||
Add Section 8.18, Shader Invocation Group Functions
|
||||
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type minInvocationsAMD(genI16Type v) | Returns the minimum value of <v> across all active shader |
|
||||
| genU16Type minInvocationsAMD(genU16Type v) | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type minInvocationsNonUniformAMD(genI16Type v) | Returns the minimum value of <v> across all active shader |
|
||||
| genU16Type minInvocationsNonUniformAMD(genU16Type v) | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type minInvocationsInclusiveScanAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genI16Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genU16Type minInvocationsInclusiveScanAMD( | operation. These functions must be used in uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type minInvocationsInclusiveScanNonUniformAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genI16Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genU16Type minInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type minInvocationsExclusiveScanAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genI16Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genU16Type minInvocationsExclusiveScanAMD( | operation. These functions must be used in uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type minInvocationsExclusiveScanNonUniformAMD( | Returns the minimum value of <v> across all active shader |
|
||||
| genI16Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genU16Type minInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type maxInvocationsAMD(genI16Type v) | Returns the maximum value of <v> across all active shader |
|
||||
| genU16Type maxInvocationsAMD(genU16Type v) | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type maxInvocationsNonUniformAMD(genI16Type v) | Returns the maximum value of <v> across all active shader |
|
||||
| genU16Type maxInvocationsNonUniformAMD(genU16Type v) | invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type maxInvocationsInclusiveScanAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genI16Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genU16Type maxInvocationsInclusiveScanAMD( | operation. These functions must be used in uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type maxInvocationsInclusiveScanNonUniformAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genI16Type v) | invocations in the sub-group with <InclusiveScan> group |
|
||||
| genU16Type maxInvocationsInclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type maxInvocationsExclusiveScanAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genI16Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genU16Type maxInvocationsExclusiveScanAMD( | operation. These functions must be used in uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type maxInvocationsExclusiveScanNonUniformAMD( | Returns the maximum value of <v> across all active shader |
|
||||
| genI16Type v) | invocations in the sub-group with <ExclusiveScan> group |
|
||||
| genU16Type maxInvocationsExclusiveScanNonUniformAMD( | operation. These functions could be used in non-uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type addInvocationsAMD(genI16Type v) | Returns the sum of the value of <v> across all active |
|
||||
| genU16Type addInvocationsAMD(genU16Type v) | shader invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions must be used in uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type addInvocationsNonUniformAMD(genI16Type v) | Returns the sum of the value of <v> across all active |
|
||||
| genU16Type addInvocationsNonUniformAMD(genU16Type v) | shader invocations in the sub-group with <Reduce> group |
|
||||
| | operation. These functions could be used in non-uniform |
|
||||
| | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type addInvocationsInclusiveScanAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genI16Type v) | shader invocations in the sub-group with <InclusiveScan> |
|
||||
| genU16Type addInvocationsInclusiveScanAMD( | group operation. These functions must be used in uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type addInvocationsInclusiveScanNonUniformAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genI16Type v) | shader invocations in the sub-group with <InclusiveScan> |
|
||||
| genU16Type addInvocationsInclusiveScanNonUniformAMD( | group operation. These functions could be used in |
|
||||
| genU16Type v) | non-uniform control flow. These functions operate |
|
||||
| | component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type addInvocationsExclusiveScanAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genI16Type v) | shader invocations in the sub-group with <ExclusiveScan> |
|
||||
| genU16Type addInvocationsExclusiveScanAMD( | group operation. These functions must be used in uniform |
|
||||
| genU16Type v) | control flow. These functions operate component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
| genI16Type addInvocationsExclusiveScanNonUniformAMD( | Returns the sum of the value of <v> across all active |
|
||||
| genI16Type v) | shader invocations in the sub-group with <ExclusiveScan> |
|
||||
| genU16Type addInvocationsExclusiveScanNonUniformAMD( | group operation. These functions could be used in |
|
||||
| genU16Type v) | non-uniform control flow. These functions operate |
|
||||
| | component-wise. |
|
||||
+------------------------------------------------------+-----------------------------------------------------------+
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- ---------- -------- --------------------------------------------------
|
||||
5 03/28/2018 rexu Add interactions with ARB_gpu_shader_int16. New
|
||||
group invocation functions are added to support
|
||||
16-bit integer type in group operations.
|
||||
|
||||
4 10/19/2016 rexu Add interactions with ARB_gpu_shader_int64 and
|
||||
AMD_gpu_shader_half_float. New group invocation
|
||||
functions are added to support 64-bit integer
|
||||
type and 16-bit/64-bit floating-point type
|
||||
in group operations. Clarify that <mask> in
|
||||
swizzleInvocationsMaskedAMD() should be constant
|
||||
integer expression with a value in the range
|
||||
[0, 31].
|
||||
|
||||
3 08/16/2016 rexu Clarify that minInvocationsAMD, maxInvocationsAMD,
|
||||
addInvocationsAMD, along with their non-uniform
|
||||
versions, operate component-wise rather than on
|
||||
vector.
|
||||
|
||||
2 08/11/2016 rexu Add non-uniform versions of minInvocationsAMD,
|
||||
maxInvocationsAMD, and addInvocationsAMD.
|
||||
Support those operations in non-uniform control
|
||||
flow.
|
||||
|
||||
1 04/21/2016 qlin Internal revisions.
|
||||
@@ -0,0 +1,218 @@
|
||||
Name
|
||||
|
||||
AMD_shader_explicit_vertex_parameter
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_shader_explicit_vertex_parameter
|
||||
|
||||
Contact
|
||||
|
||||
Qun Lin, AMD (Quentin.Lin 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Qun Lin, AMD
|
||||
Graham Sellers, AMD
|
||||
Daniel Rakos, AMD
|
||||
Dominik Witczak, AMD
|
||||
|
||||
Status
|
||||
|
||||
Pending
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 04/21/2016
|
||||
Author Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #485
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 2.0 or ARB_shader_objects is required.
|
||||
|
||||
This extension is written against the OpenGL Shading Language
|
||||
Specification, Version 4.50.
|
||||
|
||||
Overview
|
||||
|
||||
Unextended GLSL provides a set of fixed function interpolation modes and
|
||||
even those are limited to certain types of interpolants (for example,
|
||||
interpolation of integer and double isn't supported).
|
||||
|
||||
This extension introduces new built-in functions allowing access to vertex
|
||||
parameters explicitly in the fragment shader. It also exposes barycentric
|
||||
coordinates as new built-in variables, which can be used to implement
|
||||
custom interpolation algorithms using shader code.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Modifications to the OpenGL Shading Language Specification, Version 4.50
|
||||
|
||||
Including the following line in a shader can be used to control the
|
||||
language features described in this extension:
|
||||
|
||||
#extension GL_AMD_shader_explicit_vertex_parameter : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.3.
|
||||
|
||||
New preprocessor #defines are added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_AMD_shader_explicit_vertex_parameter 1
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.50, (Basics)
|
||||
|
||||
Modify section 3.6, Keywords p. 17
|
||||
|
||||
(Add __explicitInterpAMD to the list of keywords)
|
||||
...smooth noperspective __explicitInterpAMD
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.50, (Variables and Types)
|
||||
|
||||
Modify section 4.5, Interpolation Qualifiers p.81
|
||||
|
||||
(Add explicitInterpAMD to interpolation qualifier list)
|
||||
|
||||
+-------------------+------------------------------------------------+
|
||||
| Qualifier | Meaning |
|
||||
+-------------------+------------------------------------------------+
|
||||
| explicitInterpAMD | Explicit interpolation |
|
||||
+-------------------+------------------------------------------------+
|
||||
|
||||
(Add a new paragraph after the description of noperspective)
|
||||
|
||||
A variable qualified as __explicitInterpAMD can only be used as the
|
||||
parameter of the built-in function interpolateAtVertex in fragment shader,
|
||||
and it cannot be qualified with any other auxiliary storage qualifiers.
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.50 (Built-in variables)
|
||||
|
||||
|
||||
Modify Section 7.1, Built-in Languages Variable, p. 110
|
||||
|
||||
(Add to the list of built-in variables for the fragment languages)
|
||||
|
||||
In the fragment language, built-in variables are intrinsically declared as:
|
||||
|
||||
in vec2 gl_BaryCoordNoPerspAMD;
|
||||
in vec2 gl_BaryCoordNoPerspCentroidAMD;
|
||||
in vec2 gl_BaryCoordNoPerspSampleAMD;
|
||||
in vec2 gl_BaryCoordSmoothAMD;
|
||||
in vec2 gl_BaryCoordSmoothCentroidAMD;
|
||||
in vec2 gl_BaryCoordSmoothSampleAMD;
|
||||
in vec3 gl_BaryCoordPullModelAMD
|
||||
|
||||
The built-in variables <gl_BaryCoord??AMD> are fragment shader input
|
||||
variables. Except the <gl_BaryCoordPullModelAMD>, the variables provide
|
||||
the (I,J) pair of the barycentric coordinates interpolated at a fixed
|
||||
location within the pixel. The K coordinate can be derived given the
|
||||
identity I+J+K=1.0.
|
||||
|
||||
<gl_BaryCoordPullModelAMD> returns (1/W, 1/I, 1/J) at the pixel center and
|
||||
the shader can use it to calculate gradients and to interpolate I, J, and
|
||||
W to any desired sample location.
|
||||
|
||||
The interpolation mode of gl_BaryCoord??AMD variables are as follows
|
||||
+---------------------------------+-----------------------------------------------------------+
|
||||
| Variable name | Description |
|
||||
+---------------------------------+-----------------------------------------------------------+
|
||||
| gl_BaryCoordNoPerspAMD | Linear interpolation evaluated at the pixel's center |
|
||||
| gl_BaryCoordNoPerspCentroidAMD | Linear interpolation evaluated at the centroid |
|
||||
| gl_BaryCoordNoPerspSampleAMD | Linear interpolation evaluated at each covered sample |
|
||||
| gl_BaryCoordSmoothAMD | Perspective interpolation evaluated at the pixel's center |
|
||||
| gl_BaryCoordSmoothCentroidAMD | Perspective interpolation evaluated at the centroid |
|
||||
| gl_BaryCoordSmoothSampleAMD | Perspective interpolation evaluated at each covered sample|
|
||||
+---------------------------------+-----------------------------------------------------------+
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30 (Built-in functions)
|
||||
|
||||
Modify Section 8.13.2, "Interpolation Functions", p. 180
|
||||
|
||||
(Add to the end of last paragraph in this page)
|
||||
The return value of the functions interpolateAtCentroid,
|
||||
interpolateAtSample, and interpolateAtOffset is undefined if <interpolant>
|
||||
is declared with __explicitInterpAMD.
|
||||
|
||||
add to the table of functions, p.181:
|
||||
|
||||
+----------------------------------------------------+--------------------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+----------------------------------------------------+--------------------------------------------------------+
|
||||
| genType interpolateAtVertexAMD(genType | Returns the value of the input <interpolant> without |
|
||||
| interpolant, uint vertexIdx) | any interpolation. i.e. the raw output value of |
|
||||
| genIType interpolateAtVertexAMD(genIType | previous shader stage. <vertexIdx> selects for which |
|
||||
| interpolant, uint vertexIdx) | vertex of the primitive the value of <interpolant> is |
|
||||
| genUType interpolateAtVertexAMD(genUType | returned. |
|
||||
| interpolant, uint vertexIdx) | This return value is equivalent with interpolating |
|
||||
| | the input <interpolant> using the following |
|
||||
| | set of barycentric coordinates, depending on |
|
||||
| | the value of <vertexIdx>: |
|
||||
| | |
|
||||
| | vertexIdx Barycentric coordinates |
|
||||
| | 0 I=0, J=0, K=1 |
|
||||
| | 1 I=1, J=0, K=0 |
|
||||
| | 2 I=0, J=1, K=0 |
|
||||
| | |
|
||||
| | However this order has no association with the vertex |
|
||||
| | order specified by the application in the originating |
|
||||
| | draw. |
|
||||
| | The value of <vertexIdx> must be constant integer |
|
||||
| | expression with a value in the range [0, 2]. |
|
||||
+----------------------------------------------------+--------------------------------------------------------+
|
||||
|
||||
Additions to Chapter 9 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30, (Shading Language Grammar)
|
||||
|
||||
Modify Chapter 9, Shading Language Grammar for Core Profile, p. 187
|
||||
|
||||
(Add new token __EXPLICITINTERPAMD to list)
|
||||
... NOPERSPECTIVE FLAT SMOOTH __EXPLICITINTERPAMD
|
||||
|
||||
Modify Chapter 9, Shading Language Grammar for Core Profile, p. 194
|
||||
|
||||
(Add __EXPLICITINTERPAMD to grammar interpolation_qualifier)
|
||||
|
||||
interpolation_qualifier:
|
||||
SMOOTH
|
||||
FLAT
|
||||
NOPERSPECTIVE
|
||||
__EXPLICITINTERPAMD
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
2 05/19/2016 dwitczak Minor update.
|
||||
1 04/21/2016 qlin Internal revisions.
|
||||
@@ -0,0 +1,186 @@
|
||||
Name
|
||||
|
||||
AMD_shader_image_load_store_lod
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_shader_image_load_store_lod
|
||||
|
||||
Contact
|
||||
|
||||
Rex Xu, AMD (rex.xu 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Rex Xu, AMD
|
||||
Zhou Jin, AMD
|
||||
Qun Lin, AMD
|
||||
Daniel Rakos, AMD
|
||||
|
||||
Status
|
||||
|
||||
Shipping.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 07/03/2017
|
||||
Author Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
513
|
||||
|
||||
Dependencies
|
||||
|
||||
This extension is written against the OpenGL 4.5 (Core Profile)
|
||||
Specification.
|
||||
|
||||
This extension is written against version 4.50 of the OpenGL Shading
|
||||
Language Specification.
|
||||
|
||||
OpenGL 4.0 and GLSL 4.00 are required.
|
||||
|
||||
This extension interacts with ARB_sparse_texture2.
|
||||
|
||||
Overview
|
||||
|
||||
This extension was developed based on the ARB_shader_image_load_store
|
||||
extension to allow implementations supporting loads and stores on
|
||||
mipmap texture images.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Modifications to the OpenGL Shading Language Specification, Version 4.50
|
||||
|
||||
Including the following line in a shader can be used to control the
|
||||
language features described in this extension:
|
||||
|
||||
#extension GL_AMD_shader_image_load_store_lod : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.3.
|
||||
|
||||
New preprocessor #defines are added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_AMD_shader_image_load_store_lod 1
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language Specification (Built-in
|
||||
Functions)
|
||||
|
||||
Modify Section 8.12 Image Functions
|
||||
|
||||
(insert a new paragraph, following the fourth paragraph on p. 179)
|
||||
|
||||
... "Texture Image Loads and Stores" of the OpenGL specification.
|
||||
|
||||
Loads and stores could also be done on mipmap texture images with the
|
||||
level-of-detail specified explicitly. In such case, the IMAGE_LOD_PARAMS
|
||||
is used instead. Similar to IMAGE_PARAMS, the IMAGE_LOD_PARAMS in the
|
||||
prototypes below is a placeholder representing 21 separate functions, each
|
||||
for a different type of image variable. The IMAGE_LOD_PARAMS placeholder is
|
||||
replaced by one of the following parameter list:
|
||||
|
||||
gimage1D image, int P, int lod
|
||||
gimage2D image, ivec2 P, int lod
|
||||
gimage3D image, ivec3 P, int lod
|
||||
gimageCube image, ivec3 P, int lod
|
||||
gimage1DArray image, ivec2 P, int lod
|
||||
gimage2DArray image, ivec3 P, int lod
|
||||
gimageCubeArray image, ivec3 P, int lod
|
||||
|
||||
(insert new functions to the "Syntax" table cell of each image memory
|
||||
function group on p. 180-181)
|
||||
|
||||
+-----------------------------------------+-------------------------------+
|
||||
| Syntax | Description |
|
||||
+-----------------------------------------+-------------------------------+
|
||||
| gvec4 imageLoadLodAMD(readonly | Loads the texel at the |
|
||||
| IMAGE_LOD_PARAMS) | coordinate <P> from the image |
|
||||
| | unit <image> (in |
|
||||
| | IMAGE_MIP_PARAMS). When |
|
||||
| | <image>, <P>, <lod> identify |
|
||||
| | a valid texel, the bits used |
|
||||
| | to represent the selected |
|
||||
| | texel in the memory are |
|
||||
| | converted to a vec4, ivec4, |
|
||||
| | uvec4 in the manner described |
|
||||
| | in the section 8.25 "Texture |
|
||||
| | Image Loads and Stores" of |
|
||||
| | the OpenGL Specification and |
|
||||
| | returned. |
|
||||
+-----------------------------------------+-------------------------------+
|
||||
| void imageStoreLodAMD(writeonly | Store <data> into the texel |
|
||||
| IMAGE_LOD_PARAMS, | at the coordinate <P> from |
|
||||
| gvec4 data) | the image specified by |
|
||||
| | <image>. When <image>, <P>, |
|
||||
| | <lod> identify a valid texel, |
|
||||
| | the bits used to represent |
|
||||
| | <data> are converted to the |
|
||||
| | format of the image unit in |
|
||||
| | the manner described in |
|
||||
| | section 8.25 "Texture Image |
|
||||
| | Loads and Stores" of the |
|
||||
| | OpenGL Specification and |
|
||||
| | stored to the specified texel.|
|
||||
+-----------------------------------------+-------------------------------+
|
||||
|
||||
Dependencies on ARB_sparse_texture2
|
||||
|
||||
If the shader enables ARB_sparse_texture2, this extension adds additional
|
||||
image load functions.
|
||||
|
||||
+-------------------------------------------------+-----------------------+
|
||||
| Syntax | Description |
|
||||
+-------------------------------------------------+-----------------------+
|
||||
| int sparseImageLoadLodAMD(gimage2D image, | Loads a texel from |
|
||||
| ivec2 P, int lod, | the image <image> as |
|
||||
| out gvec4 texel) | in imageLoadLodAMD(), |
|
||||
| int sparseImageLoadLodAMD(gimage3D image, | but return texture |
|
||||
| ivec3 P, int lod, | access residency |
|
||||
| out gvec4 texel) | information from the |
|
||||
| int sparseImageLoadLodAMD(gimageCube image, | function and the |
|
||||
| ivec3 P, int lod, | filtered lookup |
|
||||
| out gvec4 texel) | result in the out |
|
||||
| int sparseImageLoadLodAMD(gimage2DArray image, | parameter <texel>. |
|
||||
| ivec3 P, int lod, | |
|
||||
| out gvec4 texel) | |
|
||||
| int sparseImageLoadLodAMD(gimageCuberray image, | |
|
||||
| ivec3 P, int lod, | |
|
||||
| out gvec4 texel) | |
|
||||
+-------------------------------------------------+-----------------------+
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
(1) What is the intention of this extension?
|
||||
|
||||
RESOLVED: This extension is designed to support loads and stores on
|
||||
mipmap texture images with the level-of-detail specified explicitly.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -------------------------------------------------
|
||||
2 07/03/17 rexu Rename this extension and use suffix "lod" to
|
||||
keep the consistency with existing texture and
|
||||
image functions. Remove gimage2DRect and
|
||||
gimageBuffer dimensions for these new built-in
|
||||
functions in that they do not support mipmapping.
|
||||
|
||||
1 06/30/17 rexu Initial draft.
|
||||
@@ -0,0 +1,209 @@
|
||||
Name
|
||||
|
||||
AMD_shader_stencil_export
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_shader_stencil_export
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers, AMD
|
||||
Andrew Lewycky, AMD
|
||||
Mais Alnasser, AMD
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
In Progress.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 04/07/2010
|
||||
Author Revision: 5
|
||||
|
||||
Number
|
||||
|
||||
382
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.0 is required.
|
||||
|
||||
ARB_fragment_shader is required.
|
||||
|
||||
This extension is written against the OpenGL Shading Language Specification
|
||||
version 1.40.05
|
||||
|
||||
Overview
|
||||
|
||||
In OpenGL, the stencil test is a powerful mechanism to selectively discard
|
||||
fragments based on the content of the stencil buffer. However, facilites
|
||||
to update the content of the stencil buffer are limited to operations such
|
||||
as incrementing the existing value, or overwriting with a fixed reference
|
||||
value.
|
||||
|
||||
This extension provides a mechanism whereby a shader may generate the
|
||||
stencil reference value per invocation. When stencil testing is enabled,
|
||||
this allows the test to be performed against the value generated in the
|
||||
shader. When the stencil operation is set to GL_REPLACE, this allows a
|
||||
value generated in the shader to be written to the stencil buffer directly.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 2.1 Specification (OpenGL Operation)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 2.1 Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 2.1 Specification (Per-Fragment Operations
|
||||
and the Framebuffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 2.1 Specification (Special
|
||||
Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 2.1 Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the OpenGL Shading Language Version 1.40.05
|
||||
|
||||
Add a new Section 3.3.x, GL_AMD_shader_stencil_export Extension (p. 11)
|
||||
|
||||
3.3.x GL_AMD_shader_stencil_export
|
||||
|
||||
To use the GL_AMD_shader_stencil_export extension in a shader it must be
|
||||
enabled using the #extension directive.
|
||||
|
||||
The shading language preprocessor #define GL_AMD_shader_stencil_export will
|
||||
be defined to 1 if the GL_AMD_shader_stencil_export extension is supported.
|
||||
|
||||
Modify Section 7.2, "Fragment Shader Special Variables":
|
||||
|
||||
Add to the list of built-in special variables, p.63:
|
||||
|
||||
out int gl_FragStencilRefAMD;
|
||||
|
||||
Modify the paragraph beginning, "Fragment shaders output values to the
|
||||
OpenGL pipeline..." to:
|
||||
|
||||
Fragment shaders output values to the OpenGL pipeline using the built-in
|
||||
variables gl_FragColor, gl_FragData, gl_FragDepth, and gl_FragStencilRefAMD
|
||||
unless the discard statement is executed. Both gl_FragColor and gl_FragData
|
||||
are deprecated; the preferred usage is to explicitly declare these outputs
|
||||
in the fragment shader using the out storage qualifier.
|
||||
|
||||
Insert a new paragraph after the paragraph describing gl_FragDepth:
|
||||
|
||||
Writing to gl_FragStencilRefAMD will establish the stencil reference value
|
||||
for the fragment being processed. Only the least significant bits of the
|
||||
integer gl_FragStencilRefAMD are considered up to the value of STENCIL_BITS
|
||||
and higher order bits are discarded. If stencil testing is enabled and no
|
||||
shader writes to gl_FragStencilRefAMD, then the fixed function value for
|
||||
stencil reference will be used as the fragment's stencil reference value.
|
||||
If a shader statically assignes a value to gl_FragStencilRefAMD, and there
|
||||
is an execution path through the shader that does not set
|
||||
gl_FragStencilRefAMD, then the value of the fragment's stencil reference
|
||||
value may be undefined for executions of the shader that take that path.
|
||||
That is, if the set of linked shaders statically contain a write to
|
||||
gl_FragStencilRefAMD, then it is responsible for always writing it.
|
||||
|
||||
Modify the first paragraph on p.64:
|
||||
|
||||
If a shader executes the discard keyword, the fragment is discarded, and
|
||||
the values of any user-defined fragment outputs, gl_FragDepth, gl_FragColor,
|
||||
gl_FragData, and gl_FragStencilRefAMD become irrelevant.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
1) Should gl_FragStencilRefAMD be initialized to the current stencil
|
||||
reference value on input to the fragment shader?
|
||||
|
||||
RESOLVED: No. gl_FragStencilRefAMD is write-only. If the current stencil
|
||||
reference value is required in a shader, the application should place
|
||||
it in a uniform.
|
||||
|
||||
2) Is it possible to output the stencil mask from the shader?
|
||||
|
||||
RESOLVED: No.
|
||||
|
||||
3) Is the global stencil mask still applied?
|
||||
|
||||
RESOLVED: Yes. The mask is global as there is no way to export the
|
||||
stencil mask from the shader.
|
||||
|
||||
4) How is two-sided stencil handled? How do we export front and back
|
||||
stencil references?
|
||||
|
||||
RESOLVED: There is only one export from the shader. However, two sided
|
||||
stencil reference generation may be achived as:
|
||||
|
||||
if (gl_FrontFacing)
|
||||
gl_FragStencilRefAMD = foo;
|
||||
else
|
||||
gl_FragStencilRefAMD = bar;
|
||||
|
||||
If both front and back stencil reference values are needed in a single
|
||||
shader, user defined uniforms may be used.
|
||||
|
||||
5) If the value written to gl_FragStencilRefAMD is outside of the range of
|
||||
values representable by the stencil buffer, what happens?
|
||||
|
||||
RESOLVED: The additional bits are discarded. This is logical as the
|
||||
stencil mask is still applied and its bit-depth is that of the stencil
|
||||
buffer. If clamping is desired, this should be performed in the shader.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
5 04/07/2010 gsellers Remove erroneous language stating that
|
||||
gl_FragStencilRefAMD is initialized to the fixed
|
||||
function reference value.
|
||||
4 09/27/2009 gsellers Update issues 1, 4 and 5.
|
||||
3 07/16/2009 gsellers Address two-sided stencil references.
|
||||
Add issues 3, 4 and 5.
|
||||
2 07/14/2009 gsellers Add AMD suffix to gl_FragStencilRef. Resolve (1)
|
||||
1 07/10/2009 gsellers Initial draft.
|
||||
@@ -0,0 +1,164 @@
|
||||
Name
|
||||
|
||||
AMD_shader_stencil_value_export
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_shader_stencil_value_export
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 12/12/2013
|
||||
Author Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #444
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 2.0 or ARB_fragment_shader is required.
|
||||
|
||||
The AMD_shader_stencil_export extension affects the definition of this
|
||||
extension.
|
||||
|
||||
The AMD_stencil_operation_extended extension is required.
|
||||
|
||||
This extension is written against the OpenGL Shading Language (GLSL)
|
||||
Specification, Version 4.00.7.
|
||||
|
||||
Overview
|
||||
|
||||
OpenGL includes stencil testing functionality that allows an application
|
||||
specified value (the reference value) to be compared against the content
|
||||
of a stencil buffer and fragments kept or discarded based on the results
|
||||
of this test. In addition to updating the stencil buffer with simple
|
||||
operations such as inversion or incrementation, this reference value may be
|
||||
written directly into the stencil buffer.
|
||||
|
||||
AMD_stencil_operation_extended further extended the number of
|
||||
operations that may be performed on the stencil buffer to include logical
|
||||
and arithmetic operations. It also introduced new state, the stencil
|
||||
operation source value, to allow these new operations to be performed on
|
||||
the stencil buffer using an application supplied constant value as a source
|
||||
value, rather than the reference value used in the stencil test.
|
||||
|
||||
The AMD_shader_stencil_export extension allowed the reference value
|
||||
used for the stencil test to be generated and exported from a fragment
|
||||
shader. This extension provides similar functionality for the stencil
|
||||
operation source value, allowing it to be generated in and exported from
|
||||
the fragment shader too.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Modifications to the OpenGL 4.0 (Core Profile) Specification
|
||||
|
||||
None.
|
||||
|
||||
Modifications to Chapter 3 of the OpenGL Shading Language Specification,
|
||||
Version 4.00.7
|
||||
|
||||
Add new Section 3.3.x, GL_AMD_shader_stencil_value_export Extension, p.15
|
||||
|
||||
3.3.x GL_AMD_shader_stencil_value_export
|
||||
|
||||
To use the GL_AMD_shader_stencil_value_export extension in a shader it must
|
||||
be enabled using the #extension directive.
|
||||
|
||||
The shading language preprocessor #define GL_AMD_shader_stencil_value_export
|
||||
will be defined to 1 if the GL_AMD_shader_stencil_value_export extension is
|
||||
supported.
|
||||
|
||||
Modifications to Chapter 7 of the OpenGL Shading Language Specification,
|
||||
Version 4.00.7 (Built-in Variables)
|
||||
|
||||
Modify Section 7.1, "Built-in Language Variables":
|
||||
|
||||
Add to the list of built-in special variables for the fragment language,
|
||||
p.86:
|
||||
|
||||
out int gl_FragStencilValueAMD;
|
||||
|
||||
Insert the following paragraph, after the paragraph describing
|
||||
gl_FragStencilRefAMD (as introduced by AMD_shader_stencil_export) on p.89:
|
||||
|
||||
Writing to gl_FragStencilValueAMD will establish the stencil operation
|
||||
source value for the fragment being processed. Only the least significant
|
||||
STENCIL_BITS bits of the integer gl_FragStencilValueAMD are considered and
|
||||
higher order bits are discarded. If stencil buffering is enabled and no
|
||||
shader writes to gl_FragStencilValueAMD, the fixed function value for
|
||||
stencil operation source will be used as the fragment's stencil operation
|
||||
source value. If a shader statically assignes a value to
|
||||
gl_FragStencilValueAMD, and there is an execution path through the shader
|
||||
that does not set gl_FragStencilValueAMD, then the value of the fragment's
|
||||
stencil operation source value may be undefined for executions of the
|
||||
shader that take that path. That is, if the set of linked shaders
|
||||
statically contain a write to gl_FragStencilValueAMD, then it is
|
||||
responsible for always writing it.
|
||||
|
||||
Modify the paragraph on p.89, describing the 'discard' keyword:
|
||||
|
||||
If a shader executes the discard keyword, the fragment is discarded, and
|
||||
the values of any user-defined fragment outputs, gl_FragDepth,
|
||||
gl_FragStencilRefAMD, and gl_FragStencilValueAMD become irrelevant.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Dependencies on AMD_shader_stencil_export
|
||||
|
||||
If AMD_shader_stencil_export is not supported, remove all references to
|
||||
gl_FragStencilRefAMD.
|
||||
|
||||
Issues
|
||||
|
||||
1) What is the behavior of gl_FragStencilValueAMD with respect to masks,
|
||||
significant bits and so on?
|
||||
|
||||
The behavior of the value written to gl_FragStencilValueAMD is the same
|
||||
as that of the fixed function value set through glStencilOpValueAMD. That
|
||||
is, the value is not masked until the result of the operation is written
|
||||
to the stencil buffer. Bits that cannot be represented by the stencil
|
||||
buffer are simply discarded.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- ---------- -------- -----------------------------------------
|
||||
2 12/12/2013 gsellers Minor cleanup ready for posting.
|
||||
1 06/10/2010 gsellers Initial revision
|
||||
@@ -0,0 +1,136 @@
|
||||
Name
|
||||
|
||||
AMD_shader_trinary_minmax
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_shader_trinary_minmax
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 10/01/2012
|
||||
Author Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
428
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 2.0 or ARB_shader_objects is required.
|
||||
|
||||
This extension is written against the OpenGL Shading Language
|
||||
Specification, Version 4.30.
|
||||
|
||||
Overview
|
||||
|
||||
This extension introduces three new trinary built-in functions to the
|
||||
OpenGL Shading Languages. These functions allow the minimum, maximum
|
||||
or median of three inputs to be found with a single function call. These
|
||||
operations may be useful for sorting and filtering operations, for example.
|
||||
By explicitly performing a trinary operation with a single built-in
|
||||
function, shader compilers and optimizers may be able to generate better
|
||||
instruction sequences for perform sorting and other multi-input functions.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30, (Overview of OpenGL Shading)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30, (Basics)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30, (Variables and Types)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30, (Operators and Expressions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30, (Statement Structure)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30 (Built-in variables)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30 (Built-in functions)
|
||||
|
||||
In Section 8.3, "Common Functions", add to the table of functions, p.133:
|
||||
|
||||
+---------------------------------------------------+--------------------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+---------------------------------------------------+--------------------------------------------------------+
|
||||
| genType min3(genType x, genType y, genType z) | Returns the per-component minimum value of x, y, and z |
|
||||
| genIType min3(genIType x, genIType y, genIType z) | Returns the per-component minimum value of x, y, and z |
|
||||
| genUType min3(genUType x, genUType y, genUType z) | Returns the per-component minimum value of x, y, and z |
|
||||
+---------------------------------------------------+--------------------------------------------------------+
|
||||
| genType max3(genType x, genType y, genType z) | Returns the per-component maximum value of x, y, and z |
|
||||
| genIType max3(genIType x, genIType y, genIType z) | Returns the per-component maximum value of x, y, and z |
|
||||
| genUType max3(genUType x, genUType y, genUType z) | Returns the per-component maximum value of x, y, and z |
|
||||
+---------------------------------------------------+--------------------------------------------------------+
|
||||
| genType mid3(genType x, genType y, genType z) | Returns the per-component median value of x, y, and z |
|
||||
| genIType mid3(genIType x, genIType y, genIType z) | Returns the per-component median value of x, y, and z |
|
||||
| genUType mid3(genUType x, genUType y, genUType z) | Returns the per-component median value of x, y, and z |
|
||||
+---------------------------------------------------+--------------------------------------------------------+
|
||||
|
||||
Additions to Chapter 9 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.30, (Shading Language Grammar)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
1) Should the trinary min and max functions be given new names (min3, max3)
|
||||
or simply overload the existing min and max functions?
|
||||
|
||||
RESOLVED: Use new names.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
2 10/01/2012 gsellers Update to GLSL 4.30. Ready to post.
|
||||
1 11/01/2012 gsellers Initial Revision
|
||||
@@ -0,0 +1,822 @@
|
||||
Name
|
||||
|
||||
AMD_sparse_texture
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_sparse_texture
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers, AMD
|
||||
Pierre Boudier, AMD
|
||||
Juraj Obert, AMD
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Shipping.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 03/27/2012
|
||||
AMD Revision: 6
|
||||
|
||||
Number
|
||||
|
||||
426
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 2.0 or ARB_fragment_shader is required.
|
||||
|
||||
This extension is written against the OpenGL 4.2 (Core) Specification.
|
||||
|
||||
This extension is written against the OpenGL Shading Language (GLSL)
|
||||
Specification, version 4.20.
|
||||
|
||||
Overview
|
||||
|
||||
Recent advances in application complexity and a desire for higher
|
||||
resolutions have pushed texture sizes up considerably. Often, the amount
|
||||
of physical memory available to a graphics processor is a limiting factor
|
||||
in the performance of texture-heavy applications. Once the available
|
||||
physical memory is exhausted, paging may occur bringing performance down
|
||||
considerably - or worse, the application may fail. Nevertheless, the amount
|
||||
of address space available to the graphics processor has increased to the
|
||||
point where many gigabytes - or even terabytes of address space may be
|
||||
usable even though that amount of physical memory is not present.
|
||||
|
||||
This extension allows the separation of the graphics processor's address
|
||||
space (reservation) from the requirement that all textures must be
|
||||
physically backed (commitment). This exposes a limited form of
|
||||
virtualization for textures. Use cases include sparse (or partially
|
||||
resident) textures, texture paging, on-demand and delayed loading of
|
||||
texture assets and application controlled level of detail.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void TexStorageSparseAMD(enum target,
|
||||
enum internalFormat,
|
||||
sizei width,
|
||||
sizei height,
|
||||
sizei depth,
|
||||
sizei layers,
|
||||
bitfield flags);
|
||||
|
||||
void TextureStorageSparseAMD(uint texture,
|
||||
enum target,
|
||||
enum internalFormat,
|
||||
sizei width,
|
||||
sizei height,
|
||||
sizei depth,
|
||||
sizei layers,
|
||||
bitfield flags);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <flags> parameter to TexStorageSparseAMD and TextureStorageSparseAMD:
|
||||
|
||||
TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001
|
||||
|
||||
Accepted by the <pname> parameter to GetInternalformativ:
|
||||
|
||||
VIRTUAL_PAGE_SIZE_X_AMD 0x9195
|
||||
VIRTUAL_PAGE_SIZE_Y_AMD 0x9196
|
||||
VIRTUAL_PAGE_SIZE_Z_AMD 0x9197
|
||||
|
||||
Accepted by the <pname> parameter to GetIntegerv, GetFloatv, GetDoublev,
|
||||
GetInteger64v, and GetBooleanv:
|
||||
|
||||
MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198
|
||||
MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199
|
||||
MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A
|
||||
|
||||
Accepted by the <pname> parameter of GetTexParameter{if}v:
|
||||
|
||||
MIN_SPARSE_LEVEL_AMD 0x919B
|
||||
|
||||
Accepted by the <pname> parameter of TexParameter{if}{v} and
|
||||
GetTexParameter{if}v:
|
||||
|
||||
MIN_LOD_WARNING_AMD 0x919C
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.2 (Core) Specification (OpenGL Operation)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.2 (Core) Specification (Rasterization)
|
||||
|
||||
Add new Subsection 3.8.3 "Texture Storage Allocation". Renumber
|
||||
subsequent sections.
|
||||
|
||||
3.8.3 Texture Storage Allocation
|
||||
|
||||
The command
|
||||
|
||||
void TexStorageSparseAMD(enum target,
|
||||
enum internalFormat,
|
||||
sizei width,
|
||||
sizei height,
|
||||
sizei depth,
|
||||
sizei layers,
|
||||
bitfield flags);
|
||||
|
||||
is used to specify the storage requirements for a texture object. <target>
|
||||
must be one of TEXTURE_1D, TEXTURE_1D_ARRAY, TEXTURE_2D, TEXTURE_RECTANGLE,
|
||||
TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, TEXTURE_CUBE_MAP_ARRAY or TEXTURE_3D
|
||||
for a one-dimensional texture, one-dimensional array texture,
|
||||
two-dimensional texture, rectangular texture, two-dimensional array texture,
|
||||
cube-map texture, cube-map array texture, or three-dimensional texture,
|
||||
respectively.
|
||||
|
||||
<width>, <height>, and <depth> determine the size of the allocated texture.
|
||||
When <target> is TEXTURE_1D or TEXTURE_1D_ARRAY, <height> and <depth> must
|
||||
be 1. When <target> is TEXTURE_2D, TEXTURE_RECTANGLE or TEXTURE_2D_ARRAY,
|
||||
<depth> must be 1. When <target> is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY,
|
||||
<width>, <height> and <depth> must be equal. For the non-array targets (TEXTURE_1D,
|
||||
TEXTURE_2D, TEXTURE_CUBE_MAP and TEXTURE_3D), <layers> must be 1, otherwise
|
||||
it specifies the number of layers in the array. <internalFormat> specifies
|
||||
the internal storage format for the texture data and must be one of the
|
||||
sized internal formats listed in Table 3.12.
|
||||
|
||||
<width>, and <height> must be less than or equal to the value of
|
||||
MAX_SPARSE_TEXTURE_SIZE_AMD, and <depth> must be less than or equal to the
|
||||
value of MAX_SPARSE_3D_TEXTURE_SIZE_AMD. <layers> must be less than or
|
||||
equal to the value of MAX_SPARSE_ARRAY_TEXTURE_LAYERS_AMD.
|
||||
|
||||
<flags> contains a bitfield that is used to control the allocation strategy
|
||||
used for the texture.
|
||||
|
||||
If <flags> contains TEXTURE_STORAGE_SPARSE_BIT_AMD, storage is reserved for
|
||||
the texture data, but not committed immediately, otherwise, storage is
|
||||
both reserved and committed at time of specification . If the texture is
|
||||
marked as sparse (and storage is therefore uncommitted), storage for the
|
||||
texture data is committed on later specification through commands such as
|
||||
TexSubImage1D, TexSubImage2D or CopyTexSubImage2D.
|
||||
|
||||
Texture image stores allocated via calls to TextStorageSparseAMD are always
|
||||
considered complete, whether or not physical backing store for all mipmap
|
||||
levels has been allocated.
|
||||
|
||||
The TextureStorageSparseAMD command operates identically to the
|
||||
TexStorageSparseAMD command except, rather than specifying storage requirements
|
||||
for the current bound texture for the texture unit indicated by the current
|
||||
active texture state and the target parameter, this command specifies storage
|
||||
requirements for the texture object named by the initial texture parameter.
|
||||
The error INVALID_VALUE is generated if <texture> is zero.
|
||||
|
||||
Add new Subsection 3.8.6 "Texture Storage Commitment and Decommitment",
|
||||
p.212. Renumber subsequent sections.
|
||||
|
||||
For texture images allocated by calling TexStorageSparseAMD or
|
||||
TextureStorageSparseAMD with a <flags> parameter which contains
|
||||
the TEXTURE_STORAGE_SPARSE_BIT_AMD, physical storage for the underlying
|
||||
texture data may not yet be committed. Commitment is made by calling
|
||||
TexSubImage1D, TexSubImage2D, TexSubImage3D, with <data> containing a value
|
||||
other than NULL. When such a command is encountered, physical storage
|
||||
for the specified region of the texture is committed and the data
|
||||
becomes resident. If <data> is NULL and no buffer is bound to the
|
||||
PIXEL_UNPACK_BUFFER binding, then the data corresponding to
|
||||
the specified region is decommitted and released to the GL. If a buffer is
|
||||
bound to the PIXEL_UNPACK_BUFFER binding point, then <data> is interpreted
|
||||
as normal - that is, if <data> is NULL, then it indicates an offset of
|
||||
zero into that buffer's data store.
|
||||
|
||||
Compressed texture data may be specified by calling CompressedTexSubImage1D,
|
||||
CompressedTexSubImage2D or CompressedTexSubImage3D. Again, physical pages
|
||||
are allocated on demand when <data> is non-NULL and freed when <data> is
|
||||
NULL and no buffer is bound to the PIXEL_UNPACK_BUFFER binding point.
|
||||
|
||||
The origin and size of committed regions must be integer multiples of the
|
||||
virtual page size in each dimension as appropriate for the specified level
|
||||
of the specified texture. The virtual page size for a sparse texture may be
|
||||
determined by calling GetInternalformativ with <pname> set to
|
||||
VIRTUAL_PAGE_SIZE_X_AMD, VIRTUAL_PAGE_SIZE_Y_AMD or VIRTUAL_PAGE_SIZE_Z_AMD
|
||||
to query the X, Y or Z dimension of the page size, respectively. Calling
|
||||
TexSubImage* or CopyTexSubImage* with <width>, <height> (for 2D and 3D
|
||||
textures) or <depth> (for 3D textures) not set to integer multiples of
|
||||
VIRTUAL_PAGE_SIZE_X_AMD, VIRTUAL_PAGE_SIZE_Y_AMD or VIRTUAL_PAGE_SIZE_Z_AMD,
|
||||
respectively, will generate an INVALID_VALUE error. An INVALID_VALUE error
|
||||
is also generated if <xoffset>, <yoffset> (for 2D and 3D textures) or
|
||||
<zoffset> (for 3D textures) is not a multiple of VIRTUAL_PAGE_SIZE_X_AMD,
|
||||
VIRTUAL_PAGE_SIZE_Y_AMD or VIRTUAL_PAGE_SIZE_Z_AMD, respectively.
|
||||
|
||||
Calling TexStorageSparseAMD or TextureStorageSparseAMD on an already
|
||||
committed texture decommits any associated storage and, if <flags>
|
||||
contains TEXTURE_STORAGE_SPARSE_BIT_AMD, returns the image store to
|
||||
fully uncommitted. Likewise, calling one of the TexImage commands
|
||||
reallocates the storage for the texture image data and commits it
|
||||
immediately.
|
||||
|
||||
When storage is committed for texture levels greater than or equal to
|
||||
the value of MIN_SPARSE_LEVEL_AMD for a sparse texture, all levels greater
|
||||
than or equal to that level become committed. The value of
|
||||
MIN_SPARSE_LEVEL_AMD may be retrieved by calling GetTexParameter{if}v with
|
||||
<pname> set to MIN_SPARSE_LEVEL_AMD. Sampling from a committed level of a
|
||||
texture that has not yet had data specified produces undefined results,
|
||||
but will not result in instability or program termination.
|
||||
|
||||
Add new paragraph heading "Effects of Texture Commitment on Completeness"
|
||||
to end of Section 3.8.17 "Texture Completeness", p.237.
|
||||
|
||||
Effects of Texture Commitment on Completeness
|
||||
|
||||
Texture images whose storage was allocated without commitment (by calling
|
||||
TexStorageSparseAMD or TextureStorageSparseAMD with a <flags> parameter
|
||||
containing TEXTURE_STORAGE_SPARSE_BIT_AMD) are always considered complete,
|
||||
regardless of their commitment status. Using such a texture image as
|
||||
the source for rendering operations produces results as described
|
||||
in sections XXX and XXX of the OpenGL Specification and section XXX
|
||||
of the OpenGL Shading Language specification.
|
||||
|
||||
User-Specified LOD Warning Thresholds
|
||||
|
||||
In addition to detecting attempts to read from uncommitted regions of a
|
||||
sparse texture, the GL can also signal to the shader that it required texels
|
||||
that reside at LODs below some user specified threshold. This may be used,
|
||||
for example, to specify a watermark and to provide feedback to an
|
||||
application before it attempts to fetch from uncommitted texture regions.
|
||||
Any attempt to fetch from lower LOD than the user-specified LOD warning
|
||||
level will generate an LOD warning, which may be detected in the shader
|
||||
by calling the sparseTexelMinLodWarning built-in function. When this
|
||||
function returns <true>, the sparseTexelLodWarningFetch function may
|
||||
be called to determine the requested LOD that generated this warning. If
|
||||
the data representing this LOD is resident, the texture read will still
|
||||
return valid texel data.
|
||||
|
||||
To specify the user-defined LOD watermark for a texture, call TexParameteri
|
||||
with <target> set to a valid texture target, and with <pname> set to
|
||||
MIN_LOD_WARNING_AMD. Setting MIN_LOD_WARNING_AMD to zero effectively
|
||||
disables the warning.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.2 (Core) Specification (Per-Fragment Operations
|
||||
and the Framebuffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.2 (Core) Specification (Special
|
||||
Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.2 (Core) Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.20, (Overview of OpenGL Shading)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.20, (Basics)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.20, (Variables and Types)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.20, (Operators and Expressions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.20, (Statement Structure)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.20 (Built-in variables)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.20, (Built-in Functions)
|
||||
|
||||
Add the Subection 8.9.3, "Uncommitted Texture Images", renumber subsequent
|
||||
sections.
|
||||
|
||||
If a standard texture function is used to sample from a region of a texture
|
||||
image where storage is uncommitted, undefined data is returned to the
|
||||
shader (although no instability results). If the application can guarantee
|
||||
that this will not occur (such as when well defined texture coordinates are
|
||||
used with a texture atlas, for example), then standard texturing functions
|
||||
may be used with partially resident textures. If there is a possibility that
|
||||
at the time of use, data in the texture may be non-resident (uncommitted),
|
||||
one of the sparse texture functions may be used to determine the residency
|
||||
status of the data.
|
||||
|
||||
The sparse texture functions return a condition code indicating the success
|
||||
of a texel fetch operation. If texture data is present at the sampled
|
||||
location, the texture data is returned in the <texel> inout parameter and
|
||||
the function returns zero. If texture data is not present at the sampled
|
||||
location, <texel> is unmodified and the function returns a non-zero status
|
||||
code. It is then the responsibility of the shader to determine the
|
||||
appropriate course of action.
|
||||
|
||||
Add the following tables to the end of Section 8.9.3:
|
||||
|
||||
Sparse texture lookup functions:
|
||||
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTexture(gsampler1D sampler, float P, | Behave as in texture(), but with |
|
||||
| inout gvec4 texel [, float bias]); | data returned in <texel> and a |
|
||||
| | status code produced as the return value |
|
||||
| int sparseTexture(gsampler2D sampler, vec2 P, | of the function. |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTexture(gsampler2DRect sampler, vec2 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTexture(gsampler3D sampler, vec3 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTexture(gsampler1DArray sampler, vec2 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTexture(gsampler2DArray sampler, vec3 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTexture(gsamplerCube sampler, vec3 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTexture(gsamplerCubeArray sampler, vec4 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureProj(gsampler1D sampler, | Behave as in textureProj(), but with |
|
||||
| vec2 P, | data returned in <texel> and a |
|
||||
| inout gvec4 texel [, float bias]); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureProj(gsampler1D sampler, | |
|
||||
| vec4 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureProj(gsampler2D sampler, | |
|
||||
| vec3 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureProj(gsampler2DRect sampler, | |
|
||||
| vec3 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureProj(gsampler2D sampler, | |
|
||||
| vec4 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureProj(gsampler2DRect sampler, | |
|
||||
| vec4 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureProj(gsampler3D sampler, | |
|
||||
| vec4 P, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureLod(gsampler1D sampler, | Behave as in textureLod(), but with |
|
||||
| float P, float lod, | data returned in <texel> and a |
|
||||
| inout gvec4 texel); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureLod(gsampler2D sampler, | |
|
||||
| vec2 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureLod(gsampler3D sampler, | |
|
||||
| vec3 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureLod(gsampler1DArray sampler, | |
|
||||
| vec2 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureLod(gsampler2DArray sampler, | |
|
||||
| vec3 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureLod(gsamplerCube sampler, | |
|
||||
| vec3 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureLod(gsamplerCubeArray sampler, | |
|
||||
| vec4 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureOffset(gsampler1D sampler, | Behave as in textureOffset(), but |
|
||||
| float P, int offset, | with data returned in <texel> and a |
|
||||
| inout gvec4 texel [, float bias]); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureOffset(gsampler2D sampler, | |
|
||||
| vec2 P, ivec2 offset, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureOffset(gsampler3D sampler, | |
|
||||
| vec3 P, ivec3 offset, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureOffset(gsampler1DArray sampler, | |
|
||||
| vec2 P, int offset, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureOffset(gsampler2DArray sampler, | |
|
||||
| vec3 P, ivec2 offset, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureProjOffset(gsampler1D sampler, | Behave as in textureProjOffset(), but |
|
||||
| vec2 P, int offset, | with data returned in <texel> and a |
|
||||
| inout gvec4 texel [, float bias]); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureProjOffset(gsampler1D sampler, | |
|
||||
| vec4 P, int offset, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureProjOffset(gsampler2D sampler, | |
|
||||
| vec3 P, ivec2 offset, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureProjOffset(gsampler2D sampler, | |
|
||||
| vec4 P, ivec2 offset, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
| | |
|
||||
| int sparseTextureProjOffset(gsampler3D sampler, | |
|
||||
| vec4 P, ivec3 offset, | |
|
||||
| inout gvec4 texel [, float bias]); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureLodOffset(gsampler1D sampler, | Behave as in textureLodOffset(), but |
|
||||
| float P, float lod, int offset, | with data returned in <texel> and a |
|
||||
| inout gvec4 texel); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureLodOffset(gsampler2D sampler, | |
|
||||
| vec2 P, float lod, ivec2 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureLodOffset(gsampler3D sampler, | |
|
||||
| vec3 P, float lod, ivec3 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureLodOffset(gsampler1DArray sampler, | |
|
||||
| vec2 P, float lod, int offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureLodOffset(gsampler2DArray sampler, | |
|
||||
| vec3 P, float lod, ivec2 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureProjLod(gsampler1D sampler, | Behave as in textureProjLod(), but |
|
||||
| vec2 P, float lod, | with data returned in <texel> and a |
|
||||
| inout gvec4 texel); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureProjLod(gsampler1D sampler, | |
|
||||
| vec4 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjLod(gsampler2D sampler, | |
|
||||
| vec3 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjLod(gsampler2D sampler, | |
|
||||
| vec4 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjLod(gsampler3D sampler, | |
|
||||
| vec4 P, float lod, | |
|
||||
| inout gvec4 texel); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureProjLodOffset(gsampler1D sampler, | Behave as in textureProjLodOffset(), but |
|
||||
| vec2 P, float lod, int offset, | with data returned in <texel> and a |
|
||||
| inout gvec4 texel); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureProjLodOffset(gsampler1D sampler, | |
|
||||
| vec4 P, float lod, int offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjLodOffset(gsampler2D sampler, | |
|
||||
| vec3 P, float lod, ivec2 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjLodOffset(gsampler2D sampler, | |
|
||||
| vec4 P, float lod, ivec2 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjLodOffset(gsampler3D sampler, | |
|
||||
| vec4 P, float lod, ivec3 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureGrad(gsampler1D sampler, float P, | Behave as in textureGrad(), but |
|
||||
| float dPdx, float dPdy, | with data returned in <texel> and a |
|
||||
| inout gvec4 texel); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureGrad(gsampler2D sampler, vec2 P, | |
|
||||
| vec2 dPdx, vec2 dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureGrad(gsampler3D sampler, vec3 P, | |
|
||||
| vec3 dPdx, vec3 dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureGrad(gsampler1DArray sampler, vec2 P, | |
|
||||
| float dPdx, float dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureGrad(gsampler2DArray sampler, vec3 P, | |
|
||||
| vec2 dPdx, vec2 dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureGrad(gsamplerCube sampler, vec3 P, | |
|
||||
| vec2 dPdx, vec2 dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureGrad(gsamplerCubeArray sampler, vec4 P, | |
|
||||
| vec2 dPdx, vec2 dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureGradOffset(gsampler1D sampler, float P, | Behave as in textureGradOffset(), but |
|
||||
| float dPdx, float dPdy, int offset, | with data returned in <texel> and a |
|
||||
| inout gvec4 texel); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureGradOffset(gsampler2D sampler, vec2 P, | |
|
||||
| vec2 dPdx, vec2 dPdy, ivec2 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureGradOffset(gsampler3D sampler, vec3 P, | |
|
||||
| vec3 dPdx, vec3 dPdy, ivec3 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureGradOffset(gsampler1DArray sampler, vec2 P, | |
|
||||
| float dPdx, float dPdy, int offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureGradOffset(gsampler2DArray sampler, vec3 P, | |
|
||||
| vec2 dPdx, vec2 dPdy, ivec2 offset, | |
|
||||
| inout gvec4 texel); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureProjGrad(gsampler1D sampler, | Behave as in textureProjGrad(), but |
|
||||
| vec2 P, float dPdx, float dPdy, | with data returned in <texel> and a |
|
||||
| inout gvec4 texel); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureProjGrad(gsampler1D sampler, | |
|
||||
| vec4 P, float dPdx, float dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjGrad(gsampler2D sampler, | |
|
||||
| vec3 P, vec2 dPdx, vec2 dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjGrad(gsampler2D sampler, | |
|
||||
| vec4 P, vec2 dPdx, vec2 dPdy, | |
|
||||
| inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjGrad(gsampler3D sampler, | |
|
||||
| vec4 P, | |
|
||||
| inout gvec4 texel); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| int sparseTextureProjGradOffset(gsampler1D sampler, vec2 P, | Behave as in textureProjGradOffset(), but |
|
||||
| float dPdx, float dPdy, | with data returned in <texel> and a |
|
||||
| int offset, inout gvec4 texel); | status code produced as the return value |
|
||||
| | of the function. |
|
||||
| int sparseTextureProjGradOffset(gsampler1D sampler, vec4 P, | |
|
||||
| float dPdx, float dPdy, | |
|
||||
| int offset, inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjGradOffset(gsampler2D sampler, vec3 P, | |
|
||||
| vec2 dPdx, vec2 dPdy, | |
|
||||
| ivec2 offset, inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjGradOffset(gsampler2D sampler, vec4 P, | |
|
||||
| vec2 dPdx, vec2 dPdy, | |
|
||||
| ivec2 offset, inout gvec4 texel); | |
|
||||
| | |
|
||||
| int sparseTextureProjGradOffset(gsampler3D sampler, vec4 P, | |
|
||||
| vec3 dPdx, vec3 dPdy, | |
|
||||
| ivec3 offset, inout gvec4 texel); | |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
|
||||
Add the following table and description.
|
||||
|
||||
The following functions may be used to interpret the status codes returned
|
||||
by the sparse texture lookup functions.
|
||||
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| Syntax | Description |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
| bool sparseTexelResident(int code); | Returns true if the texture read that |
|
||||
| | produced <code> retrieved valid data, and |
|
||||
| | false otherwise. |
|
||||
| | |
|
||||
| bool sparseTexelMinLodWarning(int code); | Returns true if the texture read that |
|
||||
| | produced <code> required a texel fetch |
|
||||
| | from any LOD lower than the user |
|
||||
| | specified LOD warning threshold. |
|
||||
| | |
|
||||
| int sparseTexelLodWarningFetch(int code); | Returns the LOD calculated by the texture |
|
||||
| | read that generated <code> and resulted |
|
||||
| | in a condition that would cause |
|
||||
| | sparseTexelMinLodWarning to return true. |
|
||||
| | If the LOD warning was not encountered, |
|
||||
| | this function returns zero. |
|
||||
+-------------------------------------------------------------------+-------------------------------------------+
|
||||
|
||||
|
||||
Additions to Chapter 9 of the OpenGL Shading Language (GLSL) Specification,
|
||||
version 4.20, (Shading Language Grammar)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_ENUM is generated by TexStorageSparseAMD
|
||||
and TextureStorageSparseAMD if <target> is not one of the supported
|
||||
texture targets.
|
||||
|
||||
INVALID_ENUM is generated by TexStorageSparseAMD
|
||||
and TextureStorageSparseAMD if <internalFormat> is not one of the
|
||||
accepted internal texture formats.
|
||||
|
||||
INVALID_VALUE is generated by TexStorageSparseAMD
|
||||
and TextureStorageSparseAMD if <height> or <depth> is not 1 and
|
||||
<target> is TEXTURE_1D or TEXTURE_1D_ARRAY.
|
||||
|
||||
INVALID_VALUE is generated by TexStorageSparseAMD
|
||||
and TextureStorageSparseAMD if <height> is not 1 and <target> is
|
||||
TEXTURE_2D, TEXTURE_RECTANGLE or TEXTURE_2D_ARRAY.
|
||||
|
||||
INVALID_VALUE is generated by TexStorageSparseAMD
|
||||
and TextureStorageSparseAMD if <width>, <height> and <depth> are not
|
||||
equal and <target> is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY.
|
||||
|
||||
INVALID_VALUE is generated by TexStorageSparseAMD
|
||||
and TextureStorageSparseAMD if <layers> is not 1 and <target> is not
|
||||
one of the ARRAY texture targets.
|
||||
|
||||
INVALID_VALUE is generated by TexStorageSparseAMD
|
||||
and TextureStorageSparseAMD if <width> or <height> is greater than the
|
||||
value of MAX_SPARSE_TEXTURE_SIZE_AMD, or if <depth> is greater than
|
||||
the value of MAX_SPARSE_3D_TEXTURE_SIZE_AMD, or if <layers> is greater
|
||||
than the value of MAX_SPARSE_ARRAY_TEXTURE_LAYERS_AMD.
|
||||
|
||||
INVALID_VALUE is generated by TexImage* and CopyTexImage* if the dimensions
|
||||
of the updated region are not integer multiples of VIRTUAL_PAGE_SIZE_X_AMD,
|
||||
VIRTUAL_PAGE_SIZE_Y_AMD (for 2D and 3D textures) and VIRTUAL_PAGE_SIZE_Z_AMD
|
||||
(for 3D textures).
|
||||
|
||||
New State
|
||||
|
||||
Append to Table 6.16, "Textures (state per texture object)"
|
||||
|
||||
+-----------------------+-------+-------------------+---------------+-------------------------------------------+-------+
|
||||
| Get Value | Type | Get Command | Initial Value | Description | Sec. |
|
||||
+-----------------------+-------+-------------------+---------------+-------------------------------------------+-------+
|
||||
| MIN_LOD_WARNING_AMD | Z+ | GetTexParameteriv | 0 | User-specified minimum LOD warning level. | 3.8.6 |
|
||||
+-----------------------+-------+-------------------+---------------+-------------------------------------------+-------+
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
Append to Table 6.42, "Implementation Dependent Values"
|
||||
|
||||
+-----------------------------------+-------+-------------+-----------------+---------------------------------------+-------+
|
||||
| Get Value | Type | Get Command | Minimum Value | Description | Sec. |
|
||||
+-----------------------------------+-------+-------------+-----------------+---------------------------------------+-------+
|
||||
| MAX_SPARSE_TEXTURE_SIZE_AMD | Z+ | GetIntegerv | 16384 | Maximum 1D/2D/rectangle texture image | 3.8.6 |
|
||||
| | | | | dimension for a sparse texture. | |
|
||||
| MAX_SPARSE_3D_TEXTURE_SIZE_AMD | Z+ | GetIntegerv | 2048 | Maximum 3D texture image dimension | 3.8.6 |
|
||||
| | | | | for a sparse texture. | |
|
||||
| MAX_SPARSE_3D_TEXTURE_SIZE_AMD | Z+ | GetIntegerv | 2048 | Maximum number of layers in a sparse | 3.8.6 |
|
||||
| | | | | array texture. | |
|
||||
+-----------------------------------+-------+-------------+-----------------+---------------------------------------+-------+
|
||||
|
||||
Issues
|
||||
|
||||
1) Are all supported texture targets exposed? Are any exposed that are not
|
||||
supported well by hardware?
|
||||
|
||||
RESOLVED: All texture targets are exposed except for multisample, and
|
||||
buffer textures.
|
||||
|
||||
2) Why do we have <depth> and <layers> separate in TexStorageSparseAMD and
|
||||
TextureStorageSparseAMD, whereas in TexImage3D, <depth> specifies the
|
||||
size of the 2D array, for example?
|
||||
|
||||
Because it's easier to validate and because I don't want to hack up my
|
||||
extension if we introduce 3D-array textures.
|
||||
|
||||
3) Does this play nice with the proposed EXT_texture_storage extension
|
||||
(which defines some very similar entry points to TexStorageSparseAMD
|
||||
and TextureStorageSparseAMD)? Can it be made to play nice?
|
||||
|
||||
RESOLVED: Yes, it should interact just fine. Unfortunately,
|
||||
EXT_texture_storage didn't introduce any mechanism to convey flags or
|
||||
allocation strategies and so those entry points could not be used here.
|
||||
Otherwise, textures allocated with TexStorage* APIs should appear as
|
||||
fully resident textures if used with sparse texture sampling functions.
|
||||
|
||||
4) Is it possible to attach a partially resident texture to an FBO and
|
||||
render into it?
|
||||
|
||||
RESOLVED: Yes, this is supported. Keep in mind, though, that data rendered
|
||||
to an attachment in areas that are not resident will be discarded and there
|
||||
is no mechanism to detect this. Also, depth, stencil and multisample
|
||||
formats are not supported by this extension.
|
||||
|
||||
5) What happens if TEXTURE_STORAGE_SPARSE_BIT_AMD is not present in
|
||||
TexStorageSparseAMD or TextureStorageSparseAMD?
|
||||
|
||||
RESOLVED: Texture storage will be both allocated and committed. The
|
||||
texture is still considered immutable and so this is mostly equivalent
|
||||
to calling the TexStorage API.
|
||||
|
||||
6) Does this extension increase the maximum supported texture size?
|
||||
|
||||
RESOLVED: No, not explicitly. The maximum supported texture size is
|
||||
still queryable by retrieving the value of MAX_TEXTURE_SIZE. A new token,
|
||||
MAX_SPARSE_TEXTURE_SIZE_AMD is added to query the maximum sparse texture
|
||||
size, which may be larger than the non-sparse maximum. However, there
|
||||
is no requirement for it to be so.
|
||||
|
||||
7) What if a larger sparse textures are supported than non-sparse textures?
|
||||
|
||||
RESOLVED: Query the maximum sparse texture size by retrieving the value
|
||||
of MAX_SPARSE_TEXTURE_SIZE_AMD.
|
||||
|
||||
8) How do you decommit (free) a region of a sparse texture?
|
||||
|
||||
RESOLVED: Call TexSubImageND with <data> set to NULL and without a
|
||||
pixel unpack buffer bound.
|
||||
|
||||
9) -
|
||||
|
||||
10) Is compression supported for sparse textures?
|
||||
|
||||
RESOLVED: Yes, but be aware that the dimensions of a single tile could
|
||||
be substantially larger when the texture is compressed.
|
||||
|
||||
11) Does this work with non-power-of-two textures?
|
||||
|
||||
RESOLVED: Yes, so long as the texture size is an integer multiple of
|
||||
the texture tile size in all dimensions.
|
||||
|
||||
12) Are multisampled sparse textures supported?
|
||||
|
||||
RESOLVED: No.
|
||||
|
||||
13) What about OUT_OF_MEMORY errors?
|
||||
|
||||
RESOLVED: OUT_OF_MEMORY errors can be reported if there isn't sufficient
|
||||
system memory to allocate internal structures (even a fully uncommitted
|
||||
sparse texture requires some internal resources), or if there isn't
|
||||
sufficient video memory to commit all requested regions.
|
||||
|
||||
The error doesn't have to be reported upon creation of a sparse texture.
|
||||
For example, allocation of two 64 GB sparse textures might succeed, but
|
||||
their simulatenous use in one draw call might result in an OUT_OF_MEMORY
|
||||
error being reported by the GL later.
|
||||
|
||||
14) Does CopyTexSubImage work with sparse textures?
|
||||
|
||||
RESOLVED: Yes.
|
||||
|
||||
15) Does GetTexImage work with sparse texture?
|
||||
|
||||
RESOLVED: Yes in general. However, the call can fail based on
|
||||
implementation-specific limitations.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
6 03/27/2012 gsellers Resolve some issues.
|
||||
Clarify interactions with PBO.
|
||||
5 03/14/2012 jobert Rename some tokens.
|
||||
Assign token values.
|
||||
4 20/04/2011 gsellers Add min-lod warning.
|
||||
Add sparse texture fetch return code built-ins.
|
||||
Add new state tables.
|
||||
Add 3D sparse texture size limit.
|
||||
Add support for cube textures and cube texture
|
||||
arrays.
|
||||
Add issues 10 and 11, remove issue 9.
|
||||
3 25/03/2011 gsellers Change required version of GL to 2.0 (or
|
||||
equivalent extensions).
|
||||
Add query for virtual page size.
|
||||
Add restrictions on page size and alignment
|
||||
during commitment.
|
||||
Add MAX_SPARSE_TEXTURE_SIZE_AMD.
|
||||
Add issues 6 through 9.
|
||||
Add MIN_SPARSE_LEVEL_AMD.
|
||||
2 25/02/2011 jobert Expanded the Issues section
|
||||
1 11/02/2011 gsellers Initial Revision
|
||||
@@ -0,0 +1,248 @@
|
||||
Name
|
||||
|
||||
AMD_stencil_operation_extended
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_stencil_operation_extended
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 01/11/2012
|
||||
Author Revision: 4
|
||||
|
||||
Number
|
||||
|
||||
413
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.0 is required.
|
||||
|
||||
The definition of this extension is affected by EXT_stencil_wrap and
|
||||
OpenGL 2.0.
|
||||
|
||||
This extension is written against the OpenGL Specification, Version 4.2
|
||||
(Core Profile).
|
||||
|
||||
Overview
|
||||
|
||||
Stencil buffers are special buffers that allow tests to be made against an
|
||||
incoming value and action taken based on that value. The stencil buffer is
|
||||
updated during rasterization, and the operation used to update the stencil
|
||||
buffer is chosen based on whether the fragment passes the stencil test,
|
||||
and if it does, whether it passes the depth test. Traditional OpenGL
|
||||
includes support for several primitive operations, such as incrementing,
|
||||
or clearing the content of the stencil buffer, or replacing it with a
|
||||
specified reference value.
|
||||
|
||||
This extension adds support for an additional set of operations that may
|
||||
be performed on the stencil buffer under each circumstance. Additionally,
|
||||
this extension separates the value used as the source for stencil
|
||||
operations from the reference value, allowing different values to be used
|
||||
in the stencil test, and in the update of the stencil buffer.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void StencilOpValueAMD(enum face, uint value);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <sfail>, <dpfail> and <dppass> parameters of StencilOp
|
||||
and StencilOpSeparate:
|
||||
|
||||
SET_AMD 0x874A
|
||||
AND 0x1501
|
||||
XOR 0x1506
|
||||
OR 0x1507
|
||||
NOR 0x1508
|
||||
EQUIV 0x1509
|
||||
NAND 0x150E
|
||||
REPLACE_VALUE_AMD 0x874B
|
||||
|
||||
Accepted by the <param> parameter of GetIntegerv, GetFloatv, GetBooleanv
|
||||
GetDoublev and GetInteger64v:
|
||||
|
||||
STENCIL_OP_VALUE_AMD 0x874C
|
||||
STENCIL_BACK_OP_VALUE_AMD 0x874D
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(OpenGL Operation)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(Per-Fragment Operations and the Framebuffer)
|
||||
|
||||
Add to the functions introduced in Section 4.1.4 "Stencil Test", p.287
|
||||
|
||||
The stencil test is controlled with
|
||||
|
||||
<leave existing functions in place>
|
||||
void StencilOpValueAMD(enum face, uint value);
|
||||
|
||||
Modify the paragraph beginning "StencilFuncSeparate and StencilOpSeparate
|
||||
take a <face> argument...", p.288
|
||||
|
||||
StencilFuncSeparate, StencilOpSeparate and StencilOpValue take a
|
||||
<face> argument which can be FRONT, BACK or FRONT_AND_BACK and indicates
|
||||
which set of state is affected.
|
||||
|
||||
Replace the second and third paragraphs on p.288, describing StencilOp and
|
||||
StencilOpSeparate with the following three paragraphs:
|
||||
|
||||
StencilOp and StencilOpSeparate take three arguments that indicate what
|
||||
happens to the stored stencil value if this or certain subsequent tests fail
|
||||
or pass. sfail indicates what action is taken if the stencil test fails.
|
||||
The inputs to the stencil operation are the stencil reference value, the
|
||||
stencil operation source value, and the current content of the stencil
|
||||
buffer. The accepted symbolic constants are KEEP, ZERO, SET_AMD, REPLACE,
|
||||
REPLACE_VALUE_AMD, INCR, DECR, INVERT, INCR_WRAP, DECR_WRAP, AND, XOR, OR,
|
||||
NOR, EQUIV, and NAND. These correspond to keeping the current value, setting
|
||||
to zero, setting to the maximum representable value, replacing with the
|
||||
reference value, replacing with the operation source value, incrementing by
|
||||
the operation source value with saturation, decrementing by the operation
|
||||
source value with saturation, bitwise inverting it, incrementing by the
|
||||
operation source value without saturation, decrementing by the operation
|
||||
source value without saturation, logically ANDing the operation source
|
||||
value value with it, logically XORing the operation source value value with
|
||||
it, logically ORing the operation source value with it, logically NORing
|
||||
the operation source value with it, logically XORing the operation source
|
||||
value with it and replacing the it with the logically inverted result of
|
||||
that computation, and logically NANDing the operation source value with it,
|
||||
respectively.
|
||||
|
||||
For purposes of increment, decrement, the stencil bits are considered
|
||||
as an unsigned integer. Incrementing or decrementing with saturation clamps
|
||||
the stencil value between 0 and the maximum representable value.
|
||||
Incrementing without saturation will wrap such that incrementing the
|
||||
content of the stencil buffer in such a way that overflow occurs will cause
|
||||
the result of the operation to be masked by the number of bits representable
|
||||
by the stencil buffer. Decrementing without saturation will wrap such that
|
||||
decrementing the content of the stencil buffer in a manner such that the
|
||||
result of the subtraction would be negative causes the two's complement
|
||||
result to be interpreted as an unsigned integer and masked to the number of
|
||||
bits representable by the stencil buffer.
|
||||
|
||||
The stencil operation source value is set by calling StencilOpValueAMD
|
||||
with <face> set to GL_FRONT, GL_BACK or GL_FRONT_AND_BACK, and <value> set
|
||||
to the new value of the stencil operation source value.
|
||||
|
||||
Modify the paragraph beginning "If the stencil test fails, the ... ", p.288
|
||||
as follows:
|
||||
|
||||
If the stencil test fails, the incoming fragment is discarded. The state
|
||||
required consists of the most recent values passed to StencilFunc or
|
||||
StencilFuncSeparate, to StencilOp or StencilOpSeparate, and to
|
||||
StencilOpValueAMD, and a bit indicating whether stencil testing is enabled
|
||||
or disabled. In the initial state, stenciling is disabled, the front and
|
||||
back reference values are both zero, the front and back stencil comparison
|
||||
functions are both ALWAYS, the front and back stencil mask are both set to
|
||||
the value 2^S - 1, where S is greater than or equal to the number of bits
|
||||
in the deepest buffer supported by the GL implementation, and the front
|
||||
and back stencil operation values are both 1. Initially, all three front
|
||||
and back stencil operations are KEEP.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(Special Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.2 (Core Profile) Specification
|
||||
(State and State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_ENUM is generated by StencilOpValueAMD if <face> is not FRONT,
|
||||
BACK or FRONT_AND_BACK.
|
||||
|
||||
New State
|
||||
|
||||
Modify Table 6.20 "Pixel Operations", p.394:
|
||||
|
||||
+--------------------------------+----------+---------------+-----------+-------------------------------------------+--------+
|
||||
| | | Get | Initial | | |
|
||||
| Get Value | Type | Command | Value | Description | Sec. |
|
||||
+--------------------------------+----------+---------------+-----------+-------------------------------------------+--------+
|
||||
| STENCIL_FAIL | Z16 | GetIntegerv | KEEP | Front stencil fail action | 4.1.4 |
|
||||
| STENCIL_PASS_DEPTH_FAIL | Z16 | GetIntegerv | KEEP | Front stencil depth buffer fail action | 4.1.4 |
|
||||
| STENCIL_PASS_DEPTH_PASS | Z16 | GetIntegerv | KEEP | Front stencil depth buffer pass action | 4.1.4 |
|
||||
| STENCIL_BACK_FAIL | Z16 | GetIntegerv | KEEP | Back stencil fail action | 4.1.4 |
|
||||
| STENCIL_BACK_PASS_DEPTH_FAIL | Z16 | GetIntegerv | KEEP | Back stencil depth buffer fail action | 4.1.4 |
|
||||
| STENCIL_BACK_PASS_DEPTH_PASS | Z16 | GetIntegerv | KEEP | Back stencil depth buffer pass action | 4.1.4 |
|
||||
| STENCIL_OP_VALUE_AMD | Z+ | GetIntegerv | 1 | Front stencil operation value | 4.1.4 |
|
||||
| STENCIL_BACK_OP_VALUE_AMD | Z+ | GetIngeterv | 1 | Back stencil operation value | 4.1.4 |
|
||||
+--------------------------------+----------+---------------+-----------+-------------------------------------------+--------+
|
||||
|
||||
NOTE: The existing STENCIL{_BACK}_{*} enumerants change have changed from Z8 to Z16.
|
||||
|
||||
Dependencies on EXT_stencil_wrap
|
||||
|
||||
If EXT_stencil_wrap is not supported, remove references to INCR_WRAP and
|
||||
DECR_WRAP. Also, change the definition of the STENCIL_{*} state to Z14
|
||||
rather than Z16.
|
||||
|
||||
Dependencies on OpenGL 2.0
|
||||
|
||||
If the GL version is less than 2.0, remove all references to
|
||||
StencilOpSeparate. Furthermore, the <face> parameter to StencilOpValueAMD
|
||||
must be FRONT_AND_BACK, otherwise an INVALID_ENUM error will be generated.
|
||||
|
||||
Issues
|
||||
|
||||
1) Is the stencil mask applied to the stencil operation value?
|
||||
|
||||
RESOLVED: No, only to the reference and current values before the test.
|
||||
The stencil operation is carried out on the full value. The stencil write
|
||||
mask is applied to the result during stencil buffer update, however.
|
||||
|
||||
2) Is this really backwards compatible? Does it break OpenGL?
|
||||
|
||||
RESOLVED: Yes, this is backwards compatible and does not break anything.
|
||||
The INCR{_WRAP} and DECR{_WRAP} operations have been semantically redefined
|
||||
to be generalized add and subtract operations. However, the stencil
|
||||
operation source value is used in the addition operation and its default is
|
||||
1. Therefore, in the default state (assuming the stencil operation source
|
||||
value is not changed), INCR and DECR still increment and decrement by 1.
|
||||
|
||||
3) What if I want to apply a logical operation with the stencil reference
|
||||
value and the current stencil buffer contents?
|
||||
|
||||
RESOLVED: Set the stencil operation source value to the same thing as the
|
||||
stencil reference value.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- ---------- -------- -----------------------------------------
|
||||
4 01/11/2012 gsellers Update for OpenGL 4.2. Prepare for posting.
|
||||
3 12/17/2010 yunzhang update enum definitions
|
||||
2 06/10/2010 gsellers Add separate stencil op value. Add issues.
|
||||
1 06/08/2010 gsellers Initial revision
|
||||
@@ -0,0 +1,306 @@
|
||||
Name
|
||||
|
||||
AMD_texture_gather_bias_lod
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_texture_gather_bias_lod
|
||||
|
||||
Contact
|
||||
|
||||
Rex Xu, AMD (Rex.Xu 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Rex Xu, AMD
|
||||
Timothy Lottes, AMD
|
||||
Qun Lin, AMD
|
||||
Daniel Rakos, AMD
|
||||
Graham Sellers, AMD
|
||||
Dominik Witczak, AMD
|
||||
Matthäus G. Chajdas, AMD
|
||||
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 05/10/2017
|
||||
Author Revision: 5
|
||||
|
||||
Number
|
||||
|
||||
502
|
||||
|
||||
Dependencies
|
||||
|
||||
This extension is written against the OpenGL 4.5 (Core Profile) Specification.
|
||||
|
||||
This extension is written against version 4.50 of the OpenGL Shading Language Specification.
|
||||
|
||||
OpenGL 4.0 and GLSL 4.00 are required.
|
||||
|
||||
This extension interacts with ARB_sparse_texture2.
|
||||
|
||||
Overview
|
||||
|
||||
This extension was developed based on existing built-in texture gather functions to allow
|
||||
implementations supporting bias of implicit level of detail and explicit control of level of
|
||||
detail in texture gather operations.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Modifications to the OpenGL Shading Language Specification, Version 4.50
|
||||
|
||||
Including the following line in a shader can be used to control the language features described
|
||||
in this extension:
|
||||
|
||||
#extension GL_AMD_texture_gather_bias_lod : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.3.
|
||||
|
||||
New preprocessor #defines are added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_AMD_texture_gather_bias_lod 1
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language Specification (Built-in Functions)
|
||||
|
||||
Modify Section 8.9.3 Texture Gather Functions
|
||||
|
||||
(modify the first sentence of the first paragraph on p. 170)
|
||||
|
||||
The texture gather functions take components of a single floating-point vector operand as a
|
||||
texture coordinate, determine a set of four texels to sample either from the base level of
|
||||
detail and its bias (if present) of the specified texture image or from the explicit level of
|
||||
detail (if present) of this texture image, and return one component from each texel in a four-
|
||||
component result vector.
|
||||
|
||||
(modify certain functions in the "Syntax" table cell of each gather function group, adding
|
||||
an optional <bias> parameter for those sampler types: gsampler2D, gsampler2DArray,
|
||||
gsamplerCube, gsamplerCubeArray, and modify four-texel sampling formulas in the "Description"
|
||||
table cell of textureGather() on p. 171-172)
|
||||
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| Syntax | Description |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| gvec4 textureGather(gsampler2D sampler, vec2 P [, int comp | Returns the value |
|
||||
| [, float bias]]) | |
|
||||
| gvec4 textureGather(gsampler2DArray sampler, vec3 P | gvec4( |
|
||||
| [, int comp [, float bias]]) | Sample_i0_j1( |
|
||||
| gvec4 textureGather(gsamplerCube sampler, vec3 P | P, base, bias).comp, |
|
||||
| [, int comp [, float bias]]) | Sample_i1_j1( |
|
||||
| gvec4 textureGather(gsamplerCubeArray sampler, vec4 P | P, base, bias).comp, |
|
||||
| [, int comp [, float bias]]) | Sample_i1_j0( |
|
||||
| ... | P, base, bias).comp, |
|
||||
| | Sample_i0_j0( |
|
||||
| | P, base, bias).comp) |
|
||||
| | ... |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| gvec4 textureGatherOffset(gsampler2D sampler, vec2 P, | Perform a texture gather |
|
||||
| ivec2 offset [, int comp | operation as in |
|
||||
| [, float bias]]) | textureGather() by <offset> |
|
||||
| gvec4 textureGatherOffset(gsampler2DArray sampler, vec3 P, | as described in |
|
||||
| ivec2 offset [, int comp | textureOffset() except that |
|
||||
| [, float bias]]) | the <offset> can be variable |
|
||||
| ... | (non constant) and ... |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| gvec4 textureGatherOffsets(gsampler2D sampler, vec2 P, | Operate identically to |
|
||||
| ivec2 offsets[4] [, int comp | textureGatherOffset() except |
|
||||
| [, float bias]]) | that <offsets> is used to |
|
||||
| gvec4 textureGatherOffsets(gsampler2DArray sampler, vec3 P, | determine the location of the|
|
||||
| ivec2 offsets[4] [, int comp | four texels to sample. ... |
|
||||
| [, float bias]]) | |
|
||||
| ... | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
|
||||
(insert new gather function table cells, at the end of the section, p. 172)
|
||||
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| Syntax | Description |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| gvec4 textureGatherLodAMD(gsampler2D sampler, vec2 P, | Perform a texture gather |
|
||||
| float lod [, int comp]) | operation as in |
|
||||
| gvec4 textureGatherLodAMD(gsampler2DArray sampler, vec3 P, | textureGather() with explicit|
|
||||
| float lod [, int comp]) | LOD, but the four-texel |
|
||||
| gvec4 textureGatherLodAMD(gsamplerCube sampler, vec3 P, | sampling is modified as |
|
||||
| float lod [, int comp]) | follow: |
|
||||
| gvec4 textureGatherLodAMD(gsamplerCubeArray sampler, vec4 P, | |
|
||||
| float lod [, int comp]) | gvec4( |
|
||||
| | Sample_i0_j1(P, lod).comp, |
|
||||
| | Sample_i1_j1(P, lod).comp, |
|
||||
| | Sample_i1_j0(P, lod).comp, |
|
||||
| | Sample_i0_j0(P, lod).comp) |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| gvec4 textureGatherLodOffsetAMD(gsampler2D sampler, vec2 P, | Perform a texture gather |
|
||||
| float lod, ivec2 offset | operation as in |
|
||||
| [, int comp]) | textureGatherOffset() but |
|
||||
| gvec4 textureGatherLodOffsetAMD(gsampler2DArray sampler, | with explicit LOD. |
|
||||
| vec3 P, float lod, | |
|
||||
| ivec2 offset [, int comp]) | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| gvec4 textureGatherLodOffsetsAMD(gsampler2D sampler, vec2 P, | Perform a texture gather |
|
||||
| float lod, ivec2 offsets[4] | operation as in |
|
||||
| [, int comp]) | textureGatherOffsets() but |
|
||||
| gvec4 textureGatherLodOffsetsAMD(gsampler2DArray sampler, | with explicit LOD. |
|
||||
| vec3 P, float lod, | |
|
||||
| ivec2 offsets[4] | |
|
||||
| [, int comp]) | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
|
||||
Dependencies on ARB_sparse_texture2
|
||||
|
||||
If the shader enables ARB_sparse_texture2, this extension modifies certain variants of
|
||||
sparseTextureGather*(), adding optional <bias> parameter for those sampler types: gsampler2D,
|
||||
gsampler2DArray, gsamplerCube, gsamplerCubeArray.
|
||||
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| Syntax | Description |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| int sparseTextureGatherARB(gsampler2D sampler, vec2 P, | Do a texture gather operation|
|
||||
| out gvec4 texel [, int comp | as in textureGather(), but |
|
||||
| [, float bias]]) | return texture access |
|
||||
| int sparseTextureGatherARB(gsampler2DArray sampler, vec3 P, | residency information from |
|
||||
| out gvec4 texel [, int comp | the function and the filtered|
|
||||
| [, float bias]]) | lookup result in the out |
|
||||
| int sparseTextureGatherARB(gsamplerCube sampler, vec3 P, | parameter <texel>. |
|
||||
| out gvec4 texel [, int comp | |
|
||||
| [, float bias]]) | |
|
||||
| int sparseTextureGatherARB(gsamplerCubeArray sampler, vec4 P,| |
|
||||
| out gvec4 texel [, int comp | |
|
||||
| [, float bias]]) | |
|
||||
| ... | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| int sparseTextureGatherOffsetARB(gsampler2D sampler, vec2 P, | Do a texture gather operation|
|
||||
| ivec2 offset, | as in textureGatherOffset(), |
|
||||
| out gvec4 texel | but return texture access |
|
||||
| [, int comp [, float bias]])| residency information from |
|
||||
| int sparseTextureGatherOffsetARB(gsampler2DArray sampler, | the function and the filtered|
|
||||
| vec3 P, ivec2 offset, | lookup result in the out |
|
||||
| out gvec4 texel | parameter <texel>. |
|
||||
| [, int comp [, float bias]])| |
|
||||
| ... | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| int sparseTextureGatherOffsetsARB(gsampler2D sampler, vec2 P,| Do a texture gather operation|
|
||||
| ivec2 offsets[4], | as in textureGatherOffsets(),|
|
||||
| out gvec4 texel | but return texture access |
|
||||
| [, int comp | residency information from |
|
||||
| [, float bias]]) | the function and the filtered|
|
||||
| int sparseTextureGatherOffsetsARB(gsampler2DArray sampler, | lookup result in the out |
|
||||
| vec3 P, ivec2 offsets[4], | parameter <texel>. |
|
||||
| out gvec4 texel | |
|
||||
| [, int comp | |
|
||||
| [, float bias]]) | |
|
||||
| ... | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
|
||||
Meanwhile, this extension adds additional texture gather functions as follow if the shader
|
||||
enables ARB_sparse_texture2, providing explicit control of level of detail.
|
||||
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| Syntax | Description |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| int sparseTextureGatherLodAMD(gsampler2D sampler, vec2 P, | Do a texture gather operation|
|
||||
| float lod, out gvec4 texel | as in textureGather() with, |
|
||||
| [, int comp]) | explicit LOD, but return |
|
||||
| int sparseTextureGatherLodAMD(gsampler2DArray sampler, | texture access residency |
|
||||
| vec3 P, float lod, | information from the function|
|
||||
| out gvec4 texel [, int comp]) | and the filtered lookup |
|
||||
| int sparseTextureGatherLodAMD(gsamplerCube sampler, vec3 P, | result in the out parameter |
|
||||
| float lod, out gvec4 texel | <texel>. |
|
||||
| [, int comp]) | |
|
||||
| int sparseTextureGatherLodAMD(gsamplerCubeArray sampler, | |
|
||||
| vec4 P, float lod, | |
|
||||
| out gvec4 texel [, int comp]) | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| int sparseTextureGatherLodOffsetAMD(gsampler2D sampler, | Do a texture gather operation|
|
||||
| vec2 P, float lod, | as in textureGatherOffset() |
|
||||
| ivec2 offset, | with explicit LOD, but return|
|
||||
| out gvec4 texel | texture access residency |
|
||||
| [, int comp]) | information from the function|
|
||||
| int sparseTextureGatherLodOffsetAMD(gsampler2DArray sampler, | and the filtered lookup |
|
||||
| vec3 P, float lod, | result in the out parameter |
|
||||
| ivec2 offset, | <texel>. |
|
||||
| out gvec4 texel | |
|
||||
| [, int comp]) | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
| int sparseTextureGatherLodOffsetsAMD(gsampler2D sampler, | Do a texture gather operation|
|
||||
| vec2 P, float lod, | as in textureGatherOffsets() |
|
||||
| ivec2 offsets[4], | with explicit LOD, but return|
|
||||
| out gvec4 texel | texture access residency |
|
||||
| [, int comp]) | information from the function|
|
||||
| int sparseTextureGatherLodOffsetsAMD(gsampler2DArray sampler,| and the filtered lookup |
|
||||
| vec3 P, float lod, | result in the out parameter |
|
||||
| ivec2 offsets[4], | <texel>. |
|
||||
| out gvec4 texel | |
|
||||
| [, int comp]) | |
|
||||
+--------------------------------------------------------------+------------------------------+
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
(1) Could you explain the function syntax since <bias> is added as another optional parameter?
|
||||
|
||||
RESOLVED: This extension adds <bias> as another optional parameter apart from the existing
|
||||
parameter <comp>. The function syntax is somewhat similar to rules of default parameters in
|
||||
C++. To be exact, when <comp> is not specified, <bias> should not be specified as well; when
|
||||
<comp> is specified, <bias> could be specified or not. For example,
|
||||
|
||||
uniform sampler2D samp2D;
|
||||
|
||||
vec2 P;
|
||||
int comp;
|
||||
float bias;
|
||||
|
||||
...
|
||||
|
||||
textureGather(samp2D, P); // legal, both comp and bias are not specified
|
||||
textureGather(samp2D, P, bias); // illegal, bias is specified while comp is not
|
||||
textureGather(samp2D, P, comp); // legal, comp is specified while bias is not
|
||||
textureGather(samp2D, p, comp, bias); // legal both comp and bias are specified
|
||||
|
||||
(2) Which level-of-detail do texture gather functions use, if the extension is defined?
|
||||
|
||||
RESOLVED: If GL_AMD_texture_gather_bias_lod extension is *enabled*, *all* texture
|
||||
gather functions (ie. the ones which do not take the extra bias argument and
|
||||
the ones that do) fetch texels from implicit LOD in fragment shader stage. In all
|
||||
other shader stages, base level is used instead.
|
||||
|
||||
If the extension is *disabled*, all texture gather functions always fetch texels
|
||||
from the base mip level.
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- ---------------------------------------------------------------------
|
||||
5 05/10/17 dwitczak Added issue 2.
|
||||
|
||||
4 01/24/17 dwitczak Fix sparseTextureGatherOffsetsARB() and
|
||||
sparseTextureGatherLodOffsetAMD() function prototypes.
|
||||
|
||||
3 11/17/16 rexu Clarify that when <bias> parameter is specified, the optional <comp>
|
||||
parameter, prior to <bias>, should be specified as well based on
|
||||
the calling rules of default parameters.
|
||||
|
||||
2 11/16/16 rexu Add the interaction with ARB_sparse_texture2.
|
||||
|
||||
1 11/15/16 rexu Initial draft.
|
||||
@@ -0,0 +1,299 @@
|
||||
Name
|
||||
|
||||
AMD_texture_texture4
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_texture_texture4
|
||||
|
||||
Contact
|
||||
|
||||
Bill Licea-Kane, AMD ( Bill.Licea-Kane 'at' amd.com )
|
||||
|
||||
Contributors
|
||||
|
||||
Pierre Boudier
|
||||
Eric Boumaour
|
||||
Alex Chalfin
|
||||
Nick Haemel
|
||||
Evan Hart
|
||||
Bill Licea-Kane
|
||||
Benj Lipchak
|
||||
Lijun Qu
|
||||
|
||||
Status
|
||||
|
||||
Complete
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: Mar 6, 2009
|
||||
Revision: 6
|
||||
|
||||
Number
|
||||
|
||||
362
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.1 is required.
|
||||
|
||||
The extension is written against the OpenGL 2.0 Specification.
|
||||
|
||||
The extension is written against the OpenGL Shading Language V 1.20
|
||||
Specification.
|
||||
|
||||
This extension interacts with EXT_texture_anisotropic.
|
||||
|
||||
|
||||
Overview
|
||||
|
||||
This extension adds new shading language built-in texture functions
|
||||
to the shading language.
|
||||
|
||||
These texture functions may be used to access one component textures.
|
||||
|
||||
The texture4 built-in function returns a texture value derived from
|
||||
a 2x2 set of texels in the image array of level levelbase is selected.
|
||||
These texels are selected in the same way as when the value of
|
||||
TEXTURE_MIN_FILTER is LINEAR, but instead of these texels being
|
||||
filtered to generate the texture value, the R, G, B and A texture values
|
||||
are derived directly from these four texels.
|
||||
|
||||
IP Status
|
||||
|
||||
No known claims.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL
|
||||
Operation)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
|
||||
|
||||
Add to section 3.8.8 (P. 174, Prior to "And for a one-dimensional texture"):
|
||||
|
||||
"For a texture4 built-in function (see OpenGL Shading Language), a 2x2 set
|
||||
of texels in the image array of level levelbase is selected. These
|
||||
texels are selected in the same way as when the value of TEXTURE_MIN_FILTER
|
||||
is LINEAR, but instead of these texels being filtered to generate the
|
||||
texture value, the R, G, B and A texture values are derived directly
|
||||
from these four texels,
|
||||
|
||||
TauR = Taui0j1 (3.26a)
|
||||
TauG = Taui1j1
|
||||
TauB = Taui1j0
|
||||
TauA = Taui0j0
|
||||
|
||||
___________________________________________________________________
|
||||
| |
|
||||
| 1.0 +---+---+---+---+---+---+---+---+ |
|
||||
| 7| | | | | | | | | |
|
||||
| +---+---+---+---+---+---+---+---+ |
|
||||
| 6| | | | | | R | G | | |
|
||||
| +---+---+---+---+---+---+---+---+ |
|
||||
| 5| | | | | | A | B | | |
|
||||
| +---+---+---+---+---+---+---+---+ |
|
||||
| 4| | | | | | | | | |
|
||||
| +---+---+---+---+---+---+---+---+ |
|
||||
| 3| | | | | | | | | |
|
||||
| +---+---+---+---+---+---+---+---+ |
|
||||
| 2| | | | | | | | | |
|
||||
| +---+---+---+---+---+---+---+---+ |
|
||||
| 1| | | | | | | | | |
|
||||
| +---+---+---+---+---+---+---+---+ |
|
||||
| 0| | | | | | | | | |
|
||||
| 0.0 +---+---+---+---+---+---+---+---+ |
|
||||
| 0 1 2 3 4 5 6 7 |
|
||||
| 0.0 1.0 |
|
||||
| |
|
||||
| Figure 3.10a. An example of an 8x8 texture image and the |
|
||||
| components returned for texture4. |
|
||||
| |
|
||||
|_________________________________________________________________|
|
||||
|
||||
|
||||
To achieve this packing, the use of texture4 is
|
||||
restricted to textures with a single component base internal format of
|
||||
ALPHA, DEPTH_COMPONENT, INTENSITY, or LUMINANCE and cannot be used
|
||||
with a three-dimensional texture (see section 3.8.10)."
|
||||
|
||||
Add to caption of Table 3.21 (p. 184)
|
||||
|
||||
"If the texture4 built-in function is used to access a sampler,
|
||||
texture source components are derived as if the Texture Base
|
||||
Internal Format is RGBA.
|
||||
|
||||
Add to Section 3.11.2, Shader Execution, Texture Access
|
||||
(p. 195) Prior to paragraph beginning "If a fragment shader uses a sampler..."
|
||||
|
||||
Texture4 lookups must be consistent with the texture state; the
|
||||
results of the texture4 lookup are undefined if:
|
||||
|
||||
- The base internal format of the texture not one of ALPHA,
|
||||
DEPTH_COMPONENT, INTENSITY, or LUMINANCE.
|
||||
|
||||
- The wrap modes is not either CLAMP_TO_EDGE or REPEAT.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 2.0 Specification (Special
|
||||
Functions)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 2.0 Specification (State and
|
||||
State Requests)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 1 of the OpenGL Shading Language 1.20 Specification
|
||||
(Introduction)
|
||||
|
||||
Additions to Chapter 2 of the OpenGL Shading Language 1.20 Specification
|
||||
(Overview of OpenGL Shading)
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language 1.20 Specification
|
||||
(Basics)
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language 1.20 Specification
|
||||
(Variables and Types)
|
||||
|
||||
Additions to Chapter 5 of the OpenGL Shading Language 1.20 Specification
|
||||
(Operators and Expressions)
|
||||
|
||||
Additions to Chapter 6 of the OpenGL Shading Language 1.20 Specification
|
||||
(Statements and Structure)
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language 1.20 Specification
|
||||
(Built-in Variables)
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language 1.20 Specification
|
||||
(Built-in Functions)
|
||||
|
||||
Add to 8.7, Texture Lookup Functions
|
||||
(p. 85) prior to paragraph beginning "In all functions below..."
|
||||
|
||||
Add to 8.7, Texture Lookup Functions,
|
||||
(p. 85) to the texture built-in function table:
|
||||
|
||||
Syntax
|
||||
vec4 texture4( sampler2D sampler, vec2 coord)
|
||||
Description
|
||||
Use the texture coordinate coord to do a texture lookup
|
||||
in the 2D texture currently bound to sampler, and return
|
||||
the four nearest (unfiltered) texels.
|
||||
|
||||
Additions to Chapter 9 of the OpenGL Shading Language 1.20 Specification
|
||||
(Shading Language Grammar)
|
||||
|
||||
Additions to Chapter 10 of the OpenGL Shading Language 1.20
|
||||
Specification (Issues)
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None
|
||||
|
||||
Interactions with EXT_texture_filter_anisotropic
|
||||
|
||||
Texture4 is not an area filter. No LOD calculations are performed
|
||||
and only texels in the baselevel can be returned.
|
||||
|
||||
Therefore, for the texture4 built-in function the preferred implementation
|
||||
would sample four texels even if TEXTURE_MAX_ANISOTROPY_EXT is greater than 1.0.
|
||||
|
||||
Issues
|
||||
|
||||
1) How is this related to ATI_texture_nearest_four?
|
||||
|
||||
ATI_texture_nearest_four only set texture filter state.
|
||||
|
||||
This extension adds built-in functions to the shading language
|
||||
that will fetch four texels from the baselevel.
|
||||
|
||||
2) What about extending this to allow texture4 fetches from
|
||||
RG, RGB, and RGBA textures?
|
||||
|
||||
Resolution - defer. This extension only fetches from one component
|
||||
textures.
|
||||
|
||||
3) What about the use of this extension with fixed function?
|
||||
|
||||
Resolution - The built-in functions are added to the shading
|
||||
language only. There is no ability to fetch four texels in
|
||||
fixed function.
|
||||
|
||||
4) What naming convention do we use for the new texture built-in
|
||||
functions?
|
||||
|
||||
Resolution - Even though this extension is written against
|
||||
OpenGL Shading Language 1.20, we use the naming convention
|
||||
for OpenGL Shading Language 1.30.
|
||||
|
||||
5) Should we add built-in texture functions for:
|
||||
* Fetch4 with Absolute LOD?
|
||||
* Fetch4 with Relative LOD?
|
||||
* Fetch4 with coordinate offsets?
|
||||
* Fetch4 with compare?
|
||||
|
||||
Resolved - No.
|
||||
|
||||
6) If the texture is not a single component, or if the
|
||||
wrap modes are not clamp_to_edge or repeat, is the texture
|
||||
treated as incomplete, or are the values returned by the
|
||||
texture4 built-in undefined?
|
||||
|
||||
Unresolved. This draft makes them undefined.
|
||||
|
||||
7) Can both texture *AND* texture4 built-in functions
|
||||
sample from the same sampler in a shader?
|
||||
|
||||
No.
|
||||
|
||||
Revision History:
|
||||
|
||||
Date: 03/06/2008
|
||||
Revision: 6 (wwlk)
|
||||
Remove redundant <CR><LF>s (Apple v Microsoft)
|
||||
|
||||
Date: 03/04/2008
|
||||
Revision: 5 (wwlk)
|
||||
General cleanup for posting to registry.
|
||||
|
||||
Date: 01/15/2009
|
||||
Revision: 4 (wwlk)
|
||||
Updated IP Status.
|
||||
|
||||
Date: 06/24/2008
|
||||
Revision: 3 (wwlk)
|
||||
Deleted mip-mapping section. (Inadvertent undelete.)
|
||||
|
||||
Date: 06/24/2008
|
||||
|
||||
Revision: 2 (wwlk)
|
||||
Dropped texture filter state.
|
||||
Document restrictions of texture4. (Baselevel only.)
|
||||
|
||||
|
||||
Date: 06/18/2008
|
||||
Revision: 1 (wwlk)
|
||||
1st draft derived from ATI_texture_nearest_four
|
||||
@@ -0,0 +1,114 @@
|
||||
Name
|
||||
|
||||
AMD_transform_feedback3_lines_triangles
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_transform_feedback3_lines_triangles
|
||||
|
||||
Contributors
|
||||
|
||||
Eric Zolnowski, AMD
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete. Shipping in ATI Catalyst 10.6 Drivers.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 03/22/2010
|
||||
Author Revision: 1
|
||||
|
||||
Number
|
||||
|
||||
397
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 4.0 or ARB_transform_feedback3 is required.
|
||||
|
||||
This extension is written against the OpenGL 4.0 (Core) Specification.
|
||||
|
||||
Overview
|
||||
|
||||
OpenGL 4.0 introduced the ability to record primitives into multiple output
|
||||
streams using transform feedback. However, the restriction that all streams
|
||||
must output POINT primitives when more than one output stream is active was
|
||||
also introduced. This extension simply removes that restriction, allowing
|
||||
the same set of primitives to be used with multiple transform feedback
|
||||
streams as with a single stream.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.0 (Core) Specification (OpenGL Operation)
|
||||
|
||||
Modify Section 2.13.4 "Geometry Shader Execution Environment"
|
||||
|
||||
Replace the last paragraph of the subsection titled "Geometry Shader
|
||||
Vertex Streams", p.119, with the following:
|
||||
|
||||
Geometry shaders that emit vertices into multiple vertex streams are
|
||||
currently limited to using the same output primitive type on all streams.
|
||||
A program will fail to link if it includes a geometry shader that calls
|
||||
the EmitStreamVertex buit-in function and has two or more output streams
|
||||
with different primitive types.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.0 (Core) Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.0 (Core) Specification (Per-Fragment Operations
|
||||
and the Framebuffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.0 (Core) Specification (Special
|
||||
Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.0 (Core) Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
None.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
1 03/22/2010 gsellers Initial draft
|
||||
@@ -0,0 +1,291 @@
|
||||
Name
|
||||
|
||||
AMD_transform_feedback4
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_transform_feedback4
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers, AMD
|
||||
Eric Zolnowski, AMD
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers (graham.sellers 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Shipping
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 31/04/2014
|
||||
Author Revision: 5
|
||||
|
||||
Number
|
||||
|
||||
OpenGL Extension #450
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 4.0 or ARB_transform_feedback3 is required.
|
||||
|
||||
This extension is written against the OpenGL Specification, Version 4.4
|
||||
(Core Profile).
|
||||
|
||||
This extension is written against the OpenGL Shading Language (GLSL)
|
||||
Specification, Version 4.40
|
||||
|
||||
Overview
|
||||
|
||||
Transform feedback is a mechanism to record the output of the vertex,
|
||||
tessellation evaluation or geometry shader into one or more buffers for
|
||||
further processing, recursive rendering or read-back by the client.
|
||||
ARB_transform_feedback3 (and OpenGL 4.0) extended the transform feedback
|
||||
subsystem to allow multiple streams of primitive information to be
|
||||
captured. However, it imposed a limitation that the primitive type for all
|
||||
streams must be POINTS if more than one stream is to be captured.
|
||||
AMD_transform_feedback3_lines_triangles relaxed that restriction to allow
|
||||
lines or triangles to be captured, in the case where multiple streams are
|
||||
to be processed. However, it still required that all streams share the same
|
||||
primitive type. Additionally, with all current extensions to transform
|
||||
feedback, only a single primitive stream may be rasterized.
|
||||
|
||||
This extension enhances transform feedback in two significant ways. First,
|
||||
it allows multiple transform feedback streams to be captured, each with its
|
||||
own, independent primitve type. Second, it allows any combination of streams
|
||||
to be rasterized. As an example, this enables the geometry shader to take
|
||||
a single stream of triangle geometry and emit filled triangles with a
|
||||
wireframe outline and a point at each vertex, all in a single pass through
|
||||
the input vertices. Combined with features such those provided by
|
||||
ARB_viewport_array, layered rendering, shader subroutines and so on, an
|
||||
application can render several views of its geoemtry, each with a
|
||||
radically different style, all in a single pass.
|
||||
|
||||
IP Status
|
||||
|
||||
None.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of Enablei, Disablei and IsEnabledi:
|
||||
|
||||
STREAM_RASTERIZATION_AMD 0x91A0
|
||||
|
||||
Additions to Chapter 11 of the OpenGL 4.4 (Core Profile) Specification
|
||||
(Programmable Vertex Processing)
|
||||
|
||||
Modify subsection 11.3.4.3, "Geometry Shader Vertex Streams":
|
||||
|
||||
Replace the second to last paragraph of the subsection with:
|
||||
|
||||
The primitives emitted to all vertex streams are passed to the transform
|
||||
feedback stage to be captured and written to buffer objects in the manner
|
||||
specified by the transform feedback state. The primitives emitted to vertex
|
||||
streams for which rasterization is enabled are then passed to subsequent
|
||||
pipeline stages for clipping, rasterization, and subsequent fragment
|
||||
processing.
|
||||
|
||||
Replace the last paragraph of the subsection with:
|
||||
|
||||
Geometry shaders that emit vertices to multiple vertex streams may
|
||||
generate a different primitive type on each stream. Any combination of
|
||||
streams may be rasterized (see Section 3.1). This allows a geometry shader
|
||||
to transform a single input vertex stream into multiple primitives of
|
||||
different types, all of which may be rasterized.
|
||||
|
||||
Additions to Chapter 14 of the OpenGL 4.4 (Core Profile) Specification
|
||||
(Fixed-Function Primitive Assembly and Rasterization)
|
||||
|
||||
Modify Section 14.1 "Discarding Primitives Before Rasterization", p. 409:
|
||||
|
||||
Primitives sent to any vertex stream (see section 13.2) may be processed
|
||||
further. When geometry shaders are disabled, all vertices are considered
|
||||
to be emitted to stream zero.
|
||||
Primitives can be optionally discarded before rasterization but after
|
||||
the optional transform feedback stage (see section 13.2). All primitives
|
||||
may be discarded by calling Enable with RASTERIZER_DISCARD. When enabled,
|
||||
primitives emitted to any stream are discarded. When enabled,
|
||||
RASTERIZER_DISCARD also causes the Clear and ClearBuffer* commands to be
|
||||
ignored. When RASTERIZER_DISCARD is disabled, primitives emitted on streams
|
||||
for which rasterization is enabled are passed through to the rasterization
|
||||
stage to be processed normally. Rasterization for specific streams may be
|
||||
enabled by calling Enablei (or disabled by calling Disablei) with the
|
||||
constant STREAM_RASTERIZATION_AMD and the index of the selected stream.
|
||||
Initially, rasterization is enabled for stream zero and is disabled for all
|
||||
other streams.
|
||||
If primitives are emitted on more than one stream for which
|
||||
rasterization is enabled, the order of rasterization of primitives on
|
||||
different streams is undefined. However, it is guaranteed that all
|
||||
primitives emitted on a single stream are rasterized in the order in which
|
||||
they are generated, and that all primitives generated by a single invocation
|
||||
of a geometry shader are rasterized in stream order, starting with the
|
||||
lowest numbered stream.
|
||||
|
||||
Additions to Chapter 15 of the OpenGL 4.4 (Core Profile) Specification
|
||||
(Programmable Fragment Processing)
|
||||
|
||||
Modify Section 15.2, "Shader Execution"
|
||||
|
||||
Insert the following paragraph to subsection 15.2.2, "Shader Inputs",
|
||||
after the paragraph describing gl_SamplePosition on p. 433:
|
||||
|
||||
The built-in read-only variable gl_StreamID contains the index of the
|
||||
vertex stream from which the vertices forming the primitive currently being
|
||||
rasterized were taken. User defined input varying variables belonging to
|
||||
this stream have defined values, whilst all other user defined input
|
||||
variables are undefined. When no geometry shader is active, gl_StreamID
|
||||
is zero. When a geometry shader is active and writes to multiple output
|
||||
vertex streams for which rasterization is enabled, gl_StreamID may range
|
||||
from zero to the value of MAX_VERTEX_STREAMS - 1.
|
||||
|
||||
Modifications to Chapter 4 of the OpenGL Shading Language Specification,
|
||||
Version 4.40 (Variables and Types)
|
||||
|
||||
Append to the end of Section 4.4.1 "Input Layout Qualifiers"
|
||||
|
||||
The identifier <stream> is used to specify that a fragment shader input
|
||||
variable or block is associated with a particular vertex stream (numbered
|
||||
beginning with zero). A default stream number may be declared at global
|
||||
scope by qualifying interface qualifier out as in this example:
|
||||
|
||||
layout (stream = 1) in;
|
||||
|
||||
The stream number specified in such a declaration replaces any previous
|
||||
default and applies to all subsequent block and variable declarations until
|
||||
a new default is established. The initial default stream number is zero.
|
||||
|
||||
Each input block or non-block input variable is associated with a
|
||||
vertex stream. If the block or variable is declared with the <stream>
|
||||
identifier, it is associated with the specified stream; otherwise, it is
|
||||
associated with the current default stream. A block member may be declared
|
||||
with a stream identifier, but the specified stream must match the stream
|
||||
associated with the containing block. One example:
|
||||
|
||||
layout (stream = 1) in; // default is now stream 1
|
||||
out vec4 var1; // var1 belongs to default stream (1)
|
||||
layout (stream = 2) in Block1 { // "Block1" belongs to stream 2
|
||||
layout (stream = 2) vec4 var2; // redundant block member stream decl
|
||||
layout (stream = 3) vec2 var3; // ILLEGAL (must match block stream)
|
||||
vec3 var4; // belongs to stream 2
|
||||
};
|
||||
layout (stream = 0) in; // default is now stream 0
|
||||
in vec4 var5; // var5 belongs to default stream (0)
|
||||
in Block2 { // "Block2" belongs to default stream (0)
|
||||
vec4 var6;
|
||||
};
|
||||
layout ( stream = 3) in vec4 var7; // var7 belongs to stream 3
|
||||
|
||||
Each fragment processed by the fragment shader receives its input
|
||||
variables from a specific stream corresponding to the stream upon which the
|
||||
source vertices were emitted in the geometry shader. Each invocation of
|
||||
the fragment shader processes a fragment belonging to a primitive generated
|
||||
from vertices emitted to a single stream. The index of the stream to which
|
||||
these vertices belong is available in the built-in variable gl_StreamID
|
||||
(see Section 7.1, "Built-in Language Variables"). Only those input variables
|
||||
belonging to the current stream have defined values. Reading from a variable
|
||||
belonging to any other stream may cause undefined behavior, including
|
||||
program termination.
|
||||
|
||||
Modifications to Chapter 7 of the OpenGL Shading Language Specification,
|
||||
Version 4.40 (Built-in Variables)
|
||||
|
||||
Add to the list of built-in variables in the fragment language, sec. 7.1,
|
||||
p.122.
|
||||
|
||||
in int gl_StreamID;
|
||||
|
||||
Insert the following paragraph after the description of gl_SamplePosition
|
||||
on p.122:
|
||||
|
||||
The input variable gl_StreamID indicates the vertex stream from which
|
||||
vertices were taken to generate the primitive to which the current fragment
|
||||
belongs. This information may be used to deduce which of the fragment
|
||||
shader input variables contain defined values. Reading from input variables
|
||||
belonging to a vertex stream other than that indicated by gl_StreamID
|
||||
may produce undefined behavior, possibly including application termination.
|
||||
|
||||
Modifications to Chapter 8 of the OpenGL Shading Language Specification,
|
||||
Version 4.40 (Built-in Functions)
|
||||
|
||||
Remove the final paragraph of section 8.15 "Geometry Shader Functions" on
|
||||
p.180, which disallows shaders with multiple streams that are not all
|
||||
set to POINTS primitive type.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_VALUE is generated by Enablei, Disablei and IsEnabledi if <target>
|
||||
is STREAM_RASTERIZATION_AMD and <index> is greater than or equal to
|
||||
MAX_VERTEX_STREAMS_AMD.
|
||||
|
||||
New State
|
||||
|
||||
Append to table 23.9, Rasterization
|
||||
|
||||
+---------------------------------------------------+-----------+-------------------+---------------+-----------------------------------------------+-------+
|
||||
| | | Get | Initial | | |
|
||||
| Get Value | Type | Command | Value | Description | Sec. |
|
||||
+---------------------------------------------------+-----------+-------------------+---------------+-----------------------------------------------+-------+
|
||||
| STREAM_RASTERIZATION_AMD | nxB | GetBoolean | See 14.1 | Per stream rasterizer enable | 14.1 |
|
||||
+---------------------------------------------------+-----------+-------------------+---------------+-----------------------------------------------+-------+
|
||||
|
||||
Issues
|
||||
|
||||
1) Why is rasterization order undefined?
|
||||
|
||||
DISCUSSION: Implementations typically break large draws into chunks and
|
||||
process each separately. Within each chunk, the rasterization order is
|
||||
guaranteed. Between chunks, ordering is also guaranteed - everything in
|
||||
early chunks is rasterized before later chunks. However, this means
|
||||
that primitives emitted to higher numbered streams in early chunks will
|
||||
be rasterized before primitives emitted to lower numbered streams in
|
||||
later chunks. Because the boundaries between chunks are not necessarily
|
||||
in fixed positions, it is not possible to specify where they will be and
|
||||
therefore guarantee rasterization order.
|
||||
|
||||
2) Is this still useful then?
|
||||
|
||||
RESOLVED: Yes, sure. If rendering is order independent (depth test on,
|
||||
blending off for example), or can be guaranteed to not overlap (viewport
|
||||
arrays, layered rendering and so on), it makes no difference whether
|
||||
rasterization order between streams is guaranteed or not.
|
||||
|
||||
3) What's the need for multiple 'streams' in the fragment shader?
|
||||
|
||||
DISCUSSION: In unextended OpenGL, the inputs to the fragment shader are
|
||||
derived from the vertices generated on stream 0 in the geometry shader
|
||||
(the vertex shader always writes to stream 0). When multiple streams can
|
||||
be rasterized, the fragment shader can be invoked as part of a primitive
|
||||
on any stream. As each stream can have wildly different outputs in the
|
||||
geometry shader, it is really not possible to have only a single set
|
||||
of inputs in the fragment shader. Therefore, we expose each stream
|
||||
independently. Only those variables written by the geometry shader on the
|
||||
stream from which the current primitive was generated will be defined,
|
||||
and the others will likely have garbage in them (aliases of the real
|
||||
variables). That stream is given by the new gl_StreamID built-in in the
|
||||
fragment shader. Other built-in variables (such as gl_FragCoord) are
|
||||
always available on any stream.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- ---------- -------- -----------------------------------------
|
||||
5 31/04/2014 gsellers Update for OpenGL 4.4, ready for posting.
|
||||
4 12/03/2012 gsellers Update against OpenGL 4.3.
|
||||
3 05/01/2011 gsellers Assign enumerants
|
||||
2 10/14/2010 gsellers Add fragment shader streams.
|
||||
1 10/11/2010 gsellers Initial revision
|
||||
@@ -0,0 +1,242 @@
|
||||
Name
|
||||
|
||||
AMD_vertex_shader_layer
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_vertex_shader_layer
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers
|
||||
|
||||
Status
|
||||
|
||||
Shipping.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: March 19, 2012
|
||||
Revision: 3
|
||||
|
||||
Number
|
||||
|
||||
417
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 3.0 or EXT_texture_array is required.
|
||||
|
||||
OpenGL 3.2 and ARB_geometry_shader4 affect the definition of this
|
||||
extension.
|
||||
|
||||
The extension is written against the OpenGL 4.2 Specification, Core Profile,
|
||||
January 19, 2012 and the OpenGL Shading Language Specification, version
|
||||
4.20.11.
|
||||
|
||||
Overview
|
||||
|
||||
The gl_Layer built-in shading language variable was introduced with the
|
||||
ARB_geometry_shader extension and subsequently promoted to core OpenGL
|
||||
in version 3.2. This variable is an output from the geometry shader stage
|
||||
that allows rendering to be directed to a specific layer of an array
|
||||
texture, slice of a 3D texture or face of a cube map or cube map array
|
||||
attachment of the framebuffer. Thus, this extremely useful functionality is
|
||||
only available if a geometry shader is present - even if the geometry shader
|
||||
is not otherwise required by the application. This adds overhead to the
|
||||
graphics processing pipeline, and complexity to applications. It also
|
||||
precludes implementations that cannot support geometry shaders from
|
||||
supporting rendering to layered framebuffer attachments.
|
||||
|
||||
This extension exposes the gl_Layer built-in variable in the vertex shader,
|
||||
allowing rendering to be directed to layered framebuffer attachments with
|
||||
only a vertex and fragment shader present. Combined with features such
|
||||
as instancing, or static vertex attributes and so on, this allows a wide
|
||||
variety of techniques to be implemented without the requirement for a
|
||||
geometry shader to be present.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.2 (Core) Specification (OpenGL Operation)
|
||||
|
||||
Add the following paragraph to the "Shader Outputs" subsection of
|
||||
section 2.11, "Vertex Shaders" on p. 112.
|
||||
|
||||
The built-in special variable gl_Layer, if written, holds the layer to
|
||||
which rendering should be directed and is discussed in the next subsection.
|
||||
|
||||
Insert the following subsection after the "Shader Outputs" subsection on
|
||||
p.112.
|
||||
|
||||
"Layered Rendering"
|
||||
|
||||
Vertex shaders can be used to render to one of several different layers
|
||||
of cube map textures, three-dimensional textures, or one- or two-dimensional
|
||||
texture arrays. This functionality allows an application to bind an entire
|
||||
complex texture to a framebuffer object, and render primitives to arbitrary
|
||||
layers computed at run time. For example, it can be used to project and
|
||||
render a scene onto all six faces of a cube map texture in one pass. The
|
||||
layer to render to is specified by writing to the built-in output variable
|
||||
gl_Layer. Layered rendering requires the use of framebuffer objects
|
||||
(see section 4.4.7).
|
||||
|
||||
Replace the first paragraph of the "Layer and Viewport Selection" subsection
|
||||
of section 2.13, "Geometry Shaders", p.150 with:
|
||||
|
||||
The special built-in variable gl_Layer is available to geometry
|
||||
shaders to direct rendering to a specific layer of a layered framebuffer
|
||||
attachment and has the same effect as the similarly named variable in the
|
||||
vertex shader.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.2 (Core) Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.2 (Core) Specification (Per-Fragment Operations
|
||||
and the Framebuffer)
|
||||
|
||||
Modify section 4.4.7, "Layered Framebuffers", p. 339:
|
||||
|
||||
Remove the first bullet point from the list on p. 339.
|
||||
Modify the second bullet point to read:
|
||||
|
||||
* the current vertex or geometry shader (if present) does not statically
|
||||
assign a value to the built-in output variable gl_Layer.
|
||||
|
||||
Modify the following paragraph to read:
|
||||
|
||||
Otherwise, the layer for each point, line or triangle generated by
|
||||
primitive assembly, or emitted by the geometry shader (if present) is taken
|
||||
from the gl_Layer output of one of the vertices of the primitive. The
|
||||
vertex used is implementation-dependent. To obtain defined results, all
|
||||
vertices of a single primitive (including strips, fans and loops) should
|
||||
receive the same value for gl_Layer. When a geometry shader is present,
|
||||
since the EndPrimitive built-in function starts a new output primitive,
|
||||
defined results can be achieved if EndPrimitive is called between two
|
||||
vertices emitted with different layer numbers. A layer number written by a
|
||||
vertex or geometry shader has no effect if the framebuffer is not layered.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.2 (Core) Specification (Special
|
||||
Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.2 (Core) Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language Specification, Version 4.20
|
||||
|
||||
Add to the list of vertex shader built-in variables, Section 7.1, p.97:
|
||||
|
||||
out int gl_Layer;
|
||||
|
||||
Modify the first paragraph on p.100, describing gl_Layer as follows:
|
||||
|
||||
The output variable gl_Layer is available only in the vertex and
|
||||
geometry languages, and is used to select ... See section 2.11.11,
|
||||
"Shader Exection" (under "Shader Outputs") and section 4.4.7, "Layered
|
||||
Framebuffers" in the OpenGL Graphics System for more information.
|
||||
|
||||
Add the following paragraph after the discussion of cube-map arrays on
|
||||
p.101:
|
||||
|
||||
Should a vertex shader write to gl_Layer when a geometry shader is
|
||||
present, this value will be discarded and the value written to gl_Layer
|
||||
by the geometry shader (if any) will be used instead. If the geometry
|
||||
shader does not write to gl_Layer, layer zero will be assumed. If
|
||||
selection of layer by the vertex shader is desired in the presence of a
|
||||
geometry shader, the layer should be communicated from the vertex shader
|
||||
to the geometry shader via a user defined varying per-vertex and the
|
||||
geometry shader used to copy the appropriate value to the gl_Layer output
|
||||
variable.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Interaction with versions of OpenGL prior to 3.2 or with the absence of
|
||||
ARB_geometry_shader4
|
||||
|
||||
If geometry shaders are not supported, remove all references to geometry
|
||||
shaders. gl_Layer is still introduced in the vertex shader. However,
|
||||
layered framebuffer attachments were also introduced with geometry shaders,
|
||||
and so this extension is of limited use. In order to expose this extension
|
||||
on an implementation that does not support geometry shaders in a meaningful
|
||||
way, it may be necessary to introduce an extension that adds layered
|
||||
framebuffer attachments alone.
|
||||
|
||||
Issues
|
||||
|
||||
1) What happens when there is a tessellation shader in the pipe?
|
||||
|
||||
RESOLVED: gl_Layer is not exposed to tessellation shaders. The primary
|
||||
motivation for this extension is to allow simple applications using only
|
||||
vertex and fragment shaders to take advantage of layered rendering. To use
|
||||
vertex-shader specified layers in a program that uses tessellation, the
|
||||
layer can be passed from vertex to control to evaluation shader and then
|
||||
a geometry shader can be used to initialize gl_Layer as would be the case
|
||||
in the absence of this extension.
|
||||
|
||||
2) Can we use the provoking vertex semantics to decide which layer will
|
||||
be rendered to in case the vertices of a single primitive are emitted
|
||||
with different layer index?
|
||||
|
||||
RESOLVED: Yes, the provoking vertex semantics, including
|
||||
LAYER_PROVOKING_VERTEX remain in place.
|
||||
|
||||
3) Why we don't introduce layered framebuffers in this extension as we
|
||||
did in ARB_geometry_shader4?
|
||||
|
||||
RESOLVED: The scope of changes required to introduce layered framebuffer
|
||||
attachments, cube map attachments, 3D texture attachments and so on would
|
||||
be quite large and serve little purpose, at least as far as AMD's
|
||||
implementation of this extension is concerned. However, requiring
|
||||
ARB_geometry_shader4 is not conducive to allowing support for this
|
||||
extension in the absence of geometry shader support. Therefore, we decided
|
||||
to expose only the layer functionality here and leave it to said
|
||||
hypothetical implementation to define the behavior of layered attachments
|
||||
as a separate extension.
|
||||
|
||||
4) What happens if the VS writes gl_Layer while there is a geometry shader
|
||||
present?
|
||||
|
||||
RESOLVED: The value written by the VS is lost and the value written by
|
||||
the GS (if any) is used. If the GS does not write gl_Layer then layer
|
||||
zero is assumed.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
3 19/03/2012 gsellers Address final feedback.
|
||||
2 15/03/2012 gsellers Ready for posting in repository.
|
||||
1 04/05/2011 gsellers Initial draft
|
||||
@@ -0,0 +1,641 @@
|
||||
Name
|
||||
|
||||
AMD_vertex_shader_tessellator
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_vertex_shader_tessellator
|
||||
|
||||
Contact
|
||||
|
||||
Bill Licea-Kane, AMD ( Bill.Licea-Kane 'at' amd.com )
|
||||
|
||||
Status
|
||||
|
||||
Complete
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: 2009-03-06
|
||||
Author Revision: 8
|
||||
|
||||
Number
|
||||
|
||||
363
|
||||
|
||||
Dependencies
|
||||
|
||||
|
||||
OpenGL 2.0 is required.
|
||||
|
||||
EXT_gpu_shader4 affects the definition of this extension.
|
||||
|
||||
EXT_geometry_shader4 affects the definition of this extension.
|
||||
|
||||
This extension interracts with AMDX_vertex_shader_tesselator.
|
||||
|
||||
This extension is written against the OpenGL Shading Language
|
||||
1.20 Specification.
|
||||
|
||||
The extension is written against the OpenGL 2.1 Specification.
|
||||
|
||||
Overview
|
||||
|
||||
The vertex shader tessellator gives new flexibility to the shader
|
||||
author to shade at a tessellated vertex, rather than just at a
|
||||
provided vertex.
|
||||
|
||||
In unextended vertex shading, the built-in attributes such as
|
||||
gl_Vertex, gl_Normal, and gl_MultiTexcoord0, together with the
|
||||
user defined attributes, are system provided values which are
|
||||
initialized prior to vertex shader invocation.
|
||||
|
||||
With vertex shading tessellation, additional vertex shader special
|
||||
values are available:
|
||||
|
||||
ivec3 gl_VertexTriangleIndex; // indices of the three control
|
||||
// points for the vertex
|
||||
vec3 gl_BarycentricCoord; // barycentric coordinates
|
||||
// of the vertex
|
||||
|
||||
i o
|
||||
|\
|
||||
| \
|
||||
*--*
|
||||
|\ |\
|
||||
| \| \
|
||||
*--*--*
|
||||
|\ |\ |\
|
||||
| \| \| \
|
||||
j o--*--*--o k
|
||||
|
||||
Figure 1 A Tessellated Triangle
|
||||
o = control point (and tessellated vertex)
|
||||
* = tessellated vertex
|
||||
|
||||
ivec4 gl_VertexQuadIndex; // indices for the four control
|
||||
// points for the vertex
|
||||
vec2 gl_UVCoord; // UV coordinates of the vertex
|
||||
|
||||
i o--*--*--o k
|
||||
|\ |\ |\ |
|
||||
| \| \| \|
|
||||
*--*--*--*
|
||||
|\ |\ |\ |
|
||||
| \| \| \|
|
||||
*--*--*--*
|
||||
|\ |\ |\ |
|
||||
| \| \| \|
|
||||
j o--*--*--o l
|
||||
|
||||
Figure 2 A Tessellated Quad
|
||||
o = control point (and tessellated vertex)
|
||||
* = tessellated vertex
|
||||
|
||||
When this extension is enabled, conventional built-in attributes
|
||||
and user defined attributes are uninitialized. The shader writer
|
||||
is responsible for explicitly fetching all other vertex data either
|
||||
from textures, uniform buffers, or vertex buffers.
|
||||
|
||||
The shader writer is further responsible for interpolating
|
||||
the vertex data at the given barycentric coordinates or uv
|
||||
coordinates of the vertex.
|
||||
|
||||
IP Status
|
||||
|
||||
No known claims.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void TessellationFactorAMD( float factor );
|
||||
void TessellationModeAMD( enum mode );
|
||||
|
||||
New Types
|
||||
|
||||
(None.)
|
||||
|
||||
New Tokens
|
||||
|
||||
Returned by the <type> parameter of GetActiveUniform:
|
||||
|
||||
SAMPLER_BUFFER_AMD 0x9001
|
||||
INT_SAMPLER_BUFFER_AMD 0x9002
|
||||
UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
|
||||
|
||||
Accepted by TessellationModeAMD
|
||||
|
||||
DISCRETE_AMD 0x9006
|
||||
CONTINUOUS_AMD 0x9007
|
||||
|
||||
Accepted by GetIntegerv
|
||||
|
||||
TESSELLATION_MODE_AMD 0x9004
|
||||
|
||||
Accepted by GetFloatv
|
||||
|
||||
TESSELLATION_FACTOR_AMD 0x9005
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 2.1 Specification
|
||||
(OpenGL Operation)
|
||||
|
||||
Modify section 2.15.3, "Shader Variables", page 75
|
||||
|
||||
Add the following new return types to the description of
|
||||
GetActiveUniform on p. 81.
|
||||
|
||||
SAMPLER_BUFFER_AMD,
|
||||
INT_SAMPLER_BUFFER_AMD,
|
||||
UNSIGNED_INT_SAMPLER_BUFFER_AMD.
|
||||
|
||||
Replace section "Samplers" p. 83 with:
|
||||
|
||||
Samplers
|
||||
|
||||
Samplers are special uniforms used in the OpenGL Shading Language
|
||||
to identify the texture object or vertex buffer object used for
|
||||
each lookup.
|
||||
|
||||
Samplers and Texture objects
|
||||
|
||||
If the sampler is one of the texture types, the value of a sampler
|
||||
indicates the texture image unit being accessed. Setting a
|
||||
sampler's value to i selects texture image unit number i. The values
|
||||
of i range from zero to the implementation dependent maximum
|
||||
supported number of texture image units.
|
||||
|
||||
The type of the sampler identifies the target on the texture image
|
||||
unit. The texture object bound to that texture image unit's target
|
||||
is then used for the texture lookup. For example, a variable of type
|
||||
sampler2D selects target TEXTURE 2D on its texture image unit.
|
||||
Binding of texture objects to targets is done as usual with
|
||||
BindTexture. Selecting the texture image unit to bind to is done as
|
||||
usual with ActiveTexture.
|
||||
|
||||
It is not allowed to have variables of different sampler types
|
||||
pointing to the same texture image unit within a program object.
|
||||
This situation can only be detected at the next rendering command
|
||||
issued, and an INVALID OPERATION error will then be generated.
|
||||
|
||||
Samplers and vertex buffer objects
|
||||
|
||||
If the sampler is one of the vertex types, the value of a sampler
|
||||
indicates the vertex array being accessed. Setting a sampler's
|
||||
value to i selects vertex array i. The values of i range from zero
|
||||
to the implementation dependent maximum supported max vertex
|
||||
attributes. Binding of vertex buffer objects to vertex arrays is
|
||||
done as usual with BindBuffer.
|
||||
|
||||
It is not allowed to have multiple variables of samplers to the same
|
||||
vertex array within a program object. This situation can only be
|
||||
detected at the next rendering command issued, and an INVALID
|
||||
OPERATION error will then be generated.
|
||||
|
||||
All samplers
|
||||
|
||||
The location of a sampler needs to be queried with
|
||||
GetUniformLocation, just like any uniform variable. Sampler values
|
||||
need to be set by calling Uniform1i{v}. Loading samplers with any
|
||||
of the other Uniform* entry points is not allowed and will result
|
||||
in an INVALID OPERATION error.
|
||||
|
||||
Active samplers are samplers actually being used in a program
|
||||
object. The LinkProgram command determines if a sampler is active or
|
||||
not. The LinkProgram command will attempt to determine if the active
|
||||
samplers in the shader(s) contained in the program object exceed the
|
||||
maximum allowable limits. If it determines that the count of active
|
||||
samplers exceeds the allowable limits, then the link fails (these
|
||||
limits can be different for different types of shaders). Each active
|
||||
sampler variable counts against the limit, even if multiple samplers
|
||||
refer to the same texture image unit. If this cannot be determined
|
||||
at link time, for example if the program object only contains a
|
||||
vertex shader, then it will be determined at the next rendering
|
||||
command issued, and an INVALID OPERATION error will then be
|
||||
generated.
|
||||
|
||||
Insert section prior to "Validation" on p. 87
|
||||
|
||||
Tessellation
|
||||
|
||||
If a vertex shader enables GL_AMD_vertex_shader_tessellation, then
|
||||
the shader writer is responsible for fetching and evaluating the
|
||||
vertex attributes at the barycentric coordinates of the vertex.
|
||||
(See the shading language specification.)
|
||||
|
||||
Only indexed triangles or indexed quads may be drawn with such a
|
||||
shader. Each triangle or quad will introduce generated vertices
|
||||
(including the original vertices of the triangle or quad)
|
||||
controlled by:
|
||||
|
||||
void TessellationFactorAMD( float factor );
|
||||
|
||||
where the factor is a value between 1.0 and 15.0 inclusive
|
||||
|
||||
The introduction of generated vertices is further controlled by:
|
||||
|
||||
void TessellationModeAMD( enum mode );
|
||||
|
||||
where mode is either DISCRETE_AMD or CONTINUOUS_AMD.
|
||||
|
||||
Add to the list of "begin errors":
|
||||
|
||||
* any two samplers of vertex type refer to the same vertex array.
|
||||
|
||||
* Any sampler bound to a vertex array has vertex buffer object 0
|
||||
bound.
|
||||
|
||||
* A vertex shader enables GL_AMD_vertex_shader_tessellation,
|
||||
statically reads gl_VertexTriangleIndex or gl_BarycentricCoord
|
||||
and the Implicit Begin mode is NOT GL_TRIANGLES
|
||||
|
||||
* A vertex shader enables GL_AMD_vertex_shader_tessellation,
|
||||
statically reads gl_VertexQuadIndex or gl_UVCoord and
|
||||
the Implicit Begin mode is NOT GL_QUADS
|
||||
|
||||
* A vertex shader enables GL_AMD_vertex_shader_tessellation and
|
||||
the command is RasterPos.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 2.1 Specification (Rasterization)
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 2.1 Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 2.1 Specification
|
||||
(Special Functions)
|
||||
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 2.1 Specification (State and State
|
||||
Requests)
|
||||
|
||||
|
||||
Additions to Appendix A of the OpenGL 2.1 Specification (Invariance)
|
||||
|
||||
Modifications to The OpenGL Shading Language 1.20 Specification
|
||||
|
||||
Including the following line in a shader can be used to control the
|
||||
language features described in this extension:
|
||||
|
||||
#extension GL_AMD_vertex_shader_tessellator : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.3.
|
||||
|
||||
A new preprocessor #define is added to the OpenGL Shading Language:
|
||||
|
||||
#define GL_AMD_vertex_shader_tessellator 1
|
||||
|
||||
Additions to Chapter 1 of the OpenGL Shading Language 1.20 Specification
|
||||
(Introduction)
|
||||
|
||||
Additions to Chapter 2 of the OpenGL Shading Language 1.20 Specification
|
||||
(Overview of OpenGL Shading)
|
||||
|
||||
2.1 Vertex Processor
|
||||
|
||||
Change 2nd paragraph to:
|
||||
|
||||
The vertex processor operates on one vertex at a time. It does not
|
||||
replace graphics operations that require knowledge of several
|
||||
vertices at a time. While a tessellated vertex however has LIMITED
|
||||
knowledge of the immediately adjacent control points (three for a
|
||||
triangle, four for a quad), the vertex processor is still operating
|
||||
on one tessellated vertex at a time. The vertex shaders running on
|
||||
the vertex processor must compute the homogeneous position
|
||||
of the incoming vertex.
|
||||
|
||||
|
||||
Additions to Chapter 3 of the OpenGL Shading Language 1.20 Specification
|
||||
(Basics)
|
||||
|
||||
3.6 Keywords
|
||||
|
||||
Add the keywords
|
||||
|
||||
__samplerVertexAMD
|
||||
__isamplerVertexAMD
|
||||
__usamplerVertexAMD
|
||||
|
||||
Additions to Chapter 4 of the OpenGL Shading Language 1.20 Specification
|
||||
(Variables and Types)
|
||||
|
||||
4.3.4 Attribute, Change third sentence:
|
||||
|
||||
"Attribute values are read-only as far as the vertex shader is
|
||||
concerned, unless GL_AMD_vertex_shader_tessellator is enabled. If
|
||||
GL_AMD_vertex_shader is enabled, they are read-write with undefined
|
||||
initial values."
|
||||
|
||||
Additions to Chapter 5 of the OpenGL Shading Language 1.20 Specification
|
||||
(Operators and Expressions)
|
||||
|
||||
Additions to Chapter 6 of the OpenGL Shading Language 1.20 Specification
|
||||
(Statements and Structure)
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language 1.20 Specification
|
||||
(Built-in Variables)
|
||||
|
||||
7.1 Vertex Shader Special Variables
|
||||
|
||||
Add the list of intrinsically declared with the following types:
|
||||
|
||||
// if GL_AMD_vertex_shader_tessellator enabled
|
||||
|
||||
ivec3 gl_VertexTriangleIndex; // may be read
|
||||
// indices of the three control
|
||||
// points for the vertex
|
||||
vec3 gl_BarycentricCoord; // may be read
|
||||
// barycentric coordinates of the
|
||||
// vertex
|
||||
|
||||
ivec4 gl_VertexQuadIndex; // may be read
|
||||
vec2 gl_UVCoord; // may be read
|
||||
|
||||
|
||||
If gl_VertexTriangleIndex and/or gl_BarycentricCoord is statically
|
||||
read by the shader, the shader is a Triangle Tessellator shader.
|
||||
|
||||
If gl_VertexQuadIndex and/or gl_UVCoord is statically read by the
|
||||
shader, the shader is a Quad Tessellator shader.
|
||||
|
||||
It is a link error if both a Triangle Tessellator shader and a Quad
|
||||
Tessellator shader are attached to a program.
|
||||
|
||||
7.3 Vertex Shader Built-In Attributes
|
||||
|
||||
Add the following paragraph.
|
||||
|
||||
If GL_AMD_vertex_shader_tessellator is enabled, the values of the
|
||||
built-in Attributes are undefined.
|
||||
|
||||
Additions to Chapter 8 of the OpenGL Shading Language 1.20 Specification
|
||||
(Built-in Functions)
|
||||
|
||||
8.7 Texture Lookup Functions
|
||||
|
||||
Rename section to "Lookup Functions"
|
||||
|
||||
Add in front of first sentence:
|
||||
|
||||
Vertex lookup functions are available to the vertex shader.
|
||||
|
||||
Add to the front of the table of functions:
|
||||
|
||||
Syntax:
|
||||
vec4 vertexFetchAMD( __samplerVertexAMD sampler, int i );
|
||||
ivec4 vertexFetchAMD( __isamplerVertexAMD sampler, int i );
|
||||
uvec4 vertexFetchAMD( __usamplerVertexAMD sampler, int i );
|
||||
|
||||
Description:
|
||||
|
||||
If GL_AMD_vertex_shader_tessellator is enabled, fetch the "ith"
|
||||
element from the vertex buffer bound to the vertex array bound to
|
||||
the sampler.
|
||||
|
||||
Additions to Chapter 9 of the OpenGL Shading Language 1.20 Specification
|
||||
(Shading Language Grammar)
|
||||
|
||||
Additions to Chapter 10 of the OpenGL Shading Language 1.20
|
||||
Specification (Issues)
|
||||
|
||||
Additions to the AGL/EGL/GLX/WGL Specifications
|
||||
|
||||
None
|
||||
|
||||
|
||||
Dependencies on ARB_vertex_shader
|
||||
|
||||
ARB_vertex_shader is required.
|
||||
|
||||
Interactions with EXT_gpu_shader4
|
||||
|
||||
If EXT_gpu_shader4 is not supported, remove all references to:
|
||||
|
||||
__isamplerVertexAMD
|
||||
__usamplerVertexAMD
|
||||
ivec4 vertexFetchAMD
|
||||
uvec4 vertexFetchAMD
|
||||
|
||||
Interactions with EXT_geometry_shader4
|
||||
|
||||
If EXT_geometry_shader4 is supported, change the last
|
||||
paragraph of Section 2.16, Geometry Shaders to:
|
||||
|
||||
A program object that includes a geometry shader must also include
|
||||
a vertex shader; otherwise a link error will occur. If a program
|
||||
object that includes a geometry shader also includes a vertex shader
|
||||
with that has enabled GL_AMD_vertex_shader_tessellator, a link error
|
||||
will occur.
|
||||
|
||||
Interactions with AMDX_vertex_shader_tessellator
|
||||
|
||||
This extension is symantically identical to the experimental
|
||||
AMDX_vertex_shader_tessellator. (It has been "promoted" to
|
||||
non-experimental status.)
|
||||
|
||||
Only the prefix AMDX has been changed to AMD.
|
||||
Only the suffix AMDX has been changed to AMD.
|
||||
|
||||
We encourage applications and shader writers to migrate from
|
||||
AMDX to AMD. However, the AMDX entry points, enums, keywords
|
||||
and function names are not yet deprecated.
|
||||
|
||||
Errors
|
||||
|
||||
New State
|
||||
|
||||
Add to Table 6.5 Vertex Array Data
|
||||
|
||||
Get Value Type Get Command Value Description Sec. Attribute
|
||||
--------- ---- --------------- ------- -------------------- ---- ---------
|
||||
TESSELLATION_FACTOR_AMD R GetFloatv 1.0 tessellation factor 2.8 vertex-array
|
||||
TESSELLATION_MODE_AMD Z_2 GetIntegerv DISCRETE_AMD tessellation mode 2.8 vertex-array
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Sample Code
|
||||
|
||||
#extension GL_AMD_vertex_shader_tessellator : require
|
||||
|
||||
__samplerVertexAMD Vertex;
|
||||
__samplerVertexAMD Normal;
|
||||
__samplerVertexAMD Texcoord0;
|
||||
__samplerVertexAMD Temperature;
|
||||
__samplerVertexAMD Pressure;
|
||||
|
||||
attribute float myTemperature;
|
||||
|
||||
void main ( void )
|
||||
{
|
||||
gl_Vertex = vec4( 0.0 );
|
||||
gl_Normal = vec4( 0.0 );
|
||||
gl_MultiTexCoord0 = vec4( 0.0 );
|
||||
myTemperature = 0.0;
|
||||
float myPressure = 0.0; // Don't have to interpolate to attribute
|
||||
|
||||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
float weight = gl_BarycentricCoord[i];
|
||||
|
||||
gl_Vertex += weight*vertexFetchAMD( Vertex, gl_VertexTriangleIndex[i] );
|
||||
gl_Normal += weight*vertexFetchAMD( Normal, gl_VertexTriangleIndex[i] );
|
||||
gl_MultiTexCoord0 += weight*vertexFetchAMD( Texcoord0, gl_VertexTriangleIndex[i] );
|
||||
myTemperature += weight*vertexFetchAMD( Temperature, gl_VertexTriangleIndex[i] ).x;
|
||||
myPressure += weight*vertexFetchAMD( Pressure, gl_VertexTriangleIndex[i] ).x;
|
||||
|
||||
}
|
||||
// Rest of vertex shader goes here....
|
||||
}
|
||||
|
||||
Issues
|
||||
|
||||
1) Does this belong conceptually in the pipe as subsuming geometry
|
||||
shader (after primitive combine) or vertex unpack.
|
||||
|
||||
Vertex unpack. Even though there is "primitive information" it
|
||||
is limited to the immediate neighborhood.
|
||||
|
||||
2) Do we need a new stage?
|
||||
|
||||
If we add a "tessellation" stage:
|
||||
|
||||
Input to the tessellator is the unpacked vertex attributes, but
|
||||
each attribute is now an array of size 3, the "superprim" attributes,
|
||||
plus a barycentric coordinate.
|
||||
|
||||
The output of the tessellator is the varying.
|
||||
|
||||
The varying output of the tessellator then becomes the attributes
|
||||
input to the vertex shader.
|
||||
|
||||
Alternatively, we can make the "unpack" part of the vertex shader
|
||||
responsibility.
|
||||
|
||||
No. We'll just make the attributes undefined, and the
|
||||
"vertex unpack" stage naturally collapses into the vertex shader.
|
||||
|
||||
3) Why make attributes undefined but writable?
|
||||
|
||||
This is the easiest way to have an unpack shader merged into
|
||||
existing shaders.
|
||||
|
||||
4) What variants of vertexFetch do we need.
|
||||
|
||||
1D is probably all we need, and probably all we will ever need.
|
||||
The return types should be vec4, ivec4 and uvec4.
|
||||
So, we need:
|
||||
|
||||
vec4 vertexFetchAMD( __samplerVertexAMD sampler, int i );
|
||||
ivec4 vertexFetchAMD( __isamplerVertexAMD sampler, int i );
|
||||
uvec4 vertexFetchAMD( __usamplerVertexAMD sampler, int i );
|
||||
|
||||
5) How does __samplerVertexAMD and vertexFetchAMD interact with vertex arrays?
|
||||
|
||||
The __samplerVertexAMD becomes an active uniform. As existing
|
||||
samplers are bound to texture units, the samplerVertex is bound to a
|
||||
VertexAttrib array, and similarly, the "enable" of the
|
||||
VertexAttribArray is ignored. vertexFetchAMD will use the size,
|
||||
type, normalized and stride to fetch the "ith" element from the array
|
||||
as the following pseudocode:
|
||||
|
||||
if (generic vertex attribute j array normalization flag is set, and
|
||||
type is not FLOAT or DOUBLE)
|
||||
VertexAttrib[size]N[type]v
|
||||
(j, generic vertex attribute j array element i);
|
||||
else
|
||||
VertexAttrib[size][type]v
|
||||
(j, generic vertex attribute j array element i);
|
||||
|
||||
6) What happens if a buffer object is not bound to an array?
|
||||
|
||||
There is no reason why it shouldn't work, but there's also no good
|
||||
reason to make it work. Undefined.
|
||||
|
||||
7) What about "conventional" OpenGL array state (Vertex, Color, Normal,
|
||||
TexCoord, etc....)?
|
||||
|
||||
By binding the buffer objects to the appropriate vertexAttrib array,
|
||||
and setting appropriate size, type, normalized and stride, the
|
||||
application programmer can access all "conventional" OpenGL array
|
||||
state?
|
||||
|
||||
8) Are attributes declared or used in the shader "active?"
|
||||
|
||||
For the purposes of GetActiveAttrib, GetAttribLocation and
|
||||
BindAttribLocation, no.
|
||||
|
||||
9) What about geometry shaders and tessellation?
|
||||
|
||||
Future hardware may relax this restriction, but you can not
|
||||
successfully link a program that includes a vertex shader that has
|
||||
enabled GL_AMD_vertex_shader_tessellator and a geometry shader.
|
||||
|
||||
10) What draw calls do we support?
|
||||
|
||||
To the shader writer, everything looks like indexed triangles or
|
||||
indexed quads, with discrete and continuous tessellation. These
|
||||
indexed triangles result from a polygon Begin/End object, a
|
||||
triangle resulting from a triangle strip, triangle fan, or series
|
||||
of separate triangles, or a quadrilateral arising from a
|
||||
quadrilateral strip, series of separate quadrilaterals, or a Rect
|
||||
command.
|
||||
|
||||
Points, Lines and pixel rectangles and bitmaps are unsupported by
|
||||
a tessellation shader.
|
||||
|
||||
11) Do we need additional enables?
|
||||
|
||||
Lets first see how "implicit" enable of vertex arrays and
|
||||
tessellation draw calls works. The first follows precedent (samplers
|
||||
override texture enable hierarchy.) The second seems to follow.
|
||||
|
||||
11) What about begin errors?
|
||||
|
||||
They are evil, but I don't see how they can be avoided.
|
||||
Clearly sampler validation needs to follow precedent.
|
||||
|
||||
12) What about quads?
|
||||
|
||||
Quads are necessary for subdivision surfaces such as Catmull-Clark.
|
||||
We have received several significant requests to support subdivision
|
||||
surfaces.
|
||||
|
||||
Revision History
|
||||
|
||||
Revision 1, 2007-06-26 wwlk
|
||||
Preliminary review document
|
||||
|
||||
Revision 2, 2007-08-16 wwlk
|
||||
Review document
|
||||
|
||||
Correct spelling of "tessellate" throughout. Blush.
|
||||
Rename special variables.
|
||||
Add additional sampler types.
|
||||
Remove "1D" from sampler types and vertex fetches.
|
||||
Add core OpenGL api spec changes.
|
||||
Add interactions with EXT_gpu_shader4.
|
||||
Add many issues.
|
||||
Expanded example shader.
|
||||
|
||||
Revision 3, 2007-08-17 wwlk
|
||||
Correct edit headers
|
||||
(OpenGL 1.5 -> OpenGL 2.0)
|
||||
(Shading Language 1.10 -> Shading Language 1.20)
|
||||
|
||||
Revision 4, 2007-09-21 wwlk
|
||||
Fix typo in reserved keywords (remove "1D")
|
||||
Added support for all polygon calls, explicitly disallowing points
|
||||
lines and RasterPos,
|
||||
List additional BEGIN errors - yes they are evil.
|
||||
|
||||
Revision 5, 2008-05-22 wwlk
|
||||
Add quad support
|
||||
|
||||
Revision 6, 2009-03-05 wwlk
|
||||
General cleanup to ready for posting to repository
|
||||
|
||||
Revision 7, 2009-03-05 wwlk
|
||||
Promote from AMDX to AMD.
|
||||
|
||||
Revision 8, 2009-03-06 wwlk
|
||||
Minor update to enums section.
|
||||
Cleaned up typos and <cr><lf>.
|
||||
@@ -0,0 +1,215 @@
|
||||
Name
|
||||
|
||||
AMD_vertex_shader_viewport_index
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_AMD_vertex_shader_viewport_index
|
||||
|
||||
Contact
|
||||
|
||||
Graham Sellers, AMD (graham.sellers 'at' amd.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Graham Sellers
|
||||
|
||||
Status
|
||||
|
||||
Shipping.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: March 15, 2012
|
||||
Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
416
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 4.1 or ARB_viewport_array is required.
|
||||
|
||||
The extension is written against the OpenGL 4.2 Specification, Core Profile,
|
||||
January 19, 2011 and the OpenGL Shading Language Specification,
|
||||
version 4.20.11.
|
||||
|
||||
Overview
|
||||
|
||||
The gl_ViewportIndex built-in variable was introduced by the
|
||||
ARB_viewport_array extension and OpenGL 4.1. This variable is available
|
||||
in un-extended OpenGL only to the geometry shader. When written in the
|
||||
geometry shader, it causes geometry to be directed to one of an array
|
||||
of several independent viewport rectangles.
|
||||
|
||||
In order to use any viewport other than zero, a geometry shader must be
|
||||
present. Geometry shaders introduce processing overhead and potential
|
||||
performance issues. This extension exposes the gl_ViewportIndex built-in
|
||||
variable to the vertex shader, allowing the functionality introduced by
|
||||
ARB_viewport_array to be accessed without requiring a geometry shader to
|
||||
be present.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 4.2 (Core) Specification (OpenGL Operation)
|
||||
|
||||
Add the following paragraph to the "Output Variables" subsection of
|
||||
section 2.11, "Vertex Shaders" on p. 106.
|
||||
|
||||
The built-in special variable gl_ViewportIndex, if written, is used to
|
||||
direct rendering to one of several viewports and is discussed further in
|
||||
the next section.
|
||||
|
||||
Insert the following subsection after the "Shader Outputs" subsection on
|
||||
p.106.
|
||||
|
||||
"Viewport Selection"
|
||||
|
||||
Vertex shaders can be used to render to one of several different
|
||||
viewport rectangles. The destination viewport rectangle for a primitive
|
||||
may be specified by writing to the built-in output variable
|
||||
gl_ViewportIndex in the vertex shader. This functionality allows a vertex
|
||||
shader to direct rendering to one of several viewport rectangles. The
|
||||
specific vertex of a primitive from which gl_ViewportIndex is taken
|
||||
is implementation defined and may be determined by calling GetIntegerv with
|
||||
the symbolic constant VIEWPORT_INDEX_PROVOKING_VERTEX.
|
||||
|
||||
If the value returned is PROVOKING_VERTEX then vertex selection follows the
|
||||
convention specified to ProvokingVertex (see Section 2.19). If the value
|
||||
returned is FIRST_VERTEX_CONVENTION, selection is always taken from the
|
||||
first vertex of the primitive. If the value returned is
|
||||
LAST_VERTEX_CONVENTION, the selection is always taken from the last vertex
|
||||
of the primitive. If the value returned is UNDEFINED_VERTEX, the selection
|
||||
is not guaranteed to be taken from any specific vertex. The vertex
|
||||
considered the provoking vertex for particular primitive types is given
|
||||
in table 2.15.
|
||||
|
||||
Replace the second paragraph of the "Layer and Viewport Selection" subsection
|
||||
of section 2.13, "Geometry Shaders", p.135 (which describes
|
||||
gl_ViewportIndex) with:
|
||||
|
||||
The special built-in variable gl_ViewportIndex is available to geometry
|
||||
shaders to direct rendering to a specific viewport in an array of
|
||||
viewports and has the same effect as the similarly named variable in the
|
||||
vertex shader.
|
||||
|
||||
Modify section 2.14.1 "Controling the Viewport" as follows:
|
||||
|
||||
Multiple viewports are available and are numbered zero through the value
|
||||
of MAX_VIEWPORTS minus one. If a vertex or geometry shader is active and
|
||||
writes to gl_ViewportIndex, the viewport transformation uses the viewport
|
||||
corresponding to the value assigned to gl_ViewportIndex taken from an
|
||||
implementation-dependent primitive vertex. If the value of the viewport
|
||||
index is outside the range zero to the value of MAX_VIEWPORTS minus one,
|
||||
the results of the viewport transformation are undefined. If the active
|
||||
vertex shaders or geometry shaders (if present) do not write to
|
||||
gl_ViewportIndex, the viewport numbered zero is used by the viewport
|
||||
transformation.
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 4.2 (Core) Specification (Rasterization)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 4.2 (Core) Specification (Per-Fragment Operations
|
||||
and the Framebuffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 4.2 (Core) Specification (Special
|
||||
Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 4.2 (Core) Specification (State and
|
||||
State Requests)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 7 of the OpenGL Shading Language Specification, Version 4.20
|
||||
|
||||
Add to the list of vertex shader built-in variables, Section 7.1, p. 97:
|
||||
|
||||
out int gl_ViewportIndex;
|
||||
|
||||
Modify the first paragraph on p.101, describing gl_ViewpotIndex as follows:
|
||||
|
||||
The output variable gl_ViewportIndex is available only in the vertex and
|
||||
geometry languages and provides the index of the viewport to which the next
|
||||
primitive assembled from the resulting vertices or emitted from the
|
||||
geometry shader (if present) should be drawn. Primitives generated during
|
||||
primitive assembly will undergo viewport transformation and scissor testing
|
||||
using the viewport transformation and scissor rectangle selected by the
|
||||
value of gl_ViewportIndex. The viewport index used will come from one of
|
||||
the vertices in the primitive being processed. However, which vertex the
|
||||
viewport index comes from is implementation-dependent, so it is best to use
|
||||
the same viewport index for all vertices of the primitive. If a vertex or
|
||||
geometry shader (if present) does not assign a value to gl_ViewportIndex,
|
||||
viewport transform and scissor rectangle zero will be used. If a vertex
|
||||
or geometry shader statically assigns a value to gl_ViewportIndex and there
|
||||
is a path through the shader that does not assign a value to
|
||||
gl_ViewportIndex, the value of gl_ViewportIndex is undefined for executions
|
||||
of the shader that take that path. See section 2.11.11, under "Output
|
||||
Variables" of the OpenGL Graphics System Specification (Core Profile) for
|
||||
more information.
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
1) What happens when there is a tessellation shader in the pipe?
|
||||
|
||||
RESOVED: gl_ViewportIndex is not exposed to tessellation shaders. The
|
||||
primary motivation for this extension is to allow simple applications using
|
||||
only vertex and fragment shaders to take advantage of multiple viewports.
|
||||
To use vertex-shader specified viewport indices in a program that uses
|
||||
tessellation, the viewport index can be passed from vertex to control to
|
||||
evaluation shader and then a geometry shader can be used to initialize
|
||||
gl_ViewportIndex as would be the case in the absence of this extension.
|
||||
|
||||
2) What happens if gl_ViewportIndex is written in the vertex shader and
|
||||
a geometry shader is present?
|
||||
|
||||
RESOLVED: The value written in the VS is lost. If the GS writes
|
||||
gl_ViewportIndex, that value is used, otherwise the zeroth viewport
|
||||
is used.
|
||||
|
||||
3) Are provoking vertex semantics honored for the purposes of writes to
|
||||
gl_ViewportIndex in the VS?
|
||||
|
||||
RESOLVED: Yes, they are. Query VIEWPORT_INDEX_PROVOKING_VERTEX to determine
|
||||
the 'provokingness' of gl_ViewportIndex. In general, though, it's best
|
||||
practice to ensure that all vertices of a single primitive (including
|
||||
strips, fans and loops) have the same value for gl_ViewportIndex.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- -----------------------------------------
|
||||
|
||||
2 03/15/2012 gsellers Finalize for posting in public repository
|
||||
1 04/05/2011 gsellers Initial draft
|
||||
@@ -0,0 +1,462 @@
|
||||
Name
|
||||
|
||||
AMD_gpu_association
|
||||
|
||||
Name Strings
|
||||
|
||||
GLX_AMD_gpu_association
|
||||
|
||||
Contact
|
||||
|
||||
David Mao, AMD (david.mao 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: September 18, 2014
|
||||
Author Revision: 2
|
||||
|
||||
Based on: GLX_SGI_make_current_read specification
|
||||
Date: 3/20/1997
|
||||
|
||||
EXT_framebuffer_object specification
|
||||
Date: 2/13/2007 Revision #119
|
||||
|
||||
Number
|
||||
|
||||
398
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.5 is required.
|
||||
|
||||
GLX 1.3 is required.
|
||||
|
||||
GL_EXT_framebuffer_object is required.
|
||||
|
||||
GLX_ARB_get_proc_address is required.
|
||||
|
||||
This extension interacts with GLX_SGI_make_current_read.
|
||||
|
||||
This extension interacts with GL_EXT_framebuffer_blit.
|
||||
|
||||
This extension interacts with GLX_ARB_create_context.
|
||||
|
||||
This extension interacts with WGL_AMD_gpu_association.
|
||||
|
||||
Overview
|
||||
|
||||
|
||||
There currently is no way for applications to efficiently use GPU
|
||||
resources in systems that contain more than one GPU. Vendors have
|
||||
provided methods that attempt to split the workload for an
|
||||
application among the available GPU resources. This has proven to be
|
||||
very inefficient because most applications were never written with
|
||||
these sorts of optimizations in mind.
|
||||
|
||||
This extension provides a mechanism for applications to explicitly
|
||||
use the GPU resources on a given system individually. By providing
|
||||
this functionality, a driver allows applications to make appropriate
|
||||
decisions regarding where and when to distribute rendering tasks.
|
||||
|
||||
The set of GPUs available on a system can be queried by calling
|
||||
glXGetGPUIDsAMD. The current GPU assigned to a specific context
|
||||
can be determined by calling glXGetContextGPUIDAMD. Each GPU in a
|
||||
system may have different performance characteristics in addition
|
||||
to supporting a different version of OpenGL. The specifics of each
|
||||
GPU can be obtained by calling glXGetGPUInfo. This will allow
|
||||
applications to pick the most appropriate GPU for each rendering
|
||||
task.
|
||||
|
||||
Once all necessary GPU information has been obtained, a context tied
|
||||
to a specific GPU can be created with glXCreateAssociatedContextAMD.
|
||||
These associated contexts can be made current with
|
||||
glXMakeAssociatedContextCurrentAMD and deleted with
|
||||
glXDeleteAssociatedContextAMD. Only one GPU associated or
|
||||
non-associated context can be current at one time per thread.
|
||||
|
||||
To provide an accelerated path for blitting data from one context
|
||||
to another, the new blit function BlitContextFramebufferAMD has
|
||||
been added.
|
||||
|
||||
|
||||
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
unsigned int glXGetGPUIDsAMD(unsigned int maxCount, unsigned int *ids);
|
||||
|
||||
int glXGetGPUInfoAMD(unsigned int id, int property, GLenum dataType,
|
||||
unsigned int size, void *data)
|
||||
|
||||
unsigned int glXGetContextGPUIDAMD(GLXContext ctx);
|
||||
|
||||
GLXContext glXCreateAssociatedContextAMD(unsigned int id,
|
||||
GLXContext share_list);
|
||||
|
||||
GLXContext glXCreateAssociatedContextAttribsAMD(unsigned int id,
|
||||
GLXContext share_context,
|
||||
const int *attribList);
|
||||
|
||||
Bool glXDeleteAssociatedContextAMD(GLXContext ctx);
|
||||
|
||||
Bool glXMakeAssociatedContextCurrentAMD(GLXContext ctx);
|
||||
|
||||
GLXContext glXGetCurrentAssociatedContextAMD(void);
|
||||
|
||||
void glXBlitContextFramebufferAMD(GLXContext dstCtx, GLint srcX0, GLint srcY0,
|
||||
GLint srcX1, GLint srcY1, GLint dstX0,
|
||||
GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <property> parameter of glXGetGPUInfo:
|
||||
|
||||
GLX_GPU_VENDOR_AMD 0x1F00
|
||||
GLX_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
GLX_GPU_RAM_AMD 0x21A3
|
||||
GLX_GPU_CLOCK_AMD 0x21A4
|
||||
GLX_GPU_NUM_PIPES_AMD 0x21A5
|
||||
GLX_GPU_NUM_SIMD_AMD 0x21A6
|
||||
GLX_GPU_NUM_RB_AMD 0x21A7
|
||||
GLX_GPU_NUM_SPI_AMD 0x21A8
|
||||
|
||||
Accepted by the <dataType> argument of glXGetGPUInfoAMD:
|
||||
|
||||
GL_UNSIGNED_BYTE
|
||||
GL_UNSIGNED_INT
|
||||
GL_INT
|
||||
GL_FLOAT
|
||||
|
||||
Accepted by the <mask> argument of glXBlitContextFramebufferAMD:
|
||||
|
||||
GL_COLOR_BUFFER_BIT
|
||||
GL_DEPTH_BUFFER_BIT
|
||||
GL_STENCIL_BUFFER_BIT
|
||||
|
||||
Additions to the WGL Specification
|
||||
|
||||
None. This specification is written for GLX.
|
||||
|
||||
Additions to the GLX 1.4 Specification
|
||||
|
||||
Add a new section in between 3.3.7 and 3.3.8 entitled "GPU
|
||||
Associated Contexts"
|
||||
|
||||
GPU Associated Contexts
|
||||
|
||||
When multiple GPUs are present, a context can be created for
|
||||
off-screen rendering that is associated with a specific GPU.
|
||||
This will allow applications to achieve an app-specific
|
||||
distributed GPU utilization.
|
||||
|
||||
The IDs for available GPUs can be queried with the command:
|
||||
|
||||
unsigned int glXGetGPUIDsAMD(unsigned int maxCount, unsigned int *ids);
|
||||
|
||||
where <maxCount> is the max number of IDs that can be returned and
|
||||
<ids> is the array of returned IDs. If the function succeeds,
|
||||
the return value is the number of total GPUs available. The
|
||||
value 0 is returned if no GPUs are available or if the call has
|
||||
failed. The array pointer <ids> passed into the function will be
|
||||
populated by the smaller of maxCount or the total GPU count
|
||||
available. The ID 0 is reserved and will not be retuned as a
|
||||
valid GPU ID. If the array <ids> is NULL, the function will
|
||||
only return the total number of GPUs. <ids> will be tightly packed
|
||||
with no 0 values between valid ids.
|
||||
|
||||
Calling glXGetGPUIDsAMD once with <maxCount> set to zero returns
|
||||
the total available GPU count which can be used to allocate an
|
||||
appropriately sized id array before calling glXGetGPUIDsAMD
|
||||
again to query the full set of supported GPUs.
|
||||
|
||||
Each GPU in a system may have different properties, performance
|
||||
characteristics and different supported OpenGL versions. To
|
||||
determine which GPU is best suited for a specific task the
|
||||
following functions may be used:
|
||||
|
||||
int glXGetGPUInfoAMD(unsigned int id, int property, GLenum dataType,
|
||||
unsigned int size, void *data);
|
||||
|
||||
<id> is a GPU id obtained from calling glXGetGPUIDsAMD. The GPU ID
|
||||
must be a valid GPU ID. The function will fail if <id> is an invalid
|
||||
GPU ID and -1 will be returned. <property> is the information being
|
||||
queried. <dataType> may be GL_UNSIGNED_INT, GL_INT, GL_FLOAT, or
|
||||
GL_UNSIGNED_BYTE and signals what data type is to be returned. <size>
|
||||
signals the size of the data buffer passed into glXGetGPUInfoAMD.
|
||||
This is the count of the array of type <dataType>. <data> is the
|
||||
buffer which will be filled with the requested information. For a
|
||||
string, <size> will be the number of characters allocated and will
|
||||
include NULL termination. For arrays of type GL_UNSIGNED_INT, GL_INT,
|
||||
and GL_FLOAT <size> will be the array depth. If the function
|
||||
succeeds, the number of values written will be returned. If the number
|
||||
of values written is equal to <size>, the query should be repeated with
|
||||
a larger <data> buffer. Strings should be queried using the
|
||||
GL_UNSIGNED_BYTE type, are UTF-8 encoded and will be NULL terminated.
|
||||
If the function fails, -1 will be returned.
|
||||
|
||||
<property> defines the GPU property to be queried, and may be one of
|
||||
GLX_GPU_OPENGL_VERSION_STRING_AMD, GLX_GPU_RENDERER_STRING_AMD,
|
||||
GLX_GPU_FASTEST_TARGET_GPUS_AMD, GLX_GPU_RAM_AMD, GLX_GPU_CLOCK_AMD,
|
||||
GLX_GPU_NUM_PIPES_AMD, GLX_GPU_NUM_SIMD_AMD, GLX_GPU_NUM_RB_AMD, or
|
||||
GLX_GPU_NUM_SPI_AMD.
|
||||
|
||||
If <size> is not sufficient to hold the entire value for a particular
|
||||
property, the number of values returned will equal <size>. If
|
||||
<dataType> is inappropriate for <property>, for instance INT for a
|
||||
property which is a string, the function will fail and -1 will be
|
||||
returned.
|
||||
|
||||
Querying GLX_GPU_OPENGL_VERSION_STRING_AMD returns the highest supported
|
||||
OpenGL version string and GLX_GPU_RENDERER_STRING_AMD returns name
|
||||
of the GPU. <dataType> must be GL_UNSIGNED_BYTE with the previous
|
||||
properties. Querying GLX_GPU_FASTEST_TARGET_GPUS_AMD returns an array
|
||||
of the IDs of GPUs with the fastest data blit rates when using
|
||||
glXBlitContextFramebufferAMD. This list is ordered fastest
|
||||
first. This provides a performance hint about which contexts and GPUS
|
||||
are capable of transfering data between each other the quickest. Querying
|
||||
GLX_GPU_RAM_AMD returns the amount of RAM available to GPU in MB. Querying
|
||||
GLX_GPU_CLOCK_AMD returns the GPU clock speed in MHz. Querying
|
||||
GLX_GPU_NUM_PIPES_AMD returns the nubmer of 3D pipes. Querying
|
||||
GLX_GPU_NUM_SIMD_AMD returns the number of SIMD ALU units in each
|
||||
shader pipe. Querying GLX_GPU_NUM_RB_AMD returns the number of render
|
||||
backends. Querying GLX_GPU_NUM_SPI_AMD returns the number of shader
|
||||
parameter interpolaters. If the <parameter> being queried is not
|
||||
applicable for the GPU specified by <id>, the value 0 will be returned.
|
||||
|
||||
Unassociated contexts are created by calling glXCreateNewContext.
|
||||
Although these contexts are unassociated, their use will still be
|
||||
tied to a single GPU in most cases. For this reason it is advantageous
|
||||
to be able to query the GPU an existing unassociated context resides
|
||||
on. If multiple GPUs are available, it would be undesirable
|
||||
to use one for rendering to visible surfaces and then chose the
|
||||
same one for off-screen rendering. Use the following command to
|
||||
determine which GPU a context is attached to:
|
||||
|
||||
unsigned int glXGetContextGPUIDAMD(GLXContext ctx);
|
||||
|
||||
<ctx> is the context for which the GPU id will be returned. If the
|
||||
context is invalid or if an error has occurred, glXGetContextGPUIDAMD
|
||||
will return 0.
|
||||
|
||||
To create an associated context, use:
|
||||
|
||||
GLXContext glXCreateAssociatedContextAMD(unsigned int id,
|
||||
GLXContext share_list);
|
||||
|
||||
<id> must be a valid GPU id and cannot be 0. <share_list> must either
|
||||
be NULL or that of an associated context created with the the same GPU
|
||||
ID as <id>. If <share_list> was created using a different ID,
|
||||
glXCreateAssociatedContextAMD will fail and return NULL. If a context was
|
||||
successfully created the handle will be returned by
|
||||
glXCreateAssociatedContextAMD. If a context could not be created, NULL
|
||||
will be returned. If a context could not be created, error information
|
||||
can be obtained by calling GetLastError. Upon successful creation,
|
||||
no pixel format is tied to an associated context and the context is not
|
||||
tied to a specific Display. Associated contexts are always direct contexts.
|
||||
Associated Contexts always support only GLX_RGBA_TYPE rendering type.
|
||||
|
||||
glXCreateAssociatedContextAMD can generate the following errors:
|
||||
GLXBadContext if <share_list> is neither zero nor a valid GLX rendering
|
||||
context; BadMatch if the server context state for share list exists in
|
||||
an address space that cannot be shared with the newly created context
|
||||
or if share list was created on a different screen than the one
|
||||
referenced by config; BadAlloc if the server does not have enough resources
|
||||
to allocate the new context.
|
||||
|
||||
To create an associated context and request a specific GL version, use:
|
||||
|
||||
GLXContext glXCreateAssociatedContextAttribsAMD(unsigned int id,
|
||||
GLXContext share_list, const int *attribList)
|
||||
|
||||
All capabilities and limitations of glXCreateContextAttribsARB apply
|
||||
to glXCreateAssociatedContextAttribsAMD. Additionally, <id> must be
|
||||
a valid GPU ID and cannot be 0. If a context was successfully created
|
||||
the handle will be returned by glXCreateAssociatedContextAttribsAMD.
|
||||
If a context could not be created, NULL will be returned. Upon
|
||||
successful creation, no pixel format is tied to an associated context.
|
||||
|
||||
<share_list> must either be NULL or that of an associated context created
|
||||
with the the same GPU ID as <id>. If <share_list> was created using a
|
||||
different ID, glXCreateAssociatedContextAttribsAMD will fail and return NULL.
|
||||
|
||||
glXCreateAssociatedContextAttribsAMD can generate the following errors:
|
||||
GLXBadContext if <share_list> is neither zero nor a valid GLX rendering
|
||||
context; BadMatch if the server context state for share list exists in
|
||||
an address space that cannot be shared with the newly created context
|
||||
or if share list was created on a different screen than the one
|
||||
referenced by config; BadAlloc if the server does not have enough resources
|
||||
to allocate the new context.
|
||||
|
||||
A context must be deleted once it is no longer needed. Use the
|
||||
following call to delete an associated context:
|
||||
|
||||
Bool glXDeleteAssociatedContextAMD(GLXContext ctx);
|
||||
|
||||
If the function succeeds, TRUE will be returned, otherwise FALSE is
|
||||
returned. <ctx> must be a valid associated context created by
|
||||
calling glXCreateAssociatedContextAMD. If an unassociated context,
|
||||
created by calling glXCreateNewContext, is passed into <ctx>, the
|
||||
function will fail. An associated context cannot be deleted by calling
|
||||
glXDestroyContext. If an associated context is passed into
|
||||
glXDestroyContext, the result is undefiend.
|
||||
|
||||
To render using an associated context, it must be made the current
|
||||
context for a thread:
|
||||
|
||||
Bool glXMakeAssociatedContextCurrentAMD(GLXContext ctx);
|
||||
|
||||
<ctx> is a context handle created by calling
|
||||
glXCreateAssociatedContextAMD. If <ctx> was created using
|
||||
glXCreateNewContext, the call will fail, FALSE will be returned and
|
||||
the error BadAccess will be generated. If <ctx> is not a valid context
|
||||
and not NULL, the call will fail, FALSE will be returned and the error
|
||||
GLXBadContext will be generated. If the call succeeds, TRUE will be
|
||||
returned. To detach the current associated context, pass NULL as <ctx>.
|
||||
|
||||
Only one type of context can be current to a thread at a time. If an
|
||||
unassociated context is current to a thread when
|
||||
glXMakeAssociatedContextCurrentAMD is called with a valid <ctx>, it
|
||||
is as if glxMakeContextCurrent is called first with a ctx value of NULL.
|
||||
If an associated context is current and glxMakeContextCurrent is called
|
||||
with a valid context, it is as if glXMakeAssociatedContextCurrentAMD is
|
||||
called with a ctx value of NULL.
|
||||
|
||||
The current associated context can be queried by calling:
|
||||
|
||||
GLXContext glXGetCurrentAssociatedContextAMD(void);
|
||||
|
||||
The current associated context is returned on a successful call to
|
||||
this function. If no associated context is current, NULL is returned.
|
||||
If an unassociated context is current, NULL will be returned.
|
||||
|
||||
An associated context can not be passed in as a parameter into
|
||||
glXCopyContext. If an associated context is passed into glXCopyContext,
|
||||
the error GLXBadContext will be generated.
|
||||
|
||||
The addresses returned from glXGetProcAddressARB are only valid for the
|
||||
current context. It may be invalid to use proc addresses obtained from
|
||||
a traditional context with an associated context. Furthermore, the
|
||||
OpenGL version and extensions supported on an associated context may
|
||||
differ. Each context should be treated seperately, proc addressses
|
||||
should be queried for each after context creation.
|
||||
|
||||
Calls to glXSwapBuffers when an associated context is current will have
|
||||
no effect.
|
||||
|
||||
There is no way to use pBuffers with associated contexts.
|
||||
|
||||
Overlays and underlays are not supported with associated contexts.
|
||||
|
||||
The same associated context is used for both write and read operations.
|
||||
|
||||
To facilitate high performance data communication between multiple
|
||||
contexts, a new function is necessary to blit data from one context
|
||||
to another.
|
||||
|
||||
VOID glXBlitContextFramebufferAMD(GLXContext dstCtx, GLint srcX0, GLint srcY0,
|
||||
GLint srcX1, GLint srcY1, GLint dstX0,
|
||||
GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter);
|
||||
|
||||
<dstCtx> is the context handle for the write context. <mask> is the
|
||||
bitwise OR of a number of values indicating which buffers are to be
|
||||
copied. The values are GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and
|
||||
GL_STENCIL_BUFFER_BIT, which are described in section 4.2.3. The
|
||||
pixels corresponding to these buffers are copied from the source
|
||||
rectangle, bound by the locations (srcX0, srcY0) and (srcX1, srcY1),
|
||||
to the destination rectangle, bound by the locations (dstX0, dstY0)
|
||||
and (dstX1, dstY1). The lower bounds of the rectangle are inclusive,
|
||||
while the upper bounds are exclusive.
|
||||
|
||||
The source context is the current GL context. Specifying the current
|
||||
GL context as the <dstCtx> will result in the error
|
||||
GL_INVALID_OPERATION being generated. If <dstCtx> is invalid, the
|
||||
error GL_INVALID_OPERATION will be generated. If no context is
|
||||
current at the time of this call, the error GL_INVALID_OPERATION
|
||||
will be generated. These errors may be queried by calling glGetError.
|
||||
The target framebuffer will be the framebuffer bound to
|
||||
GL_DRAW_FRAMEBUFFER_EXT in the context <dstCtx>. The source framebuffer
|
||||
will be the framebuffer bound to GL_READ_FRAMEBUFFER_EXT in the
|
||||
currently bound context.
|
||||
|
||||
The restrictions that apply to the source and destination rectangles
|
||||
specified with <srcX0>, <srcY0>, <srcX1>, <srcY1>, <dstX0>, <dstY0>
|
||||
<dstX0>, and <dstY0> are the same as those that apply for
|
||||
glBlitFramebufferEXT. The same error conditions exist as for
|
||||
glBlitFramebufferEXT.
|
||||
|
||||
When called, this function will execute immediately in the currently
|
||||
bound context. It is up to the caller to maintain appropriate
|
||||
synchronization between the current context and <dstCtx> to ensure
|
||||
rendering to the appropriate surfaces has completed on the current
|
||||
and <dstCtx> contexts.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
Modify the beginning of section 4.4.1 as follows:
|
||||
|
||||
When an assoicated context is bound, the default state for an associated
|
||||
context is invalid for rendering. Because there is no attached window,
|
||||
there is no default framebuffer surface to render to. An app created
|
||||
framebuffer object must be bound for rendering to be valid. If the
|
||||
object bound to GL_FRAMEBUFFER_BINDING_EXT is 0, it is as if the
|
||||
framebuffer is incomplete, and an
|
||||
GL_INVALID_FRAMEBUFFER_OPERATION_EXT error will be generated
|
||||
where rendering is attempted.
|
||||
|
||||
|
||||
New State
|
||||
|
||||
None
|
||||
|
||||
|
||||
Interactions with GL_EXT_framebuffer_blit
|
||||
|
||||
If the framebuffer blit extension is not supported, all language
|
||||
referring to glBlitFramebufferEXT and glXBlitContextFramebufferAMD
|
||||
is removed.
|
||||
|
||||
Interactions with GL_EXT_framebuffer_object
|
||||
|
||||
If GLX_AMD_gpu_association is supported, a context created with it
|
||||
will also support EXT_framebuffer_object.
|
||||
|
||||
|
||||
Interactions with GLX_SGI_make_current_read
|
||||
|
||||
If the make current read extension is supported, it is invalid to pass
|
||||
an associated context handle as a parameter to
|
||||
glXMaketCurrentReadSGI. If an associated context is passed into
|
||||
glXMaketCurrentReadSGI, the error GLXBadContext will be generated.
|
||||
|
||||
Interactions with GLX_create_context
|
||||
|
||||
If GLX_create_context is not supported, all language
|
||||
referring to glXCreateAssociatedContextAttribsAMD is removed.
|
||||
|
||||
|
||||
Issues
|
||||
|
||||
1) Should the language for the new context creation methods be added to
|
||||
GLX 1.4 section 3.3.7 or in a new section?
|
||||
|
||||
Resolved. Although it is also possible to add this exension text to
|
||||
section 3.3.7, the resulting text would not flow well or be as coherent.
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- -------- -------- ---------------------------------------------
|
||||
|
||||
2 09/18/2014 gsellers Fixed types in function prototypes.
|
||||
Update contact. Minor formatting fixes.
|
||||
0.1 11/04/2009 nickh Initial version.
|
||||
@@ -0,0 +1,502 @@
|
||||
Name
|
||||
|
||||
AMD_gpu_association
|
||||
|
||||
Name Strings
|
||||
|
||||
WGL_AMD_gpu_association
|
||||
|
||||
Contact
|
||||
|
||||
Nick Haemel, AMD (nick.haemel 'at' amd.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: March 03, 2009
|
||||
Author Revision: 1.0
|
||||
|
||||
Based on: WGL_ARB_make_current_read specification
|
||||
Date: 3/15/2000 Version: 1.1
|
||||
|
||||
EXT_framebuffer_object specification
|
||||
Date: 2/13/2007 Revision #119
|
||||
|
||||
Number
|
||||
|
||||
361
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.5 is required.
|
||||
|
||||
WGL_ARB_extensions_string is required.
|
||||
|
||||
GL_EXT_framebuffer_object is required.
|
||||
|
||||
This extension interacts with WGL_ARB_make_current_read.
|
||||
|
||||
This extension interacts with GL_EXT_framebuffer_blit.
|
||||
|
||||
This extension interacts with WGL_ARB_create_context.
|
||||
|
||||
|
||||
Overview
|
||||
|
||||
|
||||
There currently is no way for applications to efficiently use GPU
|
||||
resources in systems that contain more than one GPU. Vendors have
|
||||
provided methods that attempt to split the workload for an
|
||||
application among the available GPU resources. This has proven to be
|
||||
very inefficient because most applications were never written with
|
||||
these sorts of optimizations in mind.
|
||||
|
||||
This extension provides a mechanism for applications to explicitly
|
||||
use the GPU resources on a given system individually. By providing
|
||||
this functionality, a driver allows applications to make appropriate
|
||||
decisions regarding where and when to distribute rendering tasks.
|
||||
|
||||
The set of GPUs available on a system can be queried by calling
|
||||
wglGetGPUIDsAMD(). The current GPU assigned to a specific context
|
||||
can be determined by calling wglGetContextGPUIDAMD. Each GPU in a
|
||||
system may have different performance characteristics in addition
|
||||
to supporting a different version of OpenGL. The specifics of each
|
||||
GPU can be obtained by calling wglGetGPUInfo. This will allow
|
||||
applications to pick the most appropriate GPU for each rendering
|
||||
task.
|
||||
|
||||
Once all necessary GPU information has been obtained, a context tied
|
||||
to a specific GPU can be created with wglCreateAssociatedContextAMD.
|
||||
These associated contexts can be made current with
|
||||
wglMakeAssociatedContextCurrentAMD and deleted with
|
||||
wglDeleteAssociatedContextAMD. Only one GPU associated or
|
||||
non-associated context can be current at one time per thread.
|
||||
|
||||
To provide an accelerated path for blitting data from one context
|
||||
to another, the new blit function BlitContextFramebufferAMD has
|
||||
been added.
|
||||
|
||||
|
||||
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
UINT wglGetGPUIDsAMD(UINT maxCount, UINT *ids);
|
||||
|
||||
INT wglGetGPUInfoAMD(UINT id, INT property, GLenum dataType,
|
||||
UINT size, void *data)
|
||||
|
||||
UINT wglGetContextGPUIDAMD(HGLRC hglrc);
|
||||
|
||||
HGLRC wglCreateAssociatedContextAMD(UINT id);
|
||||
|
||||
HGLRC wglCreateAssociatedContextAttribsAMD(UINT id, HGLRC hShareContext,
|
||||
const int *attribList);
|
||||
|
||||
BOOL wglDeleteAssociatedContextAMD(HGLRC hglrc);
|
||||
|
||||
BOOL wglMakeAssociatedContextCurrentAMD(HGLRC hglrc);
|
||||
|
||||
HGLRC wglGetCurrentAssociatedContextAMD(void);
|
||||
|
||||
VOID wglBlitContextFramebufferAMD(HGLRC dstCtx, GLint srcX0, GLint srcY0,
|
||||
GLint srcX1, GLint srcY1, GLint dstX0,
|
||||
GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <property> parameter of wglGetGPUInfo:
|
||||
|
||||
WGL_GPU_VENDOR_AMD 0x1F00
|
||||
WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
WGL_GPU_RAM_AMD 0x21A3
|
||||
WGL_GPU_CLOCK_AMD 0x21A4
|
||||
WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||
WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||
WGL_GPU_NUM_RB_AMD 0x21A7
|
||||
WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||
|
||||
Accepted by the <dataType> argument of wglGetGPUInfoAMD:
|
||||
|
||||
GL_UNSIGNED_BYTE
|
||||
GL_UNSIGNED_INT
|
||||
GL_INT
|
||||
GL_FLOAT
|
||||
|
||||
Accepted by the <mask> argument of wglBlitContextFramebufferAMD:
|
||||
|
||||
GL_COLOR_BUFFER_BIT
|
||||
GL_DEPTH_BUFFER_BIT
|
||||
GL_STENCIL_BUFFER_BIT
|
||||
|
||||
|
||||
Additions to the GLX Specification
|
||||
|
||||
This specification is written for WGL.
|
||||
|
||||
|
||||
GLX Protocol
|
||||
|
||||
This specification is written for WGL.
|
||||
|
||||
|
||||
Additions to the WGL Specification
|
||||
|
||||
GPU Associated Contexts
|
||||
|
||||
When multiple GPUs are present, a context can be created for
|
||||
off-screen rendering that is associated with a specific GPU.
|
||||
This will allow applications to achieve an app-specific
|
||||
distributed GPU utilization.
|
||||
|
||||
The IDs for available GPUs can be queried with the command:
|
||||
|
||||
UINT wglGetGPUIDsAMD(UINT maxCount, UINT *ids);
|
||||
|
||||
where <maxCount> is the max number of IDs that can be returned and
|
||||
<ids> is the array of returned IDs. If the function succeeds,
|
||||
the return value is the number of total GPUs available. The
|
||||
value 0 is returned if no GPUs are available or if the call has
|
||||
failed. The array pointer <ids> passed into the function will be
|
||||
populated by the smaller of maxCount or the total GPU count
|
||||
available. The ID 0 is reserved and will not be retuned as a
|
||||
valid GPU ID. If the array <ids> is NULL, the function will
|
||||
only return the total number of GPUs. <ids> will be tightly packed
|
||||
with no 0 values between valid ids.
|
||||
|
||||
Calling wglGetGPUIDsAMD once with <maxCount> set to zero returns
|
||||
the total available GPU count which can be used to allocate an
|
||||
appropriately sized id array before calling wglGetGPUIDsAMD
|
||||
again to query the full set of supported GPUs.
|
||||
|
||||
Each GPU in a system may have different properties, performance
|
||||
characteristics and different supported OpenGL versions. To
|
||||
determine which GPU is best suited for a specific task the
|
||||
following functions may be used:
|
||||
|
||||
INT wglGetGPUInfoAMD(UINT id, INT property, GLenum dataType,
|
||||
UINT size, void *data);
|
||||
|
||||
<id> is a GPU id obtained from calling wglGetGPUIDsAMD. The GPU ID
|
||||
must be a valid GPU ID. The function will fail if <id> is an invalid
|
||||
GPU ID and -1 will be returned. <property> is the information being
|
||||
queried. <dataType> may be GL_UNSIGNED_INT, GL_INT, GL_FLOAT, or
|
||||
GL_UNSIGNED_BYTE and signals what data type is to be returned. <size>
|
||||
signals the size of the data buffer passed into wglGetGPUInfoAMD.
|
||||
This is the count of the array of type <dataType>. <data> is the
|
||||
buffer which will be filled with the requested information. For a
|
||||
string, <size> will be the number of characters allocated and will
|
||||
include NULL termination. For arrays of type GL_UNSIGNED_INT, GL_INT,
|
||||
and GL_FLOAT <size> will be the array depth. If the function
|
||||
succeeds, the number of values written will be returned. If the number
|
||||
of values written is equal to <size>, the query should be repeated with
|
||||
a larger <data> buffer. Strings should be queried using the
|
||||
GL_UNSIGNED_BYTE type, are UTF-8 encoded and will be NULL terminated.
|
||||
If the function fails, -1 will be returned.
|
||||
|
||||
<property> defines the GPU property to be queried, and may be one of
|
||||
WGL_GPU_OPENGL_VERSION_STRING_AMD, WGL_GPU_RENDERER_STRING_AMD,
|
||||
WGL_GPU_FASTEST_TARGET_GPUS_AMD, WGL_GPU_RAM_AMD, WGL_GPU_CLOCK_AMD,
|
||||
WGL_GPU_NUM_PIPES_AMD, WGL_GPU_NUM_SIMD_AMD, WGL_GPU_NUM_RB_AMD, or
|
||||
WGL_GPU_NUM_SPI_AMD.
|
||||
|
||||
If <size> is not sufficient to hold the entire value for a particular
|
||||
property, the number of values returned will equal <size>. If
|
||||
<dataType> is inappropriate for <property>, for instance INT for a
|
||||
property which is a string, the function will fail and -1 will be
|
||||
returned.
|
||||
|
||||
Querying WGL_GPU_OPENGL_VERSION_STRING_AMD returns the highest supported
|
||||
OpenGL version string and WGL_GPU_RENDERER_STRING_AMD returns name
|
||||
of the GPU. <dataType> must be GL_UNSIGNED_BYTE with the previous
|
||||
properties. Querying WGL_GPU_FASTEST_TARGET_GPUS_AMD returns an array
|
||||
of the IDs of GPUs with the fastest data blit rates when using
|
||||
wglBlitContextFramebufferAMD. This list is ordered fastest
|
||||
first. This provides a performance hint about which contexts and GPUS
|
||||
are capable of transfering data between each other the quickest. Querying
|
||||
WGL_GPU_RAM_AMD returns the amount of RAM available to GPU in MB. Querying
|
||||
WGL_GPU_CLOCK_AMD returns the GPU clock speed in MHz. Querying
|
||||
WGL_GPU_NUM_PIPES_AMD returns the nubmer of 3D pipes. Querying
|
||||
WGL_GPU_NUM_SIMD_AMD returns the number of SIMD ALU units in each
|
||||
shader pipe. Querying WGL_GPU_NUM_RB_AMD returns the number of render
|
||||
backends. Querying WGL_GPU_NUM_SPI_AMD returns the number of shader
|
||||
parameter interpolaters. If the <parameter> being queried is not
|
||||
applicable for the GPU specified by <id>, the value 0 will be returned.
|
||||
|
||||
Unassociated contexts are created by calling wglCreateContext.
|
||||
Although these contexts are unassociated, their use will still be
|
||||
tied to a single GPU in most cases. For this reason it is advantageous
|
||||
to be able to query the GPU an existing unassociated context resides
|
||||
on. If multiple GPUs are available, it would be undesirable
|
||||
to use one for rendering to visible surfaces and then chose the
|
||||
same one for off-screen rendering. Use the following command to
|
||||
determine which GPU a context is attached to:
|
||||
|
||||
UINT wglGetContextGPUIDAMD(HGLRC hglrc);
|
||||
|
||||
<hglrc> is the context for which the GPU id will be returned. If the
|
||||
context is invalid or if an error has occurred, wglGetContextGPUIDAMD
|
||||
will return 0.
|
||||
|
||||
To create an associated context, use:
|
||||
|
||||
HGLRC wglCreateAssociatedContextAMD(UINT id);
|
||||
|
||||
<id> must be a valid GPU id and cannot be 0. If a context was
|
||||
successfully created the handle will be returned by
|
||||
wglCreateAssociatedContextAMD. If a context could not be created, NULL
|
||||
will be returned. If a context could not be created, error information
|
||||
can be obtained by calling GetLastError. Upon successful creation,
|
||||
no pixel format is tied to an associated context.
|
||||
|
||||
To create an associated context and request a specific GL version, use:
|
||||
|
||||
HGLRC wglCreateAssociatedContextAttribsAMD(UINT id,
|
||||
HGLRC hShareContext, const int *attribList)
|
||||
|
||||
All capabilities and limitations of wglCreateContextAttribsARB apply
|
||||
to wglCreateAssociatedContextAttribsAMD. Additionally, <id> must be
|
||||
a valid GPU ID and cannot be 0. If a context was successfully created
|
||||
the handle will be returned by wglCreateAssociatedContextAttribsAMD.
|
||||
If a context could not be created, NULL will be returned. In this
|
||||
case, error information can be obtained by calling GetLastError. Upon
|
||||
successful creation, no pixel format is tied to an associated context.
|
||||
|
||||
<hShareContext> must either be NULL or that of an associated context
|
||||
created with the the same GPU ID as <id>. If <hShareContext> was
|
||||
created using a different ID, wglCreateAssociatedContextAttribsAMD
|
||||
will fail and return NULL.
|
||||
|
||||
|
||||
A context must be deleted once it is no longer needed. Use the
|
||||
following call to delete an associated context:
|
||||
|
||||
BOOL wglDeleteAssociatedContextAMD(HGLRC hglrc);
|
||||
|
||||
If the function succeeds, TRUE will be returned, otherwise FALSE is
|
||||
returned. <hglrc> must be a valid associated context created by
|
||||
calling wglCreateAssociatedContextAMD. If an unassociated context,
|
||||
created by calling wglCreateContext, is passed into <hglrc>, the
|
||||
function will fail. An associated context cannot be deleted by calling
|
||||
wglDeleteContext. If an associated context is passed into
|
||||
wglDeleteContext, the result is undefiend.
|
||||
|
||||
To render using an associated context, it must be made the current
|
||||
context for a thread:
|
||||
|
||||
BOOL wglMakeAssociatedContextCurrentAMD(HGLRC hglrc);
|
||||
|
||||
<hglrc> is a context handle created by calling
|
||||
wglCreateAssociatedContextAMD. If <hglrc> was created using
|
||||
wglCreateContext, the call will fail and FALSE will be returned. If
|
||||
<hglrc> is not a valid context and not NULL, the call will fail and
|
||||
FALSE will be returned. If the call succeeds, TRUE will be returned.
|
||||
To detach the current associated context, pass NULL as <hglrc>.
|
||||
|
||||
Only one type of context can be current to a thread at a time. If an
|
||||
unassociated context is current to a hdc when
|
||||
wglMakeAssociatedContextCurrentAMD is called with a valid <hglrc>, it
|
||||
is as if wglMakeCurrent is called first with an hglrc of NULL. If an
|
||||
associated context is current and wglMakeCurrent is called with a
|
||||
valid context, it is as if wglMakeAssociatedContextCurrentAMD is
|
||||
called with an hglrc of NULL.
|
||||
|
||||
The current associated context can be queried by calling:
|
||||
|
||||
HGLRC wglGetCurrentAssociatedContextAMD(void);
|
||||
|
||||
The current associated context is returned on a successful call to
|
||||
this function. If no associated context is current, NULL is returned.
|
||||
If an unassociated context is current, NULL will be returned.
|
||||
|
||||
Associated contexts can be shared just as unassociated contexts can by
|
||||
calling wglShareLists. Associated contexts can only be shared with
|
||||
other contexts that were created with the same GPU id. Associated
|
||||
contexts cannot be shared with non-associated contexts. FALSE will be
|
||||
returned if either context is not valid or not an associated context
|
||||
associated with the same GPU.
|
||||
|
||||
An associated context can not be passed in as a parameter into
|
||||
wglCopyContext. If an associated context is passed into wglCopyContext,
|
||||
the result is undefiend.
|
||||
|
||||
The addresses returned from wglGetProcAddress are only valid for the
|
||||
current context. It may be invalid to use proc addresses obtained from
|
||||
a traditional context with an associated context. Furthermore, the
|
||||
OpenGL version and extensions supported on an associated context may
|
||||
differ. Each context should be treated seperately, proc addressses
|
||||
should be queried for each after context creation.
|
||||
|
||||
Calls to wglSwapBuffers and wglSwapLayerBuffers when an associated
|
||||
context is current will return FALSE and will have no effect.
|
||||
|
||||
There is no way to use pBuffers with associated contexts.
|
||||
|
||||
Overlays and underlays are not supported with associated contexts.
|
||||
|
||||
The same associated context is used for both write and read operations.
|
||||
|
||||
To facilitate high performance data communication between multiple
|
||||
contexts, a new function is necessary to blit data from one context
|
||||
to another.
|
||||
|
||||
VOID wglBlitContextFramebufferAMD(HGLRC dstCtx, GLint srcX0, GLint srcY0,
|
||||
GLint srcX1, GLint srcY1, GLint dstX0,
|
||||
GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter);
|
||||
|
||||
<dstCtx> is the context handle for the write context. <mask> is the
|
||||
bitwise OR of a number of values indicating which buffers are to be
|
||||
copied. The values are GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and
|
||||
GL_STENCIL_BUFFER_BIT, which are described in section 4.2.3. The
|
||||
pixels corresponding to these buffers are copied from the source
|
||||
rectangle, bound by the locations (srcX0, srcY0) and (srcX1, srcY1),
|
||||
to the destination rectangle, bound by the locations (dstX0, dstY0)
|
||||
and (dstX1, dstY1). The lower bounds of the rectangle are inclusive,
|
||||
while the upper bounds are exclusive.
|
||||
|
||||
The source context is the current GL context. Specifying the current
|
||||
GL context as the <dstCtx> will result in the error
|
||||
GL_INVALID_OPERATION being generated. If <dstCtx> is invalid, the
|
||||
error GL_INVALID_OPERATION will be generated. If no context is
|
||||
current at the time of this call, the error GL_INVALID_OPERATION
|
||||
will be generated. These errors may be queried by calling glGetError.
|
||||
The target framebuffer will be the framebuffer bound to
|
||||
GL_DRAW_FRAMEBUFFER_EXT in the context <dstCtx>. The source framebuffer
|
||||
will be the framebuffer bound to GL_READ_FRAMEBUFFER_EXT in the
|
||||
currently bound context.
|
||||
|
||||
The restrictions that apply to the source and destination rectangles
|
||||
specified with <srcX0>, <srcY0>, <srcX1>, <srcY1>, <dstX0>, <dstY0>
|
||||
<dstX0>, and <dstY0> are the same as those that apply for
|
||||
glBlitFramebufferEXT. The same error conditions exist as for
|
||||
glBlitFramebufferEXT.
|
||||
|
||||
When called, this function will execute immediately in the currently
|
||||
bound context. It is up to the caller to maintain appropriate
|
||||
synchronization between the current context and <dstCtx> to ensure
|
||||
rendering to the appropriate surfaces has completed on the current
|
||||
and <dstCtx> contexts.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment
|
||||
Operations and the Frame Buffer)
|
||||
Modify the beginning of section 4.4.1 as follows:
|
||||
|
||||
When an assoicated context is bound, the default state for an associated
|
||||
context is invalid for rendering. Because there is no attached window,
|
||||
there is no default framebuffer surface to render to. An app created
|
||||
framebuffer object must be bound for rendering to be valid. If the
|
||||
object bound to GL_FRAMEBUFFER_BINDING_EXT is 0, it is as if the
|
||||
framebuffer is incomplete, and an
|
||||
GL_INVALID_FRAMEBUFFER_OPERATION_EXT error will be generated
|
||||
where rendering is attempted.
|
||||
|
||||
|
||||
New State
|
||||
|
||||
None
|
||||
|
||||
|
||||
Interactions with GL_EXT_framebuffer_blit
|
||||
|
||||
If the framebuffer blit extension is not supported, all language
|
||||
referring to glBlitFramebufferEXT and wglBlitContextFramebufferAMD
|
||||
is removed.
|
||||
|
||||
Interactions with GL_EXT_framebuffer_object
|
||||
|
||||
If WGL_AMD_gpu_association is supported, and context created with it
|
||||
will also support EXT_framebuffer_object.
|
||||
|
||||
|
||||
Interactions with WGL_ARB_make_current_read
|
||||
|
||||
If the make current read extension is supported, it is invalid to pass
|
||||
an associated context handle as a parameter to
|
||||
wglMakeContextCurrentARB. If an associated context is passed into
|
||||
wglMakeContextCurrentARB, the result is undefiend.
|
||||
|
||||
Interactions with WGL_ARB_create_context
|
||||
If wglCreateContextAttribsARB is not supported, all language
|
||||
referring to wglCreateAssociatedContextAttribsAMD is removed.
|
||||
|
||||
|
||||
Issues
|
||||
|
||||
1. Is a different DC necessary in addition to an associated context?
|
||||
|
||||
- Resolved. It seems unnecessary. An associated DC would be a virtual
|
||||
DC with no real meaning. Using an associated DC would require apps to
|
||||
create windows and set pixelformats that are meaningless.
|
||||
|
||||
2. Should the list of IDs returned by wglGetGPUIDs be ordered in some
|
||||
way? By fastest GPU?
|
||||
|
||||
- Resolved. There is no need to create a restriction. The GPU info can
|
||||
be queried.
|
||||
|
||||
3. What happens when the GPUs support different versions of OpenGL?
|
||||
Do we allow this? Do we need the
|
||||
|
||||
- Resolved. It is the applications responsibility to use each GPU
|
||||
appropriately based on the supported version of OpenGL.
|
||||
|
||||
4. What should the relation between wglMakeAssociatedContextCurrentAMD and
|
||||
wglMakeCurrent be? Should it be legal to have an associated context and a
|
||||
normal context current to the same thread?
|
||||
|
||||
- Resolved. It seems feasible to have an associated context and a normal
|
||||
one both current, but for simplicity, only one of any type will be allowed
|
||||
per thead.
|
||||
|
||||
5. Will a call to wglShareLists with contexts that were not created through
|
||||
wglCreateContext make it through to the driver? If not, will a new
|
||||
shareLists call be necessary?
|
||||
|
||||
-Resolved. This is not an issue.
|
||||
|
||||
6. Is GPUClock a good parameter for the GPUInfo structure? How should
|
||||
relative GPU performance be presented?
|
||||
|
||||
- Resolved. This is sufficent. One alternative would be to test execution of
|
||||
some amount of geometry rendering. But applications are better positioned
|
||||
to perform this based on their rendering needs.
|
||||
|
||||
7. Is BlitContextFramebufferEXT the best way to transfer data from one
|
||||
context to another? Or would it be better to create a read and write
|
||||
context bind point?
|
||||
|
||||
- Resolved. Both methods would work well. Adding a new function prevents
|
||||
the additional state that would have to be tracked for a global read and
|
||||
write bind point. In addition, using global (wgl) bind points may
|
||||
introduce mutability issues when multiple threads are being used.
|
||||
Only one thread could use the interface at a time.
|
||||
|
||||
8. Should the GPU ID be part of the pixel format? That would allow
|
||||
apps to search for a format that worked on different GPUs.
|
||||
|
||||
- Resolved. Using the pixel format would provide a non-intrusive solution,
|
||||
but would require the app to use a DC that is not available through
|
||||
current interfaces. In addition, the app would have to create a
|
||||
dummy window.
|
||||
|
||||
9. Are there any problems calling wglShareLists with contexts not created
|
||||
by Windows?
|
||||
|
||||
- Resolved. This is not an issue.
|
||||
|
||||
10. What should happen in an associated context when the default FBO is
|
||||
bound? The 2 options seem to be 1. Throw an error and do not render,
|
||||
2. Discard all rendering as failing the pixel ownership test.
|
||||
|
||||
- The first option seems more logical.
|
||||
|
||||
|
||||
Revision History
|
||||
03/03/2009 - Initial version written. Written by nickh
|
||||
@@ -0,0 +1,156 @@
|
||||
Name
|
||||
|
||||
ANDROID_extension_pack_es31a
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANDROID_extension_pack_es31a
|
||||
|
||||
Contact
|
||||
|
||||
Jesse Hall (jessehall 'at' google.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Jesse Hall, Google
|
||||
|
||||
Status
|
||||
|
||||
Complete.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: July 7, 2014
|
||||
Revision: 3
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #187
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL ES 3.1 and GLSL ES 3.10 are required.
|
||||
|
||||
The following extensions are required:
|
||||
* KHR_debug
|
||||
* KHR_texture_compression_astc_ldr
|
||||
* KHR_blend_equation_advanced
|
||||
* OES_sample_shading
|
||||
* OES_sample_variables
|
||||
* OES_shader_image_atomic
|
||||
* OES_shader_multisample_interpolation
|
||||
* OES_texture_stencil8
|
||||
* OES_texture_storage_multisample_2d_array
|
||||
* EXT_copy_image
|
||||
* EXT_draw_buffers_indexed
|
||||
* EXT_geometry_shader
|
||||
* EXT_gpu_shader5
|
||||
* EXT_primitive_bounding_box
|
||||
* EXT_shader_io_blocks
|
||||
* EXT_tessellation_shader
|
||||
* EXT_texture_border_clamp
|
||||
* EXT_texture_buffer
|
||||
* EXT_texture_cube_map_array
|
||||
* EXT_texture_sRGB_decode
|
||||
|
||||
Overview
|
||||
|
||||
This extension changes little functionality directly. Instead it serves to
|
||||
roll up the 20 extensions it requires, allowing applications to check for
|
||||
all of them at once, and enable all of their shading language features with
|
||||
a single #extension statement. The Android platform provides special support
|
||||
outside of OpenGL ES to help applications target this set of extensions.
|
||||
|
||||
In addition, this extension ensures support for images, shader storage
|
||||
buffers, and atomic counters in fragment shaders. In unextended OpenGL ES
|
||||
the minimum value of the relevant implementation-defined limits is zero;
|
||||
this extension raises these minimums to match the minimums for compute
|
||||
shaders.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
None
|
||||
|
||||
Modifications to Chapter 20 of the OpenGL ES 3.1 Specification (State Tables)
|
||||
|
||||
Modify Table 20.44, Implementation Dependent Fragment Shader Limits, p. 395:
|
||||
|
||||
Get Value Type Get Command Minimum Value Description Sec.
|
||||
----------------------- ---- ----------- ------------- ------------------------- -----
|
||||
MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS Z+ GetIntegerv 1 No. of atomic counter 7.7
|
||||
buffers accessed by a
|
||||
fragment shader
|
||||
MAX_FRAGMENT_ATOMIC_COUNTERS Z+ GetIntegerv 8 No. of atomic counters 7.7
|
||||
accessed by a fragment
|
||||
shader
|
||||
MAX_FRAGMENT_IMAGE_UNIFORMS Z+ GetIntegerv 4 No. of image variables in 11.1.3
|
||||
fragment shaders
|
||||
MAX_FRAGMENT_SHADER_STORAGE_BLOCKS Z+ GetIntegerv 4 No. of shader storage 7.8
|
||||
blocks accessed by a
|
||||
fragment shader
|
||||
[[Change minimum values]]
|
||||
|
||||
Modifications to The OpenGL ES Shading Language Specification, Version 3.10
|
||||
(Revision 5)
|
||||
|
||||
Including the following line in a shader:
|
||||
|
||||
#extension GL_ANDROID_extension_pack_es31a : <behavior>
|
||||
|
||||
has the same effect as including the following lines:
|
||||
|
||||
#extension GL_KHR_blend_equation_advanced : <behavior>
|
||||
#extension GL_OES_sample_variables : <behavior>
|
||||
#extension GL_OES_shader_image_atomic : <behavior>
|
||||
#extension GL_OES_shader_multisample_interpolation : <behavior>
|
||||
#extension GL_OES_texture_storage_multisample_2d_array : <behavior>
|
||||
#extension GL_EXT_geometry_shader : <behavior>
|
||||
#extension GL_EXT_gpu_shader5 : <behavior>
|
||||
#extension GL_EXT_primitive_bounding_box : <behavior>
|
||||
#extension GL_EXT_shader_io_blocks : <behavior>
|
||||
#extension GL_EXT_tessellation_shader : <behavior>
|
||||
#extension GL_EXT_texture_buffer : <behavior>
|
||||
#extension GL_EXT_texture_cube_map_array : <behavior>
|
||||
|
||||
where <behavior> is as specified in section 3.4.
|
||||
|
||||
A new preprocessor #define is added to the OpenGL ES Shading Language:
|
||||
|
||||
#define GL_ANDROID_extension_pack_es31a 1
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None
|
||||
|
||||
Issues
|
||||
|
||||
(1) Should all the extensions be enabled in all shader stages? What happens
|
||||
if an extension is enabled in a stage that it does not modify?
|
||||
|
||||
RESOLVED: All extensions are enabled in all stages.
|
||||
|
||||
Enabling this extension in a shader has exactly the same behavior as
|
||||
enabling each of the required extensions individually. None of the other
|
||||
extensions limit what shader stages they can be enabled in. Generally, if
|
||||
the modifications introduced by an extension do not apply to a shader stage,
|
||||
then enabling it in that stage is a no-op. If an extension does introduce
|
||||
new features to the language in a stage, a shader that doesn't use the new
|
||||
features will behave the same whether it enables the extension or not.
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
Revision 3, 2014/7/7 (Jesse Hall)
|
||||
- Changed status from "draft" to "complete"
|
||||
- Corrected capitalization of EXT_texture_sRGB_decode
|
||||
|
||||
Revision 2, 2014/5/2 (Jesse Hall)
|
||||
- Added dependency on EXT_primitive_bounding_box
|
||||
- Added and resolved Issue #1
|
||||
|
||||
Revision 1, 2014/4/18 (Jesse Hall)
|
||||
- Initial version
|
||||
@@ -0,0 +1,402 @@
|
||||
Name
|
||||
|
||||
ANGLE_depth_texture
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANGLE_depth_texture
|
||||
|
||||
Contributors
|
||||
|
||||
Nicolas Capens, TransGaming / Google
|
||||
Daniel Koch, TransGaming / NVIDIA
|
||||
Shannon Woods, TransGaming / Google
|
||||
Kenneth Russell, Google
|
||||
Vangelis Kokkevis, Google
|
||||
Gregg Tavares, Google
|
||||
Contributors to OES_depth_texture
|
||||
Contributors to OES_packed_depth_stencil
|
||||
|
||||
Contact
|
||||
|
||||
Shannon Woods, Google (shannonwoods 'at' google.com)
|
||||
|
||||
Status
|
||||
|
||||
Implemented in ANGLE.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: February 25, 2013
|
||||
Revision: #4
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #138
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL ES 2.0 is required.
|
||||
This extension is written against the OpenGL ES 2.0.25 specification
|
||||
|
||||
OES_packed_depth_stencil affects the definition of this extension.
|
||||
|
||||
EXT_texture_storage affects the definition of this extension.
|
||||
|
||||
Overview
|
||||
|
||||
This extension defines support for 2D depth and depth-stencil
|
||||
textures in an OpenGL ES implementation.
|
||||
|
||||
This extension incorporates the depth texturing functionality of
|
||||
OES_depth_texture and OES_packed_depth_stencil, but does not
|
||||
provide the ability to load existing data via TexImage2D or
|
||||
TexSubImage2D. This extension also allows implementation
|
||||
variability in which components from a sampled depth texture
|
||||
contain the depth data. Depth textures created with this
|
||||
extension only support 1 level.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <format> parameter of TexImage2D and TexSubImage2D and
|
||||
<internalformat> parameter of TexImage2D:
|
||||
|
||||
DEPTH_COMPONENT 0x1902
|
||||
DEPTH_STENCIL_OES 0x84F9
|
||||
|
||||
Accepted by the <type> parameter of TexImage2D, TexSubImage2D:
|
||||
|
||||
UNSIGNED_SHORT 0x1403
|
||||
UNSIGNED_INT 0x1405
|
||||
UNSIGNED_INT_24_8_OES 0x84FA
|
||||
|
||||
Accepted by the <internalformat> parameter of TexStorage2DEXT:
|
||||
|
||||
DEPTH_COMPONENT16 0x81A5
|
||||
DEPTH_COMPONENT32_OES 0x81A7
|
||||
DEPTH24_STENCIL8_OES 0x88F0
|
||||
|
||||
Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation)
|
||||
|
||||
Update Section 2.10.5 "Shader Execution" in the subsection titled
|
||||
"Texture Access" add a new paragraph before the last paragraph add
|
||||
this line:
|
||||
|
||||
"The stencil index texture internal component is ignored if the base
|
||||
internal format is DEPTH_STENCIL_OES.
|
||||
|
||||
If a vertex shader uses..."
|
||||
|
||||
Additions to Chapter 3 of the OpenGL ES 2.0 specification (Rasterization)
|
||||
|
||||
Add the following rows to Table 3.2 (page 62):
|
||||
|
||||
type Parameter GL Data Type Special
|
||||
------------------------------------------------
|
||||
... ... ...
|
||||
UNSIGNED_SHORT ushort No
|
||||
UNSIGNED_INT uint No
|
||||
UNSIGNED_INT_24_8_OES uint Yes
|
||||
|
||||
Add the following rows to Table 3.3 (page 62):
|
||||
|
||||
Format Name Element Meaning and Order Target Buffer
|
||||
------------------------------------------------------------------
|
||||
... ... ...
|
||||
DEPTH_COMPONENT Depth Depth
|
||||
DEPTH_STENCIL_OES Depth and Stencil Index Depth and Stencil
|
||||
... ... ...
|
||||
|
||||
Add a row to Table 3.5 "Packed pixel formats" (page 64):
|
||||
|
||||
type Parameter GL Type Components Pixel Formats
|
||||
------------------------------------------------------------------
|
||||
... ... ... ...
|
||||
UNSIGNED_INT_24_8_OES uint 2 DEPTH_STENCIL_OES
|
||||
|
||||
Add a new table after Table 3.6 (page 64):
|
||||
|
||||
UNSIGNED_INT_24_8_OES
|
||||
|
||||
31 30 29 28 27 26 ... 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||
+----------------------------------+---------------+
|
||||
| 1st Component | 2nd Component |
|
||||
+----------------------------------+---------------+
|
||||
|
||||
Table 3.6.B: UNSIGNED_INT formats
|
||||
|
||||
Add a row to Table 3.7 "Packed pixel field assignments" (page 65):
|
||||
|
||||
Format | 1st 2nd 3rd 4th
|
||||
------------------+-------------------------------
|
||||
... | ... ... ... ...
|
||||
DEPTH_STENCIL_OES | depth stencil N/A N/A
|
||||
|
||||
Add the following paragraph to the end of the section "Conversion to
|
||||
floating-point" (page 65):
|
||||
|
||||
"For groups of components that contain both standard components and index
|
||||
elements, such as DEPTH_STENCIL_OES, the index elements are not converted."
|
||||
|
||||
In section 3.7.1 "Texture Image Specification", update page 67 to
|
||||
say:
|
||||
|
||||
"The selected groups are processed as described in section 3.6.2, stopping
|
||||
just before final conversion. Each R, G, B, A, or depth value so generated
|
||||
is clamped to [0, 1], while the stencil index values are masked by 2^n-1,
|
||||
where n is the number of stencil bits in the internal format resolution
|
||||
(see below).
|
||||
|
||||
Components are then selected from the resulting R, G, B, A, depth, or
|
||||
stencil index values to obtain a texture with the base internal format
|
||||
specified by <internalformat>. Table 3.8 summarizes the mapping of R, G,
|
||||
B, A, depth, or stencil values to texture components, as a function of the
|
||||
base internal format of the texture image. <internalformat> may be
|
||||
specified as one of the internal format symbolic constants listed in
|
||||
table 3.8. Specifying a value for <internalformat> that is not one of the
|
||||
above values generates the error INVALID_VALUE. If <internalformat> does
|
||||
not match <format>, the error INVALID_OPERATION is generated.
|
||||
|
||||
Textures with a base internal format of DEPTH_COMPONENT or
|
||||
DEPTH_STENCIL_OES are supported by texture image specification commands
|
||||
only if <target> is TEXTURE_2D. Using these formats in conjunction with
|
||||
any other <target> will result in an INVALID_OPERATION error.
|
||||
|
||||
Textures with a base internal format of DEPTH_COMPONENT or
|
||||
DEPTH_STENCIL_OES only support one level of image data. Specifying a
|
||||
non-zero value for <level> will result in an INVALID_OPERATION error.
|
||||
|
||||
Textures with a base internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES
|
||||
require either depth component data or depth/stencil component data.
|
||||
Textures with other base internal formats require RGBA component data. The
|
||||
error INVALID_OPERATION is generated if the base internal format is
|
||||
DEPTH_COMPONENT or DEPTH_STENCIL_OES and <format> is not DEPTH_COMPONENT or
|
||||
DEPTH_STENCIL_OES, or if the base internal format is not DEPTH_COMPONENT or
|
||||
DEPTH_STENCIL_OES and <format> is DEPTH_COMPONENT or DEPTH_STENCIL_OES.
|
||||
|
||||
Textures with a base internal format of DEPTH_COMPONENT or
|
||||
DEPTH_STENCIL_OES do not support loading image data via the TexImage
|
||||
commands. They can only have their contents specified by rendering
|
||||
to them. The INVALID_OPERATION error is generated by the TexImage2D
|
||||
command if <data> is not NULL for such textures."
|
||||
|
||||
Add a row to table 3.8 (page 68), and update the title of the
|
||||
second column:
|
||||
|
||||
Base Internal Format RGBA, Depth and Stencil Values Internal Components
|
||||
-------------------------------------------------------------------------
|
||||
... ... ...
|
||||
DEPTH_COMPONENT Depth D
|
||||
DEPTH_STENCIL_OES Depth,Stencil D,S
|
||||
... ... ...
|
||||
|
||||
Update the caption for table 3.8 (page 68)
|
||||
|
||||
"Table 3.8: Conversion from RGBA, depth, and stencil pixel components to
|
||||
internal texture components. Texture components R, G, B, A, and L are
|
||||
converted back to RGBA colors during filtering as shown in table 3.12.
|
||||
Texture components D are converted to RGBA colors as described in
|
||||
section 3.7.8-1/2."
|
||||
|
||||
Add the following to section 3.7.2 "Alternate Texture Image Specification
|
||||
Commands":
|
||||
|
||||
"CopyTexImage2D and CopyTexSubImage2D generate the INVALID_OPERATION
|
||||
error if the base internal format of the destination texture is
|
||||
DEPTH_COMPONENT or DEPTH_STENCIL_OES.
|
||||
|
||||
TexSubImage2D generates the INVALID_OPERATION error if the base internal
|
||||
format of the texture is DEPTH_COMPONENT or DEPTH_STENCIL_OES."
|
||||
|
||||
Add a new section between sections 3.7.8 and 3.7.9:
|
||||
|
||||
"3.7.8-1/2 Depth/Stencil Textures
|
||||
|
||||
If the currently bound texture's base internal format is DEPTH_COMPONENT or
|
||||
DEPTH_STENCIL_OES, then the output of the texture unit is as described
|
||||
below. Otherwise, the texture unit operates in the normal manner.
|
||||
|
||||
Let <D_t> be the depth texture value, provided by the shader's texture lookup
|
||||
function. Then the effective texture value is computed as follows:
|
||||
<Tau> = <D_t>
|
||||
|
||||
If the texture image has a base internal format of DEPTH_STENCIL_OES, then
|
||||
the stencil index texture component is ignored. The texture value <Tau> does
|
||||
not include a stencil index component, but includes only the depth
|
||||
component.
|
||||
|
||||
The resulting <Tau> is assigned to <R_t>. In some implementations, <Tau> is
|
||||
also assigned to <G_t>, <B_t>, or <A_t>. Thus in table 3.12, textures with
|
||||
depth component data behave as if their base internal format is RGBA, with
|
||||
values in <G_t>, <B_t>, and <A_t> being implementation dependent."
|
||||
|
||||
Add the following to section 3.7.11 "Mipmap Generation":
|
||||
|
||||
"If the level zero array contains depth or depth-stencil data, the
|
||||
error INVALID_OPERATION is generated."
|
||||
|
||||
Insert a new paragraph after the first paragraph of the "Texture Access"
|
||||
subsection of section 3.8.2 on page 87, which says:
|
||||
|
||||
"Texture lookups involving textures with depth component data generate
|
||||
a texture source color by using depth data directly, as described in
|
||||
section 3.7.8-1/2. The stencil texture internal component is ignored
|
||||
if the base internal format is DEPTH_STENCIL_OES."
|
||||
|
||||
Additions to Chapter 4 of the OpenGL ES 2.0 specification (Per-Fragment
|
||||
Operations and the Framebuffer)
|
||||
|
||||
In section 4.4.5 "Framebuffer Completeness", replace the the 3rd
|
||||
paragraph with the following text:
|
||||
|
||||
"* An internal format is color-renderable if it is one of the formats
|
||||
from table 4.5 noted as color-renderable or if it is unsized format
|
||||
RGBA or RGB. No other formats, including compressed internal formats,
|
||||
are color-renderable.
|
||||
|
||||
* An internal format is depth-renderable if it is one of the sized
|
||||
internal formats from table 4.5 noted as depth-renderable, if it
|
||||
is the unsized format DEPTH_COMPONENT or if it is the internal
|
||||
format value of DEPTH24_STENCIL8_OES. No other formats are
|
||||
depth-renderable.
|
||||
|
||||
* An internal format is stencil-renderable if it is one of the sized
|
||||
internal formats from table 4.5 noted as stencil-renderable or if it
|
||||
is DEPTH24_STENCIL8_OES. No other formats are stencil-renderable."
|
||||
|
||||
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special
|
||||
Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
|
||||
Requests)
|
||||
|
||||
None.
|
||||
|
||||
Interactions with OES_packed_depth_stencil
|
||||
|
||||
If OES_packed_depth_stencil is not supported, mentions of
|
||||
DEPTH_STENCIL_OES and UNSIGNED_INT_24_8_OES as a format/type combinations
|
||||
for TexImage2D and TexSubImage2D are omitted. Mentions of
|
||||
the internal format DEPTH24_STENCIL8_OES are also omitted.
|
||||
|
||||
Interactions with EXT_texture_storage
|
||||
|
||||
If EXT_texture_storage is supported the following internalformat
|
||||
to format/type mappings are used:
|
||||
|
||||
<internalformat> <format> <type>
|
||||
---------------- -------- ------
|
||||
DEPTH_COMPONENT16 DEPTH_COMPONENT UNSIGNED_SHORT
|
||||
DEPTH_COMPONENT32_OES DEPTH_COMPONENT UNSIGNED_INT
|
||||
DEPTH24_STENCIL8_OES DEPTH_STENCIL_OES UNSIGNED_INT
|
||||
|
||||
Textures with the above <internalformats> only support one level of
|
||||
image data. Specifying a value other than one for the <levels> parameter
|
||||
to TexStorage2DEXT will result in an INVALID_OPERATION error.
|
||||
|
||||
If EXT_texture_storage is not supported, ignore any references
|
||||
to TexStorage2DEXT.
|
||||
|
||||
Errors
|
||||
|
||||
The error INVALID_OPERATION is generated by TexImage2D if <format> and
|
||||
<internalformat> are DEPTH_COMPONENT and <type> is not UNSIGNED_SHORT,
|
||||
or UNSIGNED_INT.
|
||||
|
||||
The error INVALID_OPERATION is generated by TexSubImage2D if <format> is
|
||||
DEPTH_COMPONENT and <type> is not UNSIGNED_SHORT, or UNSIGNED_INT.
|
||||
|
||||
The error INVALID_OPERATION is generated by TexImage2D if <format> and
|
||||
<internalformat> are not DEPTH_COMPONENT and <type> is UNSIGNED_SHORT,
|
||||
or UNSIGNED_INT.
|
||||
|
||||
The error INVALID_OPERATION is generated by TexSubImage2D if <format> is
|
||||
not DEPTH_COMPONENT and <type> is UNSIGNED_SHORT, or UNSIGNED_INT.
|
||||
|
||||
The error INVALID_OPERATION is generated by TexImage2D if <format> and
|
||||
<internalformat> are DEPTH_STENCIL_OES and <type> is not
|
||||
UNSIGNED_INT_24_8_OES.
|
||||
|
||||
The error INVALID_OPERATION is generated by TexSubImage2D if <format>
|
||||
is DEPTH_STENCIL_OES and <type> is not UNSIGNED_INT_24_8_OES.
|
||||
|
||||
The error INVALID_OPERATION is generated by TexImage2D if <format> and
|
||||
<internalformat> is not DEPTH_STENCIL_OES and <type> is
|
||||
UNSIGNED_INT_24_8_OES.
|
||||
|
||||
The error INVALID_OPERATION is generated by TexSubImage2D if <format>
|
||||
is not DEPTH_STENCIL_OES and <type> is UNSIGNED_INT_24_8_OES.
|
||||
|
||||
The error INVALID_OPERATION is generated in the following situations:
|
||||
- TexImage2D is called with <format> and <internalformat> of
|
||||
DEPTH_COMPONENT or DEPTH_STENCIL_OES and
|
||||
- <target> is not TEXTURE_2D,
|
||||
- <data> is not NULL, or
|
||||
- <level> is not zero.
|
||||
- TexSubImage2D is called with <format> of DEPTH_COMPONENT or
|
||||
DEPTH_STENCIL_OES.
|
||||
- TexStorage2DEXT is called with <internalformat> of DEPTH_COMPONENT16,
|
||||
DEPTH_COMPONENT32_OES, or DEPTH24_STENCIL8_OES, and
|
||||
- <target> is not TEXTURE_2D, or
|
||||
- <levels> is not one.
|
||||
- CopyTexImage2D is called with an <internalformat> that has a base
|
||||
internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
|
||||
- CopyTexSubImage2D is called with a target texture that has a base
|
||||
internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
|
||||
- GenerateMipmap is called on a texture that has a base internal format
|
||||
of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
1) What are the differences between this extension and OES_depth_texture
|
||||
and OES_packed_depth_stencil?
|
||||
|
||||
RESOLVED: This extension:
|
||||
- does not support loading pre-baked depth stencil data via
|
||||
TexImage2D or TexSubImage2D.
|
||||
- allows variability in the y-, z-, and w-components of the sample
|
||||
results from depth textures.
|
||||
- only supports one level textures.
|
||||
- explicitly lists the errors for unsupported functionality.
|
||||
Since these were not clearly specified in the OES_depth_texture
|
||||
extension there may be differences in error values between
|
||||
implementations of OES_depth_texture and ANGLE_depth_texture.
|
||||
This specification was also rebased to apply against the OpenGL ES 2.0
|
||||
specification instead of the OpenGL specification, making it more
|
||||
obvious what all the functionality changes are.
|
||||
|
||||
2) Why does TexSubImage2D accept the new format/type combinations even
|
||||
though it does not actually support loading data?
|
||||
|
||||
RESOLVED: This was done to be more consistent with the OES_depth_texture
|
||||
extension and to make it easier to add support for loading texture
|
||||
data if it is possible to support in the future.
|
||||
|
||||
3) Why are only 1-level depth textures supported?
|
||||
|
||||
RESOLVED: The only use for multiple levels of depth textures would
|
||||
be for fitlered texturing. However since it is not possible to
|
||||
render to non-zero-level texture levels in OpenGL ES 2.0, and since
|
||||
this extension forbids loading existing data and GenerateMipmap on
|
||||
depth textures, it is impossible to initialize or specify contents
|
||||
for non-zero levels of depth textures.
|
||||
|
||||
Revision History
|
||||
|
||||
02/25/2013 swoods revise to allow texture lookup to guarantee depth values
|
||||
only in red channel of sample result.
|
||||
06/04/2012 dgkoch fix errors, disallow multi-level depth textures.
|
||||
05/30/2012 dgkoch minor updates and add issues.
|
||||
05/23/2012 dgkoch intial revision based on OES_depth_texture and
|
||||
OES_packed_depth_stencil and rebased against the ES 2.0 spec
|
||||
|
||||
@@ -0,0 +1,437 @@
|
||||
Name
|
||||
|
||||
ANGLE_framebuffer_blit
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANGLE_framebuffer_blit
|
||||
|
||||
Contributors
|
||||
|
||||
Contributors to EXT_framebuffer_blit
|
||||
Daniel Koch, TransGaming Inc.
|
||||
Shannon Woods, TransGaming Inc.
|
||||
Kenneth Russell, Google Inc.
|
||||
Vangelis Kokkevis, Google Inc.
|
||||
|
||||
Contact
|
||||
|
||||
Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com)
|
||||
|
||||
Status
|
||||
|
||||
Implemented in ANGLE ES2
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: Sept 22, 2012
|
||||
Author Revision: 4
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #83
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL ES 2.0 is required.
|
||||
|
||||
The extension is written against the OpenGL ES 2.0 specification.
|
||||
|
||||
OES_texture_3D affects the definition of this extension.
|
||||
|
||||
Overview
|
||||
|
||||
This extension modifies framebuffer objects by splitting the
|
||||
framebuffer object binding point into separate DRAW and READ
|
||||
bindings. This allows copying directly from one framebuffer to
|
||||
another. In addition, a new high performance blit function is
|
||||
added to facilitate these blits and perform some data conversion
|
||||
where allowed.
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP claims.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void BlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1,
|
||||
int dstX0, int dstY0, int dstX1, int dstY1,
|
||||
bitfield mask, enum filter);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <target> parameter of BindFramebuffer,
|
||||
CheckFramebufferStatus, FramebufferTexture2D, FramebufferTexture3DOES,
|
||||
FramebufferRenderbuffer, and
|
||||
GetFramebufferAttachmentParameteriv:
|
||||
|
||||
// (reusing the tokens from EXT_framebuffer_blit)
|
||||
READ_FRAMEBUFFER_ANGLE 0x8CA8
|
||||
DRAW_FRAMEBUFFER_ANGLE 0x8CA9
|
||||
|
||||
Accepted by the <pname> parameters of GetIntegerv and GetFloatv:
|
||||
|
||||
// (reusing the tokens from EXT_framebuffer_blit)
|
||||
DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 // alias FRAMEBUFFER_BINDING
|
||||
READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
|
||||
|
||||
|
||||
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
|
||||
|
||||
Change the last paragraph of section 3.7.2 (Alternate Texture Image
|
||||
Specification Commands) to:
|
||||
|
||||
"Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will
|
||||
result in an INVALID_FRAMEBUFFER_OPERATION error if the object bound
|
||||
to READ_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete"
|
||||
(section 4.4.4.2)."
|
||||
|
||||
Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
|
||||
Operations and the Framebuffer)
|
||||
|
||||
Change the first word of Chapter 4 from "The" to "A".
|
||||
|
||||
Append to the introduction of Chapter 4:
|
||||
|
||||
"Conceptually, the GL has two active framebuffers; the draw
|
||||
framebuffer is the destination for rendering operations, and the
|
||||
read framebuffer is the source for readback operations. The same
|
||||
framebuffer may be used for both drawing and reading. Section
|
||||
4.4.1 describes the mechanism for controlling framebuffer usage."
|
||||
|
||||
Modify the first sentence of the last paragraph of section 4.1.1 as follows:
|
||||
|
||||
"While an application-created framebuffer object is bound to
|
||||
DRAW_FRAMEBUFFER_ANGLE, the pixel ownership test always passes."
|
||||
|
||||
Add to 4.3.1 (Reading Pixels), right before the subsection titled
|
||||
"Obtaining Pixels from the Framebuffer":
|
||||
|
||||
"Calling ReadPixels generates INVALID_FRAMEBUFFER_OPERATION if
|
||||
the object bound to READ_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer
|
||||
complete" (section 4.4.4.2). GetIntegerv generates an INVALID_OPERATION
|
||||
error if the object bound to READ_FRAMEBUFFER_BINDING_ANGLE is not
|
||||
framebuffer complete, or if the GL is using a framebuffer object
|
||||
(i.e. READ_FRAMEBUFFER_BINDING_ANGLE is non-zero) and there is no color
|
||||
attachment."
|
||||
|
||||
Insert a new section 4.3.2 titled "Copying Pixels" and renumber the
|
||||
subsequent sections. Add the following text:
|
||||
|
||||
"BlitFramebufferANGLE transfers a rectangle of pixel values from one
|
||||
region of the read framebuffer to another in the draw framebuffer.
|
||||
|
||||
BlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1,
|
||||
int dstX0, int dstY0, int dstX1, int dstY1,
|
||||
bitfield mask, enum filter);
|
||||
|
||||
<mask> is the bitwise OR of a number of values indicating which
|
||||
buffers are to be copied. The values are COLOR_BUFFER_BIT,
|
||||
DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT, which are described in
|
||||
section 4.2.3. The pixels corresponding to these buffers are
|
||||
copied from the source rectangle, bound by the locations (srcX0,
|
||||
srcY0) and (srcX1, srcY1), to the destination rectangle, bound by
|
||||
the locations (dstX0, dstY0) and (dstX1, dstY1). The lower bounds
|
||||
of the rectangle are inclusive, while the upper bounds are
|
||||
exclusive.
|
||||
|
||||
The actual region taken from the read framebuffer is limited to the
|
||||
intersection of the source buffers being transferred, which may include
|
||||
the color buffer, the depth buffer, and/or the stencil buffer depending on
|
||||
<mask>. The actual region written to the draw framebuffer is limited to the
|
||||
intersection of the destination buffers being written, which may include
|
||||
the color buffer, the depth buffer, and/or the stencil buffer
|
||||
depending on <mask>. Whether or not the source or destination regions are
|
||||
altered due to these limits, the offset applied to pixels being transferred
|
||||
is performed as though no such limits were present.
|
||||
|
||||
Stretching and scaling during a copy are not supported. If the source
|
||||
and destination rectangle dimensions do not match, no copy is
|
||||
performed and an INVALID_OPERATION error is generated.
|
||||
Because stretching is not supported, <filter> must be NEAREST and
|
||||
no filtering is applied.
|
||||
|
||||
Flipping during a copy is not supported. If either the source or
|
||||
destination rectangle specifies a negative dimension, the error
|
||||
INVALID_OPERATION is generated. If both the source and
|
||||
destination rectangles specify a negative dimension for the same
|
||||
direction, no reversal is required and the operation is supported.
|
||||
|
||||
If the source and destination buffers are identical, and the
|
||||
source and destination rectangles overlap, the result of the blit
|
||||
operation is undefined.
|
||||
|
||||
The pixel copy bypasses the fragment pipeline. The only fragment
|
||||
operations which affect the blit are the pixel ownership test and
|
||||
the scissor test.
|
||||
|
||||
If a buffer is specified in <mask> and does not exist in both the
|
||||
read and draw framebuffers, the corresponding bit is silently
|
||||
ignored.
|
||||
|
||||
Calling BlitFramebufferANGLE will result in an
|
||||
INVALID_FRAMEBUFFER_OPERATION error if the objects bound to
|
||||
DRAW_FRAMEBUFFER_BINDING_ANGLE and READ_FRAMEBUFFER_BINDING_ANGLE are
|
||||
not "framebuffer complete" (section 4.4.4.2)."
|
||||
|
||||
Calling BlitFramebufferANGLE will result in an INVALID_OPERATION
|
||||
error if <mask> includes COLOR_BUFFER_BIT and the source and
|
||||
destination color formats to not match.
|
||||
|
||||
Calling BlitFramebufferANGLE will result in an INVALID_OPERATION
|
||||
error if <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT
|
||||
and the source and destination depth and stencil buffer formats do
|
||||
not match.
|
||||
|
||||
If <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, only
|
||||
complete buffers can be copied. If the source rectangle does not
|
||||
specify the complete source buffer or the destination rectangle
|
||||
(after factoring the scissor region, if applicable) does not specify
|
||||
the complete destination buffer, an INVALID_OPERATION
|
||||
error is generated.
|
||||
|
||||
Modify the beginning of section 4.4.1 as follows:
|
||||
|
||||
"The default framebuffer for rendering and readback operations is
|
||||
provided by the windowing system. In addition, named framebuffer
|
||||
objects can be created and operated upon. The namespace for
|
||||
framebuffer objects is the unsigned integers, with zero reserved
|
||||
by the GL for the default framebuffer.
|
||||
|
||||
A framebuffer object is created by binding an unused name to
|
||||
DRAW_FRAMEBUFFER_ANGLE or READ_FRAMEBUFFER_ANGLE. The binding is
|
||||
effected by calling
|
||||
|
||||
void BindFramebuffer(enum target, uint framebuffer);
|
||||
|
||||
with <target> set to the desired framebuffer target and
|
||||
<framebuffer> set to the unused name. The resulting framebuffer
|
||||
object is a new state vector, comprising one set of the state values
|
||||
listed in table 6.23 for each attachment point of the
|
||||
framebuffer, set to the same initial values. There is one
|
||||
color attachment point, plus one each
|
||||
for the depth and stencil attachment points.
|
||||
|
||||
BindFramebuffer may also be used to bind an existing
|
||||
framebuffer object to DRAW_FRAMEBUFFER_ANGLE or
|
||||
READ_FRAMEBUFFER_ANGLE. If the bind is successful no change is made
|
||||
to the state of the bound framebuffer object, and any previous
|
||||
binding to <target> is broken.
|
||||
|
||||
If a framebuffer object is bound to DRAW_FRAMEBUFFER_ANGLE or
|
||||
READ_FRAMEBUFFER_ANGLE, it becomes the target for rendering or
|
||||
readback operations, respectively, until it is deleted or another
|
||||
framebuffer is bound to the corresponding bind point. Calling
|
||||
BindFramebuffer with <target> set to FRAMEBUFFER binds the
|
||||
framebuffer to both DRAW_FRAMEBUFFER_ANGLE and READ_FRAMEBUFFER_ANGLE.
|
||||
|
||||
While a framebuffer object is bound, GL operations on the target
|
||||
to which it is bound affect the images attached to the bound
|
||||
framebuffer object, and queries of the target to which it is bound
|
||||
return state from the bound object. Queries of the values
|
||||
specified in table 6.20 (Implementation Dependent Pixel Depths)
|
||||
and table 6.yy (Framebuffer Dependent Values) are
|
||||
derived from the framebuffer object bound to DRAW_FRAMEBUFFER_ANGLE.
|
||||
|
||||
The initial state of DRAW_FRAMEBUFFER_ANGLE and READ_FRAMEBUFFER_ANGLE
|
||||
refers to the default framebuffer provided by the windowing
|
||||
system. In order that access to the default framebuffer is not
|
||||
lost, it is treated as a framebuffer object with the name of 0.
|
||||
The default framebuffer is therefore rendered to and read from
|
||||
while 0 is bound to the corresponding targets. On some
|
||||
implementations, the properties of the default framebuffer can
|
||||
change over time (e.g., in response to windowing system events
|
||||
such as attaching the context to a new windowing system drawable.)"
|
||||
|
||||
Change the description of DeleteFramebuffers as follows:
|
||||
|
||||
"<framebuffers> contains <n> names of framebuffer objects to be
|
||||
deleted. After a framebuffer object is deleted, it has no
|
||||
attachments, and its name is again unused. If a framebuffer that
|
||||
is currently bound to one or more of the targets
|
||||
DRAW_FRAMEBUFFER_ANGLE or READ_FRAMEBUFFER_ANGLE is deleted, it is as
|
||||
though BindFramebuffer had been executed with the corresponding
|
||||
<target> and <framebuffer> zero. Unused names in <framebuffers>
|
||||
are silently ignored, as is the value zero."
|
||||
|
||||
|
||||
In section 4.4.3 (Renderbuffer Objects), modify the first two sentences
|
||||
of the description of FramebufferRenderbuffer as follows:
|
||||
|
||||
"<target> must be DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE, or
|
||||
FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as
|
||||
though DRAW_FRAMEBUFFER_ANGLE was specified. The INVALID_OPERATION
|
||||
error is generated if the value of the corresponding binding is zero."
|
||||
|
||||
In section 4.4.3 (Renderbuffer Objects), modify the first two sentences
|
||||
of the description of FramebufferTexture2D as follows:
|
||||
|
||||
"<target> must be DRAW_FRAMEBUFFER_ANGLE,
|
||||
READ_FRAMEBUFFER_ANGLE, or FRAMEBUFFER. If <target> is
|
||||
FRAMEBUFFER, it behaves as though DRAW_FRAMEBUFFER_ANGLE was
|
||||
specified. The INVALID_OPERATION error is generated if the value of the
|
||||
corresponding binding is zero."
|
||||
|
||||
In section 4.4.5 (Framebuffer Completeness), modify the first sentence
|
||||
of the description of CheckFramebufferStatus as follows:
|
||||
|
||||
"If <target> is not DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or
|
||||
FRAMEBUFFER, the error INVALID_ENUM is generated. If <target> is
|
||||
FRAMEBUFFER, it behaves as though DRAW_FRAMEBUFFER_ANGLE was
|
||||
specified."
|
||||
|
||||
Modify the first sentence of the subsection titled "Effects of Framebuffer
|
||||
Completeness on Framebuffer Operations" to be:
|
||||
|
||||
"Attempting to render to or read from a framebuffer which is not
|
||||
framebuffer complete will generate an
|
||||
INVALID_FRAMEBUFFER_OPERATION error."
|
||||
|
||||
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State
|
||||
Requests)
|
||||
|
||||
In section 6.1.3, modify the first sentence of the description of
|
||||
GetFramebufferAttachmentParameteriv as follows:
|
||||
|
||||
"<target> must be DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or
|
||||
FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as
|
||||
though DRAW_FRAMEBUFFER_ANGLE was specified."
|
||||
|
||||
Modify the title of Table 6.23 (Framebuffer State) to be "Framebuffer
|
||||
(state per attachment point)".
|
||||
|
||||
|
||||
Dependencies on OES_texture_3D
|
||||
|
||||
On an OpenGL ES implementation, in the absense of OES_texture_3D,
|
||||
omit references to FramebufferTexture3DOES and CopyTexSubImage3DOES.
|
||||
|
||||
Errors
|
||||
|
||||
The error INVALID_FRAMEBUFFER_OPERATION is generated if
|
||||
BlitFramebufferANGLE is called while the
|
||||
draw framebuffer is not framebuffer complete.
|
||||
|
||||
The error INVALID_FRAMEBUFFER_OPERATION is generated if
|
||||
BlitFramebufferANGLE, ReadPixels, CopyTex{Sub}Image*, is called while the
|
||||
read framebuffer is not framebuffer complete.
|
||||
|
||||
The error INVALID_OPERATION is generated if GetIntegerv is called
|
||||
while the read framebuffer is not framebuffer complete, or if there
|
||||
is no color attachment present on the read framebuffer object.
|
||||
|
||||
The error INVALID_VALUE is generated by BlitFramebufferANGLE if
|
||||
<mask> has any bits set other than those named by
|
||||
COLOR_BUFFER_BIT, DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT.
|
||||
|
||||
The error INVALID_OPERATION is generated if BlitFramebufferANGLE is
|
||||
called and <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT
|
||||
and the source and destination depth or stencil buffer formats do
|
||||
not match.
|
||||
|
||||
The error INVALID_OPERATION is generated if BlitFramebufferANGLE is
|
||||
called and any of the following conditions are true:
|
||||
- the source and destination rectangle dimensions do not match
|
||||
(ie scaling or flipping is required).
|
||||
- <mask> includes COLOR_BUFFER_BIT and the source and destination
|
||||
buffer formats do not match.
|
||||
- <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT and the
|
||||
source or destination rectangles do not specify the entire source
|
||||
or destination buffer (after applying any scissor region).
|
||||
|
||||
The error INVALID_ENUM is generated by BlitFramebufferANGLE if
|
||||
<filter> is not NEAREST.
|
||||
|
||||
The error INVALID_ENUM is generated if BindFramebuffer,
|
||||
CheckFramebufferStatus, FramebufferTexture{2D|3DOES},
|
||||
FramebufferRenderbuffer, or
|
||||
GetFramebufferAttachmentParameteriv is called and <target> is
|
||||
not DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or FRAMEBUFFER.
|
||||
|
||||
New State
|
||||
|
||||
(Add a new table 6.xx, "Framebuffer (state per framebuffer target binding point)")
|
||||
|
||||
Get Value Type Get Command Initial Value Description Section
|
||||
------------------------------ ---- ----------- -------------- ------------------- ------------
|
||||
DRAW_FRAMEBUFFER_BINDING_ANGLE Z+ GetIntegerv 0 framebuffer object bound 4.4.1
|
||||
to DRAW_FRAMEBUFFER_ANGLE
|
||||
READ_FRAMEBUFFER_BINDING_ANGLE Z+ GetIntegerv 0 framebuffer object 4.4.1
|
||||
to READ_FRAMEBUFFER_ANGLE
|
||||
|
||||
Remove reference to FRAMEBUFFER_BINDING from Table 6.23.
|
||||
|
||||
(Add a new table 6.yy, "Framebuffer Dependent Values")
|
||||
|
||||
Get Value Type Get Command Initial Value Description Section
|
||||
---------------------------- ---- ----------- -------------- ------------------- ------------
|
||||
SAMPLE_BUFFERS Z+ GetIntegerv 0 Number of multisample 3.2
|
||||
buffers
|
||||
SAMPLES Z+ GetIntegerv 0 Coverage mask size 3.2
|
||||
|
||||
Remove the references to SAMPLE_BUFFERS and SAMPLES from Table 6.17.
|
||||
|
||||
|
||||
Issues
|
||||
|
||||
1) What should we call this extension?
|
||||
|
||||
Resolved: ANGLE_framebuffer_blit.
|
||||
|
||||
This extension is a result of a collaboration between Google and
|
||||
TransGaming for the open-source ANGLE project. Typically one would
|
||||
label a multi-vendor extension as EXT, but EXT_framebuffer_blit
|
||||
is already the name for this on Desktop GL. Additionally this
|
||||
isn't truely a multi-vendor extension because there is only one
|
||||
implementation of this. We'll follow the example of the open-source
|
||||
MESA project which uses the project name for the vendor suffix.
|
||||
|
||||
2) Why is this done as a separate extension instead of just supporting
|
||||
EXT_framebuffer_blit?
|
||||
|
||||
To date, EXT_framebuffer_blit has not had interactions with OpenGL ES
|
||||
specified and, as far as we know, it has not previously been exposed on
|
||||
an ES 1.1 or ES 2.0 implementation. Because there are enough
|
||||
differences between Desktop GL and OpenGL ES, and since OpenGL ES 2.0
|
||||
has already subsumed the EXT_framebuffer_object functionality (with
|
||||
some changes) it was deemed a worthwhile exercise to fully specify the
|
||||
interactions. Additionally, some of the choices in exactly which
|
||||
functionality is supported by BlitFramebufferANGLE is dictated by
|
||||
what is reasonable to support on a implementation which is
|
||||
layered on Direct3D9. It is not expected that other implementations
|
||||
will necessary have the same set of restrictions or requirements.
|
||||
|
||||
3) How does this extension differ from EXT_framebuffer_blit?
|
||||
|
||||
This extension is designed to be a pure subset of the
|
||||
EXT_framebuffer_blit functionality as applicable to OpenGL ES 2.0.
|
||||
|
||||
Functionality that is unchanged:
|
||||
- the split DRAW and READ framebuffer attachment points and related sematics.
|
||||
- the token values for the DRAW/READ_FRAMEBUFFER and DRAW/READ_FRAMBUFFER_BINDING
|
||||
- the signature of the BlitFramebuffer entry-point.
|
||||
|
||||
Additional restrictions imposed by BlitFramebufferANGLE:
|
||||
- no color conversions are supported
|
||||
- no scaling, stretching or flipping are supported
|
||||
- no filtering is supported (a consequence of no stretching)
|
||||
- only whole depth and/or stencil buffers can be copied
|
||||
|
||||
Revision History
|
||||
|
||||
Revision 1, 2010/07/06
|
||||
- copied from revision 15 of EXT_framebuffer_object
|
||||
- removed language that was clearly not relevant to ES2
|
||||
- rebased changes against the OpenGL ES 2.0 specification
|
||||
- added ANGLE-specific restrictions
|
||||
Revision 2, 2010/07/15
|
||||
- clarifications of implicit clamping to buffer sizes (from ARB_fbo)
|
||||
- clarify that D/S restricts apply after the scissor is applied
|
||||
- improve some error language
|
||||
Revision 3, 2010/08/06
|
||||
- add additional contributors, update implementation status
|
||||
Revision 4, 2012/09/22
|
||||
- document errors for GetIntegerv.
|
||||
|
||||
@@ -0,0 +1,363 @@
|
||||
Name
|
||||
|
||||
ANGLE_framebuffer_multisample
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANGLE_framebuffer_multisample
|
||||
|
||||
Contributors
|
||||
|
||||
Contributors to EXT_framebuffer_multisample
|
||||
Daniel Koch, TransGaming Inc.
|
||||
Shannon Woods, TransGaming Inc.
|
||||
Kenneth Russell, Google Inc.
|
||||
Vangelis Kokkevis, Google Inc.
|
||||
|
||||
Contacts
|
||||
|
||||
Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com)
|
||||
|
||||
Status
|
||||
|
||||
Implemented in ANGLE ES2
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: Aug 6, 2010
|
||||
Author Revision: #3
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #84
|
||||
|
||||
Dependencies
|
||||
|
||||
Requires OpenGL ES 2.0.
|
||||
|
||||
Requires GL_ANGLE_framebuffer_blit (or equivalent functionality).
|
||||
|
||||
The extension is written against the OpenGL ES 2.0 specification.
|
||||
|
||||
OES_texture_3D affects the definition of this extension.
|
||||
|
||||
Overview
|
||||
|
||||
This extension extends the framebuffer object framework to
|
||||
enable multisample rendering.
|
||||
|
||||
The new operation RenderbufferStorageMultisampleANGLE() allocates
|
||||
storage for a renderbuffer object that can be used as a multisample
|
||||
buffer. A multisample render buffer image differs from a
|
||||
single-sample render buffer image in that a multisample image has a
|
||||
number of SAMPLES that is greater than zero. No method is provided
|
||||
for creating multisample texture images.
|
||||
|
||||
All of the framebuffer-attachable images attached to a framebuffer
|
||||
object must have the same number of SAMPLES or else the framebuffer
|
||||
object is not "framebuffer complete". If a framebuffer object with
|
||||
multisample attachments is "framebuffer complete", then the
|
||||
framebuffer object behaves as if SAMPLE_BUFFERS is one.
|
||||
|
||||
The resolve operation is affected by calling
|
||||
BlitFramebufferANGLE (provided by the ANGLE_framebuffer_blit
|
||||
extension) where the source is a multisample application-created
|
||||
framebuffer object and the destination is a single-sample
|
||||
framebuffer object (either application-created or window-system
|
||||
provided).
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void RenderbufferStorageMultisampleANGLE(
|
||||
enum target, sizei samples,
|
||||
enum internalformat,
|
||||
sizei width, sizei height);
|
||||
|
||||
New Types
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of GetRenderbufferParameteriv:
|
||||
|
||||
RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
|
||||
|
||||
Returned by CheckFramebufferStatus:
|
||||
|
||||
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
|
||||
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
and GetFloatv:
|
||||
|
||||
MAX_SAMPLES_ANGLE 0x8D57
|
||||
|
||||
Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation)
|
||||
|
||||
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
|
||||
|
||||
Add to the last paragraph of 3.7.2 (Alternate Texture Image Specification)
|
||||
(as modified by ANGLE_framebuffer_blit) the following:
|
||||
|
||||
"Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will
|
||||
result in INVALID_OPERATION being generated if the object bound to
|
||||
READ_FRAMEBUFFER_BINDING_ANGLE is "framebuffer complete" and the value
|
||||
of SAMPLE_BUFFERS is greater than zero."
|
||||
|
||||
Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
|
||||
Operations and the Framebuffer)
|
||||
|
||||
Add to 4.3.1 (Reading Pixels), right before the subsection titled
|
||||
"Obtaining Pixels from the Framebuffer":
|
||||
|
||||
"ReadPixels generates INVALID_OPERATION if READ_FRAMEBUFFER_BINDING_ANGLE
|
||||
(section 4.4) is non-zero, the read framebuffer is framebuffer
|
||||
complete, and the value of SAMPLE_BUFFERS for the read framebuffer
|
||||
is greater than zero."
|
||||
|
||||
In 4.3.2 (Copying Pixels), add to the section describing BlitFramebuffer
|
||||
that was added by ANGLE_framebuffer_blit.
|
||||
|
||||
"If SAMPLE_BUFFERS for the read framebuffer is greater than zero and
|
||||
SAMPLE_BUFFERS for the draw framebuffer is zero, the samples
|
||||
corresponding to each pixel location in the source are converted to
|
||||
a single sample before being written to the destination.
|
||||
|
||||
If SAMPLE_BUFFERS for the draw framebuffer is greater than zero,
|
||||
no copy is performed and an INVALID_OPERATION error is generated.
|
||||
|
||||
If SAMPLE_BUFFERS for the read framebuffer is greater than zero and
|
||||
<mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, no copy is
|
||||
performed and an INVALID_OPERATION error is generated.
|
||||
|
||||
If SAMPLE_BUFFERS for the read framebuffer is greater than zero and
|
||||
the format of the read and draw framebuffers are not identical, no
|
||||
copy is performed and an INVALID_OPERATION error is generated.
|
||||
|
||||
If SAMPLE_BUFFERS for the read framebuffer is greater than zero, the
|
||||
dimensions of the source and destination rectangles provided to
|
||||
BlitFramebufferANGLE must be identical and must specify the complete
|
||||
source and destination buffers, otherwise no copy is performed and
|
||||
an INVALID_OPERATION error is generated."
|
||||
|
||||
Modification to 4.4.3 (Renderbuffer Objects)
|
||||
|
||||
Add, just above the definition of RenderbufferStorage:
|
||||
|
||||
"The command
|
||||
|
||||
void RenderbufferStorageMultisampleANGLE(
|
||||
enum target, sizei samples,
|
||||
enum internalformat,
|
||||
sizei width, sizei height);
|
||||
|
||||
establishes the data storage, format, dimensions, and number of
|
||||
samples of a renderbuffer object's image. <target> must be
|
||||
RENDERBUFFER. <internalformat> must be one of the color-renderable,
|
||||
depth-renderable, or stencil-renderable formats described in table 4.5.
|
||||
<width> and <height> are the dimensions in pixels of the renderbuffer. If
|
||||
either <width> or <height> is greater than the value of
|
||||
MAX_RENDERBUFFER_SIZE, or if <samples> is greater than MAX_SAMPLES_ANGLE,
|
||||
then the error INVALID_VALUE is generated. If OpenGL ES is unable to
|
||||
create a data store of the requested size, the error OUT_OF_MEMORY
|
||||
is generated.
|
||||
|
||||
Upon success, RenderbufferStorageMultisampleANGLE deletes any existing
|
||||
data store for the renderbuffer image and the contents of the data
|
||||
store after calling RenderbufferStorageMultisampleANGLE are undefined.
|
||||
RENDERBUFFER_WIDTH is set to <width>, RENDERBUFFER_HEIGHT is
|
||||
set to <height>, and RENDERBUFFER_INTERNAL_FORMAT is set to
|
||||
<internalformat>.
|
||||
|
||||
If <samples> is zero, then RENDERBUFFER_SAMPLES_ANGLE is set to zero.
|
||||
Otherwise <samples> represents a request for a desired minimum
|
||||
number of samples. Since different implementations may support
|
||||
different sample counts for multisampled rendering, the actual
|
||||
number of samples allocated for the renderbuffer image is
|
||||
implementation dependent. However, the resulting value for
|
||||
RENDERBUFFER_SAMPLES_ANGLE is guaranteed to be greater than or equal
|
||||
to <samples> and no more than the next larger sample count supported
|
||||
by the implementation.
|
||||
|
||||
An OpenGL ES implementation may vary its allocation of internal component
|
||||
resolution based on any RenderbufferStorageMultisampleANGLE parameter (except
|
||||
target), but the allocation and chosen internal format must not be a
|
||||
function of any other state and cannot be changed once they are
|
||||
established. The actual resolution in bits of each component of the
|
||||
allocated image can be queried with GetRenderbufferParameteriv."
|
||||
|
||||
Modify the definiton of RenderbufferStorage as follows:
|
||||
|
||||
"The command
|
||||
|
||||
void RenderbufferStorage(enum target, enum internalformat,
|
||||
sizei width, sizei height);
|
||||
|
||||
is equivalent to calling RenderbufferStorageMultisampleANGLE with
|
||||
<samples> equal to zero."
|
||||
|
||||
In section 4.4.5 (Framebuffer Completeness) in the subsection
|
||||
titled "Framebuffer Completeness" add an entry to the bullet list:
|
||||
|
||||
* The value of RENDERBUFFER_SAMPLES_ANGLE is the same for all attached
|
||||
images.
|
||||
{ FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE }
|
||||
|
||||
Also add a paragraph to the end of the section after the definition
|
||||
of CheckFramebufferStatus:
|
||||
|
||||
"The values of SAMPLE_BUFFERS and SAMPLES are derived from the
|
||||
attachments of the currently bound framebuffer object. If the
|
||||
current DRAW_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete",
|
||||
then both SAMPLE_BUFFERS and SAMPLES are undefined. Otherwise,
|
||||
SAMPLES is equal to the value of RENDERBUFFER_SAMPLES_ANGLE for the
|
||||
attached images (which all must have the same value for
|
||||
RENDERBUFFER_SAMPLES_ANGLE). Further, SAMPLE_BUFFERS is one if
|
||||
SAMPLES is non-zero. Otherwise, SAMPLE_BUFFERS is zero.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)
|
||||
|
||||
|
||||
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
|
||||
Requests)
|
||||
|
||||
In section 6.1.3 (Enumeraged Queries), modify the third paragraph
|
||||
of the description of GetRenderbufferParameteriv as follows:
|
||||
|
||||
"Upon successful return from GetRenderbufferParameteriv, if
|
||||
<pname> is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT,
|
||||
RENDERBUFFER_INTERNAL_FORMAT, or RENDERBUFFER_SAMPLES_ANGLE, then <params>
|
||||
will contain the width in pixels, height in pixels, internal format, or
|
||||
number of samples, respectively, of the image of the renderbuffer
|
||||
currently bound to <target>."
|
||||
|
||||
|
||||
Dependencies on ANGLE_framebuffer_blit
|
||||
|
||||
ANGLE_framebuffer_blit is required. Technically, ANGLE_framebuffer_blit
|
||||
would not be required to support multisampled rendering, except for
|
||||
the fact that it provides the only method of doing a multisample
|
||||
resovle from a multisample renderbuffer.
|
||||
|
||||
Dependencies on OES_texture_3D
|
||||
|
||||
On an OpenGL ES implementation, in the absense of OES_texture_3D,
|
||||
omit references to CopyTexSubImage3DOES.
|
||||
|
||||
Errors
|
||||
|
||||
The error INVALID_OPERATION is generated if ReadPixels or
|
||||
CopyTex{Sub}Image* is called while READ_FRAMEBUFFER_BINDING_ANGLE
|
||||
is non-zero, the read framebuffer is framebuffer complete, and the
|
||||
value of SAMPLE_BUFFERS for the read framebuffer is greater than
|
||||
zero.
|
||||
|
||||
If both the draw and read framebuffers are framebuffer complete and
|
||||
the draw framebuffer has a value of SAMPLE_BUFFERS that is greater
|
||||
than zero, then the error INVALID_OPERATION is generated if
|
||||
BlitFramebufferANGLE is called.
|
||||
|
||||
If both the draw and read framebuffers are framebuffer complete and
|
||||
the read framebuffer has a value of SAMPLE_BUFFERS that is greater
|
||||
than zero, the error INVALID_OPERATION is generated if
|
||||
BlitFramebufferANGLE is called and any of the following conditions
|
||||
are true:
|
||||
- <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT.
|
||||
- the source or destination rectangles do not specify the entire
|
||||
source or destination buffer.
|
||||
|
||||
If both the draw and read framebuffers are framebuffer complete and
|
||||
either has a value of SAMPLE_BUFFERS that is greater than zero, then
|
||||
the error INVALID_OPERATION is generated if BlitFramebufferANGLE is
|
||||
called and the formats of the draw and read framebuffers are not
|
||||
identical.
|
||||
|
||||
If either the draw or read framebuffer is framebuffer complete and
|
||||
has a value of SAMPLE_BUFFERS that is greater than zero, then the
|
||||
error INVALID_OPERATION is generated if BlitFramebufferANGLE is called
|
||||
and the specified source and destination dimensions are not
|
||||
identical.
|
||||
|
||||
If RenderbufferStorageMultisampleANGLE is called with <target> not
|
||||
equal to RENDERBUFFER, the error INVALID_ENUM is generated.
|
||||
|
||||
If RenderbufferStorageMultisampleANGLE is called with an
|
||||
<internalformat> that is not listed as one of the color-, depth-
|
||||
or stencil-renderable formats in Table 4.5, then the error
|
||||
INVALID_ENUM is generated.
|
||||
|
||||
If RenderbufferStorageMultisampleANGLE is called with <width> or
|
||||
<height> greater than MAX_RENDERBUFFER_SIZE, then the error
|
||||
INVALID_VALUE is generated.
|
||||
|
||||
If RenderbufferStorageMultisampleANGLE is called with a value of
|
||||
<samples> that is greater than MAX_SAMPLES_ANGLE or less than zero,
|
||||
then the error INVALID_VALUE is generated.
|
||||
|
||||
The error OUT_OF_MEMORY is generated when
|
||||
RenderbufferStorageMultisampleANGLE cannot create storage of the
|
||||
specified size.
|
||||
|
||||
New State
|
||||
|
||||
Add to table 6.22 (Renderbuffer State)
|
||||
|
||||
Get Value Type Get Command Initial Value Description Section
|
||||
------------------------------- ------ -------------------------- ------------- -------------------- -------
|
||||
RENDERBUFFER_SAMPLES_ANGLE Z+ GetRenderbufferParameteriv 0 number of samples 4.4.3
|
||||
|
||||
|
||||
Add to table 6.yy (Framebuffer Dependent Vaues) (added by
|
||||
ANGLE_framebuffer_blit), the following new framebuffer dependent state.
|
||||
|
||||
Get Value Type Get Command Minimum Value Description Section
|
||||
----------------- ---- ----------- ------------- ------------------- -------
|
||||
MAX_SAMPLES_ANGLE Z+ GetIntegerv 1 Maximum number of 4.4.3
|
||||
samples supported
|
||||
for multisampling
|
||||
|
||||
|
||||
|
||||
Issues
|
||||
|
||||
Issues from EXT_framebuffer_multisample have been removed.
|
||||
|
||||
1) What should we call this extension?
|
||||
|
||||
Resolved: ANGLE_framebuffer_blit.
|
||||
|
||||
This extension is a result of a collaboration between Google and
|
||||
TransGaming for the open-source ANGLE project. Typically one would
|
||||
label a multi-vendor extension as EXT, but EXT_framebuffer_mulitsample
|
||||
is already the name for this on Desktop GL. Additionally this
|
||||
isn't truely a multi-vendor extension because there is only one
|
||||
implementation of this. We'll follow the example of the open-source
|
||||
MESA project which uses the project name for the vendor suffix.
|
||||
|
||||
2) How does this extension differ from EXT_framebuffer_multisample?
|
||||
|
||||
This is designed to be a proper subset of EXT_framebuffer_multisample
|
||||
functionality as applicable to OpenGL ES 2.0.
|
||||
|
||||
Functionality that is unchanged:
|
||||
- creation of multisample renderbuffers.
|
||||
- whole buffer multi-sample->single-sample resolve.
|
||||
- no format conversions, stretching or flipping supported on multisample blits.
|
||||
|
||||
Additional restrictions on BlitFramebufferANGLE:
|
||||
- multisample resolve is only supported on color buffers.
|
||||
- no blits to multisample destinations (no single->multi or multi-multi).
|
||||
- only entire buffers can be resolved.
|
||||
|
||||
Revision History
|
||||
|
||||
Revision 1, 2010/07/08
|
||||
- copied from revision 7 of EXT_framebuffer_multisample
|
||||
- removed language that was not relevant to ES2
|
||||
- rebase changes against the Open GL ES 2.0 specification
|
||||
- added ANGLE-specific restrictions
|
||||
Revision 2, 2010/07/19
|
||||
- fix missing error code
|
||||
Revision 3, 2010/08/06
|
||||
- add additional contributors, update implementation status
|
||||
- disallow negative samples
|
||||
@@ -0,0 +1,362 @@
|
||||
Name
|
||||
|
||||
ANGLE_instanced_arrays
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANGLE_instanced_arrays
|
||||
|
||||
Contributors
|
||||
|
||||
Contributors to ARB_instanced_arrays
|
||||
Nicolas Capens, TransGaming Inc.
|
||||
James Helferty, TransGaming Inc.
|
||||
Kenneth Russell, Google Inc.
|
||||
Vangelis Kokkevis, Google Inc.
|
||||
|
||||
Contact
|
||||
|
||||
Daniel Koch, TransGaming Inc. (daniel 'at' transgaming.com)
|
||||
|
||||
Status
|
||||
|
||||
Implemented in ANGLE r976.
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: February 3, 2017
|
||||
Author Revision: 4
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #109
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL ES 2.0 is required.
|
||||
|
||||
This extension is written against the OpenGL ES 2.0 Specification.
|
||||
|
||||
Overview
|
||||
|
||||
A common use case in GL for some applications is to be able to
|
||||
draw the same object, or groups of similar objects that share
|
||||
vertex data, primitive count and type, multiple times. This
|
||||
extension provides a means of accelerating such use cases while
|
||||
restricting the number of API calls, and keeping the amount of
|
||||
duplicate data to a minimum.
|
||||
|
||||
This extension introduces an array "divisor" for generic
|
||||
vertex array attributes, which when non-zero specifies that the
|
||||
attribute is "instanced." An instanced attribute does not
|
||||
advance per-vertex as usual, but rather after every <divisor>
|
||||
conceptual draw calls.
|
||||
|
||||
(Attributes which aren't instanced are repeated in their entirety
|
||||
for every conceptual draw call.)
|
||||
|
||||
By specifying transform data in an instanced attribute or series
|
||||
of instanced attributes, vertex shaders can, in concert with the
|
||||
instancing draw calls, draw multiple instances of an object with
|
||||
one draw call.
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP claims.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameters of GetVertexAttribfv and
|
||||
GetVertexAttribiv:
|
||||
|
||||
VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
void DrawArraysInstancedANGLE(enum mode, int first, sizei count,
|
||||
sizei primcount);
|
||||
|
||||
void DrawElementsInstancedANGLE(enum mode, sizei count, enum type,
|
||||
const void *indices, sizei primcount);
|
||||
|
||||
void VertexAttribDivisorANGLE(uint index, uint divisor);
|
||||
|
||||
Additions to Chapter 2 of the OpenGL ES 2.0 Specification
|
||||
(OpenGL ES Operation)
|
||||
|
||||
Modify section 2.8 (Vertex Arrays), p. 21
|
||||
|
||||
After description of EnableVertexAttribArray / DisableVertexAttribArray
|
||||
add the following:
|
||||
|
||||
"The command
|
||||
|
||||
void VertexAttribDivisorANGLE(uint index, uint divisor);
|
||||
|
||||
modifies the rate at which generic vertex attributes advance when
|
||||
rendering multiple instances of primitives in a single draw call
|
||||
(see DrawArraysInstancedANGLE and DrawElementsInstancedANGLE below).
|
||||
If <divisor> is zero, the attribute at slot <index> advances once
|
||||
per vertex. If <divisor> is non-zero, the attribute advances once
|
||||
per <divisor> instances of the primitives being rendered.
|
||||
An attribute is referred to as "instanced" if its <divisor> value is
|
||||
non-zero."
|
||||
|
||||
Replace the text describing DrawArrays and DrawElements in the
|
||||
"Transferring Array Elements" subsection of 2.8, from the second paragraph
|
||||
through the end of the section with the following:
|
||||
|
||||
"The command
|
||||
|
||||
void DrawArraysOneInstance( enum mode, int first, sizei count, int instance );
|
||||
|
||||
does not exist in the GL, but is used to describe functionality in
|
||||
the rest of this section. This function constructs a sequence of
|
||||
geometric primitives by transferring elements <first> through <first> +
|
||||
<count> - 1 of each enabled non-instanced array to the GL. <mode>
|
||||
specifies what kind of primitives are constructed, as defined in section
|
||||
2.6.1.
|
||||
|
||||
If an enabled vertex attribute array is instanced (it has a non-zero
|
||||
attribute <divisor> as specified by VertexAttribDivisorANGLE), the element
|
||||
that is transferred to the GL is given by:
|
||||
|
||||
floor( <instance> / <divisor> ).
|
||||
|
||||
If an array corresponding to a generic attribute required by a vertex shader
|
||||
is not enabled, then the corresponding element is taken from the current
|
||||
generic attribute state (see section 2.7).
|
||||
|
||||
If an array corresponding to a generic attribute required by a vertex shader
|
||||
is enabled, the corresponding current generic attribute value is unaffected
|
||||
by the execution of DrawArraysOneInstance.
|
||||
|
||||
Specifying <first> < 0 results in undefined behavior. Generating the error
|
||||
INVALID_VALUE is recommended in this case.
|
||||
|
||||
The command
|
||||
|
||||
void DrawArrays( enum mode, int first, sizei count );
|
||||
|
||||
is equivalent to the command sequence
|
||||
|
||||
DrawArraysOneInstance(mode, first, count, 0);
|
||||
|
||||
The command
|
||||
|
||||
void DrawArraysInstancedANGLE(enum mode, int first, sizei count,
|
||||
sizei primcount);
|
||||
|
||||
behaves identically to DrawArrays except that <primcount>
|
||||
instances of the range of elements are executed, and the
|
||||
<instance> advances for each iteration. Instanced attributes that
|
||||
have <divisor> N, (where N > 0, as specified by
|
||||
VertexAttribDivisorANGLE) advance once every N instances.
|
||||
|
||||
It has the same effect as:
|
||||
|
||||
if (mode, count, or primcount is invalid)
|
||||
generate appropriate error
|
||||
else {
|
||||
for (i = 0; i < primcount; i++) {
|
||||
DrawArraysOneInstance(mode, first, count, i);
|
||||
}
|
||||
}
|
||||
|
||||
The command
|
||||
|
||||
void DrawElementsOneInstance( enum mode, sizei count, enum type,
|
||||
void *indices, int instance );
|
||||
|
||||
does not exist in the GL, but is used to describe functionality in
|
||||
the rest of this section. This command constructs a sequence of
|
||||
geometric primitives by successively transferring the <count> elements
|
||||
whose indices are stored in the currently bound element array buffer
|
||||
(see section 2.9.2) at the offset defined by <indices> to the GL.
|
||||
The <i>-th element transferred by DrawElementsOneInstance will be taken
|
||||
from element <indices>[i] of each enabled non-instanced array.
|
||||
<type> must be one of UNSIGNED_BYTE, UNSIGNED_SHORT, or UNSIGNED_INT,
|
||||
indicating that the index values are of GL type ubyte, ushort, or uint
|
||||
respectively. <mode> specifies what kind of primitives are constructed,
|
||||
as defined in section 2.6.1.
|
||||
|
||||
If an enabled vertex attribute array is instanced (it has a non-zero
|
||||
attribute <divisor> as specified by VertexAttribDivisorANGLE), the element
|
||||
that is transferred to the GL is given by:
|
||||
|
||||
floor( <instance> / <divisor> );
|
||||
|
||||
If an array corresponding to a generic attribute required by a vertex
|
||||
shader is not enabled, then the corresponding element is taken from the
|
||||
current generic attribute state (see section 2.7). Otherwise, if an array
|
||||
is enabled, the corresponding current generic attribute value is
|
||||
unaffected by the execution of DrawElementsOneInstance.
|
||||
|
||||
The command
|
||||
|
||||
void DrawElements( enum mode, sizei count, enum type,
|
||||
const void *indices);
|
||||
|
||||
behaves identically to DrawElementsOneInstance with the <instance>
|
||||
parameter set to zero; the effect of calling
|
||||
|
||||
DrawElements(mode, count, type, indices);
|
||||
|
||||
is equivalent to the command sequence:
|
||||
|
||||
if (mode, count or type is invalid )
|
||||
generate appropriate error
|
||||
else
|
||||
DrawElementsOneInstance(mode, count, type, indices, 0);
|
||||
|
||||
The command
|
||||
|
||||
void DrawElementsInstancedANGLE(enum mode, sizei count, enum type,
|
||||
const void *indices, sizei primcount);
|
||||
|
||||
behaves identically to DrawElements except that <primcount>
|
||||
instances of the set of elements are executed and the instance
|
||||
advances between each set. Instanced attributes are advanced as they do
|
||||
during the execution of DrawArraysInstancedANGLE. It has the same effect as:
|
||||
|
||||
if (mode, count, primcount, or type is invalid )
|
||||
generate appropriate error
|
||||
else {
|
||||
for (int i = 0; i < primcount; i++) {
|
||||
DrawElementsOneInstance(mode, count, type, indices, i);
|
||||
}
|
||||
}
|
||||
|
||||
If the number of supported generic vertex attributes (the value of
|
||||
MAX_VERTEX_ATTRIBS) is <n>, then the client state required to implement
|
||||
vertex arrays consists of <n> boolean values, <n> memory pointers, <n>
|
||||
integer stride values, <n> symbolic constants representing array types,
|
||||
<n> integers representing values per element, <n> boolean values
|
||||
indicating normalization, and <n> integers representing vertex attribute
|
||||
divisors.
|
||||
|
||||
In the initial state, the boolean values are each false, the memory
|
||||
pointers are each NULL, the strides are each zero, the array types are
|
||||
each FLOAT, the integers representing values per element are each four,
|
||||
and the divisors are each zero."
|
||||
|
||||
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
|
||||
Operations and the Framebuffer)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
|
||||
Requests)
|
||||
|
||||
In section 6.1.8, add VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE to the list of
|
||||
pnames accepted by GetVertexAttribfv and GetVertexAttribiv.
|
||||
|
||||
Additions to the AGL/EGL/GLX/WGL Specifications
|
||||
|
||||
None
|
||||
|
||||
Dependencies on OES_element_index_uint
|
||||
|
||||
If OES_element_index_uint is not supported, removed all references
|
||||
to UNSIGNED_INT indices and the associated GL data type uint in
|
||||
the description of DrawElementsOneInstance.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_VALUE is generated by VertexAttribDivisorANGLE if <index>
|
||||
is greater than or equal to MAX_VERTEX_ATTRIBS.
|
||||
|
||||
INVALID_ENUM is generated by DrawElementsInstancedANGLE if <type> is
|
||||
not one of UNSIGNED_BYTE, UNSIGNED_SHORT or UNSIGNED_INT.
|
||||
|
||||
INVALID_VALUE is generated by DrawArraysInstancedANGLE if <first>,
|
||||
<count>, or <primcount> is less than zero.
|
||||
|
||||
INVALID_ENUM is generated by DrawArraysInstancedANGLE or
|
||||
DrawElementsInstancedANGLE if <mode> is not one of the modes described in
|
||||
section 2.6.1.
|
||||
|
||||
INVALID_VALUE is generated by DrawElementsInstancedANGLE if <count> or
|
||||
<primcount> is less than zero.
|
||||
|
||||
INVALID_OPERATION is generated by DrawArraysInstancedANGLE or
|
||||
DrawElementsInstancedANGLE if there is not at least one enabled
|
||||
vertex attribute array that has a <divisor> of zero and is bound to an
|
||||
active generic attribute value in the program used for the draw command.
|
||||
|
||||
New State
|
||||
|
||||
Changes to table 6.2, p. 136 (Vertex Array Data)
|
||||
|
||||
Initial
|
||||
Get Value Type Get Command Value Description Sec.
|
||||
--------- ----- ----------- ------- ----------- ----
|
||||
VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 8*xZ+ GetVertexAttrib 0 Instance Divisor 2.8
|
||||
|
||||
Issues
|
||||
|
||||
1) Should vertex attribute zero be instance-able?
|
||||
|
||||
Resolved: Yes.
|
||||
Discussion: In Direct3D 9 stream 0 must be specified as indexed data
|
||||
and it cannot be instanced. In ANGLE we can work around this by
|
||||
remapping any other stream that does have indexed data (ie a zero
|
||||
attribute divisor) to stream 0 in D3D9. This works because the HLSL
|
||||
vertex shader matches attributes against the stream by using the
|
||||
shader semantic index.
|
||||
|
||||
2) Can all vertex attributes be instanced simultaneously?
|
||||
|
||||
Resolved: No
|
||||
Discussion: In rare cases it is possible for no attribute to have a
|
||||
divisor of 0, meaning that all attributes are instanced and none of
|
||||
them are regularly indexed. This in turn means each instance can only
|
||||
have a single position element, and so it only actually renders
|
||||
something when rendering point primitives. This is not a very
|
||||
meaningful way of using instancing (which is likely why D3D restricts
|
||||
stream 0 to be indexed regularly for position data in the first place).
|
||||
We could implement it by drawing these points one at a time (essentially
|
||||
emulating instancing), but it would not be very efficient and there
|
||||
seems to be little-to-no value in doing so.
|
||||
|
||||
If all of the enabled vertex attribute arrays that are bound to active
|
||||
generic attributes in the program have a non-zero divisor, the draw
|
||||
call should return INVALID_OPERATION.
|
||||
|
||||
3) Direct3D 9 only supports instancing for DrawIndexedPrimitive which
|
||||
corresponds to DrawElementsInstanced. Should we support
|
||||
DrawArraysInstanced?
|
||||
|
||||
Resolved: Yes
|
||||
Discussion: This can be supported easily enough by simply manufacturing
|
||||
a linear index buffer of sufficient size and using that to do indexed
|
||||
D3D9 drawing.
|
||||
|
||||
4) How much data is needed in a buffer for an instanced attribute?
|
||||
|
||||
Resolved: Where stride is the value passed to VertexAttribPointer:
|
||||
|
||||
if stride > 0
|
||||
size = stride * ceil(primcount / divisor);
|
||||
else
|
||||
size = elementsize * ceil(primcount / divisor);
|
||||
|
||||
Revision History
|
||||
|
||||
#4 February 3, 2017 Jon Leech
|
||||
- Correct reference to ES 2.0 state table from 6.7 to 6.2 (public bug
|
||||
1390)
|
||||
#3 February 8, 2012 dgkoch
|
||||
- clarify Issue 3 and the error condition for no indexed attributes
|
||||
#2 January 24, 2012 dgkoch
|
||||
- fix typos, add clarifications, and more errors
|
||||
#1 January 17, 2012 dgkoch
|
||||
- initial GLES2 version from ARB_instanced_arrays
|
||||
@@ -0,0 +1,168 @@
|
||||
Name
|
||||
|
||||
ANGLE_pack_reverse_row_order
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANGLE_pack_reverse_row_order
|
||||
|
||||
Contact
|
||||
|
||||
Daniel Koch, TransGaming (daniel 'at' transgaming.com)
|
||||
|
||||
Contributors
|
||||
|
||||
Brian Salomon
|
||||
Daniel Koch
|
||||
|
||||
Status
|
||||
|
||||
Implemented in ANGLE ES2
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: February 22, 2011
|
||||
Author Revision: 22
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #110
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.5 or OpenGL ES 1.0 are required.
|
||||
|
||||
Some of the functionality of this extension is not supported
|
||||
when implemented against OpenGL ES.
|
||||
|
||||
EXT_texture_rg interacts with this extension.
|
||||
|
||||
The extension is written against the OpenGL 3.2 Specification
|
||||
(Core Profile).
|
||||
|
||||
Overview
|
||||
|
||||
This extension introduces a mechanism to allow reversing the order
|
||||
in which image rows are written into a pack destination. This
|
||||
effectively allows an application to flip the results of a ReadPixels
|
||||
in the y direction operation without having to render upside down.
|
||||
|
||||
The coordinate system of OpenGL is vertically reversed in comparison to a
|
||||
number of other graphics systems such as native windowing APIs. Applications
|
||||
that perform ReadPixels may have to either render to an intermediate color
|
||||
buffer before calling ReadPixels or perform a flip in software after
|
||||
ReadPixels. In some systems the GL can perform the row reversal during
|
||||
ReadPixels without incurring additional cost.
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP claims.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Types
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <pname> parameter of PixelStore{if}, GetIntegerv(),
|
||||
GetBooleanv(), and GetFloatv():
|
||||
|
||||
PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 3.2 Specification (Rasterization)
|
||||
|
||||
In Section 4.3.1 (Reading Pixels) add a row to table 4.7:
|
||||
|
||||
+------------------------------+---------+---------------+-------------+
|
||||
| Parameter Name | Type | Initial Value | Valid Range |
|
||||
+------------------------------+---------+---------------+-------------+
|
||||
| PACK_REVERSE_ROW_ORDER_ANGLE | boolean | FALSE | TRUE/FALSE |
|
||||
+------------------------------+---------+---------------+-------------+
|
||||
|
||||
In Section 4.3.1 (Reading Pixels) modify the second paragraph of subsection
|
||||
"Placement in Pixel Pack Buffer or Client Memory" to read:
|
||||
|
||||
When PACK_REVERSE_ROW_ORDER_ANGLE is FALSE groups of elements are placed
|
||||
in memory just as they are taken from memory when transferring pixel
|
||||
rectangles to the GL. That is, the ith group of the jth row
|
||||
(corresponding to the ith pixel in the jth row) is placed in memory just
|
||||
where the ith group of the jth row would be taken from when transferring
|
||||
pixels. See Unpacking under section 3.7.2. The only difference is that
|
||||
the storage mode parameters whose names begin with PACK_ are used
|
||||
instead of those whose names begin with UNPACK_. If the format is RED,
|
||||
GREEN, BLUE, or ALPHA, only the corresponding single element is written.
|
||||
Likewise if the format is RG, RGB, or BGR, only the corresponding two or
|
||||
three elements are written. Otherwise all the elements of each group are
|
||||
written. When PACK_REVERSE_ROW_ORDER_ANGLE is TRUE the order of the rows
|
||||
of elements is reversed before the data is packed. That is, the element
|
||||
corresponding to pixel (x, y + height - 1) becomes the first element
|
||||
packed, followed by (x + 1, y + height - 1), etc. Otherwise, pixel data
|
||||
is packed in the same manner as when PACK_REVERSE_ROW_ORDER_ANGLE is
|
||||
FALSE.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 3.2 Specification (State and State Requests)
|
||||
|
||||
In Section 6.1.4 add the following sentence to the fifth paragraph
|
||||
(beginning with "For three-dimensional and two-dimensional array
|
||||
textures..."):
|
||||
When PACK_REVERSE_ROW_ORDER_ANGLE is TRUE the order of rows within
|
||||
each image are reversed without reordering the images themselves.
|
||||
|
||||
Dependencies on OpenGL ES
|
||||
|
||||
If implemented for OpenGL ES, this extension behaves as specified, except:
|
||||
|
||||
-Delete all references to formats RED, GREEN, BLUE, RG, and BGR.
|
||||
|
||||
-The language about image order in Section 6.1.4 does not apply as OpenGL ES
|
||||
does not have GetTexImage.
|
||||
|
||||
Dependencies on EXT_texture_rg
|
||||
|
||||
If EXT_texture_rg is present reinsert language about formats RED and RG
|
||||
into the OpenGL ES 2.0 specification.
|
||||
|
||||
Errors
|
||||
|
||||
None
|
||||
|
||||
New State
|
||||
Initial
|
||||
Get Value Type Get Command Value Description Sec.
|
||||
--------- ---- ----------- ------- ----------- ----
|
||||
PACK_REVERSE_ROW_ORDER_ANGLE B GetIntegerv FALSE Pixel pack row order reversal 4.3.1
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
None
|
||||
|
||||
Issues
|
||||
|
||||
None
|
||||
|
||||
Sample Code
|
||||
|
||||
/* Allocate space to hold the pixel data */
|
||||
const GLvoid* pixels = malloc(width * height * 4);
|
||||
|
||||
/* Bind the framebuffer object to be read */
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, framebuffer);
|
||||
|
||||
/* Enable row order reversal */
|
||||
glPixelStore(GL_PACK_REVERSE_ROW_ORDER_ANGLE, TRUE);
|
||||
|
||||
/* The pixel data stored in pixels will be in top-down order, ready for
|
||||
* use with a windowing system API that expects this order.
|
||||
*/
|
||||
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||
|
||||
Revision History
|
||||
|
||||
Revision 1, 2011/11/22 (Brian Salomon)
|
||||
- First version
|
||||
Revision 2, 2012/02/22 (dgkoch)
|
||||
- prepare for publishing
|
||||
@@ -0,0 +1,94 @@
|
||||
Name
|
||||
|
||||
ANGLE_program_binary
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANGLE_program_binary
|
||||
|
||||
Contributors
|
||||
|
||||
Alastair Patrick, Google Inc.
|
||||
Daniel Koch, TransGaming Inc.
|
||||
|
||||
Contact
|
||||
|
||||
Alastair Patrick, Google Inc. (apatrick 'at' google 'dot' com)
|
||||
|
||||
Status
|
||||
|
||||
Implemented in ANGLE.
|
||||
|
||||
Version
|
||||
|
||||
Last Modifed Date: June 6, 2012
|
||||
Revision: #1
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #139
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL ES 2.0 is required.
|
||||
OES_get_program_binary is required.
|
||||
This extension is written against the OpenGL ES 2.0.25 specification.
|
||||
|
||||
Overview
|
||||
|
||||
This extension makes available a program binary format,
|
||||
PROGRAM_BINARY_ANGLE. It enables retrieving and loading of pre-linked
|
||||
ANGLE program objects.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <binaryFormat> parameter of ProgramBinaryOES:
|
||||
|
||||
PROGRAM_BINARY_ANGLE 0x93A6
|
||||
|
||||
Additions to Chapter 2 of the OpenGL-ES 2.0 Specification (OpenGL Operation)
|
||||
|
||||
Add the following paragraph to the end of section 2.15.4, Program Binaries:
|
||||
|
||||
"PROGRAM_BINARY_ANGLE, returned in the list of PROGRAM_BINARY_FORMATS_OES,
|
||||
is a format that may be loaded into a program object via ProgramBinaryOES."
|
||||
|
||||
Additions to Chapter 3 of the OpenGL ES 2.0 specification (Rasterizatoin)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 4 of the OpenGL ES 2.0 specification (Per-Fragment
|
||||
Operations and the Framebuffer)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special
|
||||
Functions)
|
||||
|
||||
None.
|
||||
|
||||
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
|
||||
Requests)
|
||||
|
||||
None.
|
||||
|
||||
Errors
|
||||
|
||||
None
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
Issues
|
||||
|
||||
None
|
||||
|
||||
Revision History
|
||||
|
||||
06/06/2012 apatrick intial revision
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
Name
|
||||
|
||||
ANGLE_texture_compression_dxt
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANGLE_texture_compression_dxt1
|
||||
GL_ANGLE_texture_compression_dxt3
|
||||
GL_ANGLE_texture_compression_dxt5
|
||||
|
||||
Contributors
|
||||
|
||||
Gregg Tavares, Google Inc.
|
||||
Daniel Koch, TransGaming Inc.
|
||||
Al Patrick, Google Inc.
|
||||
|
||||
Contacts
|
||||
|
||||
Gregg Tavares, Google Inc. (gman 'at' google 'dot' com)
|
||||
|
||||
Status
|
||||
|
||||
Implemented in ANGLE ES2
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: Sept 22, 2012
|
||||
Author Revision: 2
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #111
|
||||
|
||||
Dependencies
|
||||
|
||||
Requires OpenGL ES 1.0.
|
||||
|
||||
The extension is written against the OpenGL ES 2.0 specification.
|
||||
|
||||
Overview
|
||||
|
||||
These extensions are exactly the same as EXT_texture_compression_dxt1
|
||||
except they additionally expose the COMPRESSED_RGBA_S3TC_DXT3_ANGLE and
|
||||
COMPRESSED_RGBA_S3TC_DXT5_ANGLE formats and have a size restrictions
|
||||
such that the size must be a multiple of four (except for mip levels
|
||||
where the dimensions are either 2 or 1).
|
||||
|
||||
See EXT_texture_compression_dxt1 for the full list of changes. Also
|
||||
see EXT_texture_compression_s3tc for a description of the formats.
|
||||
|
||||
IP Status
|
||||
|
||||
A license to the S3TC Intellectual Property may be necessary for
|
||||
implementation of this extension. You should consult with your
|
||||
Attorney to determine the need for a license.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None.
|
||||
|
||||
New Types
|
||||
|
||||
None.
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted by the <internalformat> parameter of CompressedTexImage2D
|
||||
and the <format> parameter of CompressedTexSubImage2D:
|
||||
|
||||
COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F0
|
||||
COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F1
|
||||
COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
|
||||
COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
|
||||
|
||||
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
|
||||
|
||||
Add the following to Section 3.7.3 (Compressed Texture Images)
|
||||
(at the end of the description of the CompressedTexImage2D command):
|
||||
|
||||
Compressed Internal Format Base Internal Format
|
||||
========================== ====================
|
||||
COMPRESSED_RGB_S3TC_DXT1_ANGLE RGB
|
||||
COMPRESSED_RGBA_S3TC_DXT1_ANGLE RGBA
|
||||
COMPRESSED_RGBA_S3TC_DXT3_ANGLE RGBA
|
||||
COMPRESSED_RGBA_S3TC_DXT5_ANGLE RGBA
|
||||
|
||||
Table 3.x: Specific Compressed Internal Formats
|
||||
|
||||
If <internalformat> is one of the S3TC formats listed in Table 3.x,
|
||||
the compressed texture is stored in the appropriate S3TC compressed
|
||||
texture format (see Appendix). The GL and the S3TC texture compression
|
||||
algorithm support only 2D images without borders.
|
||||
|
||||
CompressedTexImage2D will produce the INVALID_OPERATION error when
|
||||
<internalformat> is one of the values from Table 3.x under the following
|
||||
conditions:
|
||||
|
||||
* <border> is non-zero.
|
||||
* <width> is not one, two, or a multiple of four.
|
||||
* <height> is not one, two, or a multiple of four.
|
||||
|
||||
Add the following to Section 3.7.3 (Compressed Texture Images)
|
||||
(at the end of the description of the CompressedTexSubImage2D command):
|
||||
|
||||
If the internal format of the texture image being modified is listed
|
||||
in Table 3.x, the texture is stored in the appropriate S3TC compressed
|
||||
texture format (see Appendix). Since DXT/S3TC images are easily edited
|
||||
along 4x4 texel boundaries, the limitations of CompressedTexSubImage2D
|
||||
are relaxed. CompressedTexSubImage2D will result in an INVALID_OPERATION
|
||||
error only if one of the following conditions occurs:
|
||||
|
||||
* <width> is not a multiple of four or equal to TEXTURE_WIDTH.
|
||||
* <height> is not a multipls of four or equal to TEXTURE_HEIGHT.
|
||||
* <xoffset> or <yoffset> is not a multiple of four.
|
||||
* <format> does not match the internal format of the texture image
|
||||
being modified.
|
||||
|
||||
The following restrictions at the end of section 3.7.3 do not apply
|
||||
to S3TC DXT texture formats, since subimage modification is straightforward
|
||||
as long as the subimage is properly aligned.
|
||||
|
||||
Errors
|
||||
|
||||
INVALID_OPERATION is generated by CompressedTexImage2D if <internalformat>
|
||||
is one of the compressed internal formats from Table 3.x and any of the
|
||||
following apply:
|
||||
- <border> is not equal to zero.
|
||||
- <width> is not one, two, or a multiple of four.
|
||||
- <height> is not one, two, or a multiple of four.
|
||||
|
||||
INVALID_OPERATION is generated by TexImage2D and CopyTexImage2D if
|
||||
<internalformat> is one of the compressed internal formats from
|
||||
Table 3.x.
|
||||
|
||||
INVALID_OPERATION is generated by TexSubImage2D and CopyTexSubImage2D
|
||||
if the internal format of the texture currently bound to <target> is
|
||||
one of the compressed internal formats from Table 3.x.
|
||||
|
||||
INVALID_OPERATION is generated by CompressedTexSubImage2D if <format>
|
||||
is one of the compressed interal formats from Table 3.x and any of the
|
||||
following apply:
|
||||
- <width> is not a multiple of four or equal to TEXTURE_WIDTH;
|
||||
- <height> is not a multiple of four or equal to TEXTURE_HEIGHT;
|
||||
- <xoffset> or <yoffset> is not a multiple of four;
|
||||
- <format> does not match the internal format of the texture image
|
||||
being modified.
|
||||
|
||||
New State
|
||||
|
||||
None.
|
||||
|
||||
Appendix:
|
||||
|
||||
The format for the S3TC Compressed Texture Images Formats is documented
|
||||
in the appendix of EXT_texture_compression_s3tc.
|
||||
|
||||
Revision History
|
||||
|
||||
Revision 1, 2010/08/06 - gman
|
||||
- Initial revision
|
||||
Revision 2, 2012/09/22 - dgkoch
|
||||
- Added DXT1 formats and documented multiple of 4 restriction.
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
Name
|
||||
|
||||
ANGLE_texture_usage
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_ANGLE_texture_usage
|
||||
|
||||
Contributors
|
||||
|
||||
Nicolas Capens, TransGaming
|
||||
Daniel Koch, TransGaming
|
||||
|
||||
Contact
|
||||
|
||||
Daniel Koch, TransGaming (daniel 'at' transgaming.com)
|
||||
|
||||
Status
|
||||
|
||||
Complete
|
||||
|
||||
Version
|
||||
|
||||
Last Modified Date: November 10, 2011
|
||||
Version: 2
|
||||
|
||||
Number
|
||||
|
||||
OpenGL ES Extension #112
|
||||
|
||||
Dependencies
|
||||
|
||||
This extension is written against the OpenGL ES 2.0 Specification.
|
||||
|
||||
Overview
|
||||
|
||||
In some implementations it is advantageous to know the expected
|
||||
usage of a texture before the backing storage for it is allocated.
|
||||
This can help to inform the implementation's choice of format
|
||||
and type of memory used for the allocation. If the usage is not
|
||||
known in advance, the implementation essentially has to make a
|
||||
guess as to how it will be used. If it is later proven wrong,
|
||||
it may need to perform costly re-allocations and/or reformatting
|
||||
of the texture data, resulting in reduced performance.
|
||||
|
||||
This extension adds a texture usage flag that is specified via
|
||||
the TEXTURE_USAGE_ANGLE TexParameter. This can be used to
|
||||
indicate that the application knows that this texture will be
|
||||
used for rendering.
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP claims.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
None
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted as a value for <pname> for the TexParameter{if} and
|
||||
TexParameter{if}v commands and for the <value> parameter of
|
||||
GetTexParameter{if}v:
|
||||
|
||||
TEXTURE_USAGE_ANGLE 0x93A2
|
||||
|
||||
Accepted as a value to <param> for the TexParameter{if} and
|
||||
to <params> for the TexParameter{if}v commands with a <pname> of
|
||||
TEXTURE_USAGE_ANGLE; returned as possible values for <data> when
|
||||
GetTexParameter{if}v is queried with a <value> of TEXTURE_USAGE_ANGLE:
|
||||
|
||||
NONE 0x0000
|
||||
FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
|
||||
|
||||
Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
|
||||
|
||||
Add a new row to Table 3.10 (Texture parameters and their values):
|
||||
|
||||
Name | Type | Legal Values
|
||||
------------------------------------------------------------
|
||||
TEXTURE_USAGE_ANGLE | enum | NONE, FRAMEBUFFER_ATTACHMENT_ANGLE
|
||||
|
||||
Add a new section 3.7.x (Texture Usage) before section 3.7.12 and
|
||||
renumber the subsequent sections:
|
||||
|
||||
"3.7.x Texture Usage
|
||||
|
||||
Texture usage can be specified via the TEXTURE_USAGE_ANGLE value
|
||||
for the <pname> argument to TexParameter{if}[v]. In order to take effect,
|
||||
the texture usage must be specified before the texture contents are
|
||||
defined either via TexImage2D or TexStorage2DEXT.
|
||||
|
||||
The usage values can impact the layout and type of memory used for the
|
||||
texture data. Specifying incorrect usage values may result in reduced
|
||||
functionality and/or significantly degraded performance.
|
||||
|
||||
Possible values for <params> when <pname> is TEXTURE_USAGE_ANGLE are:
|
||||
|
||||
NONE - the default. No particular usage has been specified and it is
|
||||
up to the implementation to determine the usage of the texture.
|
||||
Leaving the usage unspecified means that the implementation may
|
||||
have to reallocate the texture data as the texture is used in
|
||||
various ways.
|
||||
|
||||
FRAMEBUFFER_ATTACHMENT_ANGLE - this texture will be attached to a
|
||||
framebuffer object and used as a desination for rendering or blits."
|
||||
|
||||
Modify section 3.7.12 (Texture State) and place the last 3 sentences
|
||||
with the following:
|
||||
|
||||
"Next, there are the three sets of texture properties; each consists of
|
||||
the selected minification and magnification filters, the wrap modes for
|
||||
<s> and <t>, and the usage flags. In the initial state, the value assigned
|
||||
to TEXTURE_MIN_FILTER is NEAREST_MIPMAP_LINEAR, and the value for
|
||||
TEXTURE_MAG_FILTER is LINEAR. <s> and <t> wrap modes are both set to
|
||||
REPEAT. The initial value for TEXTURE_USAGE_ANGLE is NONE."
|
||||
|
||||
|
||||
Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
|
||||
Operations and the Framebuffer)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special
|
||||
Functions):
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and
|
||||
State Requests)
|
||||
|
||||
None
|
||||
|
||||
Dependencies on EXT_texture_storage
|
||||
|
||||
If EXT_texture_storage is not supported, omit any references to
|
||||
TexStorage2DEXT.
|
||||
|
||||
Errors
|
||||
|
||||
If TexParameter{if} or TexParamter{if}v is called with a <pname>
|
||||
of TEXTURE_USAGE_ANGLE and the value of <param> or <params> is not
|
||||
NONE or FRAMEBUFFER_ATTACHMENT_ANGLE the error INVALID_VALUE is
|
||||
generated.
|
||||
|
||||
Usage Example
|
||||
|
||||
/* create and bind texture */
|
||||
glGenTextures(1, &texture);
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
||||
/* specify texture parameters */
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_*, ...); /* as before */
|
||||
|
||||
/* specify that we'll be rendering to the texture */
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_USAGE_ANGLE, GL_FRAMEBUFFER_ATTACHMENT_ANGLE);
|
||||
|
||||
glTexStorage2DEXT(GL_TEXTURE_2D, levels, ...); // Allocation
|
||||
for(int level = 0; level < levels; ++level)
|
||||
glTexSubImage2D(GL_TEXTURE_2D, level, ...); // Initialisation
|
||||
|
||||
Issues
|
||||
|
||||
1. Should there be a dynamic usage value?
|
||||
|
||||
DISCUSSION: We could accept a dynamic flag to indicate that a texture will
|
||||
be updated frequently. We could map this to D3D9 dynamic textures. This would
|
||||
allow us to avoid creating temporary surfaces when updating the texture.
|
||||
However renderable textures cannot be dynamic in D3D9, which eliminates the
|
||||
primary use case for this. Furthermore, the memory usage of dynamic textures
|
||||
typically increases threefold when you lock it.
|
||||
|
||||
2. Should the texture usage be an enum or a bitfield?
|
||||
|
||||
UNRESOLVED. Using a bitfield would allow combination of values to be specified.
|
||||
On the other hand, if combinations are really required, additional <pnames>
|
||||
could be added as necessary. Querying a bitfield via the GetTexParameter command
|
||||
feels a bit odd.
|
||||
|
||||
3. What should happen if TEXTURE_USAGE_ANGLE is set/changed after the texture
|
||||
contents have been specified?
|
||||
|
||||
RESOLVED: It will have no effect. However, if the texture is redefined (for
|
||||
example by TexImage2D) the new allocation will use the updated usage.
|
||||
GetTexParameter is used to query the value of the TEXTURE_USAGE_ANGLE
|
||||
state that was last set by TexParameter for the currently bound texture, or
|
||||
the default value if it has never been set. There is no way to determine the
|
||||
usage that was in effect at the time the texture was defined.
|
||||
|
||||
Revision History
|
||||
|
||||
Rev. Date Author Changes
|
||||
---- ----------- --------- ----------------------------------------
|
||||
1 10 Nov 2011 dgkoch Initial revision
|
||||
2 10 Nov 2011 dgkoch Add overview
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user