Merge branch 'release/v0.2.0'

This commit is contained in:
Matt Williams 2012-11-19 16:16:33 +00:00
commit 6d37583da5
136 changed files with 51607 additions and 10722 deletions

View File

@ -1,19 +1,57 @@
Changes for PolyVox version 0.2 Changes for PolyVox version 0.2
=============================== ===============================
This is the first revision for which we have produced a changelog, as we are now trying to streamline our development and release process. Hence this changelog entry is not going to be as structured as we hope they will be in the future. I'm writing it from memory, rather than having carefully kept track of all the relevent changes as I made them. This is the first revision for which we have produced a changelog, as we are now trying to streamline our development and release process. Hence this changelog entry is not going to be as structured as we hope they will be in the future. We're writing it from memory, rather than having carefully kept track of all the relevant changes as we made them.
Deprecated functionality
------------------------
The following functionality is considered deprecated in this release of PolyVox and will probably be removed in future versions.
MeshDecimator: The mesh decimator was intended to reduce the amount of triangles in generated meshes but it has always had problems. It's far too slow and not very robust. For cubic meshes it is no longer needed anyway as the CubicSurfaceExtractor has built in decimation which is much more effective. For smooth (marching cubes) meshes there is no single alternative. You can consider downsampling the volume before you run the surface extractor (see the SmoothLODExample), and in the future we may add support for an external mesh processing library.
SimpleInterface: This was added so that people could create volumes without knowing about templates, and also to provide a target which was easier to wrap with SWIG. But overall we'd rather focus on getting the real SWIG bindings to work. The SimpleInterface is also extremely limited in the functionality it provides.
Serialisation: This is a difficult one. The current serialisation is rather old and only deals with loading/saving a whole volume at a time. It would make much more sense if it could serialise regions instead of whole volumes, and if it could handle compression. It would then be useful for serialising the data which is paged into and out of the LargeVolume, as well as other uses. Both these changes would likely require breaking the current format and interface. It is likely that serialisation will return to PolyVox in the future, but for now we would suggest just implementing your own.
VolumeChangeTracker: The idea behind this was was to provide a utility class to help the user keep track of which regions have been modified so they know when they need the surface extractor to be run again. But overall we'd rather keep such higher level functionality in user code as there are multiple ways it can be implemented. The current implementation is also old and does not support very large/infinite volumes, for example.
Refactor of basic voxel types Refactor of basic voxel types
----------------------------- -----------------------------
Previous versions of PolyVox provided classes representing voxel data, such as MaterialDensityPair88. These classes were required to expose certain function such as getDensity() and getMaterial(). This is no longer the case as now even primitive data types such as floats and ints can be used as voxels. You can also create new classes to represent voxel data and it is entirely up to you what kind of properties they have. Previous versions of PolyVox provided classes representing voxel data, such as MaterialDensityPair88. These classes were required to expose certain functions such as getDensity() and getMaterial(). This is no longer the case as now even primitive data types such as floats and ints can be used as voxels. You can also create new classes to represent voxel data and it is entirely up to you what kind of properties they have.
As an example, imagine you might want to store lighting values in a volume and propergate them according to some algorithm you devise. In this case the voxel data has no concept of densities or materials and there is no need to provide them. Algorithms which conceptually operate on densities (such as the Marching Cubes Surface Extractor) will not be able to operate on your lighting data but this would not make sense anyway. As an example, imagine you might want to store lighting values in a volume and propagate them according to some algorithm you devise. In this case the voxel data has no concept of densities or materials and there is no need to provide them. Algorithms which conceptually operate on densities (such as the MarchingCubesSurfaceExtractor) will not be able to operate on your lighting data but this would not make sense anyway.
Because algorithms now know nothing about the structure of the underlying voxels, some utility functions/classes are required. The principle is similar to the std::sort algorithm, which knows nothing about the type of data it is operating on but is told how to compare any two values via a comparator function object. In this sense, it will be useful to have an understanding of how algorithms such as std::sort are used. Because algorithms now know nothing about the structure of the underlying voxels, some utility functions/classes are required. The principle is similar to the std::sort algorithm, which knows nothing about the type of data it is operating on but is told how to compare any two values via a comparator function object. In this sense, it will be useful to have an understanding of how algorithms such as std::sort are used.
We have continued to provide the Density, Material, and MaterialDensityPair classes to ease the transition into the new system, but really they should just be considered as examples of how you might create your own voxel types. We have continued to provide the Density, Material, and MaterialDensityPair classes to ease the transition into the new system, but really they should just be considered as examples of how you might create your own voxel types.
Some algothms assume that basic mathematical operations can be applied to voxel types. For example, the LowPassFilter needs to compute the average of a set of voxels, and to do this it need to be possible to add voxels together and divide by an integer. Obviously these operations are provided by primitive types, but it means that if you want to use the LowPassfilter on custom voxel types then these types need to provide operator+=, operator/=, etc. These have been added to the Density and MaterialDensityPair classes, but not to the Material class. This reflects the fact that applying a low pass filter to a material volume does not make conceptual sense. Some algorithms assume that basic mathematical operations can be applied to voxel types. For example, the LowPassFilter needs to compute the average of a set of voxels, and to do this it needs to be possible to add voxels together and divide by an integer. Obviously these operations are provided by primitive types, but it means that if you want to use the LowPassfilter on custom voxel types then these types need to provide operator+=, operator/=, etc. These have been added to the Density and MaterialDensityPair classes, but not to the Material class. This reflects the fact that applying a low pass filter to a material volume does not make conceptual sense.
Changes to build system Changes to build system
----------------------- -----------------------
In order to make the build system easier to use, a number of CMake variables were changed to be more consistent. See :doc:`install` for details on the new variable naming. In order to make the build system easier to use, a number of CMake variables were changed to be more consistent. See :doc:`install` for details on the new variable naming.
Changes to CubicSurfaceExtractor
--------------------------------
The behaviour of the CubicSurfaceExtractor has been changed such that it no longer handles some edge cases. Because each generated quad lies between two voxels it can be unclear which region should 'own' a quad when the two voxels are from different regions. The previous version of the CubicSurfaceExtractor would attempt to handle this automatically, but as a result it was possible to get two quads existing at the same position in space. This can cause problems with transparency and with physics, as well as making it harder to decide which regions need to be updated when a voxel is changed.
The new system simplifies the behaviour of this surface extractor but does require a bit of care on the part of the user. You should be clear on the rules controlling when quads are generated and to which regions they will belong. To aid with this we have significantly improved the API documentation for the CubicSurfaceExtractor so be sure to have a look.
Changes to Raycast
------------------
The raycasting functionality was previously in a class (Raycast) but now it is provided by standalone functions. This is basically because there is no need for it to be a class, and it complicated usage. The new functions are called 'raycastWithDirection' and 'raycastWithEndpoints' which helps remove the previous ambiguity regarding the meaning of the two vectors which are passed as parameters.
The callback functionality (called for each processed voxel to determine whether to continue and also perform additional processing) is no longer implemented as an std::function. Instead the standard STL approach is used, in which a function or function object is used a a template parameter. This is faster than the std::function solution and should also be easier to integrate with other languages.
Usage of the new raycasting is demonstrated by a unit test.
Changes to AmbientOcclusionCalculator
-------------------------------------
The AmbientOcclusionCalculator has also been unclassed and is now called calculateAmbientOcclusion. The unit test has been updated to demonstrate the new usage.
Changes to A* pathfinder
------------------------
The A* pathfinder has always had different (but equally valid) results when building in Visual Studio vs. GCC. This is now fixed and results are consistent between platforms.
Copy and move semantics
-----------------------
All volume classes now have protected copy constructors and assignment operators to prevent you from accidentally copying them (which is expensive). Look at the VolumeResampler if you really do want to copy some volume data.

View File

@ -25,7 +25,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
PROJECT(PolyVox) PROJECT(PolyVox)
SET(POLYVOX_VERSION_MAJOR "0") SET(POLYVOX_VERSION_MAJOR "0")
SET(POLYVOX_VERSION_MINOR "1") SET(POLYVOX_VERSION_MINOR "2")
SET(POLYVOX_VERSION_PATCH "0") SET(POLYVOX_VERSION_PATCH "0")
SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX_VERSION_PATCH}" CACHE STRING "PolyVox version") SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX_VERSION_PATCH}" CACHE STRING "PolyVox version")
MARK_AS_ADVANCED(FORCE POLYVOX_VERSION) MARK_AS_ADVANCED(FORCE POLYVOX_VERSION)
@ -57,7 +57,7 @@ endif()
if(MSVC AND (MSVC_VERSION LESS 1600)) if(MSVC AND (MSVC_VERSION LESS 1600))
# Require boost for older (pre-vc2010) Visual Studio compilers # Require boost for older (pre-vc2010) Visual Studio compilers
# See library/include/polyvoximpl/TypeDef.h # See library/include/polyvoxcore/impl/TypeDef.h
find_package(Boost REQUIRED) find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})
endif() endif()
@ -72,22 +72,28 @@ endif()
ADD_SUBDIRECTORY(library) ADD_SUBDIRECTORY(library)
OPTION(ENABLE_EXAMPLES "Should the examples be built" ON) OPTION(ENABLE_EXAMPLES "Should the examples be built" ON)
IF(ENABLE_EXAMPLES) IF(ENABLE_EXAMPLES AND QT_QTOPENGL_FOUND)
ADD_SUBDIRECTORY(examples/Basic) ADD_SUBDIRECTORY(examples/Basic)
ADD_SUBDIRECTORY(examples/Paging) ADD_SUBDIRECTORY(examples/Paging)
ADD_SUBDIRECTORY(examples/OpenGL) ADD_SUBDIRECTORY(examples/OpenGL)
ADD_SUBDIRECTORY(examples/SmoothLOD) ADD_SUBDIRECTORY(examples/SmoothLOD)
ENDIF(ENABLE_EXAMPLES) SET(BUILD_EXAMPLES ON)
ELSE()
SET(BUILD_EXAMPLES OFF)
ENDIF()
INCLUDE(Packaging.cmake) INCLUDE(Packaging.cmake)
OPTION(ENABLE_TESTS "Should the tests be built" ON) OPTION(ENABLE_TESTS "Should the tests be built" ON)
IF(ENABLE_TESTS) IF(ENABLE_TESTS AND QT_QTTEST_FOUND)
INCLUDE(CTest) INCLUDE(CTest)
MARK_AS_ADVANCED(FORCE DART_TESTING_TIMEOUT) #This is only needed to hide the variable in the GUI (CMake bug) until 2.8.5 MARK_AS_ADVANCED(FORCE DART_TESTING_TIMEOUT) #This is only needed to hide the variable in the GUI (CMake bug) until 2.8.5
MARK_AS_ADVANCED(FORCE BUILD_TESTING) MARK_AS_ADVANCED(FORCE BUILD_TESTING)
ADD_SUBDIRECTORY(tests) ADD_SUBDIRECTORY(tests)
ENDIF(ENABLE_TESTS) SET(BUILD_TESTS ON)
ELSE()
SET(BUILD_TESTS OFF)
ENDIF()
#Check if we will building _and_ bundling the docs #Check if we will building _and_ bundling the docs
IF(DOXYGEN_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE) IF(DOXYGEN_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
@ -98,8 +104,8 @@ ENDIF()
ADD_SUBDIRECTORY(documentation) ADD_SUBDIRECTORY(documentation)
add_feature_info("Examples" ENABLE_EXAMPLES "Examples of PolyVox usage") add_feature_info("Examples" BUILD_EXAMPLES "Examples of PolyVox usage")
add_feature_info("Tests" ENABLE_TESTS "Unit tests") add_feature_info("Tests" BUILD_TESTS "Unit tests")
add_feature_info("Bindings" BUILD_BINDINGS "SWIG bindings") add_feature_info("Bindings" BUILD_BINDINGS "SWIG bindings")
add_feature_info("API docs" DOXYGEN_FOUND "HTML documentation of the API") add_feature_info("API docs" DOXYGEN_FOUND "HTML documentation of the API")
add_feature_info("Qt Help" BUILD_AND_BUNDLE_DOCS "API docs in Qt Help format") add_feature_info("Qt Help" BUILD_AND_BUNDLE_DOCS "API docs in Qt Help format")
@ -112,8 +118,8 @@ MESSAGE(STATUS "")
MESSAGE(STATUS "Summary") MESSAGE(STATUS "Summary")
MESSAGE(STATUS "-------") MESSAGE(STATUS "-------")
MESSAGE(STATUS "Library type: " ${LIBRARY_TYPE}) MESSAGE(STATUS "Library type: " ${LIBRARY_TYPE})
MESSAGE(STATUS "Build examples: " ${ENABLE_EXAMPLES}) MESSAGE(STATUS "Build examples: " ${BUILD_EXAMPLES})
MESSAGE(STATUS "Build tests: " ${ENABLE_TESTS}) MESSAGE(STATUS "Build tests: " ${BUILD_TESTS})
MESSAGE(STATUS "Build bindings: " ${BUILD_BINDINGS}) MESSAGE(STATUS "Build bindings: " ${BUILD_BINDINGS})
MESSAGE(STATUS "API Docs available: " ${DOXYGEN_FOUND}) MESSAGE(STATUS "API Docs available: " ${DOXYGEN_FOUND})
MESSAGE(STATUS " - Qt Help bundling: " ${BUILD_AND_BUNDLE_DOCS}) MESSAGE(STATUS " - Qt Help bundling: " ${BUILD_AND_BUNDLE_DOCS})

View File

@ -36,7 +36,8 @@ if(SPHINXBUILD_EXECUTABLE)
COMMENT "Building PolyVox manual" COMMENT "Building PolyVox manual"
) )
add_dependencies(manual doc) add_dependencies(manual doc)
SET_PROPERTY(TARGET manual PROPERTY FOLDER "documentation") set_target_properties(manual PROPERTIES PROJECT_LABEL "Manual") #Set label seen in IDE
SET_PROPERTY(TARGET manual PROPERTY FOLDER "Documentation")
else() else()
if(NOT SPHINXBUILD_EXECUTABLE) if(NOT SPHINXBUILD_EXECUTABLE)
message(STATUS "`sphinx-build` was not found. Try setting SPHINXBUILD_EXECUTABLE to its location.") message(STATUS "`sphinx-build` was not found. Try setting SPHINXBUILD_EXECUTABLE to its location.")

View File

@ -22,4 +22,4 @@ Can I combine smooth meshes with cubic ones?
-------------------------------------------- --------------------------------------------
We have never attempted to do this but in theory it should be possible. One option is simply to generate two meshes (one using the MarchingCubesSurfaceExtractor and the other using the CubicSurfaceExtractor) and render them on top of each other while allowing the depth buffer to resolve the intersections. Combining these two meshes into a single mesh is likely to be difficult as they use different vertex formats and have different texturing requirements (see the document on texture mapping). We have never attempted to do this but in theory it should be possible. One option is simply to generate two meshes (one using the MarchingCubesSurfaceExtractor and the other using the CubicSurfaceExtractor) and render them on top of each other while allowing the depth buffer to resolve the intersections. Combining these two meshes into a single mesh is likely to be difficult as they use different vertex formats and have different texturing requirements (see the document on texture mapping).
An alternative possibility may be to create a new surface extractor based on the Surface Nets (link) algorithm. The idea here is that the mesh would start with a cubic shape, but as the net was stretched it would be smoothed. The degree of smoothing could be controlled by a voxel property which could allow the full range from cubic to smooth to exist in a single mesh. As mention ed above, this may mean that some extra work has to be put into a fragment shader which is capable of texturring this kind of mesh. Come by the forums of you want to discuss this further. An alternative possibility may be to create a new surface extractor based on the Surface Nets (link) algorithm. The idea here is that the mesh would start with a cubic shape, but as the net was stretched it would be smoothed. The degree of smoothing could be controlled by a voxel property which could allow the full range from cubic to smooth to exist in a single mesh. As mentioned above, this may mean that some extra work has to be put into a fragment shader which is capable of texturing this kind of mesh. Come by the forums of you want to discuss this further.

View File

@ -1,35 +1,37 @@
*************** ***************
Level of Detail Level of Detail
*************** ***************
When the PolyVox surface extractors are applied to volume data the resulting mesh can contain a very high number of triangles. For large voxel worlds this can cause both performance and memory problems. The performance problems occur due the the load on the vertex shader which has to process a large number of vertices, and also due to the setup costs of a large number of tiny (possibly sub-pixel) triangles. The memory costs result simply from have a large amount of data which does not actually contibute to the visual appearance of the scene. When the PolyVox surface extractors are applied to volume data the resulting mesh can contain a very high number of triangles. For large voxel worlds this can cause both performance and memory problems. The performance problems occur due the the load on the vertex shader which has to process a large number of vertices, and also due to the setup costs of a large number of tiny (possibly sub-pixel) triangles. The memory costs result simply from having a large amount of data which does not actually contribute to the visual appearance of the scene.
For these reasons it is desirable to reduce the triangle count of the meshes as far as possible, espessially as meshes move away from the camera. This document describes the various approaches which are available within PolyVox to achieve this. Generally these approches are different for cubic meshes vs smooth meshes and so we address these cases seperatly. For these reasons it is desirable to reduce the triangle count of the meshes as far as possible, especially as meshes move away from the camera. This document describes the various approaches which are available within PolyVox to achieve this. Generally these approaches are different for cubic meshes vs smooth meshes and so we address these cases separately.
Cubic Meshes Cubic Meshes
============ ============
A naive implementation of a cubic surface extractor would generate a mesh containing a quad for voxel face which lies on the boundary between a solid and an empty voxel. The CubicSurfaceExtractor is indeed capable of generating such a mesh, but it also provides the option to merge adjacent quads into a single quad subject to various conditions being satisfied (e.g. the faces must have the same material). This meging process drastically reduces the amount of geometry which must be drawn but does not modify the shape of the mesh. Because of these desirable properties such merging is performed by default, but it can be disabled if necessary. A naive implementation of a cubic surface extractor would generate a mesh containing a quad for voxel face which lies on the boundary between a solid and an empty voxel. The CubicSurfaceExtractor is indeed capable of generating such a mesh, but it also provides the option to merge adjacent quads into a single quad subject to various conditions being satisfied (e.g. the faces must have the same material). This merging process drastically reduces the amount of geometry which must be drawn but does not modify the shape of the mesh. Because of these desirable properties such merging is performed by default, but it can be disabled if necessary.
To our knowledge the only drawback of performing this quad marging is that it can create T-junctions in the resulting mesh. T-junctions are an undesirable property of mesh geometry because they can cause tiny cracks (usually just seen as flickering pixels) to occur between quads. The figure below shows a mesh before quad merging, a mesh where the merged quads have caused T-junctions, and how the resulting rendering might look (note the single pixel holes along the quad border). To our knowledge the only drawback of performing this quad merging is that it can create T-junctions in the resulting mesh. T-junctions are an undesirable property of mesh geometry because they can cause tiny cracks (usually just seen as flickering pixels) to occur between quads. The figure below shows a mesh before quad merging, a mesh where the merged quads have caused T-junctions, and how the resulting rendering might look (note the single pixel holes along the quad border).
Vertices C and D are supposed to lie exactly along the line which has A and B as its end points, so in theory the mesh should be valid and should render correctly. The reason T-junctions cause a problem in practice is due to limitations of the floating point number representation. Ddepending on the transformations which are applied, it may be that the positions of C and/or D can not be represented precisely enough to exactly lie on the line between A and B. *Add figure here...*
Demo correct mesh. mention we don't have a solution to generate it. Vertices C and D are supposed to lie exactly along the line which has A and B as its end points, so in theory the mesh should be valid and should render correctly. The reason T-junctions cause a problem in practice is due to limitations of the floating point number representation. Depending on the transformations which are applied, it may be that the positions of C and/or D can not be represented precisely enough to exactly lie on the line between A and B.
Whether it's a problem in practice depends on hardware precision (16/32 bit), distance from origin, number of transforms which are applied, and probably a number of other factors. We have yet to investigate *Demo correct mesh. mention we don't have a solution to generate it.*
We don't currently have a real solution to this problem. In Voxeliens the borders between voxels were darkened to simulate ambient occlusion and this had the desirable side effect of making and flickering pixels very hard to see. It's also possible that antialiasing stratagies can reduce the problem, and storing vertex positions as floats may help as well. Lastly, it may be possible to construct some kind of postprocess which would repair the image where it identifies single pixel discontinuities in the depth buffer. Whether it's a problem in practice depends on hardware precision (16/32 bit), distance from origin, number of transforms which are applied, and probably a number of other factors. We have yet to investigate.
We don't currently have a real solution to this problem. In Voxeliens the borders between voxels were darkened to simulate ambient occlusion and this had the desirable side effect of making any flickering pixels very hard to see. It's also possible that anti-aliasing strategies can reduce the problem, and storing vertex positions as integers may help as well. Lastly, it may be possible to construct some kind of post-process which would repair the image where it identifies single pixel discontinuities in the depth buffer.
Smooth Meshes Smooth Meshes
============= =============
Level of detail for smooth meshes is a lot more complex than for cubic ones, and we'll admit upfront that we do not currently have a good solution to this problem. None the less, we do have a couple of partial solutions which you might be able to use or adapt for your specific scenario. Level of detail for smooth meshes is a lot more complex than for cubic ones, and we'll admit upfront that we do not currently have a good solution to this problem. None the less, we do have a couple of partial solutions which you might be able to use or adapt for your specific scenario.
Techniques for performing level of detail on smooth meshes basically fall into two catagories. The first category involves reducing the resolution of the volume data and then running the surface extractor on the smaller volume. This naturally generates a lower detail mesh which much then be scaled up to match the other meshes in the scene. The second category involves generating the mesh at full detail and then using traditional mesh simplification techniques to reduces the number of trianges. Both techniques are explored in more detail below. Techniques for performing level of detail on smooth meshes basically fall into two categories. The first category involves reducing the resolution of the volume data and then running the surface extractor on the smaller volume. This naturally generates a lower detail mesh which must then be scaled up to match the other meshes in the scene. The second category involves generating the mesh at full detail and then using traditional mesh simplification techniques to reduces the number of triangles. Both techniques are explored in more detail below.
Volume Reduction Volume Reduction
---------------- ----------------
The VolumeResampler class can be used to copy volume data from a source region to a destination region, and it handles the interpolation of the voxel values in the event that the source and destination regions are not the same size. This is exactly what we need for implementing level of detail and the principle is demonstrated by the SmoothLOD sample (see the documentation for the SmoothLOD sample for more information). The VolumeResampler class can be used to copy volume data from a source region to a destination region, and it handles the resampling of the voxel values in the event that the source and destination regions are not the same size. This is exactly what we need for implementing level of detail and the principle is demonstrated by the SmoothLOD sample (see the documentation for the SmoothLOD sample for more information).
One of the problems with this approach is that the lower resolution mesh does not *exactly* line up with the higher resolution mesh, and this can caus cracks to be visible where the two meshes meet. The SmoothLOD sample attempts to avoid this problem by overlapping the meshes slightly but this may not be effective in all situations or from all viewpoints. One of the problems with this approach is that the lower resolution mesh does not *exactly* line up with the higher resolution mesh, and this can cause cracks to be visible where the two meshes meet. The SmoothLOD sample attempts to avoid this problem by overlapping the meshes slightly but this may not be effective in all situations or from all viewpoints.
An alternative is the Transvoxel algorithm (link) developed by Eric Lengyel. This essentially extends the original Marching Cubes lookup table with additional entries which handle seamless transitions between LOD levels, and it is a very promising solution to level of detail for voxel terrain. At this point in time we do not have an implementation of this algorithm but work is being undertaking in the area. For the latest developments see: http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=338 An alternative is the Transvoxel algorithm (link) developed by Eric Lengyel. This essentially extends the original Marching Cubes lookup table with additional entries which handle seamless transitions between LOD levels, and it is a very promising solution to level of detail for voxel terrain. At this point in time we do not have an implementation of this algorithm but work is being undertaking in the area. For the latest developments see: http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=338
@ -39,12 +41,8 @@ Mesh Simplification
------------------- -------------------
The other main approach is to generate the mesh at the full resolution and then reduce the number of triangles using a postprocessing step. This can draw on the large body of mesh simplification research (link to survey) and typically involves merging adjacent faces or collapsing vertices. When using this approach there are a couple of additional complications compared to the implementations which are normally seen. The other main approach is to generate the mesh at the full resolution and then reduce the number of triangles using a postprocessing step. This can draw on the large body of mesh simplification research (link to survey) and typically involves merging adjacent faces or collapsing vertices. When using this approach there are a couple of additional complications compared to the implementations which are normally seen.
The first additional complication is that the decimation algorithm needs to preserve material boundaries so that they don't move between LOD levels. When choosing whether a particualr simplification can be made (i.e deciding if one vertex can be collapsed on to another or whether two faces can be merged) a metric is usually used to determine how much the simplification would affect the visual appearance of the mesh. When working with smooth voxel meshes this metric needs to also consider the material identifiers. The first additional complication is that the decimation algorithm needs to preserve material boundaries so that they don't move between LOD levels. When choosing whether a particular simplification can be made (i.e deciding if one vertex can be collapsed on to another or whether two faces can be merged) a metric is usually used to determine how much the simplification would affect the visual appearance of the mesh. When working with smooth voxel meshes this metric needs to also consider the material identifiers.
We also need to ensure that the metric preserves the geometric boundary of the mesh, so that no cracks are visible when a simplified mesh is place next to an original one. Maintaining this geometric boudary can be difficult, as the straightforward approach of locking the edge vertices in place will tend to limit the amount of simplification which can be performed. Alternatively, cracks can be allowed to develop if they are later hidden through the use of 'skirts' around the resulting mesh. We also need to ensure that the metric preserves the geometric boundary of the mesh, so that no cracks are visible when a simplified mesh is place next to an original one. Maintaining this geometric boundary can be difficult, as the straightforward approach of locking the edge vertices in place will tend to limit the amount of simplification which can be performed. Alternatively, cracks can be allowed to develop if they are later hidden through the use of 'skirts' around the resulting mesh.
PolyVox does contain code for performing simplification of the smooth voxel meshes, but unfortuanatly it has significant performance and functionality issues. Therefore we cannot recommend its use, and it is likely that it will be removed in a future version of the library. We will instead investigate the use of external mesh simplification libraries and OpenMesh (link) may be a good candidate here. PolyVox used to contain code for performing simplification of the smooth voxel meshes, but unfortunately it had significant performance and functionality issues. Therefore it has been deprecated and it will be removed in a future version of the library. We will instead investigate the use of external mesh simplification libraries and OpenMesh (link) may be a good candidate here.
region edges move
material boundaries
object isn't closed

View File

@ -1,40 +1,45 @@
******** ********
Lighting Lighting
******** ********
Lighting is an important part of creating a realistic scene, and fortunatly most common lighting solutions can be easily applied to PolyVox meshes. In this document we describe how to implement dynamic lighting and ambient occlusion with PolyVox. Lighting is an important part of creating a realistic scene, and fortunately most common lighting solutions can be easily applied to PolyVox meshes. In this document we describe how to implement dynamic lighting and ambient occlusion with PolyVox.
Dynamic Lighting Dynamic Lighting
================ ================
In general, any lighting solution for realtime 3D graphics should be directly applicable to PolyVox meshes. In general, any lighting solution for real-time 3D graphics should be directly applicable to PolyVox meshes.
Normal Calculation for Smooth Meshes Normal Calculation for Smooth Meshes
------------------------------------ ------------------------------------
When working with smooth voxel terrain meshes, PolyVox provides vertex normals as part of the extracted surface mesh. A common approach for computing these normals would be to compute normals for each face in the mesh and then compute the vertex normals as a weighted average of the normals of the faces which share it. Actually this is not the approach used by PolyVox, as PolyVox instead computes the vertex normals directly from the underlying volume data. When working with smooth voxel terrain meshes, PolyVox provides vertex normals as part of the extracted surface mesh. A common approach for computing these normals would be to compute normals for each face in the mesh, and then compute the vertex normals as a weighted average of the normals of the faces which share it. Actually this is not the approach used by PolyVox, as PolyVox instead computes the vertex normals directly from the underlying volume data.
More specifically, PolyVox is able to compute the *gradient* of the volume data at any given point using well established image processing methods. The normalised gradient value is used as the vertex normal and in general it is smoother than the value computed by averaging neighbouring faces. Actually there are two approaches to this gradient comoputation know as *Central Differencing* and *Sobel Filter*. The central differencing approach is generally recommended but the Sobel filter can be used to obtain slightly smoother results but with lower performance. See the MarchingCubesSurfaceExtractor documentation for details on how to select between these (check this exists...). More specifically, PolyVox is able to compute the *gradient* of the volume data at any given point using well established image processing methods. The normalised gradient value is used as the vertex normal and in general it is smoother than the value computed by averaging neighbouring faces. Actually there are two approaches to this gradient computation known as *Central Differencing* and *Sobel Filter*. The central differencing approach is generally recommended but the Sobel filter can be used to obtain slightly smoother results but with lower performance. See the MarchingCubesSurfaceExtractor documentation for details on how to select between these (check this exists...).
Normal Calculation for Cubic Meshes Normal Calculation for Cubic Meshes
----------------------------------- -----------------------------------
For cubic meshes PolyVox doesn't actually generate any vetex normals at all, and this is often a source of confusion for new users. The reason for this is that we wish to to perform per-face lighting rather than per-vertex lighting. Considering the case of a single cube, if we wanted to perform per-face lighting based on per-vertex normals then the normals cannot be shared between adjacent faces and so each vertex needs to be duplicated three times (one for each face which uses it). This means we would need 24 vertices to represent a cube which intuitively should only need eight vertices. For cubic meshes PolyVox doesn't actually generate any vertex normals at all, and this is often a source of confusion for new users. The reason for this is that we wish to to perform per-face lighting rather than per-vertex lighting. Considering the case of a single cube, if we wanted to perform per-face lighting based on per-vertex normals then the normals cannot be shared between adjacent faces and so each vertex needs to be duplicated three times (one for each face which uses it). This means we would need 24 vertices to represent a cube which intuitively should only need eight vertices.
Therefore PolyVox does not generate per-vertex normals for cubic meshes, and as a reslt the cubic mesh's vertices are both smaller and less numerous. Of course, we still need a way to obtain normals for lighting calcualtions and so our suggestion is to compute the normals in a fragment program using the *derivative operations* which are provided by modern graphics hardware. Therefore PolyVox does not generate per-vertex normals for cubic meshes, and as a result the cubic mesh's vertices are both smaller and less numerous. Of course, we still need a way to obtain normals for lighting calculations and so our suggestion is to compute the normals in a fragment program using the *derivative operations* which are provided by modern graphics hardware.
The description here is rather oversimplified, but the idea behind these operation is that they can tell you how much a variable has changed between two adjacent pixels. If we use our fragment world space position as the input to these derivative operations then we can obtain two vectors which lie on the surface of our face. The cross product of these then gives us a vector which is perpendicular to both and which is therefore our normal. The description here is rather oversimplified, but the idea behind these operation is that they can tell you how much a variable has changed between two adjacent pixels. If we use our fragment world space position as the input to these derivative operations then we can obtain two vectors which lie on the surface of our face. The cross product of these then gives us a vector which is perpendicular to both and which is therefore our normal.
Further information about the derivative operations can be found in the OpenGL/Direct3D API documentation, but the implementation in code is quite simple. Firstly you need to make sure that you have access to the fragments world space position in your shader, which means you need to pass it through from the vertex shader. Then you can use the following code in your fragment shader: Further information about the derivative operations can be found in the OpenGL/Direct3D API documentation, but the implementation in code is quite simple. Firstly you need to make sure that you have access to the fragments world space position in your shader, which means you need to pass it through from the vertex shader. Then you can use the following code in your fragment shader:
//GLSL code .. code-block:: glsl
vec3 worldNormal = cross(dFdy(inWorldPosition.xyz), dFdx(inWorldPosition.xyz));
worldNormal = normalize(worldNormal);
**TODO: Check the normal direction**
Similar code can be implemented in HLSL but you may need to invert the normal due to coordinate system differences between the two APIs. Also, be aware that it may be necessary to use OpenGL ES XXX extension in order to access this derivative functionality on mobile hardware. Similar code can be implemented in HLSL but you may need to invert the normal due to coordinate system differences between the two APIs. Also, be aware that it may be necessary to use OpenGL ES XXX extension in order to access this derivative functionality on mobile hardware.
Shadows Shadows
------- -------
To date we have only experimented with shadow maps as a solution to the real time shadowing problem and have found they work very well for both casting and receiving. The approach is essentially the same as for any other geometry and the usual approches can be used for setting up the projection and for filtering the result. One PolyVox specific tip we can give is that you don't need to take account of materials when rendering into the shadow map as you always draw in black, so if you are splitting you geometry for material blending or for handling a large number of material then you don't need to do this when rendering shadows. Using sepeate shadow geometry with all materials combined may decrease your batch count in this case. To date we have only experimented with shadow maps as a solution to the real time shadowing problem and have found they work very well for both casting and receiving. The approach is essentially the same as for any other geometry and the usual approaches can be used for setting up the projection and for filtering the result. One PolyVox specific tip we can give is that you don't need to take account of materials when rendering into the shadow map as you always draw in black, so if you are splitting you geometry for material blending or for handling a large number of materials then you don't need to do this when rendering shadows. Using separate shadow geometry with all materials combined may decrease your batch count in this case.
The most widely used alternative to shadow maps is shadow volumes but we have not tested these with PolyVox. We do not expect these will provide a good solution because meshes usually require addition edge information to allow the shadw volume to be extruded from the silowette and PolyVox does not provide this. Even if this edge information could be calculated, it would be invalidated each time the mesh changed which would make dynamic terrain more difficult. The most widely used alternative to shadow maps is shadow volumes but we have not tested these with PolyVox. We do not expect these will provide a good solution because meshes usually require additional edge information to allow the shadow volume to be extruded from the silhouette and PolyVox does not provide this. Even if this edge information could be calculated, it would be invalidated each time the mesh changed which would make dynamic terrain more difficult.
Overall we would recommend you make use of shadow maps for dynamic shadows. Overall we would recommend you make use of shadow maps for dynamic shadows.
Ambient Occlusion Ambient Occlusion
================= =================
This is an area in which we want to undertake more research in order to get effective ambient occlusion in PolyVox scene. In the mean time SSAO has proved to be a popular solution. This is an area in which we want to undertake more research in order to get effective ambient occlusion into PolyVox scenes. In the mean time SSAO has proved to be a popular solution.

View File

@ -1 +1,4 @@
Placeholder. =================
Modifying Terrain
=================
This document has yet to be written.

View File

@ -1,33 +1,38 @@
************* *************
Prerequisites Prerequisites
************* *************
The PolyVox library is also quite low-level in terms of the functionality it provides, and as a result of these factors you will need some significant previous expeience in order to make use of the library effectively. In this document we summarise the key areas with which you will need to be familier, and explain why they are necesssary when using PolyVox. We also provide some links where you can study some background material. The PolyVox library is aimed at experienced games and graphics programmers who wish to incorporate voxel environments into their applications. It is not a drop in solution, but instead provides a set of building blocks which you can use to construct a complete system. Most of the functionality could be considered quite low-level. For example, it provides mesh extractors to generate a surface from volume data but requires the application developer to handle all tasks related to scene management and rendering of such data.
You should also be aware that voxel terrain is still an open research area and had not yet seen widespread adoption in games and simulations. There are many questions to which we do not currently know the best answer and so you can expect to have to do some research and experimentation yourself when trying to opbtain your desired result. So pease do let us know if you come up with a trick or technique which you think could benefit other users. As a result you will need a decent amount of graphics programming experience to effectively make use of the library. The purpose of this document is to highlight some of the core areas with which you will need to be familiar. In some cases we also provide links to places where you can find more information about the subject in question.
Using the library You should also be aware that voxel terrain is still an open research area and has not yet seen widespread adoption in games and simulations. There are many questions to which we do not currently know the best answer and so you may have to do some research and experimentation yourself when trying to obtain your desired result. Please do let us know if you come up with a trick or technique which you think could benefit other users.
Programming
===========
This section describes some of the programming concepts with which you will need to be familiar:
**C++:** PolyVox is written using the C++ language and we expect this is what the majority of our users will be developing in. You will need to be familiar with the basic process of building and linking against external libraries as well as setting up your development environment. Note that you do have the option of working with other languages via the SWIG bindings but you may not have as much flexibility with this approach.
**Templates:** PolyVox also makes heavy use of template programming in order to be both fast and generic, so familiarity with templates will be very useful. You shouldn't need to do much template programming yourself but an understanding of them will help you understand errors and resolve any problems.
**Callbacks:** Several of the algorithms in PolyVox can be customised through the use of callbacks. In general there are sensible defaults provided, but for maximum control you may wish to learn how to define you own. In general the principle is similar to the way in which callbacks are used in the STL.
Graphics Concepts
================= =================
This section describes some of the key principles which you may want to understand in order to make use of PolyVox. Not all of these are strictly required as it depends on exactly what you are trying to achive, but in general you should find them useful: Several core graphics principles will be useful in understanding and using PolyVox:
Volume graphics: **Volume representation:** PolyVox revolves around the idea of storing and manipulating volume data and using this as a representation of a 3d world. This is a fairly intuitive extension of traditional heightmap terrain but does require the ability to 'think in 3D'. You will need to understand that data stored in this way can become very large, and understand the idea that paging and compression can be used to combat this.
Surface extaction (MC and our own cubic docs):
Mesh representation:
Image processing:
There are also some programming concepts with which you will need to be familiar: **Mesh representation:** Most PolyVox projects will involve using one of the surface extractors, which output their data as index and vertex buffers. Therefore you will need to understand this representation in order to pass the data to your rendering engine or in order to perform further modifications to it. You can find out about more about this here: (ADD LINK)
C++: PolyVox is written using the C++ language and we expect this is what the majority of our users will be developing in. You will need to be familer with the basic process of building and linking against external libraires as well as setting up your development environment. Note that you do have the option of working with other languages via the SWIG bindings but you may not have as much flexibility with this approach. **Image processing:** For certain advanced application an understanding of image processing methods can be useful. For example the process of blurring an image via a low pass filter can be used to effectively smooth out voxel terrain. There are plans to add more image processing operations to PolyVox particularly with regard to morphological operations which you might want to use to modify your environment.
Templates: PolyVox also makes heavy use of template programming in order to be both fast and generic, so familiarity with templates will be very useful. You should need to do much template programming yourself but an understanding of them will help you understand errors and resolve any problems.
Callbacks:
Rendering Rendering
========= =========
Runtime geometry creation: PolyVox is independant of any particular graphics API which means it outputs its data using API-neutral structures such as index/vertex buffers. You will need to write the code which converts these structures into a format which your API or engine can understand. This is not a difficult task but does require some knowledge of the rendering technology you are using. **Runtime geometry creation:** PolyVox is independent of any particular graphics API which means it outputs its data using API-neutral structures such as index and vertex buffers (as mentioned above). You will need to write the code which converts these structures into a format which your API or engine can understand. This is not a difficult task but does require some knowledge of the rendering technology which you are using.
Scene management:
-Culling, organisation, LOD.
Shader programming **Scene management:** PolyVox is only responsible for providing you with the mesh data to be displayed, so you application or engine will need to make sensible decisions about how this data should be organised in terms of a spatial structure (octree, bounding volumes tree, etc). It will also need to provide some approach to visibility determination such as frustum culling or a more advanced approach. If you are integrating PolyVox with an existing rendering engine then you should find that many of these aspects are already handled for you.
==================
Triplanar texturing: **Shader programming:** The meshes which are generated by PolyVox are very basic in terms of the vertex data they provide. You get vertex positions, a material identifier, and sometimes vertex normals. It is the responsibility of application programmer to decide how to use this data to create visually interesting renderings. This means you will almost certainly want to make use of shader programs. Of course, in our texturing (LINK) and lighting (LINK) documents you will find many ideas and common solutions, but you will need strong shader programming experience to make effective use of these.
Texture atlases:
Lighting: If you don't have much experience with shader programming then there are many free resources available. The Cg Tutorial (LINK) provides a good introduction here (the concepts are applicable to other shader languages) as does the documentation for the main graphics (LINK to OpenGL docs) APIs (Link to D3D docs). there is nothing special about PolyVox meshes so you would be advised to practice development on simple meshes such as spheres and cubes before trying to apply it to the output of the mesh extractors.

View File

@ -1,36 +1,40 @@
*************** ***************
Texture Mapping Texture Mapping
*************** ***************
The PolyVox library is only concerned with operations on volume data (such as extracting a mesh from from a volume) and deliberatly avoids the issue of rendering any resulting polygon meshes. This means PolyVox is not tied to any particular graphics API or rendering engine, and makes it much easier to integrate PolyVox with existing technology, because in general a PolyVox mesh can be treated the same as any other mesh. However, the texturing of a PolyVox mesh is usually handled a little differently, and so the purpose of this document is to provide some ideas about where to start with this process. The PolyVox library is only concerned with operations on volume data (such as extracting a mesh from from a volume) and deliberately avoids the issue of rendering any resulting polygon meshes. This means PolyVox is not tied to any particular graphics API or rendering engine, and makes it much easier to integrate PolyVox with existing technology, because in general a PolyVox mesh can be treated the same as any other mesh. However, the texturing of a PolyVox mesh is usually handled a little differently, and so the purpose of this document is to provide some ideas about where to start with this process.
This document is aimed at readers in one of two positions: This document is aimed at readers in one of two positions:
1) You are trying to texture 'Minecraft-style' terrain with cubic blocks and a number of different materials.
2) You are trying to texture smooth terrain produced by the Marching Cubes (or similar) algoritm. 1. You are trying to texture 'Minecraft-style' terrain with cubic blocks and a number of different materials.
2. You are trying to texture smooth terrain produced by the Marching Cubes (or similar) algorithm.
These are certainly not the limit of PolyVox, and you can choose much more advanced texturing approaches if you wish. For example, in the past we have texture mapped a voxel Earth from a cube map and used an animated *procedural* texture (based on Perlin noise) for the magma at the center of the Earth. However, if you are aiming for such advanced techniques then we assume you understand the basics in this document and have enough knowledge to expand the ideas yourself. But do feel free to drop by and ask questions on our forum. These are certainly not the limit of PolyVox, and you can choose much more advanced texturing approaches if you wish. For example, in the past we have texture mapped a voxel Earth from a cube map and used an animated *procedural* texture (based on Perlin noise) for the magma at the center of the Earth. However, if you are aiming for such advanced techniques then we assume you understand the basics in this document and have enough knowledge to expand the ideas yourself. But do feel free to drop by and ask questions on our forum.
Traditionally meshes are textured by providing a pair of UV texture coordinates for each vertex, and these UV coordinates determine which parts of a texture maps to each vertex. The process of texturing PolyVox meshes is more complex for a couple of reasons: Traditionally meshes are textured by providing a pair of UV texture coordinates for each vertex, and these UV coordinates determine which parts of a texture maps to each vertex. The process of texturing PolyVox meshes is more complex for a couple of reasons:
1) PolyVox does not provide UV coordinates for each vertex.
2) Voxel terrain (particulaly Minecraft-style) often involves many more textures than the GPU can read at a time. 1. PolyVox does not provide UV coordinates for each vertex.
2. Voxel terrain (particularly Minecraft-style) often involves many more textures than the GPU can read at a time.
By reading this document you should learn how to work around the above problems, though you will almost certainly need to follow provided links and do some further reading as we have only summarised the key ideas here. By reading this document you should learn how to work around the above problems, though you will almost certainly need to follow provided links and do some further reading as we have only summarised the key ideas here.
Mapping textures to mesh geometry Mapping textures to mesh geometry
================================= =================================
The lack of UV coordinates means some lateral thinking is requried in order to apply texture maps to meshes. But before we get to that, we will first try to explain the rational behind PolyVox not providing UV coordinates in the first place. This rational is different for the smooth voxel meshes vs the cubic voxel meshes. The lack of UV coordinates means some lateral thinking is required in order to apply texture maps to meshes. But before we get to that, we will first try to explain the rational behind PolyVox not providing UV coordinates in the first place. This rational is different for the smooth voxel meshes vs the cubic voxel meshes.
Rational Rational
-------- --------
The problem with texturing smooth voxel meshes is that the geometry can get very complex and it is not clear how the mapping between mesh geometry and a texture should be performed. In a traditional heightmap-based terrain this relationship is obvious as the texture map and heightmap simply line up diretly. But for more complex shapes some form of 'UV unwrapping' is usually performed to define this relationship. This is usually done by an artist with the help of a 3D modeling package and so is a semi-automatic process, but it is time comsuming and driven by the artists idea of what looks right for their particular scene. Even though fully automatic UV unwrapping is possible it is usually prohibitavly slow. The problem with texturing smooth voxel meshes is that the geometry can get very complex and it is not clear how the mapping between mesh geometry and a texture should be performed. In a traditional heightmap-based terrain this relationship is obvious as the texture map and heightmap simply line up directly. But for more complex shapes some form of 'UV unwrapping' is usually performed to define this relationship. This is usually done by an artist with the help of a 3D modeling package and so is a semi-automatic process, but it is time consuming and driven by the artists idea of what looks right for their particular scene. Even though fully automatic UV unwrapping is possible it is usually prohibitively slow.
Even if such an unwrapping was possible in a reasonable timeframe, the next problem is that it would be invalidated as soon as the mesh changed. Enabling dynamic manipulation is one of the appealing factors of voxel terrain, and if this use case were discarded then the user may as well just model their terrain in an existing 3D modelling package and texture there. For these reasons we do not attempt to generate UV coordinates for smooth voxel meshes. Even if such an unwrapping were possible in a reasonable time frame, the next problem is that it would be invalidated as soon as the mesh changed. Enabling dynamic manipulation is one of the appealing factors of voxel terrain, and if this use case were discarded then the user may as well just model their terrain in an existing 3D modelling package and texture there. For these reasons we do not attempt to generate UV coordinates for smooth voxel meshes.
The rational in the cubic case is almost the opposite. For Minecraft style terrain you want to simply line up an instance of a texture with each face of a cube, and generating the texture coorordinates for this is very easy. In fact it's so easy that there's no point in doing it - the logic can instead be implemented in a shader which in turn allows the amount of data in each vertex to be reduced. The rational in the cubic case is almost the opposite. For Minecraft style terrain you want to simply line up an instance of a texture with each face of a cube, and generating the texture coordinates for this is very easy. In fact it's so easy that there's no point in doing it - the logic can instead be implemented in a shader which in turn allows the amount of data in each vertex to be reduced.
Triplanar Texturing Triplanar Texturing
------------------- -------------------
The most common approach to texture mapping smooth voxel terrain is to use *triplanar texturing*. The basic idea is to project a texture along all three main axes and blend between the three texture samples according to the surface normal. As an example, suppose that we wish to write a fragment shader to apply a single texture to our terrain, and assume that we have access to both the world space position of the fragment and also its normalised surface normal. Also, note that your textures should be set to wrap because the world space position will quickly go outside the bounds of 0.0-1.0. The world space position will need to have been passed through from earlier in the pipeline while the normal can be computed using one of the approaches in the lighting (link) document. The shader code would then look something like this [footnote: code is untested as is simplified compared to real world code. hopefully it compiles, but if not it should still give you an idea of how it works]: The most common approach to texture mapping smooth voxel terrain is to use *triplanar texturing*. The basic idea is to project a texture along all three main axes and blend between the three texture samples according to the surface normal. As an example, suppose that we wish to write a fragment shader to apply a single texture to our terrain, and assume that we have access to both the world space position of the fragment and also its normalised surface normal. Also, note that your textures should be set to wrap because the world space position will quickly go outside the bounds of 0.0-1.0. The world space position will need to have been passed through from earlier in the pipeline while the normal can be computed using one of the approaches in the lighting (link) document. The shader code would then look something like this [footnote: code is untested as is simplified compared to real world code. hopefully it compiles, but if not it should still give you an idea of how it works]:
.. code-block:: c++ .. code-block:: glsl
// Take the three texture samples // Take the three texture samples
vec4 sampleX = texture2d(inputTexture, worldSpacePos.yz); // Project along x axis vec4 sampleX = texture2d(inputTexture, worldSpacePos.yz); // Project along x axis
vec4 sampleY = texture2d(inputTexture, worldSpacePos.xz); // Project along y axis vec4 sampleY = texture2d(inputTexture, worldSpacePos.xz); // Project along y axis
@ -41,9 +45,10 @@ The most common approach to texture mapping smooth voxel terrain is to use *trip
Note that this approach will lead to the texture repeating once every world unit, and so in practice you may wish to scale the world space positions to make the texture appear the desired size. Also this technique can be extended to work with normal mapping though we won't go into the details here. Note that this approach will lead to the texture repeating once every world unit, and so in practice you may wish to scale the world space positions to make the texture appear the desired size. Also this technique can be extended to work with normal mapping though we won't go into the details here.
This idea of triplanar texturing can be applied to the cubic meshes as well, and in some ways it can be considered to be even simpler. With cubic meshes the normal always points exactly along one of the main axes, and so it is not necessary to sample the texture three times nor to blend the results. Instead you can use conditional branching in the fragment shader to determine which pair of values out of {x,y,z} should be used as the texture coordintes. Something like: This idea of triplanar texturing can be applied to the cubic meshes as well, and in some ways it can be considered to be even simpler. With cubic meshes the normal always points exactly along one of the main axes, and so it is not necessary to sample the texture three times nor to blend the results. Instead you can use conditional branching in the fragment shader to determine which pair of values out of {x,y,z} should be used as the texture coordinates. Something like:
.. code-block:: glsl
.. code-block:: c++
vec4 sample = vec4(0, 0, 0, 0); // We'll fill this in below vec4 sample = vec4(0, 0, 0, 0); // We'll fill this in below
// Assume the normal is normalised. // Assume the normal is normalised.
if(normal.x > 0.9) // x must be one while y and z are zero if(normal.x > 0.9) // x must be one while y and z are zero
@ -56,17 +61,18 @@ This idea of triplanar texturing can be applied to the cubic meshes as well, and
. .
. .
You might also choose to sample a different texture for each of the axes, in order to apply a different texture to each face of your cube. If so, you probably want to pack your differnt face textures together using an approach similar to those described later in this document for multiple material textures. Another (untested) idea would be to use the normal to select a face on a 1x1x1 cubemap, and have the cubemap face contain an index value for addressing the correct face texture. This could bypass the conditional logic above. You might also choose to sample a different texture for each of the axes, in order to apply a different texture to each face of your cube. If so, you probably want to pack your different face textures together using an approach similar to those described later in this document for multiple material textures. Another (untested) idea would be to use the normal to select a face on a 1x1x1 cubemap, and have the cubemap face contain an index value for addressing the correct face texture. This could bypass the conditional logic above.
Using the material identifier Using the material identifier
----------------------------- -----------------------------
So far we have assumed that only a single material is being used for the entire voxel world, but this is seldom the case. It is common to associate a particular material with each voxel so that it can represent rock, wood, sand or any other type of material as required. The usual approach is to store a simple integer identifier with each voxel, and then map this identifier to material properties within your application. So far we have assumed that only a single material is being used for the entire voxel world, but this is seldom the case. It is common to associate a particular material with each voxel so that it can represent rock, wood, sand or any other type of material as required. The usual approach is to store a simple integer identifier with each voxel, and then map this identifier to material properties within your application.
Both the CubicSurfaceExtractor and the MarchingCubesSurfacExtractor understand the concept of a material being associated with a voxel, and they will take this into account when generating a mesh. Specifically, they will both copy the material identifer into the vertex data of the output mesh, so you can pass it through to your shaders and use it to affect the way the surface is rendered. Both the CubicSurfaceExtractor and the MarchingCubesSurfacExtractor understand the concept of a material being associated with a voxel, and they will take this into account when generating a mesh. Specifically, they will both copy the material identifier into the vertex data of the output mesh, so you can pass it through to your shaders and use it to affect the way the surface is rendered.
The following code snippet assumes that you have passed the material identifier to your shaders and that you can access it in the fragment shader. It then chooses which colour to draw the polygon based on this identifier: The following code snippet assumes that you have passed the material identifier to your shaders and that you can access it in the fragment shader. It then chooses which colour to draw the polygon based on this identifier:
.. code-block:: c++ .. code-block:: glsl
vec4 fragmentColour = vec4(1, 1, 1, 1); // Default value vec4 fragmentColour = vec4(1, 1, 1, 1); // Default value
if(materialId < 0.5) //Avoid '==' when working with floats. if(materialId < 0.5) //Avoid '==' when working with floats.
{ {
@ -84,7 +90,7 @@ The following code snippet assumes that you have passed the material identifier
. .
. .
This is a very simple example, and such use of conditional branching within the shader may not be the best approach as it incurs some performance overhead and becomes unweildy with a large number of materials. Other approaches include encoding a colour directly into the material identifier, or using the idenifier as an index into a texture atlas or array. This is a very simple example, and such use of conditional branching within the shader may not be the best approach as it incurs some performance overhead and becomes unwieldy with a large number of materials. Other approaches include encoding a colour directly into the material identifier, or using the identifier as an index into a texture atlas or array.
Note that PolyVox currently stores that material identifier for the vertex as a float, but this will probably change in the future to use the same type as is stored in the volume. It will then be up to you which type you pass to the GPU (older GPUs may not support integer values) but if you do use floats then watch out for precision issues and avoid equality comparisons. Note that PolyVox currently stores that material identifier for the vertex as a float, but this will probably change in the future to use the same type as is stored in the volume. It will then be up to you which type you pass to the GPU (older GPUs may not support integer values) but if you do use floats then watch out for precision issues and avoid equality comparisons.
@ -92,57 +98,43 @@ Blending between materials
-------------------------- --------------------------
An additional complication when working with smooth voxel terrain is that it is usually desirable to blend smoothly between adjacent voxels with different materials. This situation does not occur with cubic meshes because the texture is considered to be per-face instead of per-vertex, and PolyVox enforces this by ensuring that all the vertices of a given face have the same material. An additional complication when working with smooth voxel terrain is that it is usually desirable to blend smoothly between adjacent voxels with different materials. This situation does not occur with cubic meshes because the texture is considered to be per-face instead of per-vertex, and PolyVox enforces this by ensuring that all the vertices of a given face have the same material.
With a smooth mesh it is possible for each of the three vertices of any given triangle to have different material identifiers (see figure below). If this is not explicitely handled then the graphics hardware will interpolate these material values across the face of the triangle. Fundamentally, the concept of interpolating between material identifiers does not make sense, because if we have 1='grass', 2='rock' and 3='sand' then it does not make sense to say rock is the average of grass and sand. With a smooth mesh it is possible for each of the three vertices of any given triangle to have different material identifiers. If this is not explicitly handled then the graphics hardware will interpolate these material values across the face of the triangle. Fundamentally, the concept of interpolating between material identifiers does not make sense, because if we have (for example) 1='grass', 2='rock' and 3='sand' then it does not make sense to say rock is the average of grass and sand.
ADD FIGURE HERE Correctly handling of this is a surprising difficult problem. For now, the best approach is described in our article 'Volumetric representation of virtual terrain' which appeared in Game Engine Gems Volume 1 and which is freely available through the Google Books preview here: http://books.google.com/books?id=WNfD2u8nIlIC&lpg=PR1&dq=game%20engine%20gems&pg=PA39#v=onepage&q&f=false
There are a couple approaches we can adopt to combat this problem. However, the solutions do have some performance and/or memory cost so we should first realise that this issue only applies to a small number of the tringles in the mesh. Typically most triangles will be using the same material for all three vertices, and so it is almost certainly worth splitting the mesh into two pieces. One peice will contain all the triangles which have the same material and can be rendered as normal. The other peice will contain all the triangles which have a mix of materials, and for these we use the more complex rendering techniques below. Note that splitting the mesh like this will also increase the batch count so it may not be desirable in all circumstances. As off October 2012 we are actively researching alternative solutions to this problem though it will be some time before the results become available.
NOTE - THESE SOLUTIONS ARE WORK IN PROGRESS. CORRECTLY BLENDING MATERIAL IS AN AREA WHICH WE ARE STILL RESEARCHING, AND IN THE MEAN TIME YOU MIGHT ALSO BE INTERESTED IN OUR ARTICLE IN GAME ENGINE GEMS. Actual implementation of these material blending approaches is left as an exercise to the reader, though it is possible that in the future we will add some utility functions to PolyVox to assist with tasks such as splitting the mesh or adding the required extra vertex attributes. Our test implementations have performed the mesh processing on the CPU before the mesh is uploaded to the graphics card, but it does seem like there is a lot of potential for implementing these approaches in the geometry shader.
One approach is to attach an alpha value to each vertex so that corners of a triangle can optionally be faded out. If a triangle has the same material value at each vertex then we also give it full alpha at each vertex and the triangle draws normally, but if it has a differnt material for each vertex then we duplicate the triangle three times (once for each material). Each new triangle should then use the same material at each vertex, this material being one of those from the original triangle. The alpha values of the vertices of the new triangles are set such that when the three triangles are drawn on top of each other with additive alpha blending, the desired smoothly shaded triangle results.
One drawback of this approach is that the mesh needs to be drawn with alpha blending enabled, which is both costly and also allows previously drawn geometry to show through. Therefore, before any alpha blended geometry is drawn, you also need to draw the triangle solidly in black (which in turn means one of your material identifier need to be reserved as solid black - we use material zero below). This whole process is rather difficult to explain, but hopefully this diagram of the inputs and outputs makes it clearer:
//MaterialBlending diagram
//NOTE - Actually this doesn't work. The black triangles need different blending so must be drawn seperatly. we should recommend first off all that the mesh is split into single/multi material parts, and then come on to the approaches for multimaterial handling. Also consider the issue of whether the rendering order of triangles is guarenteed... but does this matter if black is a seperate pass? Also, what about drawing white triangles and then using multiplicative blending? No, this doesn't help because the white triangles would still need to be drawn seperatly as mutiplying by white is no better than adding black. Subtractive blending maybe? I don't think so... Custom blend process? Using alpha and colour sperately? Check the options here.
//Add kers approach based on extra vertex properties.
Actual implementation of these material blending approaches is left as an excercise to the reader, though it is possible that in the future we will add some utility functions to PolyVox to assist with tasks such as splitting the mesh or adding the extra vertex attributes. Our test implementations have performed the mesh processing on the CPU before the mesh is uploaded to the graphics card, but it does seem like there is a lot of potential for implementing these approaches in the geometry shader.
Storage of textures Storage of textures
=================== ===================
The other major challenge in texturing voxel based geometry is handling the large number of textures which such environments often require. As an example, a game like Minecraft has hundreds of different material types each with their own texture. The traditional approach to mesh texturing is to bind textures to *texture units* on the GPU before rendering a batch, but even modern GPUs only allow between 16-64 textures to be bound at a time. In this section we discuss various solutions to overcoming this limitation. The other major challenge in texturing voxel based geometry is handling the large number of textures which such environments often require. As an example, a game like Minecraft has hundreds of different material types each with their own texture. The traditional approach to mesh texturing is to bind textures to *texture units* on the GPU before rendering a batch, but even modern GPUs only allow between 16-64 textures to be bound at a time. In this section we discuss various solutions to overcoming this limitation.
There are various tradeoffs involved, but if you are targetting hardware with support for *texture arrays* (available from OpenGL 3 and Direct3D 10 onwards) then we can save you some time and tell you that they are almost certainly the best solution. Otherwise you have to understand the various pros and cons of the other approaches described below. There are various trade offs involved, but if you are targeting hardware with support for *texture arrays* (available from OpenGL 3 and Direct3D 10 on-wards) then we can save you some time and tell you that they are almost certainly the best solution. Otherwise you have to understand the various pros and cons of the other approaches described below.
Seperate texture units Separate texture units
---------------------- ----------------------
Before we make things unnecessarily complicated, you should consider whether you do actually need the hundreds of textures discussed earlier. If you actually only need a few textures then the simplest solution may indeed be to pass them in via different texture units. You can then select the desired textures using a series of if statements, or a switch statement if the material identifiers are integer values. There is probably some performance overhead here, but you may find it is acceptable for a small number of textures. Keep in mind that you may need to reserve some texture units for additional texture data such as normal maps or shadow maps. Before we make things unnecessarily complicated, you should consider whether you do actually need the hundreds of textures discussed earlier. If you actually only need a few textures then the simplest solution may indeed be to pass them in via different texture units. You can then select the desired textures using a series of if statements, or a switch statement if the material identifiers are integer values. There is probably some performance overhead here, but you may find it is acceptable for a small number of textures. Keep in mind that you may need to reserve some texture units for additional texture data such as normal maps or shadow maps.
Splitting the mesh Splitting the mesh
------------------ ------------------
If your required number of textures do indeed exceed the available number of textures units then one option is to break the mesh down into a number of pieces. Let's say you have a mesh which contains one hundred different materials. As an extreme solution you could break it down into one hundred seperate meshes, and for each mesh you could then bind the required single texture before drawing the geometry. Obviously this will dramatically increase the batch count of your scene and so is not recommended. If your required number of textures do indeed exceed the available number of textures units then one option is to break the mesh down into a number of pieces. Let's say you have a mesh which contains one hundred different materials. As an extreme solution you could break it down into one hundred separate meshes, and for each mesh you could then bind the required single texture before drawing the geometry. Obviously this will dramatically increase the batch count of your scene and so is not recommended.
A more practical approach would be to break the mesh into a smaller number of pieces such that each mesh uses several textures but less than the maximum number of texture units. For example, our mesh with one hundred materials could be split into ten meshes, the first of which contains those triangles using materials 0-9, the seconds contains those triangles using materials 10-19, and so forth. There is a trade off here between the number of batches and the number of textures units used per batch. A more practical approach would be to break the mesh into a smaller number of pieces such that each mesh uses several textures but less than the maximum number of texture units. For example, our mesh with one hundred materials could be split into ten meshes, the first of which contains those triangles using materials 0-9, the seconds contains those triangles using materials 10-19, and so forth. There is a trade off here between the number of batches and the number of textures units used per batch.
Furthermore, you could realise that although a your terrain may use hundreds of different textures, any given region is likely to use only a small fraction of those. We have yet to experiment with this, but it seems if you region uses only (for example) materials 12, 47, and 231, then you could conceptually map these materials to the first three textures slots. This means that for each region you draw the mapping between material IDs and texture untis would be different. This may require some complex logic in the application but could allow you to do much more with only a few texture units. We will investigate this furthr in the future. Furthermore, you could realise that although your terrain may use hundreds of different textures, any given region is likely to use only a small fraction of those. We have yet to experiment with this, but it seems if you region uses only (for example) materials 12, 47, and 231, then you could conceptually map these materials to the first three textures slots. This means that for each region you draw the mapping between material IDs and texture units would be different. This may require some complex logic in the application but could allow you to do much more with only a few texture units. We will investigate this further in the future.
Texture atlases Texture atlases
--------------- ---------------
Probably the most widely used method is to pack a number of textures together into a single large texture, and to our knowledge this is the approach used by Minecraft. For example, if each of your textures are 256x256 texels, and if the maximum texture size supported by your target hardware is 4096x4096 texels, then you can pack 16 x 16 = 256 small textures into the larger one. If this isn't enough (or if your input textures are larger than 256x256) then you can also combine this approach with multiple texture units or with the mesh splitting described previously. Probably the most widely used method is to pack a number of textures together into a single large texture, and to our knowledge this is the approach used by Minecraft. For example, if each of your textures are 256x256 texels, and if the maximum texture size supported by your target hardware is 4096x4096 texels, then you can pack 16 x 16 = 256 small textures into the larger one. If this isn't enough (or if your input textures are larger than 256x256) then you can also combine this approach with multiple texture units or with the mesh splitting described previously.
//Diagram of texture atlases
However, there are a number of problems with packing textures like this. Most obviously, it limits the size of your textures as they now have to be significantly smaller then the maximum texture size. Whether this is a problem will really depend on your application. However, there are a number of problems with packing textures like this. Most obviously, it limits the size of your textures as they now have to be significantly smaller then the maximum texture size. Whether this is a problem will really depend on your application.
Next, it means you have to adjust your UV coordinates to correctly address a given texture inside the atlas. UV coordinates for a single texture would normally vary between 0.0 and 1.0 in both dimensions, but when packed into a texture atlas each texture uses only a small part of this range. You will need to apply offsets and scaling factors to your UV coordinates to address your texture correctly. Next, it means you have to adjust your UV coordinates to correctly address a given texture inside the atlas. UV coordinates for a single texture would normally vary between 0.0 and 1.0 in both dimensions, but when packed into a texture atlas each texture uses only a small part of this range. You will need to apply offsets and scaling factors to your UV coordinates to address your texture correctly.
However, the biggest problem with texture atlases is that they causes problems with texture filtering and with mipmaps. The filtering problem occurs because graphics hardware usually samples the surrounding texels and performs linear interpolation to compute the colour of a given sample point, but when multiple textures are packed together these surrounding texels can actually come from a neighbouring packed texture rather than wrapping round to sample on the other side of the same packed texture. The mipmap problem occurs because for the highest mipmap levels (such as 1x1 or 2x2) multiple textures are being are being averaged together. However, the biggest problem with texture atlases is that they causes problems with texture filtering and with mipmaps. The filtering problem occurs because graphics hardware usually samples the surrounding texels and performs linear interpolation to compute the colour of a given sample point, but when multiple textures are packed together these surrounding texels can actually come from a neighbouring packed texture rather than wrapping round to sample on the other side of the same packed texture. The mipmap problem occurs because for the highest mipmap levels (such as 1x1 or 2x2) multiple textures are being are being averaged together.
It is possible to combat these problems but the solution are non-trivial. You will want to limit the number of miplevels which you use, and probably provide custom shader code to handle the wrapping of texture coordinates, the sampling of MIP maps, and the calculation of interpolated values. You can also try adding a border around all your packed textures, perhaps by duplicating each texture and offsetting by half its size. Even so, it's not clear to us at this point whether the the various artefacts can be completely removed. Minecraft handles it by completely disabling texture filtering and using the resulting pixelated look as part of its asthetic. It is possible to combat these problems but the solutions are non-trivial. You will want to limit the number of miplevels which you use, and probably provide custom shader code to handle the wrapping of texture coordinates, the sampling of MIP maps, and the calculation of interpolated values. You can also try adding a border around all your packed textures, perhaps by duplicating each texture and offsetting by half its size. Even so, it's not clear to us at this point whether the the various artifacts can be completely removed. Minecraft handles it by completely disabling texture filtering and using the resulting pixelated look as part of its aesthetic.
3D texture slices 3D texture slices
----------------- -----------------
@ -152,7 +144,7 @@ However, MIP mapping will probably be more complex than the texture atlas case b
Texture arrays Texture arrays
-------------- --------------
These provide the perfect solution to the problem of handling a large number of textures... at least if they are supported by your hardware. They were introduced with OpenGL 3 and Direct3D 10 but older versions of OpenGL may still be able to access the functionality via extensions. They allow you to bind an array of textures to the shader, and the advantage compared to a texture atlas is that the hardware understands that the textures are seperate and so avoids the filtering and mipmapping issues. Beyond the hardware requirements, the only real limitation is that all the textures must be the same size. These provide the perfect solution to the problem of handling a large number of textures... at least if they are supported by your hardware. They were introduced with OpenGL 3 and Direct3D 10 but older versions of OpenGL may still be able to access the functionality via extensions. They allow you to bind an array of textures to the shader, and the advantage compared to a texture atlas is that the hardware understands that the textures are separate and so avoids the filtering and mipmapping issues. Beyond the hardware requirements, the only real limitation is that all the textures must be the same size.
Bindless rendering Bindless rendering
------------------ ------------------

View File

@ -3,9 +3,9 @@ Threading
********* *********
Modern computing hardware typically contains a large number of processors, and so users of PolyVox often want to know how they can best make use of these from their applications. Modern computing hardware typically contains a large number of processors, and so users of PolyVox often want to know how they can best make use of these from their applications.
PolyVox does not make any guarentees about thread-saftey, and does not contain any threading primitives to protect access to data structures. You can still make use of PolyVox from multiple threads, but you will have to take responisbility for enforcing thread saftey yourself (e.g. by providing thread safe wrappers around the volume classes). If you do want to use PolyVox is a multi-threaded context then this document provides some tips and tricks that you might find useful. PolyVox does not make any guarantees about thread-safety, and does not contain any threading primitives to protect access to data structures. You can still make use of PolyVox from multiple threads, but you will have to take responsibility for enforcing thread safety yourself (e.g. by providing thread safe wrappers around the volume classes). If you do want to use PolyVox is a multi-threaded context then this document provides some tips and tricks that you might find useful.
However, be aware that we do not have a lot of expertise in threading, and this is part of the reason why it is not explicitely addressed within PolyVox. If you do have more experience and believe any of this information to be misleading then please do post on the forums to discuss it. However, be aware that we do not have a lot of expertise in threading, and this is part of the reason why it is not explicitly addressed within PolyVox. If you do have more experience and believe any of this information to be misleading then please do post on the forums to discuss it.
Volumes Volumes
======= =======
@ -15,21 +15,21 @@ RawVolume
--------- ---------
The RawVolume has a very simple internal structure in which the data is stored as a single array which is never moved or resized. Because of this property it is indeed safe to perform multiple simultaneous *reads* of the data from different threads. However, it is generally not safe to perform simultaneous writes from different threads, or even to write from only one thread while other threads are reading. The RawVolume has a very simple internal structure in which the data is stored as a single array which is never moved or resized. Because of this property it is indeed safe to perform multiple simultaneous *reads* of the data from different threads. However, it is generally not safe to perform simultaneous writes from different threads, or even to write from only one thread while other threads are reading.
The reason why simultaneous writres can be problematic should be fairly obvious - if two different threads try to write to the same voxel then the result will depend on which thread writes first. But why can't we write from one thread and read from another one? The problem here is that the the CPU may implement some kind of caching mechanism and/or choose to store data in registers. If a write operation occurs before a read, then the read *may* still obtain the old value because the cache has not been updated yet. There may even be a cache for each thread (particularly if running on multiple processors). The reason why simultaneous writes can be problematic should be fairly obvious - if two different threads try to write to the same voxel then the result will depend on which thread writes first. But why can't we write from one thread and read from another one? The problem here is that the the CPU may implement some kind of caching mechanism and/or choose to store data in registers. If a write operation occurs before a read, then the read *may* still obtain the old value because the cache has not been updated yet. There may even be a cache for each thread (particularly if running on multiple processors).
If we assume for a moment that each voxel is a simple integer, then the rules for accessing a single voxel from multiple threads are the same as the rules for accessing integers from multiple threads. There is some useful information about this available on the web, including a discussion on StackOverflow: http://stackoverflow.com/questions/4588915/can-an-integer-be-shared-between-threads-safely If we assume for a moment that each voxel is a simple integer, then the rules for accessing a single voxel from multiple threads are the same as the rules for accessing integers from multiple threads. There is some useful information about this available on the web, including a discussion on StackOverflow: http://stackoverflow.com/questions/4588915/can-an-integer-be-shared-between-threads-safely
If nothing else, this serves to illustrate that multi-threaded access even to something as simple as an integer can be suprisingly complex annd architecture dependant. If nothing else, this serves to illustrate that multi-threaded access even to something as simple as an integer can be surprisingly complex and architecture dependant.
However, all this has been in the context of accessing a *single* voxel from multiple threads... what if we carefully design our algotithm such that diferent threads access different parts of the volume which never overlap? Unfortunatly I don't believe this is a solution either. Caching mehanisms seldom operate on indiviual elements but instead tend to cache larger chunks of data on the grounds that data accesses are usually localised. So it's quite possible that accessing a given voxel will cause another voxel to be cached. However, all this has been in the context of accessing a *single* voxel from multiple threads... what if we carefully design our algorithm such that different threads access different parts of the volume which never overlap? Unfortunately I don't believe this is a solution either. Caching mechanisms seldom operate on individual elements but instead tend to cache larger chunks of data on the grounds that data accesses are usually localised. So it's quite possible that accessing a given voxel will cause another voxel to be cached.
C++ does provide the 'volatile' keyword which can be used to ensure a variable is updated immediatly (rather than being cached) but this is still not sufficient for thread safe code. It also has performance implications which we would like to avoid. More information about volatile and multitheaded programming can be found here: http://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/ C++ does provide the 'volatile' keyword which can be used to ensure a variable is updated immediately (rather than being cached) but this is still not sufficient for thread safe code. It also has performance implications which we would like to avoid. More information about volatile and multitheaded programming can be found here: http://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/
Lastly, note that PolyVox volumes are templatised which means the voxel type might be something other than a simple int. However we don't think this actually makes a difference given that so few guarentees are made anyway, and it should still be safe to perform multiple concurrent reads for more complex types. Lastly, note that PolyVox volumes are templatised which means the voxel type might be something other than a simple int. However we don't think this actually makes a difference given that so few guarantees are made anyway, and it should still be safe to perform multiple concurrent reads for more complex types.
LargeVolume LargeVolume
----------- -----------
The LargeVolume provides even less thread safety than the RawVolume, in that even concurrent read operations can cause problems. The reason for this is the more complex memory management which is performed behind the scenes, and which allows peices of volume data to be moved around and deleted. For example, a read of a single voxel may mean that the block of data associated with that voxel has to be paged in to mamory, which in turn may mean that another block of data has to be paged out of memory. If second thread was halfway through reading a voxel in this second block of data then a problem will occur. The LargeVolume provides even less thread safety than the RawVolume, in that even concurrent read operations can cause problems. The reason for this is the more complex memory management which is performed behind the scenes, and which allows pieces of volume data to be moved around and deleted. For example, a read of a single voxel may mean that the block of data associated with that voxel has to be paged in to memory, which in turn may mean that another block of data has to be paged out of memory. If second thread was halfway through reading a voxel in this second block of data then a problem will occur.
In the future we may do a more comprehensive analysis of thread safety in the LargeVolume, but for now you should assume that any multithreaded access can cause problems. In the future we may do a more comprehensive analysis of thread safety in the LargeVolume, but for now you should assume that any multithreaded access can cause problems.
@ -37,7 +37,7 @@ Consequences of abuse
--------------------- ---------------------
We have outlined above the rules for multithreaded access of volumes, but what actually happens if you violate these? There's a couple of things to watch out for: We have outlined above the rules for multithreaded access of volumes, but what actually happens if you violate these? There's a couple of things to watch out for:
- As mentioned, performing unprotected writes to the volume can cause problems because the data may be copied into the CPU cache and/or registers, and so a subsequent read could retrieve thoe old value. This is not what you want but probably won't be fatal (i.e. it shouldn't crash). It would basically manifest itself as data corruption. - As mentioned, performing unprotected writes to the volume can cause problems because the data may be copied into the CPU cache and/or registers, and so a subsequent read could retrieve the old value. This is not what you want but probably won't be fatal (i.e. it shouldn't crash). It would basically manifest itself as data corruption.
- If you access the LargeVolume in a multithreaded fashion then you risk trying to access data which has been removed by another thread, and in this case you will get undefined behaviour. This will probably be a crash (out of bounds access) but really anything could happen. - If you access the LargeVolume in a multithreaded fashion then you risk trying to access data which has been removed by another thread, and in this case you will get undefined behaviour. This will probably be a crash (out of bounds access) but really anything could happen.
Surface Extraction Surface Extraction
@ -46,11 +46,11 @@ Despite the lack of thread safety built in to PolyVox, it is still possible and
Combining multiple surface extraction threads with the *LargeVolume* is something we will need to experiment with in the future, to determine how it can be improved. Combining multiple surface extraction threads with the *LargeVolume* is something we will need to experiment with in the future, to determine how it can be improved.
In the future we will expand this section to discuss how to split surace extraction across a number of threads, but for now please see Section XX of the book chapter 'Volumetric Representation of Virtual environments', available for free here: http://books.google.nl/books?id=WNfD2u8nIlIC&lpg=PR1&dq=game+engine+gems&pg=PA39&redir_esc=y#v=onepage&q&f=false In the future we will expand this section to discuss how to split surface extraction across a number of threads, but for now please see Section XX of the book chapter 'Volumetric Representation of Virtual environments', available for free here: http://books.google.nl/books?id=WNfD2u8nIlIC&lpg=PR1&dq=game+engine+gems&pg=PA39&redir_esc=y#v=onepage&q&f=false
GPU thread safety GPU thread safety
================= =================
Be aware that even if you sucessfully perform surface across multiple threads you still need to take care when uploading the data to the GPU. For Direct3D 9.0 and OpenGL 2.0 it is only possible to upload data from the main thread (or more accuratly the one which owns the rendering context). So after you have performed your multi-threaded surface extraction you need to bring the data back to the main thread for uploading to the GPU. Be aware that even if you successfully perform surface across multiple threads you still need to take care when uploading the data to the GPU. For Direct3D 9.0 and OpenGL 2.0 it is only possible to upload data from the main thread (or more accurately the one which owns the rendering context). So after you have performed your multi-threaded surface extraction you need to bring the data back to the main thread for uploading to the GPU.
More recent versions of the Direct3D and OpenGL APIs lift this restriction and provide means of accessing GPU resources from multiple threads. Please consult the documentation for your API for details. More recent versions of the Direct3D and OpenGL APIs lift this restriction and provide means of accessing GPU resources from multiple threads. Please consult the documentation for your API for details.
@ -64,4 +64,4 @@ It might be useful to provide a thread safe wrapper around the volume classes, a
OpenMP OpenMP
------ ------
This is a standard for extending C++ with compiler directives which allow the compiler to automatically parallise sections of code. Most likely this could be used to parallelise some of the loops which occur in image processing tasks. This is a standard for extending C++ with compiler directives which allow the compiler to automatically parallelise sections of code. Most likely this could be used to parallelise some of the loops which occur in image processing tasks.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

View File

@ -1,10 +1,10 @@
Welcome to PolyVox's documentation! Welcome to PolyVox's documentation!
=================================== ===================================
Contents: User Guide:
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 1
Prerequisites Prerequisites
install install
@ -14,7 +14,20 @@ Contents:
ModifyingTerrain ModifyingTerrain
LevelOfDetail LevelOfDetail
Threading Threading
Examples:
.. toctree::
:maxdepth: 1
tutorial1 tutorial1
Other Information:
.. toctree::
:maxdepth: 1
changelog changelog
FAQ FAQ

View File

@ -14,20 +14,18 @@ To get started, we need to include the following headers:
.. code-block:: c++ .. code-block:: c++
#include "PolyVoxCore/MaterialDensityPair.h"
#include "PolyVoxCore/CubicSurfaceExtractorWithNormals.h" #include "PolyVoxCore/CubicSurfaceExtractorWithNormals.h"
#include "PolyVoxCore/MarchingCubesSurfaceExtractor.h"
#include "PolyVoxCore/SurfaceMesh.h" #include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxCore/SimpleVolume.h" #include "PolyVoxCore/SimpleVolume.h"
The most fundamental construct when working with PolyVox is that of the volume. This is represented by the :polyvox:`SimpleVolume` class and stores a 3D grid of voxels. Our basic example application creates a volume with the following line of code: The most fundamental construct when working with PolyVox is that of the volume. This is represented by the :polyvox:`SimpleVolume` class which stores a 3D grid of voxels. Our basic example application creates a volume with the following line of code:
.. code-block:: c++ .. code-block:: c++
SimpleVolume<MaterialDensityPair44> volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(63, 63, 63))); SimpleVolume<uint8_t> volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(63, 63, 63)));
As can be seen, the SimpleVolume class is templated upon the voxel type. This means it is straightforward to create a volume of integers, floats, or a custom voxel type (see the :polyvox:`SimpleVolume documentation <PolyVox::SimpleVolume>` for more details). In this particular case we have created a volume in which each voxel is an instance of :polyvox:`MaterialDensityPair44`. Each instance of :polyvox:`MaterialDensityPair44` holds both a material and a density and uses four bits of data for each. This means that both the material and the density have a range of 0-15, and each voxel requires one byte of storage. For more information about materials and densities please consult the :doc:`principles of polyvox <principles>` document. As can be seen, the SimpleVolume class is templated upon the voxel type. This means it is straightforward to create a volume of integers, floats, or a custom voxel type (see the :polyvox:`SimpleVolume documentation <PolyVox::SimpleVolume>` for more details). In this particular case we have created a volume in which each voxel is of type `uint8_t` which is an unsigned 8-bit integer.
Each voxel is initialised using its default constructor, which in the case of :polyvox:`MaterialDensityPair44` will mean that both the material and the density are set to zero. This corresponds to a volume full of empty space because the density of each voxel is below the threshold.
Next, we set some of the voxels in the volume to be 'solid' in order to create a large sphere in the centre of the volume. We do this with the following function call: Next, we set some of the voxels in the volume to be 'solid' in order to create a large sphere in the centre of the volume. We do this with the following function call:
@ -39,38 +37,34 @@ Note that this function is part of the BasicExample (rather than being part of t
.. code-block:: c++ .. code-block:: c++
void createSphereInVolume(SimpleVolume<MaterialDensityPair44>& volData, float fRadius) void createSphereInVolume(SimpleVolume<uint8_t>& volData, float fRadius)
{ {
//This vector hold the position of the center of the volume //This vector hold the position of the center of the volume
Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2); Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2);
//This three-level for loop iterates over every voxel in the volume //This three-level for loop iterates over every voxel in the volume
for (int z = 0; z < volData.getWidth(); z++) for (int z = 0; z < volData.getDepth(); z++)
{ {
for (int y = 0; y < volData.getHeight(); y++) for (int y = 0; y < volData.getHeight(); y++)
{ {
for (int x = 0; x < volData.getDepth(); x++) for (int x = 0; x < volData.getWidth(); x++)
{ {
//Store our current position as a vector... //Store our current position as a vector...
Vector3DFloat v3dCurrentPos(x,y,z); Vector3DFloat v3dCurrentPos(x,y,z);
//And compute how far the current position is from the center of the volume //And compute how far the current position is from the center of the volume
float fDistToCenter = (v3dCurrentPos - v3dVolCenter).length(); float fDistToCenter = (v3dCurrentPos - v3dVolCenter).length();
uint8_t uVoxelValue = 0;
//If the current voxel is less than 'radius' units from the center then we make it solid. //If the current voxel is less than 'radius' units from the center then we make it solid.
if(fDistToCenter <= fRadius) if(fDistToCenter <= fRadius)
{ {
//Our new density value //Our new voxel value
uint8_t uDensity = VoxelTypeTraits<MaterialDensityPair44>::MaxDensity; uVoxelValue = 255;
}
//Get the old voxel
MaterialDensityPair44 voxel = volData.getVoxelAt(x,y,z);
//Modify the density
voxel.setDensity(uDensity);
//Wrte the voxel value into the volume //Wrte the voxel value into the volume
volData.setVoxelAt(x, y, z, voxel); volData.setVoxelAt(x, y, z, uVoxelValue);
}
} }
} }
} }
@ -80,18 +74,18 @@ This function takes as input the :polyvox:`SimpleVolume` in which we want to cre
Because this is a simple example function it always places the sphere at the centre of the volume. It computes this centre by halving the dimensions of the volume as given by the functions :polyvox:`SimpleVolume::getWidth`, :polyvox:`SimpleVolume::getHeight` and :polyvox:`SimpleVolume::getDepth`. The resulting position is stored using a :polyvox:`Vector3DFloat`. This is simply a typedef from our templatised :polyvox:`Vector` class, meaning that other sizes and storage types are available if you need them. Because this is a simple example function it always places the sphere at the centre of the volume. It computes this centre by halving the dimensions of the volume as given by the functions :polyvox:`SimpleVolume::getWidth`, :polyvox:`SimpleVolume::getHeight` and :polyvox:`SimpleVolume::getDepth`. The resulting position is stored using a :polyvox:`Vector3DFloat`. This is simply a typedef from our templatised :polyvox:`Vector` class, meaning that other sizes and storage types are available if you need them.
Next, the function uses a three-level 'for' loop to iterate over each voxel in the volume. For each voxel it computes the distance from the voxel to the centre of the volume. If this distance is less than or equal to the specified radius then the voxel form part of the sphere and is made solid. During surface extraction, the voxel will be considered solid if it's density is set to any value greater than its threshold, which can be obtained by calling :polyvox:`MaterialDensityPair44::getThreshold <MaterialDensityPair::getThreshold>`. In our case we simply set it to the largest possible value by calling :polyvox:`VoxelTypeTraits<MaterialDensityPair44>::MaxDensity <VoxelTypeTraits<MaterialDensityPair44>::MaxDensity>`. Next, the function uses a three-level 'for' loop to iterate over each voxel in the volume. For each voxel it computes the distance from the voxel to the centre of the volume. If this distance is less than or equal to the specified radius then the voxel forms part of the sphere and is made solid. During surface extraction, the voxel will be considered empty if it has a value of zero, and otherwise it will be considered solid. In our case we simply set it to 255 which is the largest value a uint8_t can contain.
Extracting the surface Extracting the surface
====================== ======================
Now that we have built our volume we need to convert it into a triangle mesh for rendering. This process is performed by the :polyvox:`CubicSurfaceExtractorWithNormals` class. An instance of the :polyvox:`CubicSurfaceExtractorWithNormals` is created as follows: Now that we have built our volume we need to convert it into a triangle mesh for rendering. This process can be performed by the :polyvox:`CubicSurfaceExtractorWithNormals` class. An instance of the :polyvox:`CubicSurfaceExtractorWithNormals` is created as follows:
.. code-block:: c++ .. code-block:: c++
SurfaceMesh<PositionMaterialNormal> mesh; SurfaceMesh<PositionMaterialNormal> mesh;
CubicSurfaceExtractorWithNormals<SimpleVolume, MaterialDensityPair44 > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh); CubicSurfaceExtractorWithNormals< SimpleVolume<uint8_t> > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh);
The :polyvox:`CubicSurfaceExtractorWithNormals` takes a pointer to the volume data, and also it needs to be told which :polyvox:`Region` of the volume the extraction should be performed on (in more advanced application this is useful for extracting only those parts of the volume which have been modified since the last extraction). For our purposes the :polyvox:`SimpleVolume` class provides a convenient :polyvox:`SimpleVolume::getEnclosingRegion` function which returns a :polyvox:`Region` representing the whole volume. The constructor also takes a pointer to a :polyvox:`SurfaceMesh` object where it will store the result, so we need to create one of these before we can construct the :polyvox:`CubicSurfaceExtractorWithNormals`. The :polyvox:`CubicSurfaceExtractorWithNormals` takes a pointer to the volume data, and also it needs to be told which :polyvox:`Region` of the volume the extraction should be performed on (in more advanced applications this is useful for extracting only those parts of the volume which have been modified since the last extraction). For our purpose the :polyvox:`SimpleVolume` class provides a convenient :polyvox:`SimpleVolume::getEnclosingRegion` function which returns a :polyvox:`Region` representing the whole volume. The constructor also takes a pointer to a :polyvox:`SurfaceMesh` object where it will store the result, so we need to create one of these before we can construct the :polyvox:`CubicSurfaceExtractorWithNormals`.
The actual extraction happens in the :polyvox:`CubicSurfaceExtractorWithNormals::execute` function. This means you can set up a :polyvox:`CubicSurfaceExtractorWithNormals` with the required parameters and then actually execute it later. For this example we just call it straight away. The actual extraction happens in the :polyvox:`CubicSurfaceExtractorWithNormals::execute` function. This means you can set up a :polyvox:`CubicSurfaceExtractorWithNormals` with the required parameters and then actually execute it later. For this example we just call it straight away.
@ -101,6 +95,8 @@ The actual extraction happens in the :polyvox:`CubicSurfaceExtractorWithNormals:
This fills in our :polyvox:`SurfaceMesh` object, which basically contains an index and vertex buffer representing the desired triangle mesh. This fills in our :polyvox:`SurfaceMesh` object, which basically contains an index and vertex buffer representing the desired triangle mesh.
Note: If you like you can try swapping the :polyvox:`CubicSurfaceExtractorWithNormals` for :polyvox:`MarchingCubesSurfaceExtractor`. We have already included the relevant header, and in the BasicExample you just need to change which line in commented out. The :polyvox:`MarchingCubesSurfaceExtractor` makes use of a smooth density field and will consider a voxel to be solid if it is above a threshold of half the voxel's maximum value (so in this case that's half of 255, which is 127).
Rendering the surface Rendering the surface
===================== =====================
Rendering the surface with OpenGL is handled by the OpenGLWidget class. Again, this is not part of PolyVox, it is simply an example based on Qt and OpenGL which demonstrates how rendering can be performed. Within this class there are mainly two functions which are of interest - the OpenGLWidget::setSurfaceMeshToRender() function which constructs OpenGL buffers from our :polyvox:`SurfaceMesh` and the OpenGLWidget::paintGL() function which is called each frame to perform the rendering. Rendering the surface with OpenGL is handled by the OpenGLWidget class. Again, this is not part of PolyVox, it is simply an example based on Qt and OpenGL which demonstrates how rendering can be performed. Within this class there are mainly two functions which are of interest - the OpenGLWidget::setSurfaceMeshToRender() function which constructs OpenGL buffers from our :polyvox:`SurfaceMesh` and the OpenGLWidget::paintGL() function which is called each frame to perform the rendering.
@ -150,8 +146,8 @@ With the OpenGL index and vertex buffers set up, we can now look at the code whi
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); glLoadIdentity();
glTranslatef(0.0f,0.0f,-100.0f); //Centre volume and move back glTranslatef(0.0f,0.0f,-100.0f); //Centre volume and move back
glRotatef(m_xRotation, 1.0f, 0.0f, 0.0f); glRotatef(-m_xRotation, 0.0f, 1.0f, 0.0f);
glRotatef(m_yRotation, 0.0f, 1.0f, 0.0f); glRotatef(-m_yRotation, 1.0f, 0.0f, 0.0f);
glTranslatef(-32.0f,-32.0f,-32.0f); //Centre volume and move back glTranslatef(-32.0f,-32.0f,-32.0f); //Centre volume and move back
//Bind the index buffer //Bind the index buffer
@ -163,6 +159,8 @@ With the OpenGL index and vertex buffers set up, we can now look at the code whi
glNormalPointer(GL_FLOAT, sizeof(PositionMaterialNormal), (GLvoid*)12); glNormalPointer(GL_FLOAT, sizeof(PositionMaterialNormal), (GLvoid*)12);
glDrawRangeElements(GL_TRIANGLES, m_uBeginIndex, m_uEndIndex-1, m_uEndIndex - m_uBeginIndex, GL_UNSIGNED_INT, 0); glDrawRangeElements(GL_TRIANGLES, m_uBeginIndex, m_uEndIndex-1, m_uEndIndex - m_uBeginIndex, GL_UNSIGNED_INT, 0);
//Error checking code here...
} }
Again, the explanation of this code is best left to the OpenGL documentation. Note that is is called automatically by Qt each time the display needs to be updated. Again, the explanation of this code is best left to the OpenGL documentation. Note that is is called automatically by Qt each time the display needs to be updated.

View File

@ -59,7 +59,7 @@ IF(MSVC)
SET_TARGET_PROPERTIES(BasicExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127") SET_TARGET_PROPERTIES(BasicExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
ENDIF(MSVC) ENDIF(MSVC)
TARGET_LINK_LIBRARIES(BasicExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore) TARGET_LINK_LIBRARIES(BasicExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore)
SET_PROPERTY(TARGET BasicExample PROPERTY FOLDER "examples/Basic") SET_PROPERTY(TARGET BasicExample PROPERTY FOLDER "Examples")
#Install - Only install the example in Windows #Install - Only install the example in Windows
IF(WIN32) IF(WIN32)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -83,13 +83,16 @@
#ifdef __glxext_h_ #ifdef __glxext_h_
#error glxext.h included before glxew.h #error glxext.h included before glxew.h
#endif #endif
#ifdef GLX_H
#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
#error glx.h included before glxew.h #error glx.h included before glxew.h
#endif #endif
#define __glxext_h_ #define __glxext_h_
#define __GLX_glx_h__
#define GLX_H #define GLX_H
#define __GLX_glx_h__
#define __glx_h__
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@ -255,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
#define GLX_DONT_CARE 0xFFFFFFFF #define GLX_DONT_CARE 0xFFFFFFFF
typedef XID GLXFBConfigID; typedef XID GLXFBConfigID;
typedef XID GLXWindow;
typedef XID GLXPbuffer; typedef XID GLXPbuffer;
typedef XID GLXWindow;
typedef struct __GLXFBConfigRec *GLXFBConfig; typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef struct { typedef struct {
@ -343,6 +346,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
#endif /* GLX_3DFX_multisample */ #endif /* GLX_3DFX_multisample */
/* ------------------------ GLX_AMD_gpu_association ------------------------ */
#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
#define GLXEW_AMD_gpu_association GLXEW_GET_VAR(__GLXEW_AMD_gpu_association)
#endif /* GLX_AMD_gpu_association */
/* ------------------------- GLX_ARB_create_context ------------------------ */ /* ------------------------- GLX_ARB_create_context ------------------------ */
#ifndef GLX_ARB_create_context #ifndef GLX_ARB_create_context
@ -362,6 +385,33 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
#endif /* GLX_ARB_create_context */ #endif /* GLX_ARB_create_context */
/* --------------------- GLX_ARB_create_context_profile -------------------- */
#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
#define GLXEW_ARB_create_context_profile GLXEW_GET_VAR(__GLXEW_ARB_create_context_profile)
#endif /* GLX_ARB_create_context_profile */
/* ------------------- GLX_ARB_create_context_robustness ------------------- */
#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
#define GLXEW_ARB_create_context_robustness GLXEW_GET_VAR(__GLXEW_ARB_create_context_robustness)
#endif /* GLX_ARB_create_context_robustness */
/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */ /* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
#ifndef GLX_ARB_fbconfig_float #ifndef GLX_ARB_fbconfig_float
@ -408,6 +458,39 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
#endif /* GLX_ARB_multisample */ #endif /* GLX_ARB_multisample */
/* ---------------- GLX_ARB_robustness_application_isolation --------------- */
#ifndef GLX_ARB_robustness_application_isolation
#define GLX_ARB_robustness_application_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_application_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_application_isolation)
#endif /* GLX_ARB_robustness_application_isolation */
/* ---------------- GLX_ARB_robustness_share_group_isolation --------------- */
#ifndef GLX_ARB_robustness_share_group_isolation
#define GLX_ARB_robustness_share_group_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_share_group_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_share_group_isolation)
#endif /* GLX_ARB_robustness_share_group_isolation */
/* ---------------------- GLX_ARB_vertex_buffer_object --------------------- */
#ifndef GLX_ARB_vertex_buffer_object
#define GLX_ARB_vertex_buffer_object 1
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
#define GLXEW_ARB_vertex_buffer_object GLXEW_GET_VAR(__GLXEW_ARB_vertex_buffer_object)
#endif /* GLX_ARB_vertex_buffer_object */
/* ----------------------- GLX_ATI_pixel_format_float ---------------------- */ /* ----------------------- GLX_ATI_pixel_format_float ---------------------- */
#ifndef GLX_ATI_pixel_format_float #ifndef GLX_ATI_pixel_format_float
@ -472,6 +555,28 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
#endif /* GLX_ATI_render_texture */ #endif /* GLX_ATI_render_texture */
/* ------------------- GLX_EXT_create_context_es2_profile ------------------ */
#ifndef GLX_EXT_create_context_es2_profile
#define GLX_EXT_create_context_es2_profile 1
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es2_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es2_profile)
#endif /* GLX_EXT_create_context_es2_profile */
/* ------------------- GLX_EXT_create_context_es_profile ------------------- */
#ifndef GLX_EXT_create_context_es_profile
#define GLX_EXT_create_context_es_profile 1
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es_profile)
#endif /* GLX_EXT_create_context_es_profile */
/* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */ /* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
#ifndef GLX_EXT_fbconfig_packed_float #ifndef GLX_EXT_fbconfig_packed_float
@ -529,6 +634,33 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
#endif /* GLX_EXT_scene_marker */ #endif /* GLX_EXT_scene_marker */
/* -------------------------- GLX_EXT_swap_control ------------------------- */
#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);
#define glXSwapIntervalEXT GLXEW_GET_FUN(__glewXSwapIntervalEXT)
#define GLXEW_EXT_swap_control GLXEW_GET_VAR(__GLXEW_EXT_swap_control)
#endif /* GLX_EXT_swap_control */
/* ----------------------- GLX_EXT_swap_control_tear ----------------------- */
#ifndef GLX_EXT_swap_control_tear
#define GLX_EXT_swap_control_tear 1
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
#define GLXEW_EXT_swap_control_tear GLXEW_GET_VAR(__GLXEW_EXT_swap_control_tear)
#endif /* GLX_EXT_swap_control_tear */
/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */ /* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
#ifndef GLX_EXT_texture_from_pixmap #ifndef GLX_EXT_texture_from_pixmap
@ -615,6 +747,20 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable dr
#endif /* GLX_EXT_visual_rating */ #endif /* GLX_EXT_visual_rating */
/* -------------------------- GLX_INTEL_swap_event ------------------------- */
#ifndef GLX_INTEL_swap_event
#define GLX_INTEL_swap_event 1
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
#define GLX_COPY_COMPLETE_INTEL 0x8181
#define GLX_FLIP_COMPLETE_INTEL 0x8182
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
#define GLXEW_INTEL_swap_event GLXEW_GET_VAR(__GLXEW_INTEL_swap_event)
#endif /* GLX_INTEL_swap_event */
/* -------------------------- GLX_MESA_agp_offset -------------------------- */ /* -------------------------- GLX_MESA_agp_offset -------------------------- */
#ifndef GLX_MESA_agp_offset #ifndef GLX_MESA_agp_offset
@ -683,6 +829,34 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_MESA_set_3dfx_mode */ #endif /* GLX_MESA_set_3dfx_mode */
/* ------------------------- GLX_MESA_swap_control ------------------------- */
#ifndef GLX_MESA_swap_control
#define GLX_MESA_swap_control 1
typedef int ( * PFNGLXGETSWAPINTERVALMESAPROC) (void);
typedef int ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval);
#define glXGetSwapIntervalMESA GLXEW_GET_FUN(__glewXGetSwapIntervalMESA)
#define glXSwapIntervalMESA GLXEW_GET_FUN(__glewXSwapIntervalMESA)
#define GLXEW_MESA_swap_control GLXEW_GET_VAR(__GLXEW_MESA_swap_control)
#endif /* GLX_MESA_swap_control */
/* --------------------------- GLX_NV_copy_image --------------------------- */
#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);
#define glXCopyImageSubDataNV GLXEW_GET_FUN(__glewXCopyImageSubDataNV)
#define GLXEW_NV_copy_image GLXEW_GET_VAR(__GLXEW_NV_copy_image)
#endif /* GLX_NV_copy_image */
/* -------------------------- GLX_NV_float_buffer -------------------------- */ /* -------------------------- GLX_NV_float_buffer -------------------------- */
#ifndef GLX_NV_float_buffer #ifndef GLX_NV_float_buffer
@ -694,6 +868,18 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_NV_float_buffer */ #endif /* GLX_NV_float_buffer */
/* ---------------------- GLX_NV_multisample_coverage ---------------------- */
#ifndef GLX_NV_multisample_coverage
#define GLX_NV_multisample_coverage 1
#define GLX_COLOR_SAMPLES_NV 0x20B3
#define GLX_COVERAGE_SAMPLES_NV 100001
#define GLXEW_NV_multisample_coverage GLXEW_GET_VAR(__GLXEW_NV_multisample_coverage)
#endif /* GLX_NV_multisample_coverage */
/* -------------------------- GLX_NV_present_video ------------------------- */ /* -------------------------- GLX_NV_present_video ------------------------- */
#ifndef GLX_NV_present_video #ifndef GLX_NV_present_video
@ -749,10 +935,37 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
#endif /* GLX_NV_vertex_array_range */ #endif /* GLX_NV_vertex_array_range */
/* -------------------------- GLX_NV_video_output -------------------------- */ /* -------------------------- GLX_NV_video_capture ------------------------- */
#ifndef GLX_NV_video_output #ifndef GLX_NV_video_capture
#define GLX_NV_video_output 1 #define GLX_NV_video_capture 1
#define GLX_DEVICE_ID_NV 0x20CD
#define GLX_UNIQUE_ID_NV 0x20CE
#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
typedef XID GLXVideoCaptureDeviceNV;
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);
#define glXBindVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXBindVideoCaptureDeviceNV)
#define glXEnumerateVideoCaptureDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoCaptureDevicesNV)
#define glXLockVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXLockVideoCaptureDeviceNV)
#define glXQueryVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXQueryVideoCaptureDeviceNV)
#define glXReleaseVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoCaptureDeviceNV)
#define GLXEW_NV_video_capture GLXEW_GET_VAR(__GLXEW_NV_video_capture)
#endif /* GLX_NV_video_capture */
/* ---------------------------- GLX_NV_video_out --------------------------- */
#ifndef GLX_NV_video_out
#define GLX_NV_video_out 1
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 #define GLX_VIDEO_OUT_COLOR_NV 0x20C3
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
@ -779,9 +992,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV) #define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
#define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV) #define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV)
#define GLXEW_NV_video_output GLXEW_GET_VAR(__GLXEW_NV_video_output) #define GLXEW_NV_video_out GLXEW_GET_VAR(__GLXEW_NV_video_out)
#endif /* GLX_NV_video_output */ #endif /* GLX_NV_video_out */
/* -------------------------- GLX_OML_swap_method -------------------------- */ /* -------------------------- GLX_OML_swap_method -------------------------- */
@ -799,8 +1012,7 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
/* -------------------------- GLX_OML_sync_control ------------------------- */ /* -------------------------- GLX_OML_sync_control ------------------------- */
#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) #ifndef GLX_OML_sync_control
#include <inttypes.h>
#define GLX_OML_sync_control 1 #define GLX_OML_sync_control 1
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator); typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
@ -1137,7 +1349,7 @@ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#ifndef GLX_SGI_video_sync #ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1 #define GLX_SGI_video_sync 1
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (uint* count); typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int* count);
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count); typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count);
#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI) #define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
@ -1181,185 +1393,213 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef GLEW_MX #ifdef GLEW_MX
#define GLXEW_EXPORT #define GLXEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT
#else #else
#define GLXEW_EXPORT extern #define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */ #endif /* GLEW_MX */
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay; GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig; GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext; GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer; GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap; GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow; GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer; GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap; GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow; GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable; GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib; GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs; GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent; GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig; GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent; GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext; GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable; GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent; GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB; GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI; GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI; GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI; GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT; GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT; GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT; GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT; GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT; GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA; GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA; GLXEW_FUN_EXPORT PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
extern PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA; GLXEW_FUN_EXPORT PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA; GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA; GLXEW_FUN_EXPORT PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV; GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV; GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV; GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV; GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV; GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV; GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
#ifdef GLX_OML_sync_control GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML; GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML; GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML; GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML; GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML; GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
#endif
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX; GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX; GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX; GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX; GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX; GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX; GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX; GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX; GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX; GLXEW_FUN_EXPORT PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
GLXEW_FUN_EXPORT PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
extern PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX; GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX; GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX; GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX; GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX; GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX; GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXCUSHIONSGIPROC __glewXCushionSGI; GLXEW_FUN_EXPORT PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
extern PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI; GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI; GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI; GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI; GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI; GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
extern PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN; GLXEW_FUN_EXPORT PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
extern PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN; GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN; GLXEW_FUN_EXPORT PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
GLXEW_FUN_EXPORT PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
GLXEW_FUN_EXPORT PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
GLXEW_FUN_EXPORT PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
#if defined(GLEW_MX) #if defined(GLEW_MX)
struct GLXEWContextStruct struct GLXEWContextStruct
{ {
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context; GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap; GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info; GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method; GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control; GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync; GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index; GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize; GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_color_range;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_video_resize;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_cushion;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_make_current_read;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_swap_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_video_sync;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX #ifdef GLEW_MX
}; /* GLXEWContextStruct */ }; /* GLXEWContextStruct */
@ -1370,8 +1610,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX #ifdef GLEW_MX
typedef struct GLXEWContextStruct GLXEWContext; typedef struct GLXEWContextStruct GLXEWContext;
extern GLenum glxewContextInit (GLXEWContext* ctx); GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
#define glxewInit() glxewContextInit(glxewGetContext()) #define glxewInit() glxewContextInit(glxewGetContext())
#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x) #define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
@ -1384,11 +1624,11 @@ extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x) #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLXEW_GET_FUN(x) x #define GLXEW_GET_FUN(x) x
extern GLboolean glxewIsSupported (const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
extern GLboolean glxewGetExtension (const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -62,11 +62,12 @@
#define __wglext_h_ #define __wglext_h_
#if !defined(APIENTRY) && !defined(__CYGWIN__) #if !defined(WINAPI)
# ifndef WIN32_LEAN_AND_MEAN # ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1 # define WIN32_LEAN_AND_MEAN 1
# endif # endif
#include <windows.h> #include <windows.h>
# undef WIN32_LEAN_AND_MEAN
#endif #endif
/* /*
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
#endif /* WGL_3DL_stereo_control */ #endif /* WGL_3DL_stereo_control */
/* ------------------------ WGL_AMD_gpu_association ------------------------ */
#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 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);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int* attribList);
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT* ids);
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void* data);
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
#define wglBlitContextFramebufferAMD WGLEW_GET_FUN(__wglewBlitContextFramebufferAMD)
#define wglCreateAssociatedContextAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAMD)
#define wglCreateAssociatedContextAttribsAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAttribsAMD)
#define wglDeleteAssociatedContextAMD WGLEW_GET_FUN(__wglewDeleteAssociatedContextAMD)
#define wglGetContextGPUIDAMD WGLEW_GET_FUN(__wglewGetContextGPUIDAMD)
#define wglGetCurrentAssociatedContextAMD WGLEW_GET_FUN(__wglewGetCurrentAssociatedContextAMD)
#define wglGetGPUIDsAMD WGLEW_GET_FUN(__wglewGetGPUIDsAMD)
#define wglGetGPUInfoAMD WGLEW_GET_FUN(__wglewGetGPUInfoAMD)
#define wglMakeAssociatedContextCurrentAMD WGLEW_GET_FUN(__wglewMakeAssociatedContextCurrentAMD)
#define WGLEW_AMD_gpu_association WGLEW_GET_VAR(__WGLEW_AMD_gpu_association)
#endif /* WGL_AMD_gpu_association */
/* ------------------------- WGL_ARB_buffer_region ------------------------- */ /* ------------------------- WGL_ARB_buffer_region ------------------------- */
#ifndef WGL_ARB_buffer_region #ifndef WGL_ARB_buffer_region
@ -152,6 +193,8 @@ typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, in
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_FLAGS_ARB 0x2094 #define WGL_CONTEXT_FLAGS_ARB 0x2094
#define ERROR_INVALID_VERSION_ARB 0x2095
#define ERROR_INVALID_PROFILE_ARB 0x2096
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList); typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList);
@ -161,6 +204,33 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
#endif /* WGL_ARB_create_context */ #endif /* WGL_ARB_create_context */
/* --------------------- WGL_ARB_create_context_profile -------------------- */
#ifndef WGL_ARB_create_context_profile
#define WGL_ARB_create_context_profile 1
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGLEW_ARB_create_context_profile WGLEW_GET_VAR(__WGLEW_ARB_create_context_profile)
#endif /* WGL_ARB_create_context_profile */
/* ------------------- WGL_ARB_create_context_robustness ------------------- */
#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
#define WGLEW_ARB_create_context_robustness WGLEW_GET_VAR(__WGLEW_ARB_create_context_robustness)
#endif /* WGL_ARB_create_context_robustness */
/* ----------------------- WGL_ARB_extensions_string ----------------------- */ /* ----------------------- WGL_ARB_extensions_string ----------------------- */
#ifndef WGL_ARB_extensions_string #ifndef WGL_ARB_extensions_string
@ -400,6 +470,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
#endif /* WGL_ATI_render_texture_rectangle */ #endif /* WGL_ATI_render_texture_rectangle */
/* ------------------- WGL_EXT_create_context_es2_profile ------------------ */
#ifndef WGL_EXT_create_context_es2_profile
#define WGL_EXT_create_context_es2_profile 1
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es2_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es2_profile)
#endif /* WGL_EXT_create_context_es2_profile */
/* ------------------- WGL_EXT_create_context_es_profile ------------------- */
#ifndef WGL_EXT_create_context_es_profile
#define WGL_EXT_create_context_es_profile 1
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es_profile)
#endif /* WGL_EXT_create_context_es_profile */
/* -------------------------- WGL_EXT_depth_float -------------------------- */ /* -------------------------- WGL_EXT_depth_float -------------------------- */
#ifndef WGL_EXT_depth_float #ifndef WGL_EXT_depth_float
@ -605,6 +697,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
#endif /* WGL_EXT_swap_control */ #endif /* WGL_EXT_swap_control */
/* ----------------------- WGL_EXT_swap_control_tear ----------------------- */
#ifndef WGL_EXT_swap_control_tear
#define WGL_EXT_swap_control_tear 1
#define WGLEW_EXT_swap_control_tear WGLEW_GET_VAR(__WGLEW_EXT_swap_control_tear)
#endif /* WGL_EXT_swap_control_tear */
/* --------------------- WGL_I3D_digital_video_control --------------------- */ /* --------------------- WGL_I3D_digital_video_control --------------------- */
#ifndef WGL_I3D_digital_video_control #ifndef WGL_I3D_digital_video_control
@ -752,6 +853,59 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
#endif /* WGL_I3D_swap_frame_usage */ #endif /* WGL_I3D_swap_frame_usage */
/* --------------------------- WGL_NV_DX_interop --------------------------- */
#ifndef WGL_NV_DX_interop
#define WGL_NV_DX_interop 1
#define WGL_ACCESS_READ_ONLY_NV 0x0000
#define WGL_ACCESS_READ_WRITE_NV 0x0001
#define WGL_ACCESS_WRITE_DISCARD_NV 0x0002
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void* dxDevice);
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void* dxObject, HANDLE shareHandle);
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
#define wglDXCloseDeviceNV WGLEW_GET_FUN(__wglewDXCloseDeviceNV)
#define wglDXLockObjectsNV WGLEW_GET_FUN(__wglewDXLockObjectsNV)
#define wglDXObjectAccessNV WGLEW_GET_FUN(__wglewDXObjectAccessNV)
#define wglDXOpenDeviceNV WGLEW_GET_FUN(__wglewDXOpenDeviceNV)
#define wglDXRegisterObjectNV WGLEW_GET_FUN(__wglewDXRegisterObjectNV)
#define wglDXSetResourceShareHandleNV WGLEW_GET_FUN(__wglewDXSetResourceShareHandleNV)
#define wglDXUnlockObjectsNV WGLEW_GET_FUN(__wglewDXUnlockObjectsNV)
#define wglDXUnregisterObjectNV WGLEW_GET_FUN(__wglewDXUnregisterObjectNV)
#define WGLEW_NV_DX_interop WGLEW_GET_VAR(__WGLEW_NV_DX_interop)
#endif /* WGL_NV_DX_interop */
/* --------------------------- WGL_NV_DX_interop2 -------------------------- */
#ifndef WGL_NV_DX_interop2
#define WGL_NV_DX_interop2 1
#define WGLEW_NV_DX_interop2 WGLEW_GET_VAR(__WGLEW_NV_DX_interop2)
#endif /* WGL_NV_DX_interop2 */
/* --------------------------- WGL_NV_copy_image --------------------------- */
#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);
#define wglCopyImageSubDataNV WGLEW_GET_FUN(__wglewCopyImageSubDataNV)
#define WGLEW_NV_copy_image WGLEW_GET_VAR(__WGLEW_NV_copy_image)
#endif /* WGL_NV_copy_image */
/* -------------------------- WGL_NV_float_buffer -------------------------- */ /* -------------------------- WGL_NV_float_buffer -------------------------- */
#ifndef WGL_NV_float_buffer #ifndef WGL_NV_float_buffer
@ -804,6 +958,18 @@ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
#endif /* WGL_NV_gpu_affinity */ #endif /* WGL_NV_gpu_affinity */
/* ---------------------- WGL_NV_multisample_coverage ---------------------- */
#ifndef WGL_NV_multisample_coverage
#define WGL_NV_multisample_coverage 1
#define WGL_COVERAGE_SAMPLES_NV 0x2042
#define WGL_COLOR_SAMPLES_NV 0x20B9
#define WGLEW_NV_multisample_coverage WGLEW_GET_VAR(__WGLEW_NV_multisample_coverage)
#endif /* WGL_NV_multisample_coverage */
/* -------------------------- WGL_NV_present_video ------------------------- */ /* -------------------------- WGL_NV_present_video ------------------------- */
#ifndef WGL_NV_present_video #ifndef WGL_NV_present_video
@ -863,7 +1029,7 @@ typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrie
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count); typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers); typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers);
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group); typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group, GLuint *barrier);
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV) #define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
@ -892,6 +1058,32 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
#endif /* WGL_NV_vertex_array_range */ #endif /* WGL_NV_vertex_array_range */
/* -------------------------- WGL_NV_video_capture ------------------------- */
#ifndef WGL_NV_video_capture
#define WGL_NV_video_capture 1
#define WGL_UNIQUE_ID_NV 0x20CE
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
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);
#define wglBindVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewBindVideoCaptureDeviceNV)
#define wglEnumerateVideoCaptureDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoCaptureDevicesNV)
#define wglLockVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewLockVideoCaptureDeviceNV)
#define wglQueryVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewQueryVideoCaptureDeviceNV)
#define wglReleaseVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoCaptureDeviceNV)
#define WGLEW_NV_video_capture WGLEW_GET_VAR(__WGLEW_NV_video_capture)
#endif /* WGL_NV_video_capture */
/* -------------------------- WGL_NV_video_output -------------------------- */ /* -------------------------- WGL_NV_video_output -------------------------- */
#ifndef WGL_NV_video_output #ifndef WGL_NV_video_output
@ -957,9 +1149,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef GLEW_MX #ifdef GLEW_MX
#define WGLEW_EXPORT #define WGLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT
#else #else
#define WGLEW_EXPORT GLEWAPI #define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */ #endif /* GLEW_MX */
#ifdef GLEW_MX #ifdef GLEW_MX
@ -967,165 +1161,203 @@ struct WGLEWContextStruct
{ {
#endif /* GLEW_MX */ #endif /* GLEW_MX */
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL; WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
WGLEW_FUN_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
WGLEW_FUN_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
WGLEW_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB; WGLEW_FUN_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB; WGLEW_FUN_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB; WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB; WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB; WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB; WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB; WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB; WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB; WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT; WGLEW_FUN_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT; WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT; WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT; WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT; WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT; WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT; WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT; WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D; WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D; WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D; WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D; WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D; WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D; WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D; WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D; WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D; WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D; WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D; WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D; WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_FUN_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D; WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D; WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV; WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV; WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV; WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV; WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV; WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV; WGLEW_FUN_EXPORT PFNWGLDXOBJECTACCESSNVPROC __wglewDXObjectAccessNV;
WGLEW_FUN_EXPORT PFNWGLDXOPENDEVICENVPROC __wglewDXOpenDeviceNV;
WGLEW_FUN_EXPORT PFNWGLDXREGISTEROBJECTNVPROC __wglewDXRegisterObjectNV;
WGLEW_FUN_EXPORT PFNWGLDXSETRESOURCESHAREHANDLENVPROC __wglewDXSetResourceShareHandleNV;
WGLEW_FUN_EXPORT PFNWGLDXUNLOCKOBJECTSNVPROC __wglewDXUnlockObjectsNV;
WGLEW_FUN_EXPORT PFNWGLDXUNREGISTEROBJECTNVPROC __wglewDXUnregisterObjectNV;
WGLEW_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV; WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
WGLEW_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV; WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV; WGLEW_FUN_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV; WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
WGLEW_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV; WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV; WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML; WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML; WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML; WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control; WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region; WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string; WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB; WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read; WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample; WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float; WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture; WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float; WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table; WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB; WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read; WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample; WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer; WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format; WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float; WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma; WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_depth_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_display_color_table;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_make_current_read;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_multisample;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pbuffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control_tear;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_gamma;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_genlock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_image_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop2;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_copy_image;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_float_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_multisample_coverage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_present_video;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_swap_group;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_capture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_output;
WGLEW_VAR_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX #ifdef GLEW_MX
}; /* WGLEWContextStruct */ }; /* WGLEWContextStruct */
@ -1136,8 +1368,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX #ifdef GLEW_MX
typedef struct WGLEWContextStruct WGLEWContext; typedef struct WGLEWContextStruct WGLEWContext;
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx); GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
#define wglewInit() wglewContextInit(wglewGetContext()) #define wglewInit() wglewContextInit(wglewGetContext())
#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x) #define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
@ -1150,11 +1382,11 @@ GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
#define WGLEW_GET_FUN(x) x #define WGLEW_GET_FUN(x) x
GLEWAPI GLboolean wglewIsSupported (const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLEWAPI GLboolean wglewGetExtension (const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -24,6 +24,7 @@ freely, subject to the following restrictions:
#include "OpenGLWidget.h" #include "OpenGLWidget.h"
#include "PolyVoxCore/CubicSurfaceExtractorWithNormals.h" #include "PolyVoxCore/CubicSurfaceExtractorWithNormals.h"
#include "PolyVoxCore/MarchingCubesSurfaceExtractor.h"
#include "PolyVoxCore/SurfaceMesh.h" #include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxCore/SimpleVolume.h" #include "PolyVoxCore/SimpleVolume.h"
@ -38,34 +39,28 @@ void createSphereInVolume(SimpleVolume<uint8_t>& volData, float fRadius)
Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2); Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2);
//This three-level for loop iterates over every voxel in the volume //This three-level for loop iterates over every voxel in the volume
for (int z = 0; z < volData.getWidth(); z++) for (int z = 0; z < volData.getDepth(); z++)
{ {
for (int y = 0; y < volData.getHeight(); y++) for (int y = 0; y < volData.getHeight(); y++)
{ {
for (int x = 0; x < volData.getDepth(); x++) for (int x = 0; x < volData.getWidth(); x++)
{ {
//Store our current position as a vector... //Store our current position as a vector...
Vector3DFloat v3dCurrentPos(x,y,z); Vector3DFloat v3dCurrentPos(x,y,z);
//And compute how far the current position is from the center of the volume //And compute how far the current position is from the center of the volume
float fDistToCenter = (v3dCurrentPos - v3dVolCenter).length(); float fDistToCenter = (v3dCurrentPos - v3dVolCenter).length();
uint8_t uMaterial = 0; uint8_t uVoxelValue = 0;
//If the current voxel is less than 'radius' units from the center then we make it solid. //If the current voxel is less than 'radius' units from the center then we make it solid.
if(fDistToCenter <= fRadius) if(fDistToCenter <= fRadius)
{ {
//Our new density value //Our new voxel value
uMaterial = 1; uVoxelValue = 255;
} }
//Get the old voxel
//Material8 voxel = volData.getVoxelAt(x,y,z);
//Modify the density and material
//voxel.setMaterial(uMaterial);
//Wrte the voxel value into the volume //Wrte the voxel value into the volume
volData.setVoxelAt(x, y, z, uMaterial); volData.setVoxelAt(x, y, z, uVoxelValue);
} }
} }
} }
@ -82,9 +77,14 @@ int main(int argc, char *argv[])
SimpleVolume<uint8_t> volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(63, 63, 63))); SimpleVolume<uint8_t> volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(63, 63, 63)));
createSphereInVolume(volData, 30); createSphereInVolume(volData, 30);
//Extract the surface //A mesh object to hold the result of surface extraction
SurfaceMesh<PositionMaterialNormal> mesh; SurfaceMesh<PositionMaterialNormal> mesh;
//Create a surface extractor. Comment out one of the following two lines to decide which type gets created.
CubicSurfaceExtractorWithNormals< SimpleVolume<uint8_t> > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh); CubicSurfaceExtractorWithNormals< SimpleVolume<uint8_t> > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh);
//MarchingCubesSurfaceExtractor< SimpleVolume<uint8_t> > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh);
//Execute the surface extractor.
surfaceExtractor.execute(); surfaceExtractor.execute();
//Pass the surface to the OpenGL window //Pass the surface to the OpenGL window

View File

@ -65,7 +65,7 @@ IF(MSVC)
SET_TARGET_PROPERTIES(OpenGLExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127") SET_TARGET_PROPERTIES(OpenGLExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
ENDIF(MSVC) ENDIF(MSVC)
TARGET_LINK_LIBRARIES(OpenGLExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore) TARGET_LINK_LIBRARIES(OpenGLExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore)
SET_PROPERTY(TARGET OpenGLExample PROPERTY FOLDER "examples/OpenGL") SET_PROPERTY(TARGET OpenGLExample PROPERTY FOLDER "Examples")
#Install - Only install the example in Windows #Install - Only install the example in Windows
IF(WIN32) IF(WIN32)

View File

@ -27,7 +27,6 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/GradientEstimators.h" #include "PolyVoxCore/GradientEstimators.h"
#include "PolyVoxCore/MaterialDensityPair.h" #include "PolyVoxCore/MaterialDensityPair.h"
#include "PolyVoxCore/MeshDecimator.h"
#include "PolyVoxCore/MarchingCubesSurfaceExtractor.h" #include "PolyVoxCore/MarchingCubesSurfaceExtractor.h"
//Some namespaces we need //Some namespaces we need
@ -92,10 +91,6 @@ void OpenGLWidget::setVolume(PolyVox::LargeVolume<MaterialDensityPair44>* volDat
MarchingCubesSurfaceExtractor< LargeVolume<MaterialDensityPair44> > surfaceExtractor(volData, PolyVox::Region(regLowerCorner, regUpperCorner), mesh.get()); MarchingCubesSurfaceExtractor< LargeVolume<MaterialDensityPair44> > surfaceExtractor(volData, PolyVox::Region(regLowerCorner, regUpperCorner), mesh.get());
surfaceExtractor.execute(); surfaceExtractor.execute();
polyvox_shared_ptr< SurfaceMesh<PositionMaterialNormal> > decimatedMesh(new SurfaceMesh<PositionMaterialNormal>);
MeshDecimator<PositionMaterialNormal> decimator(mesh.get(), decimatedMesh.get(), 0.95f);
decimator.execute();
//decimatedMesh->generateAveragedFaceNormals(true); //decimatedMesh->generateAveragedFaceNormals(true);
//computeNormalsForVertices(m_volData, *(decimatedMesh.get()), SOBEL_SMOOTHED); //computeNormalsForVertices(m_volData, *(decimatedMesh.get()), SOBEL_SMOOTHED);
@ -110,12 +105,12 @@ void OpenGLWidget::setVolume(PolyVox::LargeVolume<MaterialDensityPair44>* volDat
Vector3DUint8 v3dRegPos(uRegionX,uRegionY,uRegionZ); Vector3DUint8 v3dRegPos(uRegionX,uRegionY,uRegionZ);
if(m_bUseOpenGLVertexBufferObjects) if(m_bUseOpenGLVertexBufferObjects)
{ {
OpenGLSurfaceMesh openGLSurfaceMesh = BuildOpenGLSurfaceMesh(*(decimatedMesh.get())); OpenGLSurfaceMesh openGLSurfaceMesh = BuildOpenGLSurfaceMesh(*(mesh.get()));
m_mapOpenGLSurfaceMeshes.insert(make_pair(v3dRegPos, openGLSurfaceMesh)); m_mapOpenGLSurfaceMeshes.insert(make_pair(v3dRegPos, openGLSurfaceMesh));
} }
//else //else
//{ //{
m_mapSurfaceMeshes.insert(make_pair(v3dRegPos, decimatedMesh)); m_mapSurfaceMeshes.insert(make_pair(v3dRegPos, mesh));
//} //}
//delete meshCurrent; //delete meshCurrent;
} }

View File

@ -31,7 +31,7 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/LargeVolume.h" #include "PolyVoxCore/LargeVolume.h"
#include "PolyVoxCore/SurfaceMesh.h" #include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxImpl/Utility.h" #include "PolyVoxCore/Impl/Utility.h"
#include "OpenGLImmediateModeSupport.h" #include "OpenGLImmediateModeSupport.h"
#include "OpenGLVertexBufferObjectSupport.h" #include "OpenGLVertexBufferObjectSupport.h"

View File

@ -33,11 +33,11 @@ void createSphereInVolume(LargeVolume<MaterialDensityPair44>& volData, float fRa
Vector3DInt32 v3dVolCenter = (volData.getEnclosingRegion().getUpperCorner() - volData.getEnclosingRegion().getLowerCorner()) / static_cast<int32_t>(2); Vector3DInt32 v3dVolCenter = (volData.getEnclosingRegion().getUpperCorner() - volData.getEnclosingRegion().getLowerCorner()) / static_cast<int32_t>(2);
//This three-level for loop iterates over every voxel in the volume //This three-level for loop iterates over every voxel in the volume
for (int z = 0; z < volData.getWidth(); z++) for (int z = 0; z < volData.getDepth(); z++)
{ {
for (int y = 0; y < volData.getHeight(); y++) for (int y = 0; y < volData.getHeight(); y++)
{ {
for (int x = 0; x < volData.getDepth(); x++) for (int x = 0; x < volData.getWidth(); x++)
{ {
//Store our current position as a vector... //Store our current position as a vector...
Vector3DInt32 v3dCurrentPos(x,y,z); Vector3DInt32 v3dCurrentPos(x,y,z);
@ -57,8 +57,8 @@ void createSphereInVolume(LargeVolume<MaterialDensityPair44>& volData, float fRa
void createCubeInVolume(LargeVolume<MaterialDensityPair44>& volData, Vector3DInt32 lowerCorner, Vector3DInt32 upperCorner, uint8_t uValue) void createCubeInVolume(LargeVolume<MaterialDensityPair44>& volData, Vector3DInt32 lowerCorner, Vector3DInt32 upperCorner, uint8_t uValue)
{ {
int maxDen = MaterialDensityPair44::getMaxDensity(); uint8_t maxDen = MaterialDensityPair44::getMaxDensity();
int minDen = MaterialDensityPair44::getMinDensity(); uint8_t minDen = MaterialDensityPair44::getMinDensity();
//This three-level for loop iterates over every voxel between the specified corners //This three-level for loop iterates over every voxel between the specified corners
for (int z = lowerCorner.getZ(); z <= upperCorner.getZ(); z++) for (int z = lowerCorner.getZ(); z <= upperCorner.getZ(); z++)
{ {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -83,13 +83,16 @@
#ifdef __glxext_h_ #ifdef __glxext_h_
#error glxext.h included before glxew.h #error glxext.h included before glxew.h
#endif #endif
#ifdef GLX_H
#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
#error glx.h included before glxew.h #error glx.h included before glxew.h
#endif #endif
#define __glxext_h_ #define __glxext_h_
#define __GLX_glx_h__
#define GLX_H #define GLX_H
#define __GLX_glx_h__
#define __glx_h__
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@ -255,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
#define GLX_DONT_CARE 0xFFFFFFFF #define GLX_DONT_CARE 0xFFFFFFFF
typedef XID GLXFBConfigID; typedef XID GLXFBConfigID;
typedef XID GLXWindow;
typedef XID GLXPbuffer; typedef XID GLXPbuffer;
typedef XID GLXWindow;
typedef struct __GLXFBConfigRec *GLXFBConfig; typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef struct { typedef struct {
@ -343,6 +346,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
#endif /* GLX_3DFX_multisample */ #endif /* GLX_3DFX_multisample */
/* ------------------------ GLX_AMD_gpu_association ------------------------ */
#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
#define GLXEW_AMD_gpu_association GLXEW_GET_VAR(__GLXEW_AMD_gpu_association)
#endif /* GLX_AMD_gpu_association */
/* ------------------------- GLX_ARB_create_context ------------------------ */ /* ------------------------- GLX_ARB_create_context ------------------------ */
#ifndef GLX_ARB_create_context #ifndef GLX_ARB_create_context
@ -362,6 +385,33 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
#endif /* GLX_ARB_create_context */ #endif /* GLX_ARB_create_context */
/* --------------------- GLX_ARB_create_context_profile -------------------- */
#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
#define GLXEW_ARB_create_context_profile GLXEW_GET_VAR(__GLXEW_ARB_create_context_profile)
#endif /* GLX_ARB_create_context_profile */
/* ------------------- GLX_ARB_create_context_robustness ------------------- */
#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
#define GLXEW_ARB_create_context_robustness GLXEW_GET_VAR(__GLXEW_ARB_create_context_robustness)
#endif /* GLX_ARB_create_context_robustness */
/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */ /* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
#ifndef GLX_ARB_fbconfig_float #ifndef GLX_ARB_fbconfig_float
@ -408,6 +458,39 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
#endif /* GLX_ARB_multisample */ #endif /* GLX_ARB_multisample */
/* ---------------- GLX_ARB_robustness_application_isolation --------------- */
#ifndef GLX_ARB_robustness_application_isolation
#define GLX_ARB_robustness_application_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_application_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_application_isolation)
#endif /* GLX_ARB_robustness_application_isolation */
/* ---------------- GLX_ARB_robustness_share_group_isolation --------------- */
#ifndef GLX_ARB_robustness_share_group_isolation
#define GLX_ARB_robustness_share_group_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_share_group_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_share_group_isolation)
#endif /* GLX_ARB_robustness_share_group_isolation */
/* ---------------------- GLX_ARB_vertex_buffer_object --------------------- */
#ifndef GLX_ARB_vertex_buffer_object
#define GLX_ARB_vertex_buffer_object 1
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
#define GLXEW_ARB_vertex_buffer_object GLXEW_GET_VAR(__GLXEW_ARB_vertex_buffer_object)
#endif /* GLX_ARB_vertex_buffer_object */
/* ----------------------- GLX_ATI_pixel_format_float ---------------------- */ /* ----------------------- GLX_ATI_pixel_format_float ---------------------- */
#ifndef GLX_ATI_pixel_format_float #ifndef GLX_ATI_pixel_format_float
@ -472,6 +555,28 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
#endif /* GLX_ATI_render_texture */ #endif /* GLX_ATI_render_texture */
/* ------------------- GLX_EXT_create_context_es2_profile ------------------ */
#ifndef GLX_EXT_create_context_es2_profile
#define GLX_EXT_create_context_es2_profile 1
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es2_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es2_profile)
#endif /* GLX_EXT_create_context_es2_profile */
/* ------------------- GLX_EXT_create_context_es_profile ------------------- */
#ifndef GLX_EXT_create_context_es_profile
#define GLX_EXT_create_context_es_profile 1
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es_profile)
#endif /* GLX_EXT_create_context_es_profile */
/* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */ /* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
#ifndef GLX_EXT_fbconfig_packed_float #ifndef GLX_EXT_fbconfig_packed_float
@ -529,6 +634,33 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
#endif /* GLX_EXT_scene_marker */ #endif /* GLX_EXT_scene_marker */
/* -------------------------- GLX_EXT_swap_control ------------------------- */
#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);
#define glXSwapIntervalEXT GLXEW_GET_FUN(__glewXSwapIntervalEXT)
#define GLXEW_EXT_swap_control GLXEW_GET_VAR(__GLXEW_EXT_swap_control)
#endif /* GLX_EXT_swap_control */
/* ----------------------- GLX_EXT_swap_control_tear ----------------------- */
#ifndef GLX_EXT_swap_control_tear
#define GLX_EXT_swap_control_tear 1
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
#define GLXEW_EXT_swap_control_tear GLXEW_GET_VAR(__GLXEW_EXT_swap_control_tear)
#endif /* GLX_EXT_swap_control_tear */
/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */ /* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
#ifndef GLX_EXT_texture_from_pixmap #ifndef GLX_EXT_texture_from_pixmap
@ -615,6 +747,20 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable dr
#endif /* GLX_EXT_visual_rating */ #endif /* GLX_EXT_visual_rating */
/* -------------------------- GLX_INTEL_swap_event ------------------------- */
#ifndef GLX_INTEL_swap_event
#define GLX_INTEL_swap_event 1
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
#define GLX_COPY_COMPLETE_INTEL 0x8181
#define GLX_FLIP_COMPLETE_INTEL 0x8182
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
#define GLXEW_INTEL_swap_event GLXEW_GET_VAR(__GLXEW_INTEL_swap_event)
#endif /* GLX_INTEL_swap_event */
/* -------------------------- GLX_MESA_agp_offset -------------------------- */ /* -------------------------- GLX_MESA_agp_offset -------------------------- */
#ifndef GLX_MESA_agp_offset #ifndef GLX_MESA_agp_offset
@ -683,6 +829,34 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_MESA_set_3dfx_mode */ #endif /* GLX_MESA_set_3dfx_mode */
/* ------------------------- GLX_MESA_swap_control ------------------------- */
#ifndef GLX_MESA_swap_control
#define GLX_MESA_swap_control 1
typedef int ( * PFNGLXGETSWAPINTERVALMESAPROC) (void);
typedef int ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval);
#define glXGetSwapIntervalMESA GLXEW_GET_FUN(__glewXGetSwapIntervalMESA)
#define glXSwapIntervalMESA GLXEW_GET_FUN(__glewXSwapIntervalMESA)
#define GLXEW_MESA_swap_control GLXEW_GET_VAR(__GLXEW_MESA_swap_control)
#endif /* GLX_MESA_swap_control */
/* --------------------------- GLX_NV_copy_image --------------------------- */
#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);
#define glXCopyImageSubDataNV GLXEW_GET_FUN(__glewXCopyImageSubDataNV)
#define GLXEW_NV_copy_image GLXEW_GET_VAR(__GLXEW_NV_copy_image)
#endif /* GLX_NV_copy_image */
/* -------------------------- GLX_NV_float_buffer -------------------------- */ /* -------------------------- GLX_NV_float_buffer -------------------------- */
#ifndef GLX_NV_float_buffer #ifndef GLX_NV_float_buffer
@ -694,6 +868,18 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_NV_float_buffer */ #endif /* GLX_NV_float_buffer */
/* ---------------------- GLX_NV_multisample_coverage ---------------------- */
#ifndef GLX_NV_multisample_coverage
#define GLX_NV_multisample_coverage 1
#define GLX_COLOR_SAMPLES_NV 0x20B3
#define GLX_COVERAGE_SAMPLES_NV 100001
#define GLXEW_NV_multisample_coverage GLXEW_GET_VAR(__GLXEW_NV_multisample_coverage)
#endif /* GLX_NV_multisample_coverage */
/* -------------------------- GLX_NV_present_video ------------------------- */ /* -------------------------- GLX_NV_present_video ------------------------- */
#ifndef GLX_NV_present_video #ifndef GLX_NV_present_video
@ -749,10 +935,37 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
#endif /* GLX_NV_vertex_array_range */ #endif /* GLX_NV_vertex_array_range */
/* -------------------------- GLX_NV_video_output -------------------------- */ /* -------------------------- GLX_NV_video_capture ------------------------- */
#ifndef GLX_NV_video_output #ifndef GLX_NV_video_capture
#define GLX_NV_video_output 1 #define GLX_NV_video_capture 1
#define GLX_DEVICE_ID_NV 0x20CD
#define GLX_UNIQUE_ID_NV 0x20CE
#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
typedef XID GLXVideoCaptureDeviceNV;
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);
#define glXBindVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXBindVideoCaptureDeviceNV)
#define glXEnumerateVideoCaptureDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoCaptureDevicesNV)
#define glXLockVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXLockVideoCaptureDeviceNV)
#define glXQueryVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXQueryVideoCaptureDeviceNV)
#define glXReleaseVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoCaptureDeviceNV)
#define GLXEW_NV_video_capture GLXEW_GET_VAR(__GLXEW_NV_video_capture)
#endif /* GLX_NV_video_capture */
/* ---------------------------- GLX_NV_video_out --------------------------- */
#ifndef GLX_NV_video_out
#define GLX_NV_video_out 1
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 #define GLX_VIDEO_OUT_COLOR_NV 0x20C3
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
@ -779,9 +992,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV) #define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
#define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV) #define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV)
#define GLXEW_NV_video_output GLXEW_GET_VAR(__GLXEW_NV_video_output) #define GLXEW_NV_video_out GLXEW_GET_VAR(__GLXEW_NV_video_out)
#endif /* GLX_NV_video_output */ #endif /* GLX_NV_video_out */
/* -------------------------- GLX_OML_swap_method -------------------------- */ /* -------------------------- GLX_OML_swap_method -------------------------- */
@ -799,8 +1012,7 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
/* -------------------------- GLX_OML_sync_control ------------------------- */ /* -------------------------- GLX_OML_sync_control ------------------------- */
#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) #ifndef GLX_OML_sync_control
#include <inttypes.h>
#define GLX_OML_sync_control 1 #define GLX_OML_sync_control 1
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator); typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
@ -1137,7 +1349,7 @@ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#ifndef GLX_SGI_video_sync #ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1 #define GLX_SGI_video_sync 1
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (uint* count); typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int* count);
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count); typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count);
#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI) #define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
@ -1181,185 +1393,213 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef GLEW_MX #ifdef GLEW_MX
#define GLXEW_EXPORT #define GLXEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT
#else #else
#define GLXEW_EXPORT extern #define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */ #endif /* GLEW_MX */
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay; GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig; GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext; GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer; GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap; GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow; GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer; GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap; GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow; GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable; GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib; GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs; GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent; GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig; GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent; GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext; GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable; GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent; GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB; GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI; GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI; GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI; GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT; GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT; GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT; GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT; GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT; GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA; GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA; GLXEW_FUN_EXPORT PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
extern PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA; GLXEW_FUN_EXPORT PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA; GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA; GLXEW_FUN_EXPORT PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV; GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV; GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV; GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV; GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV; GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV; GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
#ifdef GLX_OML_sync_control GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML; GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML; GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML; GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML; GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML; GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
#endif
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX; GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX; GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX; GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX; GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX; GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX; GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX; GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX; GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX; GLXEW_FUN_EXPORT PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
GLXEW_FUN_EXPORT PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
extern PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX; GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX; GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX; GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX; GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX; GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX; GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXCUSHIONSGIPROC __glewXCushionSGI; GLXEW_FUN_EXPORT PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
extern PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI; GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI; GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI; GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI; GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI; GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
extern PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN; GLXEW_FUN_EXPORT PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
extern PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN; GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN; GLXEW_FUN_EXPORT PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
GLXEW_FUN_EXPORT PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
GLXEW_FUN_EXPORT PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
GLXEW_FUN_EXPORT PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
#if defined(GLEW_MX) #if defined(GLEW_MX)
struct GLXEWContextStruct struct GLXEWContextStruct
{ {
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context; GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap; GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info; GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method; GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control; GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync; GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index; GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize; GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_color_range;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_video_resize;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_cushion;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_make_current_read;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_swap_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_video_sync;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX #ifdef GLEW_MX
}; /* GLXEWContextStruct */ }; /* GLXEWContextStruct */
@ -1370,8 +1610,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX #ifdef GLEW_MX
typedef struct GLXEWContextStruct GLXEWContext; typedef struct GLXEWContextStruct GLXEWContext;
extern GLenum glxewContextInit (GLXEWContext* ctx); GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
#define glxewInit() glxewContextInit(glxewGetContext()) #define glxewInit() glxewContextInit(glxewGetContext())
#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x) #define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
@ -1384,11 +1624,11 @@ extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x) #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLXEW_GET_FUN(x) x #define GLXEW_GET_FUN(x) x
extern GLboolean glxewIsSupported (const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
extern GLboolean glxewGetExtension (const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -62,11 +62,12 @@
#define __wglext_h_ #define __wglext_h_
#if !defined(APIENTRY) && !defined(__CYGWIN__) #if !defined(WINAPI)
# ifndef WIN32_LEAN_AND_MEAN # ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1 # define WIN32_LEAN_AND_MEAN 1
# endif # endif
#include <windows.h> #include <windows.h>
# undef WIN32_LEAN_AND_MEAN
#endif #endif
/* /*
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
#endif /* WGL_3DL_stereo_control */ #endif /* WGL_3DL_stereo_control */
/* ------------------------ WGL_AMD_gpu_association ------------------------ */
#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 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);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int* attribList);
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT* ids);
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void* data);
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
#define wglBlitContextFramebufferAMD WGLEW_GET_FUN(__wglewBlitContextFramebufferAMD)
#define wglCreateAssociatedContextAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAMD)
#define wglCreateAssociatedContextAttribsAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAttribsAMD)
#define wglDeleteAssociatedContextAMD WGLEW_GET_FUN(__wglewDeleteAssociatedContextAMD)
#define wglGetContextGPUIDAMD WGLEW_GET_FUN(__wglewGetContextGPUIDAMD)
#define wglGetCurrentAssociatedContextAMD WGLEW_GET_FUN(__wglewGetCurrentAssociatedContextAMD)
#define wglGetGPUIDsAMD WGLEW_GET_FUN(__wglewGetGPUIDsAMD)
#define wglGetGPUInfoAMD WGLEW_GET_FUN(__wglewGetGPUInfoAMD)
#define wglMakeAssociatedContextCurrentAMD WGLEW_GET_FUN(__wglewMakeAssociatedContextCurrentAMD)
#define WGLEW_AMD_gpu_association WGLEW_GET_VAR(__WGLEW_AMD_gpu_association)
#endif /* WGL_AMD_gpu_association */
/* ------------------------- WGL_ARB_buffer_region ------------------------- */ /* ------------------------- WGL_ARB_buffer_region ------------------------- */
#ifndef WGL_ARB_buffer_region #ifndef WGL_ARB_buffer_region
@ -152,6 +193,8 @@ typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, in
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_FLAGS_ARB 0x2094 #define WGL_CONTEXT_FLAGS_ARB 0x2094
#define ERROR_INVALID_VERSION_ARB 0x2095
#define ERROR_INVALID_PROFILE_ARB 0x2096
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList); typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList);
@ -161,6 +204,33 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
#endif /* WGL_ARB_create_context */ #endif /* WGL_ARB_create_context */
/* --------------------- WGL_ARB_create_context_profile -------------------- */
#ifndef WGL_ARB_create_context_profile
#define WGL_ARB_create_context_profile 1
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGLEW_ARB_create_context_profile WGLEW_GET_VAR(__WGLEW_ARB_create_context_profile)
#endif /* WGL_ARB_create_context_profile */
/* ------------------- WGL_ARB_create_context_robustness ------------------- */
#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
#define WGLEW_ARB_create_context_robustness WGLEW_GET_VAR(__WGLEW_ARB_create_context_robustness)
#endif /* WGL_ARB_create_context_robustness */
/* ----------------------- WGL_ARB_extensions_string ----------------------- */ /* ----------------------- WGL_ARB_extensions_string ----------------------- */
#ifndef WGL_ARB_extensions_string #ifndef WGL_ARB_extensions_string
@ -400,6 +470,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
#endif /* WGL_ATI_render_texture_rectangle */ #endif /* WGL_ATI_render_texture_rectangle */
/* ------------------- WGL_EXT_create_context_es2_profile ------------------ */
#ifndef WGL_EXT_create_context_es2_profile
#define WGL_EXT_create_context_es2_profile 1
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es2_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es2_profile)
#endif /* WGL_EXT_create_context_es2_profile */
/* ------------------- WGL_EXT_create_context_es_profile ------------------- */
#ifndef WGL_EXT_create_context_es_profile
#define WGL_EXT_create_context_es_profile 1
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es_profile)
#endif /* WGL_EXT_create_context_es_profile */
/* -------------------------- WGL_EXT_depth_float -------------------------- */ /* -------------------------- WGL_EXT_depth_float -------------------------- */
#ifndef WGL_EXT_depth_float #ifndef WGL_EXT_depth_float
@ -605,6 +697,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
#endif /* WGL_EXT_swap_control */ #endif /* WGL_EXT_swap_control */
/* ----------------------- WGL_EXT_swap_control_tear ----------------------- */
#ifndef WGL_EXT_swap_control_tear
#define WGL_EXT_swap_control_tear 1
#define WGLEW_EXT_swap_control_tear WGLEW_GET_VAR(__WGLEW_EXT_swap_control_tear)
#endif /* WGL_EXT_swap_control_tear */
/* --------------------- WGL_I3D_digital_video_control --------------------- */ /* --------------------- WGL_I3D_digital_video_control --------------------- */
#ifndef WGL_I3D_digital_video_control #ifndef WGL_I3D_digital_video_control
@ -752,6 +853,59 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
#endif /* WGL_I3D_swap_frame_usage */ #endif /* WGL_I3D_swap_frame_usage */
/* --------------------------- WGL_NV_DX_interop --------------------------- */
#ifndef WGL_NV_DX_interop
#define WGL_NV_DX_interop 1
#define WGL_ACCESS_READ_ONLY_NV 0x0000
#define WGL_ACCESS_READ_WRITE_NV 0x0001
#define WGL_ACCESS_WRITE_DISCARD_NV 0x0002
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void* dxDevice);
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void* dxObject, HANDLE shareHandle);
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
#define wglDXCloseDeviceNV WGLEW_GET_FUN(__wglewDXCloseDeviceNV)
#define wglDXLockObjectsNV WGLEW_GET_FUN(__wglewDXLockObjectsNV)
#define wglDXObjectAccessNV WGLEW_GET_FUN(__wglewDXObjectAccessNV)
#define wglDXOpenDeviceNV WGLEW_GET_FUN(__wglewDXOpenDeviceNV)
#define wglDXRegisterObjectNV WGLEW_GET_FUN(__wglewDXRegisterObjectNV)
#define wglDXSetResourceShareHandleNV WGLEW_GET_FUN(__wglewDXSetResourceShareHandleNV)
#define wglDXUnlockObjectsNV WGLEW_GET_FUN(__wglewDXUnlockObjectsNV)
#define wglDXUnregisterObjectNV WGLEW_GET_FUN(__wglewDXUnregisterObjectNV)
#define WGLEW_NV_DX_interop WGLEW_GET_VAR(__WGLEW_NV_DX_interop)
#endif /* WGL_NV_DX_interop */
/* --------------------------- WGL_NV_DX_interop2 -------------------------- */
#ifndef WGL_NV_DX_interop2
#define WGL_NV_DX_interop2 1
#define WGLEW_NV_DX_interop2 WGLEW_GET_VAR(__WGLEW_NV_DX_interop2)
#endif /* WGL_NV_DX_interop2 */
/* --------------------------- WGL_NV_copy_image --------------------------- */
#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);
#define wglCopyImageSubDataNV WGLEW_GET_FUN(__wglewCopyImageSubDataNV)
#define WGLEW_NV_copy_image WGLEW_GET_VAR(__WGLEW_NV_copy_image)
#endif /* WGL_NV_copy_image */
/* -------------------------- WGL_NV_float_buffer -------------------------- */ /* -------------------------- WGL_NV_float_buffer -------------------------- */
#ifndef WGL_NV_float_buffer #ifndef WGL_NV_float_buffer
@ -804,6 +958,18 @@ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
#endif /* WGL_NV_gpu_affinity */ #endif /* WGL_NV_gpu_affinity */
/* ---------------------- WGL_NV_multisample_coverage ---------------------- */
#ifndef WGL_NV_multisample_coverage
#define WGL_NV_multisample_coverage 1
#define WGL_COVERAGE_SAMPLES_NV 0x2042
#define WGL_COLOR_SAMPLES_NV 0x20B9
#define WGLEW_NV_multisample_coverage WGLEW_GET_VAR(__WGLEW_NV_multisample_coverage)
#endif /* WGL_NV_multisample_coverage */
/* -------------------------- WGL_NV_present_video ------------------------- */ /* -------------------------- WGL_NV_present_video ------------------------- */
#ifndef WGL_NV_present_video #ifndef WGL_NV_present_video
@ -863,7 +1029,7 @@ typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrie
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count); typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers); typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers);
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group); typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group, GLuint *barrier);
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV) #define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
@ -892,6 +1058,32 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
#endif /* WGL_NV_vertex_array_range */ #endif /* WGL_NV_vertex_array_range */
/* -------------------------- WGL_NV_video_capture ------------------------- */
#ifndef WGL_NV_video_capture
#define WGL_NV_video_capture 1
#define WGL_UNIQUE_ID_NV 0x20CE
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
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);
#define wglBindVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewBindVideoCaptureDeviceNV)
#define wglEnumerateVideoCaptureDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoCaptureDevicesNV)
#define wglLockVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewLockVideoCaptureDeviceNV)
#define wglQueryVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewQueryVideoCaptureDeviceNV)
#define wglReleaseVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoCaptureDeviceNV)
#define WGLEW_NV_video_capture WGLEW_GET_VAR(__WGLEW_NV_video_capture)
#endif /* WGL_NV_video_capture */
/* -------------------------- WGL_NV_video_output -------------------------- */ /* -------------------------- WGL_NV_video_output -------------------------- */
#ifndef WGL_NV_video_output #ifndef WGL_NV_video_output
@ -957,9 +1149,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef GLEW_MX #ifdef GLEW_MX
#define WGLEW_EXPORT #define WGLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT
#else #else
#define WGLEW_EXPORT GLEWAPI #define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */ #endif /* GLEW_MX */
#ifdef GLEW_MX #ifdef GLEW_MX
@ -967,165 +1161,203 @@ struct WGLEWContextStruct
{ {
#endif /* GLEW_MX */ #endif /* GLEW_MX */
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL; WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
WGLEW_FUN_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
WGLEW_FUN_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
WGLEW_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB; WGLEW_FUN_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB; WGLEW_FUN_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB; WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB; WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB; WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB; WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB; WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB; WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB; WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT; WGLEW_FUN_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT; WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT; WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT; WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT; WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT; WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT; WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT; WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D; WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D; WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D; WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D; WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D; WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D; WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D; WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D; WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D; WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D; WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D; WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D; WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_FUN_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D; WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D; WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV; WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV; WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV; WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV; WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV; WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV; WGLEW_FUN_EXPORT PFNWGLDXOBJECTACCESSNVPROC __wglewDXObjectAccessNV;
WGLEW_FUN_EXPORT PFNWGLDXOPENDEVICENVPROC __wglewDXOpenDeviceNV;
WGLEW_FUN_EXPORT PFNWGLDXREGISTEROBJECTNVPROC __wglewDXRegisterObjectNV;
WGLEW_FUN_EXPORT PFNWGLDXSETRESOURCESHAREHANDLENVPROC __wglewDXSetResourceShareHandleNV;
WGLEW_FUN_EXPORT PFNWGLDXUNLOCKOBJECTSNVPROC __wglewDXUnlockObjectsNV;
WGLEW_FUN_EXPORT PFNWGLDXUNREGISTEROBJECTNVPROC __wglewDXUnregisterObjectNV;
WGLEW_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV; WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
WGLEW_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV; WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV; WGLEW_FUN_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV; WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
WGLEW_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV; WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV; WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML; WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML; WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML; WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control; WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region; WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string; WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB; WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read; WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample; WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float; WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture; WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float; WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table; WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB; WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read; WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample; WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer; WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format; WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float; WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma; WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_depth_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_display_color_table;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_make_current_read;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_multisample;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pbuffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control_tear;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_gamma;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_genlock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_image_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop2;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_copy_image;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_float_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_multisample_coverage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_present_video;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_swap_group;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_capture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_output;
WGLEW_VAR_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX #ifdef GLEW_MX
}; /* WGLEWContextStruct */ }; /* WGLEWContextStruct */
@ -1136,8 +1368,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX #ifdef GLEW_MX
typedef struct WGLEWContextStruct WGLEWContext; typedef struct WGLEWContextStruct WGLEWContext;
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx); GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
#define wglewInit() wglewContextInit(wglewGetContext()) #define wglewInit() wglewContextInit(wglewGetContext())
#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x) #define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
@ -1150,11 +1382,11 @@ GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
#define WGLEW_GET_FUN(x) x #define WGLEW_GET_FUN(x) x
GLEWAPI GLboolean wglewIsSupported (const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLEWAPI GLboolean wglewGetExtension (const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -27,7 +27,7 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/LowPassFilter.h" #include "PolyVoxCore/LowPassFilter.h"
#include "PolyVoxCore/RawVolume.h" #include "PolyVoxCore/RawVolume.h"
#include "PolyVoxCore/SurfaceMesh.h" #include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxImpl/Utility.h" #include "PolyVoxCore/Impl/Utility.h"
#include "OpenGLImmediateModeSupport.h" #include "OpenGLImmediateModeSupport.h"
#include "OpenGLVertexBufferObjectSupport.h" #include "OpenGLVertexBufferObjectSupport.h"
@ -101,12 +101,14 @@ int main(int argc, char *argv[])
createCubeInVolume(volData, Vector3DInt32(midPos-10, 1, midPos-10), Vector3DInt32(midPos+10, maxPos-1, midPos+10), MaterialDensityPair44::getMaxDensity()); createCubeInVolume(volData, Vector3DInt32(midPos-10, 1, midPos-10), Vector3DInt32(midPos+10, maxPos-1, midPos+10), MaterialDensityPair44::getMaxDensity());
createCubeInVolume(volData, Vector3DInt32(midPos-10, midPos-10 ,1), Vector3DInt32(midPos+10, midPos+10, maxPos-1), MaterialDensityPair44::getMaxDensity()); createCubeInVolume(volData, Vector3DInt32(midPos-10, midPos-10 ,1), Vector3DInt32(midPos+10, midPos+10, maxPos-1), MaterialDensityPair44::getMaxDensity());
//Smooth part of the volume //I've removed this smoothing because it doesn't really make sense to apply a low pass filter to a volume with material values.
RawVolume<MaterialDensityPair44> tempVolume(PolyVox::Region(0,0,0,128, 128, 128)); //I could implement the mathematical operators for MaterialDensityPair in such a way that they ignores the materials but this
LowPassFilter< LargeVolume<MaterialDensityPair44>, RawVolume<MaterialDensityPair44> > pass1(&volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), &tempVolume, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), 3); //seems to be setting a bad example. Users can add this operators in their own classes if they want smoothing.
pass1.executeSAT(); //RawVolume<MaterialDensityPair44> tempVolume(PolyVox::Region(0,0,0,128, 128, 128));
LowPassFilter< RawVolume<MaterialDensityPair44>, LargeVolume<MaterialDensityPair44> > pass2(&tempVolume, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), &volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), 3); //LowPassFilter< LargeVolume<MaterialDensityPair44>, RawVolume<MaterialDensityPair44> > pass1(&volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), &tempVolume, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), 3);
pass2.executeSAT(); //pass1.executeSAT();
//LowPassFilter< RawVolume<MaterialDensityPair44>, LargeVolume<MaterialDensityPair44> > pass2(&tempVolume, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), &volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), 3);
//pass2.executeSAT();
QApplication app(argc, argv); QApplication app(argc, argv);

View File

@ -61,7 +61,7 @@ IF(MSVC)
SET_TARGET_PROPERTIES(PagingExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127") SET_TARGET_PROPERTIES(PagingExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
ENDIF(MSVC) ENDIF(MSVC)
TARGET_LINK_LIBRARIES(PagingExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore) TARGET_LINK_LIBRARIES(PagingExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore)
SET_PROPERTY(TARGET PagingExample PROPERTY FOLDER "examples/Paging") SET_PROPERTY(TARGET PagingExample PROPERTY FOLDER "Examples")
#Install - Only install the example in Windows #Install - Only install the example in Windows
IF(WIN32) IF(WIN32)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -83,13 +83,16 @@
#ifdef __glxext_h_ #ifdef __glxext_h_
#error glxext.h included before glxew.h #error glxext.h included before glxew.h
#endif #endif
#ifdef GLX_H
#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
#error glx.h included before glxew.h #error glx.h included before glxew.h
#endif #endif
#define __glxext_h_ #define __glxext_h_
#define __GLX_glx_h__
#define GLX_H #define GLX_H
#define __GLX_glx_h__
#define __glx_h__
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@ -255,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
#define GLX_DONT_CARE 0xFFFFFFFF #define GLX_DONT_CARE 0xFFFFFFFF
typedef XID GLXFBConfigID; typedef XID GLXFBConfigID;
typedef XID GLXWindow;
typedef XID GLXPbuffer; typedef XID GLXPbuffer;
typedef XID GLXWindow;
typedef struct __GLXFBConfigRec *GLXFBConfig; typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef struct { typedef struct {
@ -343,6 +346,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
#endif /* GLX_3DFX_multisample */ #endif /* GLX_3DFX_multisample */
/* ------------------------ GLX_AMD_gpu_association ------------------------ */
#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
#define GLXEW_AMD_gpu_association GLXEW_GET_VAR(__GLXEW_AMD_gpu_association)
#endif /* GLX_AMD_gpu_association */
/* ------------------------- GLX_ARB_create_context ------------------------ */ /* ------------------------- GLX_ARB_create_context ------------------------ */
#ifndef GLX_ARB_create_context #ifndef GLX_ARB_create_context
@ -362,6 +385,33 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
#endif /* GLX_ARB_create_context */ #endif /* GLX_ARB_create_context */
/* --------------------- GLX_ARB_create_context_profile -------------------- */
#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
#define GLXEW_ARB_create_context_profile GLXEW_GET_VAR(__GLXEW_ARB_create_context_profile)
#endif /* GLX_ARB_create_context_profile */
/* ------------------- GLX_ARB_create_context_robustness ------------------- */
#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
#define GLXEW_ARB_create_context_robustness GLXEW_GET_VAR(__GLXEW_ARB_create_context_robustness)
#endif /* GLX_ARB_create_context_robustness */
/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */ /* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
#ifndef GLX_ARB_fbconfig_float #ifndef GLX_ARB_fbconfig_float
@ -408,6 +458,39 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
#endif /* GLX_ARB_multisample */ #endif /* GLX_ARB_multisample */
/* ---------------- GLX_ARB_robustness_application_isolation --------------- */
#ifndef GLX_ARB_robustness_application_isolation
#define GLX_ARB_robustness_application_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_application_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_application_isolation)
#endif /* GLX_ARB_robustness_application_isolation */
/* ---------------- GLX_ARB_robustness_share_group_isolation --------------- */
#ifndef GLX_ARB_robustness_share_group_isolation
#define GLX_ARB_robustness_share_group_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_share_group_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_share_group_isolation)
#endif /* GLX_ARB_robustness_share_group_isolation */
/* ---------------------- GLX_ARB_vertex_buffer_object --------------------- */
#ifndef GLX_ARB_vertex_buffer_object
#define GLX_ARB_vertex_buffer_object 1
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
#define GLXEW_ARB_vertex_buffer_object GLXEW_GET_VAR(__GLXEW_ARB_vertex_buffer_object)
#endif /* GLX_ARB_vertex_buffer_object */
/* ----------------------- GLX_ATI_pixel_format_float ---------------------- */ /* ----------------------- GLX_ATI_pixel_format_float ---------------------- */
#ifndef GLX_ATI_pixel_format_float #ifndef GLX_ATI_pixel_format_float
@ -472,6 +555,28 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
#endif /* GLX_ATI_render_texture */ #endif /* GLX_ATI_render_texture */
/* ------------------- GLX_EXT_create_context_es2_profile ------------------ */
#ifndef GLX_EXT_create_context_es2_profile
#define GLX_EXT_create_context_es2_profile 1
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es2_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es2_profile)
#endif /* GLX_EXT_create_context_es2_profile */
/* ------------------- GLX_EXT_create_context_es_profile ------------------- */
#ifndef GLX_EXT_create_context_es_profile
#define GLX_EXT_create_context_es_profile 1
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es_profile)
#endif /* GLX_EXT_create_context_es_profile */
/* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */ /* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
#ifndef GLX_EXT_fbconfig_packed_float #ifndef GLX_EXT_fbconfig_packed_float
@ -529,6 +634,33 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
#endif /* GLX_EXT_scene_marker */ #endif /* GLX_EXT_scene_marker */
/* -------------------------- GLX_EXT_swap_control ------------------------- */
#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);
#define glXSwapIntervalEXT GLXEW_GET_FUN(__glewXSwapIntervalEXT)
#define GLXEW_EXT_swap_control GLXEW_GET_VAR(__GLXEW_EXT_swap_control)
#endif /* GLX_EXT_swap_control */
/* ----------------------- GLX_EXT_swap_control_tear ----------------------- */
#ifndef GLX_EXT_swap_control_tear
#define GLX_EXT_swap_control_tear 1
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
#define GLXEW_EXT_swap_control_tear GLXEW_GET_VAR(__GLXEW_EXT_swap_control_tear)
#endif /* GLX_EXT_swap_control_tear */
/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */ /* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
#ifndef GLX_EXT_texture_from_pixmap #ifndef GLX_EXT_texture_from_pixmap
@ -615,6 +747,20 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable dr
#endif /* GLX_EXT_visual_rating */ #endif /* GLX_EXT_visual_rating */
/* -------------------------- GLX_INTEL_swap_event ------------------------- */
#ifndef GLX_INTEL_swap_event
#define GLX_INTEL_swap_event 1
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
#define GLX_COPY_COMPLETE_INTEL 0x8181
#define GLX_FLIP_COMPLETE_INTEL 0x8182
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
#define GLXEW_INTEL_swap_event GLXEW_GET_VAR(__GLXEW_INTEL_swap_event)
#endif /* GLX_INTEL_swap_event */
/* -------------------------- GLX_MESA_agp_offset -------------------------- */ /* -------------------------- GLX_MESA_agp_offset -------------------------- */
#ifndef GLX_MESA_agp_offset #ifndef GLX_MESA_agp_offset
@ -683,6 +829,34 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_MESA_set_3dfx_mode */ #endif /* GLX_MESA_set_3dfx_mode */
/* ------------------------- GLX_MESA_swap_control ------------------------- */
#ifndef GLX_MESA_swap_control
#define GLX_MESA_swap_control 1
typedef int ( * PFNGLXGETSWAPINTERVALMESAPROC) (void);
typedef int ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval);
#define glXGetSwapIntervalMESA GLXEW_GET_FUN(__glewXGetSwapIntervalMESA)
#define glXSwapIntervalMESA GLXEW_GET_FUN(__glewXSwapIntervalMESA)
#define GLXEW_MESA_swap_control GLXEW_GET_VAR(__GLXEW_MESA_swap_control)
#endif /* GLX_MESA_swap_control */
/* --------------------------- GLX_NV_copy_image --------------------------- */
#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);
#define glXCopyImageSubDataNV GLXEW_GET_FUN(__glewXCopyImageSubDataNV)
#define GLXEW_NV_copy_image GLXEW_GET_VAR(__GLXEW_NV_copy_image)
#endif /* GLX_NV_copy_image */
/* -------------------------- GLX_NV_float_buffer -------------------------- */ /* -------------------------- GLX_NV_float_buffer -------------------------- */
#ifndef GLX_NV_float_buffer #ifndef GLX_NV_float_buffer
@ -694,6 +868,18 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_NV_float_buffer */ #endif /* GLX_NV_float_buffer */
/* ---------------------- GLX_NV_multisample_coverage ---------------------- */
#ifndef GLX_NV_multisample_coverage
#define GLX_NV_multisample_coverage 1
#define GLX_COLOR_SAMPLES_NV 0x20B3
#define GLX_COVERAGE_SAMPLES_NV 100001
#define GLXEW_NV_multisample_coverage GLXEW_GET_VAR(__GLXEW_NV_multisample_coverage)
#endif /* GLX_NV_multisample_coverage */
/* -------------------------- GLX_NV_present_video ------------------------- */ /* -------------------------- GLX_NV_present_video ------------------------- */
#ifndef GLX_NV_present_video #ifndef GLX_NV_present_video
@ -749,10 +935,37 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
#endif /* GLX_NV_vertex_array_range */ #endif /* GLX_NV_vertex_array_range */
/* -------------------------- GLX_NV_video_output -------------------------- */ /* -------------------------- GLX_NV_video_capture ------------------------- */
#ifndef GLX_NV_video_output #ifndef GLX_NV_video_capture
#define GLX_NV_video_output 1 #define GLX_NV_video_capture 1
#define GLX_DEVICE_ID_NV 0x20CD
#define GLX_UNIQUE_ID_NV 0x20CE
#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
typedef XID GLXVideoCaptureDeviceNV;
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);
#define glXBindVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXBindVideoCaptureDeviceNV)
#define glXEnumerateVideoCaptureDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoCaptureDevicesNV)
#define glXLockVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXLockVideoCaptureDeviceNV)
#define glXQueryVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXQueryVideoCaptureDeviceNV)
#define glXReleaseVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoCaptureDeviceNV)
#define GLXEW_NV_video_capture GLXEW_GET_VAR(__GLXEW_NV_video_capture)
#endif /* GLX_NV_video_capture */
/* ---------------------------- GLX_NV_video_out --------------------------- */
#ifndef GLX_NV_video_out
#define GLX_NV_video_out 1
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 #define GLX_VIDEO_OUT_COLOR_NV 0x20C3
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
@ -779,9 +992,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV) #define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
#define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV) #define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV)
#define GLXEW_NV_video_output GLXEW_GET_VAR(__GLXEW_NV_video_output) #define GLXEW_NV_video_out GLXEW_GET_VAR(__GLXEW_NV_video_out)
#endif /* GLX_NV_video_output */ #endif /* GLX_NV_video_out */
/* -------------------------- GLX_OML_swap_method -------------------------- */ /* -------------------------- GLX_OML_swap_method -------------------------- */
@ -799,8 +1012,7 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
/* -------------------------- GLX_OML_sync_control ------------------------- */ /* -------------------------- GLX_OML_sync_control ------------------------- */
#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) #ifndef GLX_OML_sync_control
#include <inttypes.h>
#define GLX_OML_sync_control 1 #define GLX_OML_sync_control 1
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator); typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
@ -1137,7 +1349,7 @@ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#ifndef GLX_SGI_video_sync #ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1 #define GLX_SGI_video_sync 1
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (uint* count); typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int* count);
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count); typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count);
#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI) #define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
@ -1181,185 +1393,213 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef GLEW_MX #ifdef GLEW_MX
#define GLXEW_EXPORT #define GLXEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT
#else #else
#define GLXEW_EXPORT extern #define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */ #endif /* GLEW_MX */
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay; GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig; GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext; GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer; GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap; GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow; GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer; GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap; GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow; GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable; GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib; GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs; GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent; GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig; GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent; GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext; GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable; GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent; GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB; GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI; GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI; GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI; GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT; GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT; GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT; GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT; GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT; GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA; GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA; GLXEW_FUN_EXPORT PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
extern PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA; GLXEW_FUN_EXPORT PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA; GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA; GLXEW_FUN_EXPORT PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV; GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV; GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV; GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV; GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV; GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV; GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
#ifdef GLX_OML_sync_control GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML; GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML; GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML; GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML; GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML; GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
#endif
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX; GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX; GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX; GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX; GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX; GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX; GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX; GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX; GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX; GLXEW_FUN_EXPORT PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
GLXEW_FUN_EXPORT PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
extern PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX; GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX; GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX; GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX; GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX; GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX; GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXCUSHIONSGIPROC __glewXCushionSGI; GLXEW_FUN_EXPORT PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
extern PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI; GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI; GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI; GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI; GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI; GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
extern PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN; GLXEW_FUN_EXPORT PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
extern PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN; GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN; GLXEW_FUN_EXPORT PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
GLXEW_FUN_EXPORT PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
GLXEW_FUN_EXPORT PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
GLXEW_FUN_EXPORT PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
#if defined(GLEW_MX) #if defined(GLEW_MX)
struct GLXEWContextStruct struct GLXEWContextStruct
{ {
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context; GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap; GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info; GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method; GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control; GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync; GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index; GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize; GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_color_range;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_video_resize;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_cushion;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_make_current_read;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_swap_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_video_sync;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX #ifdef GLEW_MX
}; /* GLXEWContextStruct */ }; /* GLXEWContextStruct */
@ -1370,8 +1610,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX #ifdef GLEW_MX
typedef struct GLXEWContextStruct GLXEWContext; typedef struct GLXEWContextStruct GLXEWContext;
extern GLenum glxewContextInit (GLXEWContext* ctx); GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
#define glxewInit() glxewContextInit(glxewGetContext()) #define glxewInit() glxewContextInit(glxewGetContext())
#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x) #define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
@ -1384,11 +1624,11 @@ extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x) #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLXEW_GET_FUN(x) x #define GLXEW_GET_FUN(x) x
extern GLboolean glxewIsSupported (const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
extern GLboolean glxewGetExtension (const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -62,11 +62,12 @@
#define __wglext_h_ #define __wglext_h_
#if !defined(APIENTRY) && !defined(__CYGWIN__) #if !defined(WINAPI)
# ifndef WIN32_LEAN_AND_MEAN # ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1 # define WIN32_LEAN_AND_MEAN 1
# endif # endif
#include <windows.h> #include <windows.h>
# undef WIN32_LEAN_AND_MEAN
#endif #endif
/* /*
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
#endif /* WGL_3DL_stereo_control */ #endif /* WGL_3DL_stereo_control */
/* ------------------------ WGL_AMD_gpu_association ------------------------ */
#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 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);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int* attribList);
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT* ids);
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void* data);
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
#define wglBlitContextFramebufferAMD WGLEW_GET_FUN(__wglewBlitContextFramebufferAMD)
#define wglCreateAssociatedContextAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAMD)
#define wglCreateAssociatedContextAttribsAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAttribsAMD)
#define wglDeleteAssociatedContextAMD WGLEW_GET_FUN(__wglewDeleteAssociatedContextAMD)
#define wglGetContextGPUIDAMD WGLEW_GET_FUN(__wglewGetContextGPUIDAMD)
#define wglGetCurrentAssociatedContextAMD WGLEW_GET_FUN(__wglewGetCurrentAssociatedContextAMD)
#define wglGetGPUIDsAMD WGLEW_GET_FUN(__wglewGetGPUIDsAMD)
#define wglGetGPUInfoAMD WGLEW_GET_FUN(__wglewGetGPUInfoAMD)
#define wglMakeAssociatedContextCurrentAMD WGLEW_GET_FUN(__wglewMakeAssociatedContextCurrentAMD)
#define WGLEW_AMD_gpu_association WGLEW_GET_VAR(__WGLEW_AMD_gpu_association)
#endif /* WGL_AMD_gpu_association */
/* ------------------------- WGL_ARB_buffer_region ------------------------- */ /* ------------------------- WGL_ARB_buffer_region ------------------------- */
#ifndef WGL_ARB_buffer_region #ifndef WGL_ARB_buffer_region
@ -152,6 +193,8 @@ typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, in
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_FLAGS_ARB 0x2094 #define WGL_CONTEXT_FLAGS_ARB 0x2094
#define ERROR_INVALID_VERSION_ARB 0x2095
#define ERROR_INVALID_PROFILE_ARB 0x2096
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList); typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList);
@ -161,6 +204,33 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
#endif /* WGL_ARB_create_context */ #endif /* WGL_ARB_create_context */
/* --------------------- WGL_ARB_create_context_profile -------------------- */
#ifndef WGL_ARB_create_context_profile
#define WGL_ARB_create_context_profile 1
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGLEW_ARB_create_context_profile WGLEW_GET_VAR(__WGLEW_ARB_create_context_profile)
#endif /* WGL_ARB_create_context_profile */
/* ------------------- WGL_ARB_create_context_robustness ------------------- */
#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
#define WGLEW_ARB_create_context_robustness WGLEW_GET_VAR(__WGLEW_ARB_create_context_robustness)
#endif /* WGL_ARB_create_context_robustness */
/* ----------------------- WGL_ARB_extensions_string ----------------------- */ /* ----------------------- WGL_ARB_extensions_string ----------------------- */
#ifndef WGL_ARB_extensions_string #ifndef WGL_ARB_extensions_string
@ -400,6 +470,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
#endif /* WGL_ATI_render_texture_rectangle */ #endif /* WGL_ATI_render_texture_rectangle */
/* ------------------- WGL_EXT_create_context_es2_profile ------------------ */
#ifndef WGL_EXT_create_context_es2_profile
#define WGL_EXT_create_context_es2_profile 1
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es2_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es2_profile)
#endif /* WGL_EXT_create_context_es2_profile */
/* ------------------- WGL_EXT_create_context_es_profile ------------------- */
#ifndef WGL_EXT_create_context_es_profile
#define WGL_EXT_create_context_es_profile 1
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es_profile)
#endif /* WGL_EXT_create_context_es_profile */
/* -------------------------- WGL_EXT_depth_float -------------------------- */ /* -------------------------- WGL_EXT_depth_float -------------------------- */
#ifndef WGL_EXT_depth_float #ifndef WGL_EXT_depth_float
@ -605,6 +697,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
#endif /* WGL_EXT_swap_control */ #endif /* WGL_EXT_swap_control */
/* ----------------------- WGL_EXT_swap_control_tear ----------------------- */
#ifndef WGL_EXT_swap_control_tear
#define WGL_EXT_swap_control_tear 1
#define WGLEW_EXT_swap_control_tear WGLEW_GET_VAR(__WGLEW_EXT_swap_control_tear)
#endif /* WGL_EXT_swap_control_tear */
/* --------------------- WGL_I3D_digital_video_control --------------------- */ /* --------------------- WGL_I3D_digital_video_control --------------------- */
#ifndef WGL_I3D_digital_video_control #ifndef WGL_I3D_digital_video_control
@ -752,6 +853,59 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
#endif /* WGL_I3D_swap_frame_usage */ #endif /* WGL_I3D_swap_frame_usage */
/* --------------------------- WGL_NV_DX_interop --------------------------- */
#ifndef WGL_NV_DX_interop
#define WGL_NV_DX_interop 1
#define WGL_ACCESS_READ_ONLY_NV 0x0000
#define WGL_ACCESS_READ_WRITE_NV 0x0001
#define WGL_ACCESS_WRITE_DISCARD_NV 0x0002
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void* dxDevice);
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void* dxObject, HANDLE shareHandle);
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
#define wglDXCloseDeviceNV WGLEW_GET_FUN(__wglewDXCloseDeviceNV)
#define wglDXLockObjectsNV WGLEW_GET_FUN(__wglewDXLockObjectsNV)
#define wglDXObjectAccessNV WGLEW_GET_FUN(__wglewDXObjectAccessNV)
#define wglDXOpenDeviceNV WGLEW_GET_FUN(__wglewDXOpenDeviceNV)
#define wglDXRegisterObjectNV WGLEW_GET_FUN(__wglewDXRegisterObjectNV)
#define wglDXSetResourceShareHandleNV WGLEW_GET_FUN(__wglewDXSetResourceShareHandleNV)
#define wglDXUnlockObjectsNV WGLEW_GET_FUN(__wglewDXUnlockObjectsNV)
#define wglDXUnregisterObjectNV WGLEW_GET_FUN(__wglewDXUnregisterObjectNV)
#define WGLEW_NV_DX_interop WGLEW_GET_VAR(__WGLEW_NV_DX_interop)
#endif /* WGL_NV_DX_interop */
/* --------------------------- WGL_NV_DX_interop2 -------------------------- */
#ifndef WGL_NV_DX_interop2
#define WGL_NV_DX_interop2 1
#define WGLEW_NV_DX_interop2 WGLEW_GET_VAR(__WGLEW_NV_DX_interop2)
#endif /* WGL_NV_DX_interop2 */
/* --------------------------- WGL_NV_copy_image --------------------------- */
#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);
#define wglCopyImageSubDataNV WGLEW_GET_FUN(__wglewCopyImageSubDataNV)
#define WGLEW_NV_copy_image WGLEW_GET_VAR(__WGLEW_NV_copy_image)
#endif /* WGL_NV_copy_image */
/* -------------------------- WGL_NV_float_buffer -------------------------- */ /* -------------------------- WGL_NV_float_buffer -------------------------- */
#ifndef WGL_NV_float_buffer #ifndef WGL_NV_float_buffer
@ -804,6 +958,18 @@ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
#endif /* WGL_NV_gpu_affinity */ #endif /* WGL_NV_gpu_affinity */
/* ---------------------- WGL_NV_multisample_coverage ---------------------- */
#ifndef WGL_NV_multisample_coverage
#define WGL_NV_multisample_coverage 1
#define WGL_COVERAGE_SAMPLES_NV 0x2042
#define WGL_COLOR_SAMPLES_NV 0x20B9
#define WGLEW_NV_multisample_coverage WGLEW_GET_VAR(__WGLEW_NV_multisample_coverage)
#endif /* WGL_NV_multisample_coverage */
/* -------------------------- WGL_NV_present_video ------------------------- */ /* -------------------------- WGL_NV_present_video ------------------------- */
#ifndef WGL_NV_present_video #ifndef WGL_NV_present_video
@ -863,7 +1029,7 @@ typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrie
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count); typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers); typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers);
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group); typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group, GLuint *barrier);
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV) #define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
@ -892,6 +1058,32 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
#endif /* WGL_NV_vertex_array_range */ #endif /* WGL_NV_vertex_array_range */
/* -------------------------- WGL_NV_video_capture ------------------------- */
#ifndef WGL_NV_video_capture
#define WGL_NV_video_capture 1
#define WGL_UNIQUE_ID_NV 0x20CE
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
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);
#define wglBindVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewBindVideoCaptureDeviceNV)
#define wglEnumerateVideoCaptureDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoCaptureDevicesNV)
#define wglLockVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewLockVideoCaptureDeviceNV)
#define wglQueryVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewQueryVideoCaptureDeviceNV)
#define wglReleaseVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoCaptureDeviceNV)
#define WGLEW_NV_video_capture WGLEW_GET_VAR(__WGLEW_NV_video_capture)
#endif /* WGL_NV_video_capture */
/* -------------------------- WGL_NV_video_output -------------------------- */ /* -------------------------- WGL_NV_video_output -------------------------- */
#ifndef WGL_NV_video_output #ifndef WGL_NV_video_output
@ -957,9 +1149,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef GLEW_MX #ifdef GLEW_MX
#define WGLEW_EXPORT #define WGLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT
#else #else
#define WGLEW_EXPORT GLEWAPI #define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */ #endif /* GLEW_MX */
#ifdef GLEW_MX #ifdef GLEW_MX
@ -967,165 +1161,203 @@ struct WGLEWContextStruct
{ {
#endif /* GLEW_MX */ #endif /* GLEW_MX */
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL; WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
WGLEW_FUN_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
WGLEW_FUN_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
WGLEW_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB; WGLEW_FUN_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB; WGLEW_FUN_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB; WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB; WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB; WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB; WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB; WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB; WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB; WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT; WGLEW_FUN_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT; WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT; WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT; WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT; WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT; WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT; WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT; WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D; WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D; WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D; WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D; WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D; WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D; WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D; WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D; WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D; WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D; WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D; WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D; WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_FUN_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D; WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D; WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV; WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV; WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV; WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV; WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV; WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV; WGLEW_FUN_EXPORT PFNWGLDXOBJECTACCESSNVPROC __wglewDXObjectAccessNV;
WGLEW_FUN_EXPORT PFNWGLDXOPENDEVICENVPROC __wglewDXOpenDeviceNV;
WGLEW_FUN_EXPORT PFNWGLDXREGISTEROBJECTNVPROC __wglewDXRegisterObjectNV;
WGLEW_FUN_EXPORT PFNWGLDXSETRESOURCESHAREHANDLENVPROC __wglewDXSetResourceShareHandleNV;
WGLEW_FUN_EXPORT PFNWGLDXUNLOCKOBJECTSNVPROC __wglewDXUnlockObjectsNV;
WGLEW_FUN_EXPORT PFNWGLDXUNREGISTEROBJECTNVPROC __wglewDXUnregisterObjectNV;
WGLEW_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV; WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
WGLEW_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV; WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV; WGLEW_FUN_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV; WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
WGLEW_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV; WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV; WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML; WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML; WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML; WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control; WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region; WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string; WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB; WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read; WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample; WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float; WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture; WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float; WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table; WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB; WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read; WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample; WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer; WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format; WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float; WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma; WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_depth_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_display_color_table;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_make_current_read;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_multisample;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pbuffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control_tear;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_gamma;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_genlock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_image_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop2;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_copy_image;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_float_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_multisample_coverage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_present_video;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_swap_group;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_capture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_output;
WGLEW_VAR_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX #ifdef GLEW_MX
}; /* WGLEWContextStruct */ }; /* WGLEWContextStruct */
@ -1136,8 +1368,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX #ifdef GLEW_MX
typedef struct WGLEWContextStruct WGLEWContext; typedef struct WGLEWContextStruct WGLEWContext;
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx); GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
#define wglewInit() wglewContextInit(wglewGetContext()) #define wglewInit() wglewContextInit(wglewGetContext())
#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x) #define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
@ -1150,11 +1382,11 @@ GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
#define WGLEW_GET_FUN(x) x #define WGLEW_GET_FUN(x) x
GLEWAPI GLboolean wglewIsSupported (const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLEWAPI GLboolean wglewGetExtension (const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -59,7 +59,7 @@ IF(MSVC)
SET_TARGET_PROPERTIES(SmoothLODExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127") #All warnings SET_TARGET_PROPERTIES(SmoothLODExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127") #All warnings
ENDIF(MSVC) ENDIF(MSVC)
TARGET_LINK_LIBRARIES(SmoothLODExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore) TARGET_LINK_LIBRARIES(SmoothLODExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore)
SET_PROPERTY(TARGET SmoothLODExample PROPERTY FOLDER "examples/SmoothLOD") SET_PROPERTY(TARGET SmoothLODExample PROPERTY FOLDER "Examples")
#Install - Only install the example in Windows #Install - Only install the example in Windows
IF(WIN32) IF(WIN32)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -83,13 +83,16 @@
#ifdef __glxext_h_ #ifdef __glxext_h_
#error glxext.h included before glxew.h #error glxext.h included before glxew.h
#endif #endif
#ifdef GLX_H
#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
#error glx.h included before glxew.h #error glx.h included before glxew.h
#endif #endif
#define __glxext_h_ #define __glxext_h_
#define __GLX_glx_h__
#define GLX_H #define GLX_H
#define __GLX_glx_h__
#define __glx_h__
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@ -255,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
#define GLX_DONT_CARE 0xFFFFFFFF #define GLX_DONT_CARE 0xFFFFFFFF
typedef XID GLXFBConfigID; typedef XID GLXFBConfigID;
typedef XID GLXWindow;
typedef XID GLXPbuffer; typedef XID GLXPbuffer;
typedef XID GLXWindow;
typedef struct __GLXFBConfigRec *GLXFBConfig; typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef struct { typedef struct {
@ -343,6 +346,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
#endif /* GLX_3DFX_multisample */ #endif /* GLX_3DFX_multisample */
/* ------------------------ GLX_AMD_gpu_association ------------------------ */
#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
#define GLXEW_AMD_gpu_association GLXEW_GET_VAR(__GLXEW_AMD_gpu_association)
#endif /* GLX_AMD_gpu_association */
/* ------------------------- GLX_ARB_create_context ------------------------ */ /* ------------------------- GLX_ARB_create_context ------------------------ */
#ifndef GLX_ARB_create_context #ifndef GLX_ARB_create_context
@ -362,6 +385,33 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
#endif /* GLX_ARB_create_context */ #endif /* GLX_ARB_create_context */
/* --------------------- GLX_ARB_create_context_profile -------------------- */
#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
#define GLXEW_ARB_create_context_profile GLXEW_GET_VAR(__GLXEW_ARB_create_context_profile)
#endif /* GLX_ARB_create_context_profile */
/* ------------------- GLX_ARB_create_context_robustness ------------------- */
#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
#define GLXEW_ARB_create_context_robustness GLXEW_GET_VAR(__GLXEW_ARB_create_context_robustness)
#endif /* GLX_ARB_create_context_robustness */
/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */ /* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
#ifndef GLX_ARB_fbconfig_float #ifndef GLX_ARB_fbconfig_float
@ -408,6 +458,39 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
#endif /* GLX_ARB_multisample */ #endif /* GLX_ARB_multisample */
/* ---------------- GLX_ARB_robustness_application_isolation --------------- */
#ifndef GLX_ARB_robustness_application_isolation
#define GLX_ARB_robustness_application_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_application_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_application_isolation)
#endif /* GLX_ARB_robustness_application_isolation */
/* ---------------- GLX_ARB_robustness_share_group_isolation --------------- */
#ifndef GLX_ARB_robustness_share_group_isolation
#define GLX_ARB_robustness_share_group_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_share_group_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_share_group_isolation)
#endif /* GLX_ARB_robustness_share_group_isolation */
/* ---------------------- GLX_ARB_vertex_buffer_object --------------------- */
#ifndef GLX_ARB_vertex_buffer_object
#define GLX_ARB_vertex_buffer_object 1
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
#define GLXEW_ARB_vertex_buffer_object GLXEW_GET_VAR(__GLXEW_ARB_vertex_buffer_object)
#endif /* GLX_ARB_vertex_buffer_object */
/* ----------------------- GLX_ATI_pixel_format_float ---------------------- */ /* ----------------------- GLX_ATI_pixel_format_float ---------------------- */
#ifndef GLX_ATI_pixel_format_float #ifndef GLX_ATI_pixel_format_float
@ -472,6 +555,28 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
#endif /* GLX_ATI_render_texture */ #endif /* GLX_ATI_render_texture */
/* ------------------- GLX_EXT_create_context_es2_profile ------------------ */
#ifndef GLX_EXT_create_context_es2_profile
#define GLX_EXT_create_context_es2_profile 1
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es2_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es2_profile)
#endif /* GLX_EXT_create_context_es2_profile */
/* ------------------- GLX_EXT_create_context_es_profile ------------------- */
#ifndef GLX_EXT_create_context_es_profile
#define GLX_EXT_create_context_es_profile 1
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es_profile)
#endif /* GLX_EXT_create_context_es_profile */
/* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */ /* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
#ifndef GLX_EXT_fbconfig_packed_float #ifndef GLX_EXT_fbconfig_packed_float
@ -529,6 +634,33 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
#endif /* GLX_EXT_scene_marker */ #endif /* GLX_EXT_scene_marker */
/* -------------------------- GLX_EXT_swap_control ------------------------- */
#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);
#define glXSwapIntervalEXT GLXEW_GET_FUN(__glewXSwapIntervalEXT)
#define GLXEW_EXT_swap_control GLXEW_GET_VAR(__GLXEW_EXT_swap_control)
#endif /* GLX_EXT_swap_control */
/* ----------------------- GLX_EXT_swap_control_tear ----------------------- */
#ifndef GLX_EXT_swap_control_tear
#define GLX_EXT_swap_control_tear 1
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
#define GLXEW_EXT_swap_control_tear GLXEW_GET_VAR(__GLXEW_EXT_swap_control_tear)
#endif /* GLX_EXT_swap_control_tear */
/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */ /* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
#ifndef GLX_EXT_texture_from_pixmap #ifndef GLX_EXT_texture_from_pixmap
@ -615,6 +747,20 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable dr
#endif /* GLX_EXT_visual_rating */ #endif /* GLX_EXT_visual_rating */
/* -------------------------- GLX_INTEL_swap_event ------------------------- */
#ifndef GLX_INTEL_swap_event
#define GLX_INTEL_swap_event 1
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
#define GLX_COPY_COMPLETE_INTEL 0x8181
#define GLX_FLIP_COMPLETE_INTEL 0x8182
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
#define GLXEW_INTEL_swap_event GLXEW_GET_VAR(__GLXEW_INTEL_swap_event)
#endif /* GLX_INTEL_swap_event */
/* -------------------------- GLX_MESA_agp_offset -------------------------- */ /* -------------------------- GLX_MESA_agp_offset -------------------------- */
#ifndef GLX_MESA_agp_offset #ifndef GLX_MESA_agp_offset
@ -683,6 +829,34 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_MESA_set_3dfx_mode */ #endif /* GLX_MESA_set_3dfx_mode */
/* ------------------------- GLX_MESA_swap_control ------------------------- */
#ifndef GLX_MESA_swap_control
#define GLX_MESA_swap_control 1
typedef int ( * PFNGLXGETSWAPINTERVALMESAPROC) (void);
typedef int ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval);
#define glXGetSwapIntervalMESA GLXEW_GET_FUN(__glewXGetSwapIntervalMESA)
#define glXSwapIntervalMESA GLXEW_GET_FUN(__glewXSwapIntervalMESA)
#define GLXEW_MESA_swap_control GLXEW_GET_VAR(__GLXEW_MESA_swap_control)
#endif /* GLX_MESA_swap_control */
/* --------------------------- GLX_NV_copy_image --------------------------- */
#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);
#define glXCopyImageSubDataNV GLXEW_GET_FUN(__glewXCopyImageSubDataNV)
#define GLXEW_NV_copy_image GLXEW_GET_VAR(__GLXEW_NV_copy_image)
#endif /* GLX_NV_copy_image */
/* -------------------------- GLX_NV_float_buffer -------------------------- */ /* -------------------------- GLX_NV_float_buffer -------------------------- */
#ifndef GLX_NV_float_buffer #ifndef GLX_NV_float_buffer
@ -694,6 +868,18 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_NV_float_buffer */ #endif /* GLX_NV_float_buffer */
/* ---------------------- GLX_NV_multisample_coverage ---------------------- */
#ifndef GLX_NV_multisample_coverage
#define GLX_NV_multisample_coverage 1
#define GLX_COLOR_SAMPLES_NV 0x20B3
#define GLX_COVERAGE_SAMPLES_NV 100001
#define GLXEW_NV_multisample_coverage GLXEW_GET_VAR(__GLXEW_NV_multisample_coverage)
#endif /* GLX_NV_multisample_coverage */
/* -------------------------- GLX_NV_present_video ------------------------- */ /* -------------------------- GLX_NV_present_video ------------------------- */
#ifndef GLX_NV_present_video #ifndef GLX_NV_present_video
@ -749,10 +935,37 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
#endif /* GLX_NV_vertex_array_range */ #endif /* GLX_NV_vertex_array_range */
/* -------------------------- GLX_NV_video_output -------------------------- */ /* -------------------------- GLX_NV_video_capture ------------------------- */
#ifndef GLX_NV_video_output #ifndef GLX_NV_video_capture
#define GLX_NV_video_output 1 #define GLX_NV_video_capture 1
#define GLX_DEVICE_ID_NV 0x20CD
#define GLX_UNIQUE_ID_NV 0x20CE
#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
typedef XID GLXVideoCaptureDeviceNV;
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);
#define glXBindVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXBindVideoCaptureDeviceNV)
#define glXEnumerateVideoCaptureDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoCaptureDevicesNV)
#define glXLockVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXLockVideoCaptureDeviceNV)
#define glXQueryVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXQueryVideoCaptureDeviceNV)
#define glXReleaseVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoCaptureDeviceNV)
#define GLXEW_NV_video_capture GLXEW_GET_VAR(__GLXEW_NV_video_capture)
#endif /* GLX_NV_video_capture */
/* ---------------------------- GLX_NV_video_out --------------------------- */
#ifndef GLX_NV_video_out
#define GLX_NV_video_out 1
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 #define GLX_VIDEO_OUT_COLOR_NV 0x20C3
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
@ -779,9 +992,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV) #define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
#define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV) #define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV)
#define GLXEW_NV_video_output GLXEW_GET_VAR(__GLXEW_NV_video_output) #define GLXEW_NV_video_out GLXEW_GET_VAR(__GLXEW_NV_video_out)
#endif /* GLX_NV_video_output */ #endif /* GLX_NV_video_out */
/* -------------------------- GLX_OML_swap_method -------------------------- */ /* -------------------------- GLX_OML_swap_method -------------------------- */
@ -799,8 +1012,7 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
/* -------------------------- GLX_OML_sync_control ------------------------- */ /* -------------------------- GLX_OML_sync_control ------------------------- */
#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) #ifndef GLX_OML_sync_control
#include <inttypes.h>
#define GLX_OML_sync_control 1 #define GLX_OML_sync_control 1
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator); typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
@ -1137,7 +1349,7 @@ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#ifndef GLX_SGI_video_sync #ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1 #define GLX_SGI_video_sync 1
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (uint* count); typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int* count);
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count); typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count);
#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI) #define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
@ -1181,185 +1393,213 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef GLEW_MX #ifdef GLEW_MX
#define GLXEW_EXPORT #define GLXEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT
#else #else
#define GLXEW_EXPORT extern #define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */ #endif /* GLEW_MX */
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay; GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig; GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext; GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer; GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap; GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow; GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer; GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap; GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow; GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable; GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib; GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs; GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent; GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig; GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent; GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext; GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable; GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent; GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB; GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI; GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI; GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI; GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT; GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT; GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT; GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT; GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT; GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA; GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA; GLXEW_FUN_EXPORT PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
extern PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA; GLXEW_FUN_EXPORT PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA; GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA; GLXEW_FUN_EXPORT PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV; GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV; GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV; GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV; GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV; GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV; GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
#ifdef GLX_OML_sync_control GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML; GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML; GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML; GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML; GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML; GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
#endif
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX; GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX; GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX; GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX; GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX; GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX; GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX; GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX; GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX; GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX; GLXEW_FUN_EXPORT PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
GLXEW_FUN_EXPORT PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
extern PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX; GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX; GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX; GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX; GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX; GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX; GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXCUSHIONSGIPROC __glewXCushionSGI; GLXEW_FUN_EXPORT PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
extern PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI; GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI; GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI; GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI; GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI; GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
extern PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN; GLXEW_FUN_EXPORT PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
extern PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN; GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN; GLXEW_FUN_EXPORT PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
GLXEW_FUN_EXPORT PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
GLXEW_FUN_EXPORT PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
GLXEW_FUN_EXPORT PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
#if defined(GLEW_MX) #if defined(GLEW_MX)
struct GLXEWContextStruct struct GLXEWContextStruct
{ {
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4; GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context; GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker; GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap; GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info; GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output; GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method; GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig; GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read; GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control; GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync; GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index; GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize; GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_color_range;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_video_resize;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_cushion;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_make_current_read;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_swap_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_video_sync;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX #ifdef GLEW_MX
}; /* GLXEWContextStruct */ }; /* GLXEWContextStruct */
@ -1370,8 +1610,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX #ifdef GLEW_MX
typedef struct GLXEWContextStruct GLXEWContext; typedef struct GLXEWContextStruct GLXEWContext;
extern GLenum glxewContextInit (GLXEWContext* ctx); GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
#define glxewInit() glxewContextInit(glxewGetContext()) #define glxewInit() glxewContextInit(glxewGetContext())
#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x) #define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
@ -1384,11 +1624,11 @@ extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x) #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLXEW_GET_FUN(x) x #define GLXEW_GET_FUN(x) x
extern GLboolean glxewIsSupported (const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
extern GLboolean glxewGetExtension (const char* name); GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -62,11 +62,12 @@
#define __wglext_h_ #define __wglext_h_
#if !defined(APIENTRY) && !defined(__CYGWIN__) #if !defined(WINAPI)
# ifndef WIN32_LEAN_AND_MEAN # ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1 # define WIN32_LEAN_AND_MEAN 1
# endif # endif
#include <windows.h> #include <windows.h>
# undef WIN32_LEAN_AND_MEAN
#endif #endif
/* /*
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
#endif /* WGL_3DL_stereo_control */ #endif /* WGL_3DL_stereo_control */
/* ------------------------ WGL_AMD_gpu_association ------------------------ */
#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 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);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int* attribList);
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT* ids);
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void* data);
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
#define wglBlitContextFramebufferAMD WGLEW_GET_FUN(__wglewBlitContextFramebufferAMD)
#define wglCreateAssociatedContextAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAMD)
#define wglCreateAssociatedContextAttribsAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAttribsAMD)
#define wglDeleteAssociatedContextAMD WGLEW_GET_FUN(__wglewDeleteAssociatedContextAMD)
#define wglGetContextGPUIDAMD WGLEW_GET_FUN(__wglewGetContextGPUIDAMD)
#define wglGetCurrentAssociatedContextAMD WGLEW_GET_FUN(__wglewGetCurrentAssociatedContextAMD)
#define wglGetGPUIDsAMD WGLEW_GET_FUN(__wglewGetGPUIDsAMD)
#define wglGetGPUInfoAMD WGLEW_GET_FUN(__wglewGetGPUInfoAMD)
#define wglMakeAssociatedContextCurrentAMD WGLEW_GET_FUN(__wglewMakeAssociatedContextCurrentAMD)
#define WGLEW_AMD_gpu_association WGLEW_GET_VAR(__WGLEW_AMD_gpu_association)
#endif /* WGL_AMD_gpu_association */
/* ------------------------- WGL_ARB_buffer_region ------------------------- */ /* ------------------------- WGL_ARB_buffer_region ------------------------- */
#ifndef WGL_ARB_buffer_region #ifndef WGL_ARB_buffer_region
@ -152,6 +193,8 @@ typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, in
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_FLAGS_ARB 0x2094 #define WGL_CONTEXT_FLAGS_ARB 0x2094
#define ERROR_INVALID_VERSION_ARB 0x2095
#define ERROR_INVALID_PROFILE_ARB 0x2096
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList); typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList);
@ -161,6 +204,33 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
#endif /* WGL_ARB_create_context */ #endif /* WGL_ARB_create_context */
/* --------------------- WGL_ARB_create_context_profile -------------------- */
#ifndef WGL_ARB_create_context_profile
#define WGL_ARB_create_context_profile 1
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGLEW_ARB_create_context_profile WGLEW_GET_VAR(__WGLEW_ARB_create_context_profile)
#endif /* WGL_ARB_create_context_profile */
/* ------------------- WGL_ARB_create_context_robustness ------------------- */
#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
#define WGLEW_ARB_create_context_robustness WGLEW_GET_VAR(__WGLEW_ARB_create_context_robustness)
#endif /* WGL_ARB_create_context_robustness */
/* ----------------------- WGL_ARB_extensions_string ----------------------- */ /* ----------------------- WGL_ARB_extensions_string ----------------------- */
#ifndef WGL_ARB_extensions_string #ifndef WGL_ARB_extensions_string
@ -400,6 +470,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
#endif /* WGL_ATI_render_texture_rectangle */ #endif /* WGL_ATI_render_texture_rectangle */
/* ------------------- WGL_EXT_create_context_es2_profile ------------------ */
#ifndef WGL_EXT_create_context_es2_profile
#define WGL_EXT_create_context_es2_profile 1
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es2_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es2_profile)
#endif /* WGL_EXT_create_context_es2_profile */
/* ------------------- WGL_EXT_create_context_es_profile ------------------- */
#ifndef WGL_EXT_create_context_es_profile
#define WGL_EXT_create_context_es_profile 1
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es_profile)
#endif /* WGL_EXT_create_context_es_profile */
/* -------------------------- WGL_EXT_depth_float -------------------------- */ /* -------------------------- WGL_EXT_depth_float -------------------------- */
#ifndef WGL_EXT_depth_float #ifndef WGL_EXT_depth_float
@ -605,6 +697,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
#endif /* WGL_EXT_swap_control */ #endif /* WGL_EXT_swap_control */
/* ----------------------- WGL_EXT_swap_control_tear ----------------------- */
#ifndef WGL_EXT_swap_control_tear
#define WGL_EXT_swap_control_tear 1
#define WGLEW_EXT_swap_control_tear WGLEW_GET_VAR(__WGLEW_EXT_swap_control_tear)
#endif /* WGL_EXT_swap_control_tear */
/* --------------------- WGL_I3D_digital_video_control --------------------- */ /* --------------------- WGL_I3D_digital_video_control --------------------- */
#ifndef WGL_I3D_digital_video_control #ifndef WGL_I3D_digital_video_control
@ -752,6 +853,59 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
#endif /* WGL_I3D_swap_frame_usage */ #endif /* WGL_I3D_swap_frame_usage */
/* --------------------------- WGL_NV_DX_interop --------------------------- */
#ifndef WGL_NV_DX_interop
#define WGL_NV_DX_interop 1
#define WGL_ACCESS_READ_ONLY_NV 0x0000
#define WGL_ACCESS_READ_WRITE_NV 0x0001
#define WGL_ACCESS_WRITE_DISCARD_NV 0x0002
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void* dxDevice);
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void* dxObject, HANDLE shareHandle);
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
#define wglDXCloseDeviceNV WGLEW_GET_FUN(__wglewDXCloseDeviceNV)
#define wglDXLockObjectsNV WGLEW_GET_FUN(__wglewDXLockObjectsNV)
#define wglDXObjectAccessNV WGLEW_GET_FUN(__wglewDXObjectAccessNV)
#define wglDXOpenDeviceNV WGLEW_GET_FUN(__wglewDXOpenDeviceNV)
#define wglDXRegisterObjectNV WGLEW_GET_FUN(__wglewDXRegisterObjectNV)
#define wglDXSetResourceShareHandleNV WGLEW_GET_FUN(__wglewDXSetResourceShareHandleNV)
#define wglDXUnlockObjectsNV WGLEW_GET_FUN(__wglewDXUnlockObjectsNV)
#define wglDXUnregisterObjectNV WGLEW_GET_FUN(__wglewDXUnregisterObjectNV)
#define WGLEW_NV_DX_interop WGLEW_GET_VAR(__WGLEW_NV_DX_interop)
#endif /* WGL_NV_DX_interop */
/* --------------------------- WGL_NV_DX_interop2 -------------------------- */
#ifndef WGL_NV_DX_interop2
#define WGL_NV_DX_interop2 1
#define WGLEW_NV_DX_interop2 WGLEW_GET_VAR(__WGLEW_NV_DX_interop2)
#endif /* WGL_NV_DX_interop2 */
/* --------------------------- WGL_NV_copy_image --------------------------- */
#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);
#define wglCopyImageSubDataNV WGLEW_GET_FUN(__wglewCopyImageSubDataNV)
#define WGLEW_NV_copy_image WGLEW_GET_VAR(__WGLEW_NV_copy_image)
#endif /* WGL_NV_copy_image */
/* -------------------------- WGL_NV_float_buffer -------------------------- */ /* -------------------------- WGL_NV_float_buffer -------------------------- */
#ifndef WGL_NV_float_buffer #ifndef WGL_NV_float_buffer
@ -804,6 +958,18 @@ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
#endif /* WGL_NV_gpu_affinity */ #endif /* WGL_NV_gpu_affinity */
/* ---------------------- WGL_NV_multisample_coverage ---------------------- */
#ifndef WGL_NV_multisample_coverage
#define WGL_NV_multisample_coverage 1
#define WGL_COVERAGE_SAMPLES_NV 0x2042
#define WGL_COLOR_SAMPLES_NV 0x20B9
#define WGLEW_NV_multisample_coverage WGLEW_GET_VAR(__WGLEW_NV_multisample_coverage)
#endif /* WGL_NV_multisample_coverage */
/* -------------------------- WGL_NV_present_video ------------------------- */ /* -------------------------- WGL_NV_present_video ------------------------- */
#ifndef WGL_NV_present_video #ifndef WGL_NV_present_video
@ -863,7 +1029,7 @@ typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrie
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count); typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers); typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers);
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group); typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group, GLuint *barrier);
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV) #define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
@ -892,6 +1058,32 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
#endif /* WGL_NV_vertex_array_range */ #endif /* WGL_NV_vertex_array_range */
/* -------------------------- WGL_NV_video_capture ------------------------- */
#ifndef WGL_NV_video_capture
#define WGL_NV_video_capture 1
#define WGL_UNIQUE_ID_NV 0x20CE
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
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);
#define wglBindVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewBindVideoCaptureDeviceNV)
#define wglEnumerateVideoCaptureDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoCaptureDevicesNV)
#define wglLockVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewLockVideoCaptureDeviceNV)
#define wglQueryVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewQueryVideoCaptureDeviceNV)
#define wglReleaseVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoCaptureDeviceNV)
#define WGLEW_NV_video_capture WGLEW_GET_VAR(__WGLEW_NV_video_capture)
#endif /* WGL_NV_video_capture */
/* -------------------------- WGL_NV_video_output -------------------------- */ /* -------------------------- WGL_NV_video_output -------------------------- */
#ifndef WGL_NV_video_output #ifndef WGL_NV_video_output
@ -957,9 +1149,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef GLEW_MX #ifdef GLEW_MX
#define WGLEW_EXPORT #define WGLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT
#else #else
#define WGLEW_EXPORT GLEWAPI #define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */ #endif /* GLEW_MX */
#ifdef GLEW_MX #ifdef GLEW_MX
@ -967,165 +1161,203 @@ struct WGLEWContextStruct
{ {
#endif /* GLEW_MX */ #endif /* GLEW_MX */
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL; WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB; WGLEW_FUN_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
WGLEW_FUN_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
WGLEW_FUN_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
WGLEW_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB; WGLEW_FUN_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB; WGLEW_FUN_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB; WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB; WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB; WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB; WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB; WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB; WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB; WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT; WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT; WGLEW_FUN_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT; WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT; WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT; WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT; WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT; WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT; WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT; WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT; WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D; WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D; WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D; WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D; WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D; WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D; WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D; WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D; WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D; WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D; WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D; WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D; WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_FUN_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D; WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D; WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D; WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV; WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV; WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV; WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV; WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV; WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV; WGLEW_FUN_EXPORT PFNWGLDXOBJECTACCESSNVPROC __wglewDXObjectAccessNV;
WGLEW_FUN_EXPORT PFNWGLDXOPENDEVICENVPROC __wglewDXOpenDeviceNV;
WGLEW_FUN_EXPORT PFNWGLDXREGISTEROBJECTNVPROC __wglewDXRegisterObjectNV;
WGLEW_FUN_EXPORT PFNWGLDXSETRESOURCESHAREHANDLENVPROC __wglewDXSetResourceShareHandleNV;
WGLEW_FUN_EXPORT PFNWGLDXUNLOCKOBJECTSNVPROC __wglewDXUnlockObjectsNV;
WGLEW_FUN_EXPORT PFNWGLDXUNREGISTEROBJECTNVPROC __wglewDXUnregisterObjectNV;
WGLEW_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV; WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
WGLEW_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV; WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV; WGLEW_FUN_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV; WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
WGLEW_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV; WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV; WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML; WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML; WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML; WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML; WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control; WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region; WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string; WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB; WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read; WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample; WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float; WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture; WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float; WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float; WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table; WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB; WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read; WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample; WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer; WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format; WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float; WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma; WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output; WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control; WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_depth_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_display_color_table;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_make_current_read;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_multisample;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pbuffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control_tear;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_gamma;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_genlock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_image_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop2;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_copy_image;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_float_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_multisample_coverage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_present_video;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_swap_group;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_capture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_output;
WGLEW_VAR_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX #ifdef GLEW_MX
}; /* WGLEWContextStruct */ }; /* WGLEWContextStruct */
@ -1136,8 +1368,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX #ifdef GLEW_MX
typedef struct WGLEWContextStruct WGLEWContext; typedef struct WGLEWContextStruct WGLEWContext;
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx); GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
#define wglewInit() wglewContextInit(wglewGetContext()) #define wglewInit() wglewContextInit(wglewGetContext())
#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x) #define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
@ -1150,11 +1382,11 @@ GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
#define WGLEW_GET_FUN(x) x #define WGLEW_GET_FUN(x) x
GLEWAPI GLboolean wglewIsSupported (const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#endif /* GLEW_MX */ #endif /* GLEW_MX */
GLEWAPI GLboolean wglewGetExtension (const char* name); GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -41,11 +41,11 @@ void createSphereInVolume(SimpleVolume<uint8_t>& volData, float fRadius)
Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2); Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2);
//This three-level for loop iterates over every voxel in the volume //This three-level for loop iterates over every voxel in the volume
for (int z = 0; z < volData.getWidth(); z++) for (int z = 0; z < volData.getDepth(); z++)
{ {
for (int y = 0; y < volData.getHeight(); y++) for (int y = 0; y < volData.getHeight(); y++)
{ {
for (int x = 0; x < volData.getDepth(); x++) for (int x = 0; x < volData.getWidth(); x++)
{ {
//Store our current position as a vector... //Store our current position as a vector...
Vector3DFloat v3dCurrentPos(x,y,z); Vector3DFloat v3dCurrentPos(x,y,z);

View File

@ -59,8 +59,8 @@ if(DOXYGEN_FOUND)
SOURCES Doxyfile.in polyvox.qhcp.in Mainpage.dox SOURCES Doxyfile.in polyvox.qhcp.in Mainpage.dox
VERBATIM VERBATIM
) )
set_target_properties(doc PROPERTIES PROJECT_LABEL "Documentation") #Set label seen in IDE set_target_properties(doc PROPERTIES PROJECT_LABEL "API Reference") #Set label seen in IDE
set_property(TARGET doc PROPERTY FOLDER "library/doc") set_property(TARGET doc PROPERTY FOLDER "Documentation")
#If we found qcollectiongenerator then do more processing #If we found qcollectiongenerator then do more processing
if(QT_QCOLLECTIONGENERATOR_EXECUTABLE) if(QT_QCOLLECTIONGENERATOR_EXECUTABLE)

File diff suppressed because it is too large Load Diff

View File

@ -3,9 +3,7 @@
The PolyVox documentation.\n The PolyVox documentation.\n
For a brief introduction, see the \ref tutorial. See the <a href="../manual/index.html">manual</a> for help and tutorials.
To see how to use CMake with %PolyVox, see \ref cmake.
\author David Williams \author David Williams

View File

@ -28,13 +28,11 @@ PROJECT(PolyVoxCore)
SET(CORE_SRC_FILES SET(CORE_SRC_FILES
source/ArraySizes.cpp source/ArraySizes.cpp
source/AStarPathfinder.cpp source/AStarPathfinder.cpp
source/GradientEstimators.cpp
source/Log.cpp source/Log.cpp
source/MeshDecimator.cpp source/MeshDecimator.cpp
source/Region.cpp source/Region.cpp
source/SimpleInterface.cpp source/SimpleInterface.cpp
source/VertexTypes.cpp source/VertexTypes.cpp
source/VoxelFilters.cpp
) )
#Projects headers files #Projects headers files
@ -59,6 +57,7 @@ SET(CORE_INC_FILES
include/PolyVoxCore/Density.h include/PolyVoxCore/Density.h
include/PolyVoxCore/GradientEstimators.h include/PolyVoxCore/GradientEstimators.h
include/PolyVoxCore/GradientEstimators.inl include/PolyVoxCore/GradientEstimators.inl
include/PolyVoxCore/Interpolation.h
include/PolyVoxCore/IteratorController.h include/PolyVoxCore/IteratorController.h
include/PolyVoxCore/IteratorController.inl include/PolyVoxCore/IteratorController.inl
include/PolyVoxCore/LargeVolume.h include/PolyVoxCore/LargeVolume.h
@ -79,8 +78,6 @@ SET(CORE_INC_FILES
include/PolyVoxCore/RawVolumeSampler.inl include/PolyVoxCore/RawVolumeSampler.inl
include/PolyVoxCore/Raycast.h include/PolyVoxCore/Raycast.h
include/PolyVoxCore/Raycast.inl include/PolyVoxCore/Raycast.inl
include/PolyVoxCore/RaycastWithCallback.h
include/PolyVoxCore/RaycastWithCallback.inl
include/PolyVoxCore/Region.h include/PolyVoxCore/Region.h
include/PolyVoxCore/SimpleInterface.h include/PolyVoxCore/SimpleInterface.h
include/PolyVoxCore/SimpleVolume.h include/PolyVoxCore/SimpleVolume.h
@ -95,28 +92,29 @@ SET(CORE_INC_FILES
include/PolyVoxCore/VolumeResampler.h include/PolyVoxCore/VolumeResampler.h
include/PolyVoxCore/VolumeResampler.inl include/PolyVoxCore/VolumeResampler.inl
include/PolyVoxCore/VoxelFilters.h include/PolyVoxCore/VoxelFilters.h
include/PolyVoxCore/VoxelFilters.inl
) )
SET(IMPL_SRC_FILES SET(IMPL_SRC_FILES
source/PolyVoxImpl/MarchingCubesTables.cpp source/Impl/MarchingCubesTables.cpp
source/PolyVoxImpl/RandomUnitVectors.cpp source/Impl/RandomUnitVectors.cpp
source/PolyVoxImpl/RandomVectors.cpp source/Impl/RandomVectors.cpp
source/PolyVoxImpl/Utility.cpp source/Impl/Utility.cpp
) )
SET(IMPL_INC_FILES SET(IMPL_INC_FILES
include/PolyVoxImpl/ArraySizesImpl.h include/PolyVoxCore/Impl/ArraySizesImpl.h
include/PolyVoxImpl/ArraySizesImpl.inl include/PolyVoxCore/Impl/ArraySizesImpl.inl
include/PolyVoxImpl/AStarPathfinderImpl.h include/PolyVoxCore/Impl/AStarPathfinderImpl.h
include/PolyVoxImpl/Block.h include/PolyVoxCore/Impl/Block.h
include/PolyVoxImpl/Block.inl include/PolyVoxCore/Impl/Block.inl
include/PolyVoxImpl/MarchingCubesTables.h include/PolyVoxCore/Impl/MarchingCubesTables.h
include/PolyVoxImpl/RandomUnitVectors.h include/PolyVoxCore/Impl/RandomUnitVectors.h
include/PolyVoxImpl/RandomVectors.h include/PolyVoxCore/Impl/RandomVectors.h
include/PolyVoxImpl/SubArray.h include/PolyVoxCore/Impl/SubArray.h
include/PolyVoxImpl/SubArray.inl include/PolyVoxCore/Impl/SubArray.inl
include/PolyVoxImpl/TypeDef.h include/PolyVoxCore/Impl/TypeDef.h
include/PolyVoxImpl/Utility.h include/PolyVoxCore/Impl/Utility.h
) )
#NOTE: The following line should be uncommented when building shared libs. #NOTE: The following line should be uncommented when building shared libs.
@ -126,8 +124,8 @@ SET(IMPL_INC_FILES
SOURCE_GROUP("Sources" FILES ${CORE_SRC_FILES}) SOURCE_GROUP("Sources" FILES ${CORE_SRC_FILES})
SOURCE_GROUP("Headers" FILES ${CORE_INC_FILES}) SOURCE_GROUP("Headers" FILES ${CORE_INC_FILES})
SOURCE_GROUP("Sources\\PolyVoxImpl" FILES ${IMPL_SRC_FILES}) SOURCE_GROUP("Sources\\Impl" FILES ${IMPL_SRC_FILES})
SOURCE_GROUP("Headers\\PolyVoxImpl" FILES ${IMPL_INC_FILES}) SOURCE_GROUP("Headers\\Impl" FILES ${IMPL_INC_FILES})
#Tell CMake the paths #Tell CMake the paths
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
@ -144,7 +142,7 @@ IF(LIBRARY_TYPE STREQUAL "DYNAMIC")
ADD_LIBRARY(PolyVoxCore SHARED ${CORE_SRC_FILES} ${CORE_INC_FILES} ${IMPL_SRC_FILES} ${IMPL_INC_FILES}) ADD_LIBRARY(PolyVoxCore SHARED ${CORE_SRC_FILES} ${CORE_INC_FILES} ${IMPL_SRC_FILES} ${IMPL_INC_FILES})
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS "-DPOLYVOX_SHARED_EXPORTS") SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS "-DPOLYVOX_SHARED_EXPORTS")
ENDIF() ENDIF()
SET_PROPERTY(TARGET PolyVoxCore PROPERTY FOLDER "library/PolyVoxCore") SET_PROPERTY(TARGET PolyVoxCore PROPERTY FOLDER "Library")
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR}) SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR})
IF(MSVC) IF(MSVC)
@ -159,7 +157,7 @@ IF(WIN32)
ARCHIVE DESTINATION PolyVoxCore/lib COMPONENT library ARCHIVE DESTINATION PolyVoxCore/lib COMPONENT library
) )
#Install the core header files, including the ones in the PolyVoxImpl subfolder. #Install the core header files, including the ones in the Impl subfolder.
INSTALL(DIRECTORY include DESTINATION PolyVoxCore COMPONENT development PATTERN "*.svn*" EXCLUDE) INSTALL(DIRECTORY include DESTINATION PolyVoxCore COMPONENT development PATTERN "*.svn*" EXCLUDE)
#On windows, we also install the debug information. It's unfortunate that we have to hard-code #On windows, we also install the debug information. It's unfortunate that we have to hard-code
@ -174,6 +172,6 @@ ELSE(WIN32)
ARCHIVE DESTINATION lib COMPONENT library ARCHIVE DESTINATION lib COMPONENT library
) )
#Install the core header files, including the ones in the PolyVoxImpl subfolder. #Install the core header files, including the ones in the Impl subfolder.
INSTALL(DIRECTORY include/ DESTINATION include/PolyVoxCore COMPONENT development PATTERN "*.svn*" EXCLUDE) INSTALL(DIRECTORY include/ DESTINATION include/PolyVoxCore COMPONENT development PATTERN "*.svn*" EXCLUDE)
ENDIF(WIN32) ENDIF(WIN32)

View File

@ -24,8 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_AStarPathfinder_H__ #ifndef __PolyVox_AStarPathfinder_H__
#define __PolyVox_AStarPathfinder_H__ #define __PolyVox_AStarPathfinder_H__
#include "PolyVoxImpl/AStarPathfinderImpl.h" #include "Impl/AStarPathfinderImpl.h"
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
#include "PolyVoxCore/Array.h" #include "PolyVoxCore/Array.h"
@ -70,7 +70,7 @@ namespace PolyVox
std::list<Vector3DInt32>* listResult, std::list<Vector3DInt32>* listResult,
float fHBias = 1.0, float fHBias = 1.0,
uint32_t uMaxNoOfNodes = 10000, uint32_t uMaxNoOfNodes = 10000,
Connectivity connectivity = TwentySixConnected, Connectivity requiredConnectivity = TwentySixConnected,
polyvox_function<bool (const VolumeType*, const Vector3DInt32&)> funcIsVoxelValidForPath = &aStarDefaultVoxelValidator, polyvox_function<bool (const VolumeType*, const Vector3DInt32&)> funcIsVoxelValidForPath = &aStarDefaultVoxelValidator,
polyvox_function<void (float)> funcProgressCallback = 0 polyvox_function<void (float)> funcProgressCallback = 0
) )
@ -78,7 +78,7 @@ namespace PolyVox
,start(v3dStart) ,start(v3dStart)
,end(v3dEnd) ,end(v3dEnd)
,result(listResult) ,result(listResult)
,connectivity(connectivity) ,connectivity(requiredConnectivity)
,hBias(fHBias) ,hBias(fHBias)
,maxNumberOfNodes(uMaxNoOfNodes) ,maxNumberOfNodes(uMaxNoOfNodes)
,isVoxelValidForPath(funcIsVoxelValidForPath) ,isVoxelValidForPath(funcIsVoxelValidForPath)
@ -175,6 +175,7 @@ namespace PolyVox
float EighteenConnectedCost(const Vector3DInt32& a, const Vector3DInt32& b); float EighteenConnectedCost(const Vector3DInt32& a, const Vector3DInt32& b);
float TwentySixConnectedCost(const Vector3DInt32& a, const Vector3DInt32& b); float TwentySixConnectedCost(const Vector3DInt32& a, const Vector3DInt32& b);
float computeH(const Vector3DInt32& a, const Vector3DInt32& b); float computeH(const Vector3DInt32& a, const Vector3DInt32& b);
uint32_t hash(uint32_t a);
//Node containers //Node containers
AllNodesContainer allNodes; AllNodesContainer allNodes;

View File

@ -313,11 +313,17 @@ namespace PolyVox
//bias means it is much les likely that two paths are exactly the same //bias means it is much les likely that two paths are exactly the same
//length, and so far fewer nodes must be expanded to find the shortest path. //length, and so far fewer nodes must be expanded to find the shortest path.
//See http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#S12 //See http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#S12
polyvox_hash<uint32_t> uint32Hash;
uint32_t hashValX = uint32Hash(a.getX()); //Note that if the hash is zero we can have differences between the Linux vs. Windows
uint32_t hashValY = uint32Hash(a.getY()); //(or perhaps GCC vs. VS) versions of the code. This is probably because of the way
uint32_t hashValZ = uint32Hash(a.getZ()); //sorting inside the std::set works (i.e. one system swaps values which are identical
uint32_t hashVal = hashValX ^ hashValY ^ hashValZ; //while the other one doesn't - both approaches are valid). For the same reason we want
//to make sure that position (x,y,z) has a differnt hash from e.g. position (x,z,y).
uint32_t aX = (a.getX() << 16) & 0x00FF0000;
uint32_t aY = (a.getY() << 8) & 0x0000FF00;
uint32_t aZ = (a.getZ() ) & 0x000000FF;
uint32_t hashVal = hash(aX | aY | aZ);
//Stop hashVal going over 65535, and divide by 1000000 to make sure it is small. //Stop hashVal going over 65535, and divide by 1000000 to make sure it is small.
hashVal &= 0x0000FFFF; hashVal &= 0x0000FFFF;
float fHash = hashVal / 1000000.0f; float fHash = hashVal / 1000000.0f;
@ -326,4 +332,18 @@ namespace PolyVox
hVal += fHash; hVal += fHash;
return hVal; return hVal;
} }
// Robert Jenkins' 32 bit integer hash function
// http://www.concentric.net/~ttwang/tech/inthash.htm
template<typename VolumeType>
uint32_t AStarPathfinder<VolumeType>::hash( uint32_t a)
{
a = (a+0x7ed55d16) + (a<<12);
a = (a^0xc761c23c) ^ (a>>19);
a = (a+0x165667b1) + (a<<5);
a = (a+0xd3a2646c) ^ (a<<9);
a = (a+0xfd7046c5) + (a<<3);
a = (a^0xb55a4f09) ^ (a>>16);
return a;
}
} }

View File

@ -24,49 +24,57 @@ freely, subject to the following restrictions:
#ifndef __AmbientOcclusionCalculator_H__ #ifndef __AmbientOcclusionCalculator_H__
#define __AmbientOcclusionCalculator_H__ #define __AmbientOcclusionCalculator_H__
#include "PolyVoxImpl/RandomUnitVectors.h" #include "Impl/RandomUnitVectors.h"
#include "PolyVoxImpl/RandomVectors.h" #include "Impl/RandomVectors.h"
#include "PolyVoxCore/Array.h" #include "PolyVoxCore/Array.h"
#include "PolyVoxCore/Region.h" #include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Raycast.h" #include "PolyVoxCore/Raycast.h"
#if defined(_MSC_VER)
//These two should not be here! //These two should not be here!
#include "PolyVoxCore/Material.h" #include "PolyVoxCore/Material.h"
#include "PolyVoxCore/SimpleVolume.h" #include "PolyVoxCore/SimpleVolume.h"
#endif
#include <algorithm> #include <algorithm>
namespace PolyVox namespace PolyVox
{ {
template<typename VolumeType> /**
class AmbientOcclusionCalculator * \file
*
* Ambient occlusion
*/
template<typename IsVoxelTransparentCallback>
class AmbientOcclusionCalculatorRaycastCallback
{ {
public: public:
AmbientOcclusionCalculator(VolumeType* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, polyvox_function<bool(const typename VolumeType::VoxelType& voxel)> funcIsTransparent); AmbientOcclusionCalculatorRaycastCallback(IsVoxelTransparentCallback isVoxelTransparentCallback) : mIsVoxelTransparentCallback(isVoxelTransparentCallback)
~AmbientOcclusionCalculator(); {
}
void execute(void); bool operator()(const SimpleVolume<uint8_t>::Sampler& sampler)
{
uint8_t sample = sampler.getVoxel();
bool func = mIsVoxelTransparentCallback(sample);
return func;
}
private: IsVoxelTransparentCallback mIsVoxelTransparentCallback;
bool raycastCallback(const typename VolumeType::Sampler& sampler);
Region m_region;
typename VolumeType::Sampler m_sampVolume;
VolumeType* m_volInput;
Array<3, uint8_t>* m_arrayResult;
float m_fRayLength;
uint8_t m_uNoOfSamplesPerOutputElement;
uint16_t mRandomUnitVectorIndex;
uint16_t mRandomVectorIndex;
uint16_t mIndexIncreament;
polyvox_function<bool(const typename VolumeType::VoxelType& voxel)> m_funcIsTransparent;
}; };
// NOTE: The callback needs to be a functor not a function. I haven't been
// able to work the required template magic to get functions working as well.
//
// Matt: If you make the function take a "IsVoxelTransparentCallback&&" then
// it will forward it on. Works for functors, functions and lambdas.
// This will be 'perfect forwarding' using 'universal references'
// This will require C++11 rvalue references which is why I haven't made the
// change yet.
/// Calculate the ambient occlusion for the volume
template<typename VolumeType, typename IsVoxelTransparentCallback>
void calculateAmbientOcclusion(VolumeType* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, IsVoxelTransparentCallback isVoxelTransparentCallback);
} }
#include "PolyVoxCore/AmbientOcclusionCalculator.inl" #include "PolyVoxCore/AmbientOcclusionCalculator.inl"

View File

@ -23,44 +23,40 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
template<typename VolumeType> /**
AmbientOcclusionCalculator<VolumeType>::AmbientOcclusionCalculator(VolumeType* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, polyvox_function<bool(const typename VolumeType::VoxelType& voxel)> funcIsTransparent) * \param volInput The volume to calculate the ambient occlusion for
:m_region(region) * \param[out] arrayResult The output of the calculator
,m_sampVolume(volInput) * \param region The region of the volume for which the occlusion should be calculated
,m_volInput(volInput) * \param fRayLength The length for each test ray
,m_arrayResult(arrayResult) * \param uNoOfSamplesPerOutputElement The number of samples to calculate the occlusion
,m_fRayLength(fRayLength) * \param isVoxelTransparentCallback A callback which takes a \a VoxelType and returns a \a bool whether the voxel is transparent
,m_uNoOfSamplesPerOutputElement(uNoOfSamplesPerOutputElement) */
,mRandomUnitVectorIndex(0) //Although these could be uninitialised, we template<typename VolumeType, typename IsVoxelTransparentCallback>
,mRandomVectorIndex(0) //initialise for consistant results in the tests. void calculateAmbientOcclusion(VolumeType* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, IsVoxelTransparentCallback isVoxelTransparentCallback)
,m_funcIsTransparent(funcIsTransparent)
{ {
typename VolumeType::Sampler m_sampVolume(volInput);
uint16_t uRandomUnitVectorIndex = 0;
uint16_t uRandomVectorIndex = 0;
uint16_t uIndexIncreament;
//Make sure that the size of the volume is an exact multiple of the size of the array. //Make sure that the size of the volume is an exact multiple of the size of the array.
assert(m_volInput->getWidth() % arrayResult->getDimension(0) == 0); assert(volInput->getWidth() % arrayResult->getDimension(0) == 0);
assert(m_volInput->getHeight() % arrayResult->getDimension(1) == 0); assert(volInput->getHeight() % arrayResult->getDimension(1) == 0);
assert(m_volInput->getDepth() % arrayResult->getDimension(2) == 0); assert(volInput->getDepth() % arrayResult->getDimension(2) == 0);
//Our initial indices. It doesn't matter exactly what we set here, but the code below makes //Our initial indices. It doesn't matter exactly what we set here, but the code below makes
//sure they are different for different regions which helps reduce tiling patterns in the results. //sure they are different for different regions which helps reduce tiling patterns in the results.
mRandomUnitVectorIndex += m_region.getLowerCorner().getX() + m_region.getLowerCorner().getY() + m_region.getLowerCorner().getZ(); uRandomUnitVectorIndex += region.getLowerCorner().getX() + region.getLowerCorner().getY() + region.getLowerCorner().getZ();
mRandomVectorIndex += m_region.getLowerCorner().getX() + m_region.getLowerCorner().getY() + m_region.getLowerCorner().getZ(); uRandomVectorIndex += region.getLowerCorner().getX() + region.getLowerCorner().getY() + region.getLowerCorner().getZ();
//This value helps us jump around in the array a bit more, so the //This value helps us jump around in the array a bit more, so the
//nth 'random' value isn't always followed by the n+1th 'random' value. //nth 'random' value isn't always followed by the n+1th 'random' value.
mIndexIncreament = 1; uIndexIncreament = 1;
}
template<typename VolumeType> const int iRatioX = volInput->getWidth() / arrayResult->getDimension(0);
AmbientOcclusionCalculator<VolumeType>::~AmbientOcclusionCalculator() const int iRatioY = volInput->getHeight() / arrayResult->getDimension(1);
{ const int iRatioZ = volInput->getDepth() / arrayResult->getDimension(2);
}
template<typename VolumeType>
void AmbientOcclusionCalculator<VolumeType>::execute(void)
{
const int iRatioX = m_volInput->getWidth() / m_arrayResult->getDimension(0);
const int iRatioY = m_volInput->getHeight() / m_arrayResult->getDimension(1);
const int iRatioZ = m_volInput->getDepth() / m_arrayResult->getDimension(2);
const float fRatioX = iRatioX; const float fRatioX = iRatioX;
const float fRatioY = iRatioY; const float fRatioY = iRatioY;
@ -74,15 +70,12 @@ namespace PolyVox
const Vector3DFloat v3dOffset(0.5f,0.5f,0.5f); const Vector3DFloat v3dOffset(0.5f,0.5f,0.5f);
RaycastResult raycastResult;
Raycast<VolumeType> raycast(m_volInput, Vector3DFloat(0.0f,0.0f,0.0f), Vector3DFloat(1.0f,1.0f,1.0f), raycastResult, polyvox_bind(&PolyVox::AmbientOcclusionCalculator<VolumeType>::raycastCallback, this, std::placeholders::_1));
//This loop iterates over the bottom-lower-left voxel in each of the cells in the output array //This loop iterates over the bottom-lower-left voxel in each of the cells in the output array
for(uint16_t z = m_region.getLowerCorner().getZ(); z <= m_region.getUpperCorner().getZ(); z += iRatioZ) for(uint16_t z = region.getLowerCorner().getZ(); z <= region.getUpperCorner().getZ(); z += iRatioZ)
{ {
for(uint16_t y = m_region.getLowerCorner().getY(); y <= m_region.getUpperCorner().getY(); y += iRatioY) for(uint16_t y = region.getLowerCorner().getY(); y <= region.getUpperCorner().getY(); y += iRatioY)
{ {
for(uint16_t x = m_region.getLowerCorner().getX(); x <= m_region.getUpperCorner().getX(); x += iRatioX) for(uint16_t x = region.getLowerCorner().getX(); x <= region.getUpperCorner().getX(); x += iRatioX)
{ {
//Compute a start position corresponding to //Compute a start position corresponding to
//the centre of the cell in the output array. //the centre of the cell in the output array.
@ -93,29 +86,28 @@ namespace PolyVox
//Keep track of how many rays did not hit anything //Keep track of how many rays did not hit anything
uint8_t uVisibleDirections = 0; uint8_t uVisibleDirections = 0;
for(int ct = 0; ct < m_uNoOfSamplesPerOutputElement; ct++) for(int ct = 0; ct < uNoOfSamplesPerOutputElement; ct++)
{ {
//We take a random vector with components going from -1 to 1 and scale it to go from -halfRatio to +halfRatio. //We take a random vector with components going from -1 to 1 and scale it to go from -halfRatio to +halfRatio.
//This jitter value moves our sample point from the center of the array cell to somewhere else in the array cell //This jitter value moves our sample point from the centre of the array cell to somewhere else in the array cell
Vector3DFloat v3dJitter = randomVectors[(mRandomVectorIndex += (++mIndexIncreament)) % 1019]; //Prime number helps avoid repetition on sucessive loops. Vector3DFloat v3dJitter = randomVectors[(uRandomVectorIndex += (++uIndexIncreament)) % 1019]; //Prime number helps avoid repetition on successive loops.
v3dJitter *= v3dHalfRatio; v3dJitter *= v3dHalfRatio;
const Vector3DFloat v3dRayStart = v3dStart + v3dJitter; const Vector3DFloat v3dRayStart = v3dStart + v3dJitter;
Vector3DFloat v3dRayDirection = randomUnitVectors[(mRandomUnitVectorIndex += (++mIndexIncreament)) % 1021]; //Differenct prime number. Vector3DFloat v3dRayDirection = randomUnitVectors[(uRandomUnitVectorIndex += (++uIndexIncreament)) % 1021]; //Different prime number.
v3dRayDirection *= m_fRayLength; v3dRayDirection *= fRayLength;
raycast.setStart(v3dRayStart); AmbientOcclusionCalculatorRaycastCallback<IsVoxelTransparentCallback> ambientOcclusionCalculatorRaycastCallback(isVoxelTransparentCallback);
raycast.setDirection(v3dRayDirection); RaycastResult result = raycastWithDirection(volInput, v3dRayStart, v3dRayDirection, ambientOcclusionCalculatorRaycastCallback);
raycast.execute();
if(raycastResult.foundIntersection == false) if(result == RaycastResults::Completed)
{ {
++uVisibleDirections; ++uVisibleDirections;
} }
} }
float fVisibility; float fVisibility;
if(m_uNoOfSamplesPerOutputElement == 0) if(uNoOfSamplesPerOutputElement == 0)
{ {
//The user might request zero samples (I've done this in the past while debugging - I don't want to //The user might request zero samples (I've done this in the past while debugging - I don't want to
//wait for ambient occlusion but I do want as valid result for rendering). Avoid the divide by zero. //wait for ambient occlusion but I do want as valid result for rendering). Avoid the divide by zero.
@ -123,20 +115,13 @@ namespace PolyVox
} }
else else
{ {
fVisibility = static_cast<float>(uVisibleDirections) / static_cast<float>(m_uNoOfSamplesPerOutputElement); fVisibility = static_cast<float>(uVisibleDirections) / static_cast<float>(uNoOfSamplesPerOutputElement);
assert((fVisibility >= 0.0f) && (fVisibility <= 1.0f)); assert((fVisibility >= 0.0f) && (fVisibility <= 1.0f));
} }
(*m_arrayResult)[z / iRatioZ][y / iRatioY][x / iRatioX] = static_cast<uint8_t>(255.0f * fVisibility); (*arrayResult)[z / iRatioZ][y / iRatioY][x / iRatioX] = static_cast<uint8_t>(255.0f * fVisibility);
} }
} }
} }
} }
template<typename VolumeType>
bool AmbientOcclusionCalculator<VolumeType>::raycastCallback(const typename VolumeType::Sampler& sampler)
{
typename VolumeType::VoxelType voxel = sampler.getVoxel();
return m_funcIsTransparent(voxel);
}
} }

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Array_H__ #ifndef __PolyVox_Array_H__
#define __PolyVox_Array_H__ #define __PolyVox_Array_H__
#include "PolyVoxImpl/SubArray.h" #include "Impl/SubArray.h"
#include "PolyVoxCore/ArraySizes.h" //Not strictly required, but convienient #include "PolyVoxCore/ArraySizes.h" //Not strictly required, but convienient

View File

@ -24,8 +24,8 @@ distribution.
#ifndef __PolyVox_ArraySizes_H__ #ifndef __PolyVox_ArraySizes_H__
#define __PolyVox_ArraySizes_H__ #define __PolyVox_ArraySizes_H__
#include "PolyVoxImpl/ArraySizesImpl.h" #include "Impl/ArraySizesImpl.h"
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
namespace PolyVox namespace PolyVox
{ {

View File

@ -141,13 +141,17 @@ namespace PolyVox
protected: protected:
/// Constructor for creating a fixed size volume. /// Constructor for creating a fixed size volume.
BaseVolume BaseVolume(const Region& regValid);
(
const Region& regValid /// Copy constructor
); BaseVolume(const BaseVolume& rhs);
/// Destructor /// Destructor
~BaseVolume(); ~BaseVolume();
/// Assignment operator
BaseVolume& operator=(const BaseVolume& rhs);
//The size of the volume //The size of the volume
Region m_regValidRegion; Region m_regValidRegion;

View File

@ -23,15 +23,30 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
////////////////////////////////////////////////////////////////////////////////
/// This is protected because you should never create a BaseVolume directly, you should instead use one of the derived classes.
///
/// \sa RawVolume, SimpleVolume, LargeVolume
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
BaseVolume<VoxelType>::BaseVolume BaseVolume<VoxelType>::BaseVolume(const Region& regValid)
(
const Region& regValid
)
:m_regValidRegion(regValid) :m_regValidRegion(regValid)
{ {
} }
////////////////////////////////////////////////////////////////////////////////
/// This function should never be called. Copying volumes by value would be expensive, and we want to prevent users from doing
/// it by accident (such as when passing them as paramenters to functions). That said, there are times when you really do want to
/// make a copy of a volume and in this case you should look at the Volumeresampler.
///
/// \sa VolumeResampler
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
BaseVolume<VoxelType>::BaseVolume(const BaseVolume<VoxelType>& /*rhs*/)
{
assert(false); // See function comment above.
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Destroys the volume /// Destroys the volume
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -40,6 +55,19 @@ namespace PolyVox
{ {
} }
////////////////////////////////////////////////////////////////////////////////
/// This function should never be called. Copying volumes by value would be expensive, and we want to prevent users from doing
/// it by accident (such as when passing them as paramenters to functions). That said, there are times when you really do want to
/// make a copy of a volume and in this case you should look at the Volumeresampler.
///
/// \sa VolumeResampler
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
BaseVolume<VoxelType>& BaseVolume<VoxelType>::operator=(const BaseVolume<VoxelType>& /*rhs*/)
{
assert(false); // See function comment above.
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The border value is returned whenever an attempt is made to read a voxel which /// The border value is returned whenever an attempt is made to read a voxel which
/// is outside the extents of the volume. /// is outside the extents of the volume.
@ -132,7 +160,7 @@ namespace PolyVox
/// \return The voxel value /// \return The voxel value
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
VoxelType BaseVolume<VoxelType>::getVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos) const VoxelType BaseVolume<VoxelType>::getVoxelAt(int32_t /*uXPos*/, int32_t /*uYPos*/, int32_t /*uZPos*/) const
{ {
assert(false); assert(false);
return VoxelType(); return VoxelType();
@ -143,7 +171,7 @@ namespace PolyVox
/// \return The voxel value /// \return The voxel value
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
VoxelType BaseVolume<VoxelType>::getVoxelAt(const Vector3DInt32& v3dPos) const VoxelType BaseVolume<VoxelType>::getVoxelAt(const Vector3DInt32& /*v3dPos*/) const
{ {
assert(false); assert(false);
return VoxelType(); return VoxelType();
@ -153,7 +181,7 @@ namespace PolyVox
/// \param tBorder The value to use for voxels outside the volume. /// \param tBorder The value to use for voxels outside the volume.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
void BaseVolume<VoxelType>::setBorderValue(const VoxelType& tBorder) void BaseVolume<VoxelType>::setBorderValue(const VoxelType& /*tBorder*/)
{ {
assert(false); assert(false);
} }
@ -166,7 +194,7 @@ namespace PolyVox
/// \return whether the requested position is inside the volume /// \return whether the requested position is inside the volume
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
bool BaseVolume<VoxelType>::setVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue) bool BaseVolume<VoxelType>::setVoxelAt(int32_t /*uXPos*/, int32_t /*uYPos*/, int32_t /*uZPos*/, VoxelType /*tValue*/)
{ {
assert(false); assert(false);
return false; return false;
@ -178,7 +206,7 @@ namespace PolyVox
/// \return whether the requested position is inside the volume /// \return whether the requested position is inside the volume
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
bool BaseVolume<VoxelType>::setVoxelAt(const Vector3DInt32& v3dPos, VoxelType tValue) bool BaseVolume<VoxelType>::setVoxelAt(const Vector3DInt32& /*v3dPos*/, VoxelType /*tValue*/)
{ {
assert(false); assert(false);
return false; return false;

View File

@ -67,7 +67,7 @@ namespace PolyVox
} }
//Private assignment operator, so client code can't abuse this class. //Private assignment operator, so client code can't abuse this class.
ConstVolumeProxy& operator=(const ConstVolumeProxy& rhs) throw() ConstVolumeProxy& operator=(const ConstVolumeProxy& rhs)
{ {
} }

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_CubicSurfaceExtractor_H__ #ifndef __PolyVox_CubicSurfaceExtractor_H__
#define __PolyVox_CubicSurfaceExtractor_H__ #define __PolyVox_CubicSurfaceExtractor_H__
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
#include "PolyVoxCore/Array.h" #include "PolyVoxCore/Array.h"
#include "PolyVoxCore/DefaultIsQuadNeeded.h" #include "PolyVoxCore/DefaultIsQuadNeeded.h"
@ -32,6 +32,47 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
/// The CubicSurfaceExtractor creates a mesh in which each voxel appears to be rendered as a cube
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Introduction
/// ------------
/// Games such as Minecraft and Voxatron have a unique graphical style in which each voxel in the world appears to be rendered as a single cube. Actually rendering a cube for each voxel would be very expensive, but in practice the only faces which need to be drawn are those which lie on the boundary between solid and empty voxels. The CubicSurfaceExtractor can be used to create such a mesh from PolyVox volume data. As an example, images from Minecraft and Voxatron are shown below:
///
/// \image html MinecraftAndVoxatron.jpg
///
/// Before we get into the specifics of the CubicSurfaceExtractor, it is useful to understand the principles which apply to *all* PolyVox surface extractors and which are described in the Surface Extraction document (ADD LINK). From here on, it is assumed that you are familier with PolyVox regions and how they are used to limit surface extraction to a particular part of the volume. The principles of allowing dynamic terrain are also common to all surface extractors and are described here (ADD LINK).
///
/// Basic Operation
/// ---------------
/// At its core, the CubicSurfaceExtractor works by by looking at pairs of adjacent voxels and determining whether a quad should be placed between then. The most simple situation to imagine is a binary volume where every voxel is either solid or empty. In this case a quad should be generated whenever a solid voxel is next to an empty voxel as this represents part of the surface of the solid object. There is no need to generate a quad between two solid voxels (this quad would never be seen as it is inside the object) and there is no need to generate a quad between two empty voxels (there is no object here). PolyVox allows the principle to be extended far beyond such simple binary volumes but they provide a useful starting point for understanding how the algorithm works.
///
/// As an example, lets consider the part of a volume shown below. We are going to explain the principles in only two dimensions as this makes it much simpler to illustrate, so you will need to mentally extend the process into the third dimension. Hopefully you will find this intuitive. The diagram below shows a small part of a larger volume (as indicated by the voxel coordinates on the axes) which contains only solid and empty voxels represented by solid and hollow circles respectively. The region on which we are running the surface extractor is marked in pink, and for the purpose of this example it corresponds to the whole of the diagram.
///
/// \image html CubicSurfaceExtractor1.png
///
/// The output of the surface extractor is the mesh marked in red. As you can see, this forms a closed object which corrsponds to the shape of the underlying voxel data. We won't describe the rendering of such meshes here - for details of this please see (SOME LINK HERE).
///
/// Working with Regions
/// --------------------
/// So far the behaviour is easy to understand, but let's look at what happens when the extraction is limited to a particular region of the volume. The figure below shows the same data set as the previous figure, but the extraction region (still marked in pink) has been limited to 13 to 16 in x and 47 to 51 in y:
///
/// \image html CubicSurfaceExtractor2.png
///
/// As you can see, the extractor continues to generate a number of quads as indicated by the solid red lines. However, you can also see that the shape is no longer closed. This is because the solid voxels actually extend outside the region which is being processed, and so the extractor does not encounter a boundary between solid and empty voxels. Although this may initially appear problematic, the hole in the mesh does not actually matter because it will be hidden by the mesh corresponding to the region adjacent to it (see next diagram).
///
/// More interestingly, the diagram also contains a couple of dotted red lines lying on the bottom and right hand side of the extracted region. These are present to illustrate a common point of confusion, which is that *no quads are generated at this position even though it is a boundary between solid and empty voxels*. This is indeed somewhat counter intuitive but there is a rational reasaoning behind it.
/// If you consider the dashed line on the righthand side of the extracted region, then it is clear that this lies on a boundary between solid and empty voxels and so we do need to create quads here. But what is not so clear is whether these quads should be assigned to the mesh which corresponds to the region in pink, or whether they should be assigned to the region to the right of it which is marked in blue in the diagram below:
///
/// \image html CubicSurfaceExtractor3.png
///
/// We could choose to add the quads to *both* regions, but this can cause confusion when one of the region is modified (causing the face to disappear or a new one to be created) as *both* regions need to have their mesh regenerated to correctly represent the new state of the volume data. Such pairs of coplanar quads can also cause problems with physics engines, and may prevent transparent block from rendering correctly. Therefore we choose to instead only add the quad to one of the the regions and we always choose the one with the greater coordinate value in the direction in which they differ. In the above example the regions differ by the 'x' component of their position, and so the quad is added to the region with the greater 'x' value (the one marked in blue).
///
/// **Note:** *This behaviour has changed recently (September 2012). Earlier versions of PolyVox tried to be smart about this problem by looking beyond the region which was being processed, but this complicated the code and didn't work very well. Ultimatly we decided to simply stick with the convention outlined above.*
///
/// One of the practical implications of this is that when you modify a voxel *you may have to re-extract the mesh for regions other than region which actually contains the voxel you modified.* This happens when the voxel lies on the upper x,y or z face of a region. Assuming that you have some management code which can mark a region as needing re-extraction when a voxel changes, you should probably extend this to mark the regions of neighbouring voxels as invalid (this will have no effect when the voxel is well within a region, but will mark the neighbouring region as needing an update if the voxel lies on a region face).
///
/// Another scenario which sometimes results in confusion is when you wish to extract a region which corresponds to the whole volume, partcularly when solid voxels extend right to the edge of the volume.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<typename VolumeType, typename IsQuadNeeded = DefaultIsQuadNeeded<typename VolumeType::VoxelType> > template<typename VolumeType, typename IsQuadNeeded = DefaultIsQuadNeeded<typename VolumeType::VoxelType> >
class CubicSurfaceExtractor class CubicSurfaceExtractor
{ {
@ -68,6 +109,7 @@ namespace PolyVox
public: public:
CubicSurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<PositionMaterial>* result, bool bMergeQuads = true, IsQuadNeeded isQuadNeeded = IsQuadNeeded()); CubicSurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<PositionMaterial>* result, bool bMergeQuads = true, IsQuadNeeded isQuadNeeded = IsQuadNeeded());
void execute(); void execute();
private: private:

View File

@ -58,10 +58,6 @@ namespace PolyVox
memset(m_previousSliceVertices.getRawData(), 0xff, m_previousSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial)); memset(m_previousSliceVertices.getRawData(), 0xff, m_previousSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial));
memset(m_currentSliceVertices.getRawData(), 0xff, m_currentSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial)); memset(m_currentSliceVertices.getRawData(), 0xff, m_currentSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial));
uint32_t uRegionWidth = m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 1;
uint32_t uRegionHeight = m_regSizeInVoxels.getUpperCorner().getY() - m_regSizeInVoxels.getLowerCorner().getY() + 1;
uint32_t uRegionDepth = m_regSizeInVoxels.getUpperCorner().getZ() - m_regSizeInVoxels.getLowerCorner().getZ() + 1;
m_vecQuads[NegativeX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2); m_vecQuads[NegativeX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2);
m_vecQuads[PositiveX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2); m_vecQuads[PositiveX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2);
@ -87,78 +83,76 @@ namespace PolyVox
volumeSampler.setPosition(x,y,z); volumeSampler.setPosition(x,y,z);
uint32_t material; //Filled in by callback
typename VolumeType::VoxelType currentVoxel = volumeSampler.getVoxel(); typename VolumeType::VoxelType currentVoxel = volumeSampler.getVoxel();
bool currentVoxelIsSolid = currentVoxel.getMaterial() != 0;
typename VolumeType::VoxelType negXVoxel = volumeSampler.peekVoxel1nx0py0pz(); typename VolumeType::VoxelType negXVoxel = volumeSampler.peekVoxel1nx0py0pz();
bool negXVoxelIsSolid = negXVoxel.getMaterial() != 0; typename VolumeType::VoxelType negYVoxel = volumeSampler.peekVoxel0px1ny0pz();
typename VolumeType::VoxelType negZVoxel = volumeSampler.peekVoxel0px0py1nz();
if(currentVoxelIsSolid != negXVoxelIsSolid) // X
if(m_funcIsQuadNeededCallback(currentVoxel, negXVoxel, material))
{ {
uint32_t material = (std::max)(currentVoxel.getMaterial(), negXVoxel.getMaterial()); uint32_t v0 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v1 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) + 0.5f, material, m_currentSliceVertices);
uint32_t v2 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) + 0.5f, static_cast<float>(regZ) + 0.5f, material, m_currentSliceVertices);
uint32_t v3 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) + 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v0 = addVertex(regX - 0.5f, regY - 0.5f, regZ - 0.5f, material, m_previousSliceVertices);
uint32_t v1 = addVertex(regX - 0.5f, regY - 0.5f, regZ + 0.5f, material, m_currentSliceVertices);
uint32_t v2 = addVertex(regX - 0.5f, regY + 0.5f, regZ + 0.5f, material, m_currentSliceVertices);
uint32_t v3 = addVertex(regX - 0.5f, regY + 0.5f, regZ - 0.5f, material, m_previousSliceVertices);
if(currentVoxelIsSolid > negXVoxelIsSolid)
{
m_vecQuads[NegativeX][regX].push_back(Quad(v0, v1, v2, v3)); m_vecQuads[NegativeX][regX].push_back(Quad(v0, v1, v2, v3));
} }
else
if(m_funcIsQuadNeededCallback(negXVoxel, currentVoxel, material))
{ {
uint32_t v0 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v1 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) + 0.5f, material, m_currentSliceVertices);
uint32_t v2 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) + 0.5f, static_cast<float>(regZ) + 0.5f, material, m_currentSliceVertices);
uint32_t v3 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) + 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
m_vecQuads[PositiveX][regX].push_back(Quad(v0, v3, v2, v1)); m_vecQuads[PositiveX][regX].push_back(Quad(v0, v3, v2, v1));
} }
// Y
if(m_funcIsQuadNeededCallback(currentVoxel, negYVoxel, material))
{
uint32_t v0 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v1 = addVertex(static_cast<float>(regX) + 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v2 = addVertex(static_cast<float>(regX) + 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) + 0.5f, material, m_currentSliceVertices);
uint32_t v3 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) + 0.5f, material, m_currentSliceVertices);
m_vecQuads[NegativeY][regY].push_back(Quad(v0, v1, v2, v3));
} }
typename VolumeType::VoxelType negYVoxel = volumeSampler.peekVoxel0px1ny0pz(); if(m_funcIsQuadNeededCallback(negYVoxel, currentVoxel, material))
bool negYVoxelIsSolid = negYVoxel.getMaterial() != 0;
if(currentVoxelIsSolid != negYVoxelIsSolid)
{ {
int material = (std::max)(currentVoxel.getMaterial(),negYVoxel.getMaterial()); uint32_t v0 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v1 = addVertex(static_cast<float>(regX) + 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v2 = addVertex(static_cast<float>(regX) + 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) + 0.5f, material, m_currentSliceVertices);
uint32_t v3 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) + 0.5f, material, m_currentSliceVertices);
uint32_t v0 = addVertex(regX - 0.5f, regY - 0.5f, regZ - 0.5f, material, m_previousSliceVertices); m_vecQuads[PositiveY][regY].push_back(Quad(v0, v3, v2, v1));
uint32_t v1 = addVertex(regX - 0.5f, regY - 0.5f, regZ + 0.5f, material, m_currentSliceVertices);
uint32_t v2 = addVertex(regX + 0.5f, regY - 0.5f, regZ + 0.5f, material, m_currentSliceVertices);
uint32_t v3 = addVertex(regX + 0.5f, regY - 0.5f, regZ - 0.5f, material, m_previousSliceVertices);
if(currentVoxelIsSolid > negYVoxelIsSolid)
{
//NOTE: For some reason y windong is opposite of X and Z. Investigate this...
m_vecQuads[NegativeY][regY].push_back(Quad(v0, v3, v2, v1));
}
else
{
//NOTE: For some reason y windong is opposite of X and Z. Investigate this...
m_vecQuads[PositiveY][regY].push_back(Quad(v0, v1, v2, v3));
}
} }
typename VolumeType::VoxelType negZVoxel = volumeSampler.peekVoxel0px0py1nz(); // Z
bool negZVoxelIsSolid = negZVoxel.getMaterial() != 0; if(m_funcIsQuadNeededCallback(currentVoxel, negZVoxel, material))
if(currentVoxelIsSolid != negZVoxelIsSolid)
{ {
int material = (std::max)(currentVoxel.getMaterial(), negZVoxel.getMaterial()); uint32_t v0 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v1 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) + 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v2 = addVertex(static_cast<float>(regX) + 0.5f, static_cast<float>(regY) + 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v3 = addVertex(static_cast<float>(regX) + 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v0 = addVertex(regX - 0.5f, regY - 0.5f, regZ - 0.5f, material, m_previousSliceVertices);
uint32_t v1 = addVertex(regX - 0.5f, regY + 0.5f, regZ - 0.5f, material, m_previousSliceVertices);
uint32_t v2 = addVertex(regX + 0.5f, regY + 0.5f, regZ - 0.5f, material, m_previousSliceVertices);
uint32_t v3 = addVertex(regX + 0.5f, regY - 0.5f, regZ - 0.5f, material, m_previousSliceVertices);
if(currentVoxelIsSolid > negZVoxelIsSolid)
{
m_vecQuads[NegativeZ][regZ].push_back(Quad(v0, v1, v2, v3)); m_vecQuads[NegativeZ][regZ].push_back(Quad(v0, v1, v2, v3));
} }
else
if(m_funcIsQuadNeededCallback(negZVoxel, currentVoxel, material))
{ {
uint32_t v0 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v1 = addVertex(static_cast<float>(regX) - 0.5f, static_cast<float>(regY) + 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v2 = addVertex(static_cast<float>(regX) + 0.5f, static_cast<float>(regY) + 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
uint32_t v3 = addVertex(static_cast<float>(regX) + 0.5f, static_cast<float>(regY) - 0.5f, static_cast<float>(regZ) - 0.5f, material, m_previousSliceVertices);
m_vecQuads[PositiveZ][regZ].push_back(Quad(v0, v3, v2, v1)); m_vecQuads[PositiveZ][regZ].push_back(Quad(v0, v3, v2, v1));
} }
} }
} }
}
m_previousSliceVertices.swap(m_currentSliceVertices); m_previousSliceVertices.swap(m_currentSliceVertices);
memset(m_currentSliceVertices.getRawData(), 0xff, m_currentSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial)); memset(m_currentSliceVertices.getRawData(), 0xff, m_currentSliceVertices.getNoOfElements() * sizeof(IndexAndMaterial));
@ -219,7 +213,7 @@ namespace PolyVox
} }
//If we have an existing vertex and the material matches then we can return it. //If we have an existing vertex and the material matches then we can return it.
if(rEntry.uMaterial == uMaterialIn) if(rEntry.uMaterial == static_cast<int32_t>(uMaterialIn))
{ {
return rEntry.iIndex; return rEntry.iIndex;
} }

View File

@ -40,7 +40,6 @@ namespace PolyVox
void execute(); void execute();
private: private:
//polyvox_function<bool(typename VolumeType::VoxelType voxel0, typename VolumeType::VoxelType voxel1, float& materialToUse)> m_funcIsQuadNeededCallback;
IsQuadNeeded m_funcIsQuadNeededCallback; IsQuadNeeded m_funcIsQuadNeededCallback;
//The volume data and a sampler to access it. //The volume data and a sampler to access it.

View File

@ -49,24 +49,24 @@ namespace PolyVox
float regY = static_cast<float>(y - m_regSizeInVoxels.getLowerCorner().getY()); float regY = static_cast<float>(y - m_regSizeInVoxels.getLowerCorner().getY());
float regZ = static_cast<float>(z - m_regSizeInVoxels.getLowerCorner().getZ()); float regZ = static_cast<float>(z - m_regSizeInVoxels.getLowerCorner().getZ());
float material = 0.0f; uint32_t material = 0;
if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y,z), m_volData->getVoxelAt(x+1,y,z), material)) if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y,z), m_volData->getVoxelAt(x+1,y,z), material))
{ {
uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ - 0.5f), Vector3DFloat(1.0f, 0.0f, 0.0f), material)); uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ - 0.5f), Vector3DFloat(1.0f, 0.0f, 0.0f), static_cast<float>(material)));
uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(1.0f, 0.0f, 0.0f), material)); uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(1.0f, 0.0f, 0.0f), static_cast<float>(material)));
uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(1.0f, 0.0f, 0.0f), material)); uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(1.0f, 0.0f, 0.0f), static_cast<float>(material)));
uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(1.0f, 0.0f, 0.0f), material)); uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(1.0f, 0.0f, 0.0f), static_cast<float>(material)));
m_meshCurrent->addTriangleCubic(v0,v2,v1); m_meshCurrent->addTriangleCubic(v0,v2,v1);
m_meshCurrent->addTriangleCubic(v1,v2,v3); m_meshCurrent->addTriangleCubic(v1,v2,v3);
} }
if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x+1,y,z), m_volData->getVoxelAt(x,y,z), material)) if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x+1,y,z), m_volData->getVoxelAt(x,y,z), material))
{ {
uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ - 0.5f), Vector3DFloat(-1.0f, 0.0f, 0.0f), material)); uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ - 0.5f), Vector3DFloat(-1.0f, 0.0f, 0.0f), static_cast<float>(material)));
uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(-1.0f, 0.0f, 0.0f), material)); uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(-1.0f, 0.0f, 0.0f), static_cast<float>(material)));
uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(-1.0f, 0.0f, 0.0f), material)); uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(-1.0f, 0.0f, 0.0f), static_cast<float>(material)));
uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(-1.0f, 0.0f, 0.0f), material)); uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(-1.0f, 0.0f, 0.0f), static_cast<float>(material)));
m_meshCurrent->addTriangleCubic(v0,v1,v2); m_meshCurrent->addTriangleCubic(v0,v1,v2);
m_meshCurrent->addTriangleCubic(v1,v3,v2); m_meshCurrent->addTriangleCubic(v1,v3,v2);
@ -74,20 +74,20 @@ namespace PolyVox
if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y,z), m_volData->getVoxelAt(x,y+1,z), material)) if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y,z), m_volData->getVoxelAt(x,y+1,z), material))
{ {
uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(0.0f, 1.0f, 0.0f), material)); uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(0.0f, 1.0f, 0.0f), static_cast<float>(material)));
uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 1.0f, 0.0f), material)); uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 1.0f, 0.0f), static_cast<float>(material)));
uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(0.0f, 1.0f, 0.0f), material)); uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(0.0f, 1.0f, 0.0f), static_cast<float>(material)));
uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 1.0f, 0.0f), material)); uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 1.0f, 0.0f), static_cast<float>(material)));
m_meshCurrent->addTriangleCubic(v0,v1,v2); m_meshCurrent->addTriangleCubic(v0,v1,v2);
m_meshCurrent->addTriangleCubic(v1,v3,v2); m_meshCurrent->addTriangleCubic(v1,v3,v2);
} }
if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y+1,z), m_volData->getVoxelAt(x,y,z), material)) if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y+1,z), m_volData->getVoxelAt(x,y,z), material))
{ {
uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(0.0f, -1.0f, 0.0f), material)); uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(0.0f, -1.0f, 0.0f), static_cast<float>(material)));
uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, -1.0f, 0.0f), material)); uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, -1.0f, 0.0f), static_cast<float>(material)));
uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(0.0f, -1.0f, 0.0f), material)); uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ - 0.5f), Vector3DFloat(0.0f, -1.0f, 0.0f), static_cast<float>(material)));
uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, -1.0f, 0.0f), material)); uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, -1.0f, 0.0f), static_cast<float>(material)));
m_meshCurrent->addTriangleCubic(v0,v2,v1); m_meshCurrent->addTriangleCubic(v0,v2,v1);
m_meshCurrent->addTriangleCubic(v1,v2,v3); m_meshCurrent->addTriangleCubic(v1,v2,v3);
@ -95,20 +95,20 @@ namespace PolyVox
if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y,z), m_volData->getVoxelAt(x,y,z+1), material)) if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y,z), m_volData->getVoxelAt(x,y,z+1), material))
{ {
uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, 1.0f), material)); uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, 1.0f), static_cast<float>(material)));
uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, 1.0f), material)); uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, 1.0f), static_cast<float>(material)));
uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, 1.0f), material)); uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, 1.0f), static_cast<float>(material)));
uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, 1.0f), material)); uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, 1.0f), static_cast<float>(material)));
m_meshCurrent->addTriangleCubic(v0,v2,v1); m_meshCurrent->addTriangleCubic(v0,v2,v1);
m_meshCurrent->addTriangleCubic(v1,v2,v3); m_meshCurrent->addTriangleCubic(v1,v2,v3);
} }
if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y,z+1), m_volData->getVoxelAt(x,y,z), material)) if(m_funcIsQuadNeededCallback(m_volData->getVoxelAt(x,y,z+1), m_volData->getVoxelAt(x,y,z), material))
{ {
uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, -1.0f), material)); uint32_t v0 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, -1.0f), static_cast<float>(material)));
uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, -1.0f), material)); uint32_t v1 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX - 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, -1.0f), static_cast<float>(material)));
uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, -1.0f), material)); uint32_t v2 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY - 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, -1.0f), static_cast<float>(material)));
uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, -1.0f), material)); uint32_t v3 = m_meshCurrent->addVertex(PositionMaterialNormal(Vector3DFloat(regX + 0.5f, regY + 0.5f, regZ + 0.5f), Vector3DFloat(0.0f, 0.0f, -1.0f), static_cast<float>(material)));
m_meshCurrent->addTriangleCubic(v0,v1,v2); m_meshCurrent->addTriangleCubic(v0,v1,v2);
m_meshCurrent->addTriangleCubic(v1,v3,v2); m_meshCurrent->addTriangleCubic(v1,v3,v2);

View File

@ -24,17 +24,19 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_DefaultIsQuadNeeded_H__ #ifndef __PolyVox_DefaultIsQuadNeeded_H__
#define __PolyVox_DefaultIsQuadNeeded_H__ #define __PolyVox_DefaultIsQuadNeeded_H__
#include <cstdint>
namespace PolyVox namespace PolyVox
{ {
template<typename VoxelType> template<typename VoxelType>
class DefaultIsQuadNeeded class DefaultIsQuadNeeded
{ {
public: public:
bool operator()(VoxelType back, VoxelType front, float& materialToUse) bool operator()(VoxelType back, VoxelType front, uint32_t& materialToUse)
{ {
if((back > 0) && (front == 0)) if((back > 0) && (front == 0))
{ {
materialToUse = static_cast<float>(back); materialToUse = static_cast<uint32_t>(back);
return true; return true;
} }
else else

View File

@ -107,7 +107,7 @@ namespace PolyVox
/// The default implementation of this function just returns the constant '1'. There's not much else it can do, as it needs to work with primitive /// The default implementation of this function just returns the constant '1'. There's not much else it can do, as it needs to work with primitive
/// types and the actual value of the type is already being considered to be the density. Specialisations of this class can modify this behaviour. /// types and the actual value of the type is already being considered to be the density. Specialisations of this class can modify this behaviour.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MaterialType convertToMaterial(VoxelType voxel) MaterialType convertToMaterial(VoxelType /*voxel*/)
{ {
return 1; return 1;
} }

View File

@ -26,7 +26,7 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/DefaultMarchingCubesController.h" //We'll specialise the controller contained in here #include "PolyVoxCore/DefaultMarchingCubesController.h" //We'll specialise the controller contained in here
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
#include <cassert> #include <cassert>
#include <limits> #include <limits>
@ -38,15 +38,7 @@ namespace PolyVox
{ {
/// This class represents a voxel storing only a density. /// This class represents a voxel storing only a density.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// In order to perform a surface extraction on a LargeVolume, PolyVox needs the underlying /// Detailed description...
/// voxel type to provide both getDensity() and getMaterial() functions. The getDensity()
/// function is used to determine if a voxel is 'solid', and if it is then the getMaterial()
/// funtion is used to determine what material should be assigned to the resulting mesh.
///
/// This class meets these requirements, although it only actually stores a density value.
/// For the getMaterial() function it just returns a constant value of '1'.
///
/// \sa Material, MaterialDensityPair
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// int32_t template parameter is a dummy, required as the compiler expects to be able to declare an // int32_t template parameter is a dummy, required as the compiler expects to be able to declare an
@ -55,51 +47,99 @@ namespace PolyVox
class Density class Density
{ {
public: public:
//We expose DensityType and MaterialType in this way so that, when code is /// Constructor
//templatised on voxel type, it can determine the underlying storage type
//using code such as 'VoxelType::DensityType value = voxel.getDensity()'
//or 'VoxelType::MaterialType value = voxel.getMaterial()'.
typedef Type DensityType;
typedef int32_t MaterialType; //Shouldn't define this one...
Density() : m_uDensity(0) {} Density() : m_uDensity(0) {}
Density(DensityType uDensity) : m_uDensity(uDensity) {}
bool operator==(const Density& rhs) const throw() /// Copy constructor
Density(Type uDensity) : m_uDensity(uDensity) {}
// The LowPassFilter uses this to convert between normal and accumulated types.
/// Copy constructor with cast
template <typename CastType> explicit Density(const Density<CastType>& density)
{
m_uDensity = static_cast<Type>(density.getDensity());
}
bool operator==(const Density& rhs) const
{ {
return (m_uDensity == rhs.m_uDensity); return (m_uDensity == rhs.m_uDensity);
}; };
bool operator!=(const Density& rhs) const throw() bool operator!=(const Density& rhs) const
{ {
return !(*this == rhs); return !(*this == rhs);
} }
// For densities we can supply mathematical operators which behave in an intuitive way.
// In particular the ability to add and subtract densities is important in order to
// apply an averaging filter. The ability to divide by an integer is also needed for
// this same purpose.
Density<Type>& operator+=(const Density<Type>& rhs) Density<Type>& operator+=(const Density<Type>& rhs)
{ {
m_uDensity += rhs.m_uDensity; m_uDensity += rhs.m_uDensity;
return *this; return *this;
} }
Density<Type>& operator-=(const Density<Type>& rhs)
{
m_uDensity -= rhs.m_uDensity;
return *this;
}
Density<Type>& operator/=(uint32_t rhs) Density<Type>& operator/=(uint32_t rhs)
{ {
m_uDensity /= rhs; m_uDensity /= rhs;
return *this; return *this;
} }
DensityType getDensity() const throw() { return m_uDensity; } /// \return The current density of the voxel
void setDensity(DensityType uDensity) { m_uDensity = uDensity; } Type getDensity() const { return m_uDensity; }
/**
* Set the density of the voxel
*
* \param uDensity The density to set to
*/
void setDensity(Type uDensity) { m_uDensity = uDensity; }
static DensityType getMaxDensity() throw() { return (std::numeric_limits<DensityType>::max)(); } /// \return The maximum allowed density of the voxel
static DensityType getMinDensity() throw() { return (std::numeric_limits<DensityType>::min)(); } static Type getMaxDensity() { return (std::numeric_limits<Type>::max)(); }
/// \return The minimum allowed density of the voxel
static Type getMinDensity() { return (std::numeric_limits<Type>::min)(); }
private: private:
DensityType m_uDensity; Type m_uDensity;
}; };
template <typename Type>
Density<Type> operator+(const Density<Type>& lhs, const Density<Type>& rhs)
{
Density<Type> result = lhs;
result += rhs;
return result;
}
template <typename Type>
Density<Type> operator-(const Density<Type>& lhs, const Density<Type>& rhs)
{
Density<Type> result = lhs;
result -= rhs;
return result;
}
template <typename Type>
Density<Type> operator/(const Density<Type>& lhs, uint32_t rhs)
{
Density<Type> result = lhs;
result /= rhs;
return result;
}
// These are the predefined density types. The 8-bit types are sufficient for many purposes (including // These are the predefined density types. The 8-bit types are sufficient for many purposes (including
// most games) but 16-bit and float types do have uses particularly in medical/scientific visualisation. // most games) but 16-bit and float types do have uses particularly in medical/scientific visualisation.
typedef Density<uint8_t> Density8; typedef Density<uint8_t> Density8;
typedef Density<uint16_t> Density16;
typedef Density<uint32_t> Density32;
typedef Density<float> DensityFloat;
/** /**
* This is a specialisation of DefaultMarchingCubesController for the Density voxel type * This is a specialisation of DefaultMarchingCubesController for the Density voxel type
@ -127,7 +167,7 @@ namespace PolyVox
return voxel.getDensity(); return voxel.getDensity();
} }
MaterialType convertToMaterial(Density<Type> voxel) MaterialType convertToMaterial(Density<Type> /*voxel*/)
{ {
return 1; return 1;
} }

View File

@ -92,8 +92,7 @@ namespace PolyVox
float f(void) const float f(void) const
{ {
float f = gVal + hVal; return gVal + hVal;
return f;
} }
}; };

View File

@ -24,7 +24,7 @@ distribution.
#ifndef __PolyVox_ArraySizesImpl_H__ #ifndef __PolyVox_ArraySizesImpl_H__
#define __PolyVox_ArraySizesImpl_H__ #define __PolyVox_ArraySizesImpl_H__
#include "PolyVoxImpl/TypeDef.h" #include "PolyVoxCore/Impl/TypeDef.h"
namespace PolyVox namespace PolyVox
{ {
@ -56,6 +56,6 @@ namespace PolyVox
}; };
}//namespace PolyVox }//namespace PolyVox
#include "PolyVoxImpl/ArraySizesImpl.inl" #include "PolyVoxCore/Impl/ArraySizesImpl.inl"
#endif //__PolyVox_ArraySizesImpl_H__ #endif //__PolyVox_ArraySizesImpl_H__

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Block_H__ #ifndef __PolyVox_Block_H__
#define __PolyVox_Block_H__ #define __PolyVox_Block_H__
#include "PolyVoxImpl/TypeDef.h" #include "PolyVoxCore/Impl/TypeDef.h"
#include "PolyVoxCore/Vector.h" #include "PolyVoxCore/Vector.h"
#include <limits> #include <limits>
@ -73,6 +73,6 @@ namespace PolyVox
}; };
} }
#include "PolyVoxImpl/Block.inl" #include "PolyVoxCore/Impl/Block.inl"
#endif #endif

View File

@ -21,7 +21,7 @@ freely, subject to the following restrictions:
distribution. distribution.
*******************************************************************************/ *******************************************************************************/
#include "PolyVoxImpl/Utility.h" #include "PolyVoxCore/Impl/Utility.h"
#include "PolyVoxCore/Vector.h" #include "PolyVoxCore/Vector.h"
#include <cassert> #include <cassert>

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_MarchingCubeTables_H__ #ifndef __PolyVox_MarchingCubeTables_H__
#define __PolyVox_MarchingCubeTables_H__ #define __PolyVox_MarchingCubeTables_H__
#include "PolyVoxImpl/TypeDef.h" #include "PolyVoxCore/Impl/TypeDef.h"
namespace PolyVox namespace PolyVox
{ {

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_RandomUnitVectors_H__ #ifndef __PolyVox_RandomUnitVectors_H__
#define __PolyVox_RandomUnitVectors_H__ #define __PolyVox_RandomUnitVectors_H__
#include "PolyVoxImpl/TypeDef.h" #include "PolyVoxCore/Impl/TypeDef.h"
#include "PolyVoxCore/Vector.h" #include "PolyVoxCore/Vector.h"

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_RandomVectors_H__ #ifndef __PolyVox_RandomVectors_H__
#define __PolyVox_RandomVectors_H__ #define __PolyVox_RandomVectors_H__
#include "PolyVoxImpl/TypeDef.h" #include "PolyVoxCore/Impl/TypeDef.h"
#include "PolyVoxCore/Vector.h" #include "PolyVoxCore/Vector.h"

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_SubArray_H__ #ifndef __PolyVox_SubArray_H__
#define __PolyVox_SubArray_H__ #define __PolyVox_SubArray_H__
#include "PolyVoxImpl/TypeDef.h" #include "PolyVoxCore/Impl/TypeDef.h"
namespace PolyVox namespace PolyVox
{ {
@ -83,6 +83,6 @@ namespace PolyVox
}; };
}//namespace PolyVox }//namespace PolyVox
#include "PolyVoxImpl/SubArray.inl" #include "PolyVoxCore/Impl/SubArray.inl"
#endif //__PolyVox_SubArray_H__ #endif //__PolyVox_SubArray_H__

View File

@ -30,7 +30,9 @@ freely, subject to the following restrictions:
#define POLYVOX_HELPER_IMPORT __declspec(dllimport) #define POLYVOX_HELPER_IMPORT __declspec(dllimport)
#define POLYVOX_HELPER_EXPORT __declspec(dllexport) #define POLYVOX_HELPER_EXPORT __declspec(dllexport)
#define POLYVOX_HELPER_LOCAL #define POLYVOX_HELPER_LOCAL
#define POLYVOX_DEPRECATED __declspec(deprecated)
#else #else
#define POLYVOX_DEPRECATED __attribute__((deprecated))
#if __GNUC__ >= 4 #if __GNUC__ >= 4
#define POLYVOX_HELPER_IMPORT __attribute__ ((visibility("default"))) #define POLYVOX_HELPER_IMPORT __attribute__ ((visibility("default")))
#define POLYVOX_HELPER_EXPORT __attribute__ ((visibility("default"))) #define POLYVOX_HELPER_EXPORT __attribute__ ((visibility("default")))
@ -69,9 +71,6 @@ freely, subject to the following restrictions:
#include <boost/function.hpp> #include <boost/function.hpp>
#define polyvox_function boost::function #define polyvox_function boost::function
#include <boost/functional/hash.hpp>
#define polyvox_hash boost::hash
#include <boost/bind.hpp> #include <boost/bind.hpp>
#define polyvox_bind boost::bind #define polyvox_bind boost::bind
#define polyvox_placeholder_1 _1 #define polyvox_placeholder_1 _1
@ -100,7 +99,6 @@ freely, subject to the following restrictions:
#define polyvox_bind std::bind #define polyvox_bind std::bind
#define polyvox_placeholder_1 std::placeholders::_1 #define polyvox_placeholder_1 std::placeholders::_1
#define polyvox_placeholder_2 std::placeholders::_2 #define polyvox_placeholder_2 std::placeholders::_2
#define polyvox_hash std::hash
//#define static_assert static_assert //we can use this //#define static_assert static_assert //we can use this
#endif #endif

View File

@ -0,0 +1,37 @@
/*******************************************************************************
Copyright (c) 2005-2009 David Williams
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*******************************************************************************/
#ifndef __PolyVox_Utility_H__
#define __PolyVox_Utility_H__
#include "PolyVoxCore/Impl/TypeDef.h"
#include <cassert>
namespace PolyVox
{
POLYVOX_API uint8_t logBase2(uint32_t uInput);
POLYVOX_API bool isPowerOf2(uint32_t uInput);
}
#endif

View File

@ -21,20 +21,46 @@ freely, subject to the following restrictions:
distribution. distribution.
*******************************************************************************/ *******************************************************************************/
#ifndef __PolyVox_Utility_H__ #ifndef __PolyVox_Interpolation_H__
#define __PolyVox_Utility_H__ #define __PolyVox_Interpolation_H__
#include "PolyVoxImpl/TypeDef.h"
#include <cassert> #include <cassert>
namespace PolyVox namespace PolyVox
{ {
POLYVOX_API uint8_t logBase2(uint32_t uInput); template <typename Type>
POLYVOX_API bool isPowerOf2(uint32_t uInput); Type lerp(
const Type& v0,const Type& v1,
const float x)
{
assert((x >= 0.0f) && (x <= 1.0f));
//Interpolate along X
Type v0_1 = v0 + x * (v1 - v0);
return v0_1;
}
template <typename Type> template <typename Type>
Type trilinearlyInterpolate( Type bilerp(
const Type& v00,const Type& v10,const Type& v01,const Type& v11,
const float x, const float y)
{
assert((x >= 0.0f) && (y >= 0.0f) &&
(x <= 1.0f) && (y <= 1.0f));
// Linearly interpolate along x
Type v00_10 = lerp(v00, v10, x);
Type v01_11 = lerp(v01, v11, x);
// And linearly interpolate the results along y
Type v00_10__v01_11 = lerp(v00_10, v01_11, y);
return v00_10__v01_11;
}
template <typename Type>
Type trilerp(
const Type& v000,const Type& v100,const Type& v010,const Type& v110, const Type& v000,const Type& v100,const Type& v010,const Type& v110,
const Type& v001,const Type& v101,const Type& v011,const Type& v111, const Type& v001,const Type& v101,const Type& v011,const Type& v111,
const float x, const float y, const float z) const float x, const float y, const float z)
@ -42,21 +68,15 @@ namespace PolyVox
assert((x >= 0.0f) && (y >= 0.0f) && (z >= 0.0f) && assert((x >= 0.0f) && (y >= 0.0f) && (z >= 0.0f) &&
(x <= 1.0f) && (y <= 1.0f) && (z <= 1.0f)); (x <= 1.0f) && (y <= 1.0f) && (z <= 1.0f));
//Interpolate along X // Bilinearly interpolate along Y
Type v000_v100 = (v100 - v000) * x + v000; Type v000_v100__v010_v110 = bilerp(v000, v100, v010, v110, x, y);
Type v001_v101 = (v101 - v001) * x + v001; Type v001_v101__v011_v111 = bilerp(v001, v101, v011, v111, x, y);
Type v010_v110 = (v110 - v010) * x + v010;
Type v011_v111 = (v111 - v011) * x + v011;
//Interpolate along Y // And linearly interpolate the results along z
Type v000_v100__v010_v110 = (v010_v110 - v000_v100) * y + v000_v100; Type v000_v100__v010_v110____v001_v101__v011_v111 = lerp(v000_v100__v010_v110, v001_v101__v011_v111, z);
Type v001_v101__v011_v111 = (v011_v111 - v001_v101) * y + v001_v101;
//Interpolate along Z
Type v000_v100__v010_v110____v001_v101__v011_v111 = (v001_v101__v011_v111 - v000_v100__v010_v110) * z + v000_v100__v010_v110;
return v000_v100__v010_v110____v001_v101__v011_v111; return v000_v100__v010_v110____v001_v101__v011_v111;
} }
} }
#endif #endif //__PolyVox_Interpolation_H__

View File

@ -25,7 +25,7 @@ freely, subject to the following restrictions:
#define __PolyVox_LargeVolume_H__ #define __PolyVox_LargeVolume_H__
#include "PolyVoxCore/BaseVolume.h" #include "PolyVoxCore/BaseVolume.h"
#include "PolyVoxImpl/Block.h" #include "Impl/Block.h"
#include "PolyVoxCore/Log.h" #include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h" #include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Vector.h" #include "PolyVoxCore/Vector.h"
@ -42,13 +42,17 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
template <typename VoxelType> class ConstVolumeProxy;
/// The LargeVolume class provides a memory efficient method of storing voxel data while also allowing fast access and modification. /// The LargeVolume class provides a memory efficient method of storing voxel data while also allowing fast access and modification.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// A LargeVolume is essentially a 3D array in which each element (or <i>voxel</i>) is identified by a three dimensional (x,y,z) coordinate. /// A LargeVolume is essentially a 3D array in which each element (or <i>voxel</i>) is identified by a three dimensional (x,y,z) coordinate.
/// We use the LargeVolume class to store our data in an efficient way, and it is the input to many of the algorithms (such as the surface /// We use the LargeVolume class to store our data in an efficient way, and it is the input to many of the algorithms (such as the surface
/// extractors) which form the heart of PolyVox. The LargeVolume class is templatised so that different types of data can be stored within each voxel. /// extractors) which form the heart of PolyVox. The LargeVolume class is templatised so that different types of data can be stored within each voxel.
/// ///
/// <b> Basic usage</b> /// Basic usage
/// -----------
///
/// The following code snippet shows how to construct a volume and demonstrates basic usage: /// The following code snippet shows how to construct a volume and demonstrates basic usage:
/// ///
/// \code /// \code
@ -72,7 +76,8 @@ namespace PolyVox
/// Lastly the example prints out some properties of the LargeVolume. Note that the dimentsions getWidth(), getHeight(), and getDepth() are inclusive, such /// Lastly the example prints out some properties of the LargeVolume. Note that the dimentsions getWidth(), getHeight(), and getDepth() are inclusive, such
/// that the width is 64 when the range of valid x coordinates goes from 0 to 63. /// that the width is 64 when the range of valid x coordinates goes from 0 to 63.
/// ///
/// <b>Data Representaion</b> /// Data Representaion
/// ------------------
/// If stored carelessly, volume data can take up a huge amount of memory. For example, a volume of dimensions 1024x1024x1024 with /// If stored carelessly, volume data can take up a huge amount of memory. For example, a volume of dimensions 1024x1024x1024 with
/// 1 byte per voxel will require 1GB of memory if stored in an uncompressed form. Natuarally our LargeVolume class is much more efficient /// 1 byte per voxel will require 1GB of memory if stored in an uncompressed form. Natuarally our LargeVolume class is much more efficient
/// than this and it is worth understanding (at least at a high level) the approach which is used. /// than this and it is worth understanding (at least at a high level) the approach which is used.
@ -87,7 +92,8 @@ namespace PolyVox
/// is touched a timestamp is updated on the corresponding block. When the cache becomes full the block with the oldest timestamp is /// is touched a timestamp is updated on the corresponding block. When the cache becomes full the block with the oldest timestamp is
/// recompressed and moved out of the cache. /// recompressed and moved out of the cache.
/// ///
/// <b>Achieving high compression rates</b> /// Achieving high compression rates
/// --------------------------------
/// The compression rates which can be achieved can vary significantly depending the nature of the data you are storing, but you can /// The compression rates which can be achieved can vary significantly depending the nature of the data you are storing, but you can
/// encourage high compression rates by making your data as homogenous as possible. If you are simply storing a material with each /// encourage high compression rates by making your data as homogenous as possible. If you are simply storing a material with each
/// voxel then this will probably happen naturally. Games such as Minecraft which use this approach will typically involve large areas /// voxel then this will probably happen naturally. Games such as Minecraft which use this approach will typically involve large areas
@ -98,7 +104,8 @@ namespace PolyVox
/// on the boundary) does not benefit the surface and is very hard to compress effectively. You may wish to apply some thresholding to /// on the boundary) does not benefit the surface and is very hard to compress effectively. You may wish to apply some thresholding to
/// your density values to reduce this problem (this threasholding should only be applied to voxels who don't contribute to the surface). /// your density values to reduce this problem (this threasholding should only be applied to voxels who don't contribute to the surface).
/// ///
/// <b>Paging large volumes</b> /// Paging large volumes
/// --------------------
/// The compression scheme described previously will typically allow you to load several billion voxels into a few hundred megabytes of memory, /// The compression scheme described previously will typically allow you to load several billion voxels into a few hundred megabytes of memory,
/// though as explained the exact compression rate is highly dependant on your data. If you have more data than this then PolyVox provides a /// though as explained the exact compression rate is highly dependant on your data. If you have more data than this then PolyVox provides a
/// mechanism by which parts of the volume can be paged out of memory by calling user supplied callback functions. This mechanism allows a /// mechanism by which parts of the volume can be paged out of memory by calling user supplied callback functions. This mechanism allows a
@ -128,7 +135,8 @@ namespace PolyVox
/// that you don't actually have to do anything with the data - you could simply decide that once it gets removed from memory it doesn't matter /// that you don't actually have to do anything with the data - you could simply decide that once it gets removed from memory it doesn't matter
/// anymore. But you still need to be ready to then provide something to PolyVox (even if it's just default data) in the event that it is requested. /// anymore. But you still need to be ready to then provide something to PolyVox (even if it's just default data) in the event that it is requested.
/// ///
/// <b>Cache-aware traversal</b> /// Cache-aware traversal
/// ---------------------
/// You might be suprised at just how many cache misses can occur when you traverse the volume in a naive manner. Consider a 1024x1024x1024 volume /// You might be suprised at just how many cache misses can occur when you traverse the volume in a naive manner. Consider a 1024x1024x1024 volume
/// with blocks of size 32x32x32. And imagine you iterate over this volume with a simple three-level for loop which iterates over x, the y, then z. /// with blocks of size 32x32x32. And imagine you iterate over this volume with a simple three-level for loop which iterates over x, the y, then z.
/// If you start at position (0,0,0) then ny the time you reach position (1023,0,0) you have touched 1024 voxels along one edge of the volume and /// If you start at position (0,0,0) then ny the time you reach position (1023,0,0) you have touched 1024 voxels along one edge of the volume and
@ -141,14 +149,12 @@ namespace PolyVox
/// and (31,31,31), then process all the voxels between (32,0,0) and (63,0,0), and so forth. Using this approach you will have no cache misses even /// and (31,31,31), then process all the voxels between (32,0,0) and (63,0,0), and so forth. Using this approach you will have no cache misses even
/// is your cache sise is only one. Of course the logic is more complex, but writing code in such a cache-aware manner may be beneficial in some situations. /// is your cache sise is only one. Of course the logic is more complex, but writing code in such a cache-aware manner may be beneficial in some situations.
/// ///
/// <b>Threading</b> /// Threading
/// ---------
/// The LargeVolume class does not make any guarentees about thread safety. You should ensure that all accesses are performed from the same thread. /// The LargeVolume class does not make any guarentees about thread safety. You should ensure that all accesses are performed from the same thread.
/// This is true even if you are only reading data from the volume, as concurrently reading from different threads can invalidate the contents /// This is true even if you are only reading data from the volume, as concurrently reading from different threads can invalidate the contents
/// of the block cache (amoung other problems). /// of the block cache (amoung other problems).
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> class ConstVolumeProxy;
template <typename VoxelType> template <typename VoxelType>
class LargeVolume : public BaseVolume<VoxelType> class LargeVolume : public BaseVolume<VoxelType>
{ {
@ -170,7 +176,7 @@ namespace PolyVox
Sampler(LargeVolume<VoxelType>* volume); Sampler(LargeVolume<VoxelType>* volume);
~Sampler(); ~Sampler();
Sampler& operator=(const Sampler& rhs) throw(); Sampler& operator=(const Sampler& rhs);
VoxelType getSubSampledVoxel(uint8_t uLevel) const; VoxelType getSubSampledVoxel(uint8_t uLevel) const;
inline VoxelType getVoxel(void) const; inline VoxelType getVoxel(void) const;
@ -291,6 +297,13 @@ namespace PolyVox
/// Calculates approximatly how many bytes of memory the volume is currently using. /// Calculates approximatly how many bytes of memory the volume is currently using.
uint32_t calculateSizeInBytes(void); uint32_t calculateSizeInBytes(void);
protected:
/// Copy constructor
LargeVolume(const LargeVolume& rhs);
/// Assignment operator
LargeVolume& operator=(const LargeVolume& rhs);
private: private:
void initialise(const Region& regValidRegion, uint16_t uBlockSideLength); void initialise(const Region& regValidRegion, uint16_t uBlockSideLength);

View File

@ -75,6 +75,19 @@ namespace PolyVox
initialise(regValid,uBlockSideLength); initialise(regValid,uBlockSideLength);
} }
////////////////////////////////////////////////////////////////////////////////
/// This function should never be called. Copying volumes by value would be expensive, and we want to prevent users from doing
/// it by accident (such as when passing them as paramenters to functions). That said, there are times when you really do want to
/// make a copy of a volume and in this case you should look at the Volumeresampler.
///
/// \sa VolumeResampler
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
LargeVolume<VoxelType>::LargeVolume(const LargeVolume<VoxelType>& /*rhs*/)
{
assert(false); // See function comment above.
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Destroys the volume The destructor will call flushAll() to ensure that a paging volume has the chance to save it's data via the dataOverflowHandler() if desired. /// Destroys the volume The destructor will call flushAll() to ensure that a paging volume has the chance to save it's data via the dataOverflowHandler() if desired.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -85,6 +98,19 @@ namespace PolyVox
delete[] m_pUncompressedBorderData; delete[] m_pUncompressedBorderData;
} }
////////////////////////////////////////////////////////////////////////////////
/// This function should never be called. Copying volumes by value would be expensive, and we want to prevent users from doing
/// it by accident (such as when passing them as paramenters to functions). That said, there are times when you really do want to
/// make a copy of a volume and in this case you should look at the Volumeresampler.
///
/// \sa VolumeResampler
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
LargeVolume<VoxelType>& LargeVolume<VoxelType>::operator=(const LargeVolume<VoxelType>& /*rhs*/)
{
assert(false); // See function comment above.
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The border value is returned whenever an atempt is made to read a voxel which /// The border value is returned whenever an atempt is made to read a voxel which
/// is outside the extents of the volume. /// is outside the extents of the volume.
@ -163,7 +189,7 @@ namespace PolyVox
/// Increasing the size of the block cache will increase memory but may improve performance. /// Increasing the size of the block cache will increase memory but may improve performance.
/// You may want to set this to a large value (e.g. 1024) when you are first loading your /// You may want to set this to a large value (e.g. 1024) when you are first loading your
/// volume data and then set it to a smaller value (e.g.64) for general processing. /// volume data and then set it to a smaller value (e.g.64) for general processing.
/// \param uBlockCacheSize The number of blocks for which uncompressed data can be cached. /// \param uMaxNumberOfUncompressedBlocks The number of blocks for which uncompressed data can be cached.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
void LargeVolume<VoxelType>::setMaxNumberOfUncompressedBlocks(uint32_t uMaxNumberOfUncompressedBlocks) void LargeVolume<VoxelType>::setMaxNumberOfUncompressedBlocks(uint32_t uMaxNumberOfUncompressedBlocks)
@ -175,7 +201,7 @@ namespace PolyVox
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Increasing the number of blocks in memory causes fewer calls to dataRequiredHandler()/dataOverflowHandler() /// Increasing the number of blocks in memory causes fewer calls to dataRequiredHandler()/dataOverflowHandler()
/// \param uMaxBlocks The number of blocks /// \param uMaxNumberOfBlocksInMemory The number of blocks
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
void LargeVolume<VoxelType>::setMaxNumberOfBlocksInMemory(uint32_t uMaxNumberOfBlocksInMemory) void LargeVolume<VoxelType>::setMaxNumberOfBlocksInMemory(uint32_t uMaxNumberOfBlocksInMemory)

View File

@ -40,7 +40,7 @@ namespace PolyVox
} }
template <typename VoxelType> template <typename VoxelType>
typename LargeVolume<VoxelType>::Sampler& LargeVolume<VoxelType>::Sampler::operator=(const typename LargeVolume<VoxelType>::Sampler& rhs) throw() typename LargeVolume<VoxelType>::Sampler& LargeVolume<VoxelType>::Sampler::operator=(const typename LargeVolume<VoxelType>::Sampler& rhs)
{ {
if(this == &rhs) if(this == &rhs)
{ {

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Log_H__ #ifndef __PolyVox_Log_H__
#define __PolyVox_Log_H__ #define __PolyVox_Log_H__
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
#include <string> #include <string>

View File

@ -30,7 +30,7 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
template< typename SrcVolumeType, typename DstVolumeType> template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType>
class LowPassFilter class LowPassFilter
{ {
public: public:

View File

@ -23,8 +23,15 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
template< typename SrcVolumeType, typename DstVolumeType> /**
LowPassFilter<SrcVolumeType, DstVolumeType>::LowPassFilter(SrcVolumeType* pVolSrc, Region regSrc, DstVolumeType* pVolDst, Region regDst, uint32_t uKernelSize) * \param pVolSrc
* \param regSrc
* \param[out] pVolDst
* \param regDst
* \param uKernelSize
*/
template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType>
LowPassFilter<SrcVolumeType, DstVolumeType, AccumulationType>::LowPassFilter(SrcVolumeType* pVolSrc, Region regSrc, DstVolumeType* pVolDst, Region regDst, uint32_t uKernelSize)
:m_pVolSrc(pVolSrc) :m_pVolSrc(pVolSrc)
,m_regSrc(regSrc) ,m_regSrc(regSrc)
,m_pVolDst(pVolDst) ,m_pVolDst(pVolDst)
@ -43,8 +50,8 @@ namespace PolyVox
} }
} }
template< typename SrcVolumeType, typename DstVolumeType> template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType>
void LowPassFilter<SrcVolumeType, DstVolumeType>::execute() void LowPassFilter<SrcVolumeType, DstVolumeType, AccumulationType>::execute()
{ {
int32_t iSrcMinX = m_regSrc.getLowerCorner().getX(); int32_t iSrcMinX = m_regSrc.getLowerCorner().getX();
int32_t iSrcMinY = m_regSrc.getLowerCorner().getY(); int32_t iSrcMinY = m_regSrc.getLowerCorner().getY();
@ -70,52 +77,50 @@ namespace PolyVox
{ {
for(int32_t iSrcX = iSrcMinX, iDstX = iDstMinX; iSrcX <= iSrcMaxX; iSrcX++, iDstX++) for(int32_t iSrcX = iSrcMinX, iDstX = iDstMinX; iSrcX <= iSrcMaxX; iSrcX++, iDstX++)
{ {
//VoxelType tSrcVoxel = m_pVolSrc->getVoxelAt(iSrcX, iSrcY, iSrcZ); AccumulationType tSrcVoxel(0);
srcSampler.setPosition(iSrcX, iSrcY, iSrcZ); srcSampler.setPosition(iSrcX, iSrcY, iSrcZ);
typename SrcVolumeType::VoxelType tSrcVoxel = srcSampler.getVoxel(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx1ny1nz());
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx1ny0pz());
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx1ny1pz());
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx0py1nz());
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx0py0pz());
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx0py1pz());
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx1py1nz());
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx1py0pz());
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1nx1py1pz());
tSrcVoxel += srcSampler.peekVoxel1nx1ny1nz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1ny1nz());
tSrcVoxel += srcSampler.peekVoxel1nx1ny0pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1ny0pz());
tSrcVoxel += srcSampler.peekVoxel1nx1ny1pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1ny1pz());
tSrcVoxel += srcSampler.peekVoxel1nx0py1nz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px0py1nz());
tSrcVoxel += srcSampler.peekVoxel1nx0py0pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px0py0pz());
tSrcVoxel += srcSampler.peekVoxel1nx0py1pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px0py1pz());
tSrcVoxel += srcSampler.peekVoxel1nx1py1nz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1py1nz());
tSrcVoxel += srcSampler.peekVoxel1nx1py0pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1py0pz());
tSrcVoxel += srcSampler.peekVoxel1nx1py1pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1py1pz());
tSrcVoxel += srcSampler.peekVoxel0px1ny1nz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1ny1nz());
tSrcVoxel += srcSampler.peekVoxel0px1ny0pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1ny0pz());
tSrcVoxel += srcSampler.peekVoxel0px1ny1pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1ny1pz());
tSrcVoxel += srcSampler.peekVoxel0px0py1nz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px0py1nz());
//tSrcVoxel += srcSampler.peekVoxel0px0py0pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px0py0pz());
tSrcVoxel += srcSampler.peekVoxel0px0py1pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px0py1pz());
tSrcVoxel += srcSampler.peekVoxel0px1py1nz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1py1nz());
tSrcVoxel += srcSampler.peekVoxel0px1py0pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1py0pz());
tSrcVoxel += srcSampler.peekVoxel0px1py1pz(); tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1py1pz());
tSrcVoxel += srcSampler.peekVoxel1px1ny1nz();
tSrcVoxel += srcSampler.peekVoxel1px1ny0pz();
tSrcVoxel += srcSampler.peekVoxel1px1ny1pz();
tSrcVoxel += srcSampler.peekVoxel1px0py1nz();
tSrcVoxel += srcSampler.peekVoxel1px0py0pz();
tSrcVoxel += srcSampler.peekVoxel1px0py1pz();
tSrcVoxel += srcSampler.peekVoxel1px1py1nz();
tSrcVoxel += srcSampler.peekVoxel1px1py0pz();
tSrcVoxel += srcSampler.peekVoxel1px1py1pz();
tSrcVoxel /= 27; tSrcVoxel /= 27;
//tSrcVoxel.setDensity(uDensity); //tSrcVoxel.setDensity(uDensity);
m_pVolDst->setVoxelAt(iSrcX, iSrcY, iSrcZ, tSrcVoxel); m_pVolDst->setVoxelAt(iSrcX, iSrcY, iSrcZ, static_cast<typename DstVolumeType::VoxelType>(tSrcVoxel));
} }
} }
} }
} }
template< typename SrcVolumeType, typename DstVolumeType> template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType>
void LowPassFilter<SrcVolumeType, DstVolumeType>::executeSAT() void LowPassFilter<SrcVolumeType, DstVolumeType, AccumulationType>::executeSAT()
{ {
const uint32_t border = (m_uKernelSize - 1) / 2; const uint32_t border = (m_uKernelSize - 1) / 2;
@ -124,7 +129,7 @@ namespace PolyVox
//Use floats for the SAT volume to ensure it works with negative //Use floats for the SAT volume to ensure it works with negative
//densities and with both integral and floating point input volumes. //densities and with both integral and floating point input volumes.
RawVolume<float> satVolume(Region(satLowerCorner, satUpperCorner)); RawVolume<AccumulationType> satVolume(Region(satLowerCorner, satUpperCorner));
//Clear to zeros (necessary?) //Clear to zeros (necessary?)
//FIXME - use Volume::fill() method. Implemented in base class as below //FIXME - use Volume::fill() method. Implemented in base class as below
@ -140,9 +145,9 @@ namespace PolyVox
} }
} }
RawVolume<float>::Sampler satVolumeIter(&satVolume); typename RawVolume<AccumulationType>::Sampler satVolumeIter(&satVolume);
IteratorController<RawVolume<float>::Sampler> satIterCont; IteratorController<typename RawVolume<AccumulationType>::Sampler> satIterCont;
satIterCont.m_regValid = Region(satLowerCorner, satUpperCorner); satIterCont.m_regValid = Region(satLowerCorner, satUpperCorner);
satIterCont.m_Iter = &satVolumeIter; satIterCont.m_Iter = &satVolumeIter;
satIterCont.reset(); satIterCont.reset();
@ -156,9 +161,8 @@ namespace PolyVox
do do
{ {
float previousSum = satVolumeIter.peekVoxel1nx0py0pz(); AccumulationType previousSum = static_cast<AccumulationType>(satVolumeIter.peekVoxel1nx0py0pz());
AccumulationType currentVal = static_cast<AccumulationType>(srcVolumeIter.getVoxel());
float currentVal = static_cast<float>(srcVolumeIter.getVoxel().getDensity());
satVolumeIter.setVoxel(previousSum + currentVal); satVolumeIter.setVoxel(previousSum + currentVal);
@ -173,8 +177,8 @@ namespace PolyVox
{ {
for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++) for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++)
{ {
uint32_t previousSum = satVolume.getVoxelAt(x-1,y,z); AccumulationType previousSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x-1,y,z));
uint32_t currentVal = m_pVolSrc->getVoxelAt(x,y,z).getDensity(); AccumulationType currentVal = static_cast<AccumulationType>(m_pVolSrc->getVoxelAt(x,y,z));
satVolume.setVoxelAt(x,y,z,previousSum + currentVal); satVolume.setVoxelAt(x,y,z,previousSum + currentVal);
} }
@ -187,8 +191,8 @@ namespace PolyVox
{ {
for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++) for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++)
{ {
float previousSum = satVolume.getVoxelAt(x,y-1,z); AccumulationType previousSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x,y-1,z));
float currentSum = satVolume.getVoxelAt(x,y,z); AccumulationType currentSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x,y,z));
satVolume.setVoxelAt(x,y,z,previousSum + currentSum); satVolume.setVoxelAt(x,y,z,previousSum + currentSum);
} }
@ -201,8 +205,8 @@ namespace PolyVox
{ {
for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++) for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++)
{ {
float previousSum = satVolume.getVoxelAt(x,y,z-1); AccumulationType previousSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x,y,z-1));
float currentSum = satVolume.getVoxelAt(x,y,z); AccumulationType currentSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x,y,z));
satVolume.setVoxelAt(x,y,z,previousSum + currentSum); satVolume.setVoxelAt(x,y,z,previousSum + currentSum);
} }
@ -229,38 +233,20 @@ namespace PolyVox
int32_t satUpperY = iSrcY + border; int32_t satUpperY = iSrcY + border;
int32_t satUpperZ = iSrcZ + border; int32_t satUpperZ = iSrcZ + border;
float a = satVolume.getVoxelAt(satLowerX,satLowerY,satLowerZ); AccumulationType a = satVolume.getVoxelAt(satLowerX,satLowerY,satLowerZ);
float b = satVolume.getVoxelAt(satUpperX,satLowerY,satLowerZ); AccumulationType b = satVolume.getVoxelAt(satUpperX,satLowerY,satLowerZ);
float c = satVolume.getVoxelAt(satLowerX,satUpperY,satLowerZ); AccumulationType c = satVolume.getVoxelAt(satLowerX,satUpperY,satLowerZ);
float d = satVolume.getVoxelAt(satUpperX,satUpperY,satLowerZ); AccumulationType d = satVolume.getVoxelAt(satUpperX,satUpperY,satLowerZ);
float e = satVolume.getVoxelAt(satLowerX,satLowerY,satUpperZ); AccumulationType e = satVolume.getVoxelAt(satLowerX,satLowerY,satUpperZ);
float f = satVolume.getVoxelAt(satUpperX,satLowerY,satUpperZ); AccumulationType f = satVolume.getVoxelAt(satUpperX,satLowerY,satUpperZ);
float g = satVolume.getVoxelAt(satLowerX,satUpperY,satUpperZ); AccumulationType g = satVolume.getVoxelAt(satLowerX,satUpperY,satUpperZ);
float h = satVolume.getVoxelAt(satUpperX,satUpperY,satUpperZ); AccumulationType h = satVolume.getVoxelAt(satUpperX,satUpperY,satUpperZ);
float sum = h+c-d-g-f-a+b+e;
AccumulationType sum = h+c-d-g-f-a+b+e;
uint32_t sideLength = border * 2 + 1; uint32_t sideLength = border * 2 + 1;
AccumulationType average = sum / (sideLength*sideLength*sideLength);
float average = sum / (static_cast<float>(sideLength*sideLength*sideLength)); m_pVolDst->setVoxelAt(iDstX, iDstY, iDstZ, static_cast<typename DstVolumeType::VoxelType>(average));
//Note: These lines need consideration if src and dest have different voxel types.
typename SrcVolumeType::VoxelType voxel = m_pVolSrc->getVoxelAt(iDstX, iDstY, iDstZ);
voxel.setDensity(static_cast<typename SrcVolumeType::VoxelType::DensityType>(average));
m_pVolDst->setVoxelAt(iDstX, iDstY, iDstZ, voxel);
//float maxSolid = border * 2/* + 1*/;
/*maxSolid = maxSolid * maxSolid * maxSolid;
float percentSolid = noSolid / maxSolid;
float percentEmpty = 1.0f - percentSolid;
(*mAmbientOcclusionVolume)[ambVolZ][ambVolY][ambVolX] = 255 * percentEmpty;*/
//(*mAmbientOcclusionVolume)[ambVolZ][ambVolY][ambVolX] = 255 - ((h+c-d-g-f-a+b+e) * 19); //FIXME - should not be 9
} }
} }
} }

View File

@ -24,8 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_SurfaceExtractor_H__ #ifndef __PolyVox_SurfaceExtractor_H__
#define __PolyVox_SurfaceExtractor_H__ #define __PolyVox_SurfaceExtractor_H__
#include "PolyVoxImpl/MarchingCubesTables.h" #include "Impl/MarchingCubesTables.h"
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
#include "PolyVoxCore/Array.h" #include "PolyVoxCore/Array.h"
#include "PolyVoxCore/SurfaceMesh.h" #include "PolyVoxCore/SurfaceMesh.h"
@ -48,7 +48,7 @@ namespace PolyVox
//Compute the cell bitmask for a given cell. //Compute the cell bitmask for a given cell.
template<bool isPrevXAvail, bool isPrevYAvail, bool isPrevZAvail> template<bool isPrevXAvail, bool isPrevYAvail, bool isPrevZAvail>
void computeBitmaskForCell(const Array2DUint8& pPreviousBitmask, Array2DUint8& pCurrentBitmask); void computeBitmaskForCell(const Array2DUint8& pPreviousBitmask, Array2DUint8& pCurrentBitmask, uint32_t uXRegSpace, uint32_t uYRegSpace);
//Use the cell bitmasks to generate all the vertices needed for that slice //Use the cell bitmasks to generate all the vertices needed for that slice
void generateVerticesForSlice(const Array2DUint8& pCurrentBitmask, void generateVerticesForSlice(const Array2DUint8& pCurrentBitmask,
@ -182,16 +182,6 @@ namespace PolyVox
VolumeType* m_volData; VolumeType* m_volData;
typename VolumeType::Sampler m_sampVolume; typename VolumeType::Sampler m_sampVolume;
//Holds a position in volume space.
int32_t iXVolSpace;
int32_t iYVolSpace;
int32_t iZVolSpace;
//Holds a position in region space.
uint32_t uXRegSpace;
uint32_t uYRegSpace;
uint32_t uZRegSpace;
//Used to return the number of cells in a slice which contain triangles. //Used to return the number of cells in a slice which contain triangles.
uint32_t m_uNoOfOccupiedCells; uint32_t m_uNoOfOccupiedCells;

View File

@ -136,18 +136,17 @@ namespace PolyVox
const int32_t iMaxXVolSpace = m_regSliceCurrent.getUpperCorner().getX(); const int32_t iMaxXVolSpace = m_regSliceCurrent.getUpperCorner().getX();
const int32_t iMaxYVolSpace = m_regSliceCurrent.getUpperCorner().getY(); const int32_t iMaxYVolSpace = m_regSliceCurrent.getUpperCorner().getY();
iZVolSpace = m_regSliceCurrent.getLowerCorner().getZ(); int32_t iZVolSpace = m_regSliceCurrent.getLowerCorner().getZ();
uZRegSpace = iZVolSpace - m_regSizeInVoxels.getLowerCorner().getZ();
//Process the lower left corner //Process the lower left corner
iYVolSpace = m_regSliceCurrent.getLowerCorner().getY(); int32_t iYVolSpace = m_regSliceCurrent.getLowerCorner().getY();
iXVolSpace = m_regSliceCurrent.getLowerCorner().getX(); int32_t iXVolSpace = m_regSliceCurrent.getLowerCorner().getX();
uXRegSpace = iXVolSpace - m_regSizeInVoxels.getLowerCorner().getX(); uint32_t uXRegSpace = iXVolSpace - m_regSizeInVoxels.getLowerCorner().getX();
uYRegSpace = iYVolSpace - m_regSizeInVoxels.getLowerCorner().getY(); uint32_t uYRegSpace = iYVolSpace - m_regSizeInVoxels.getLowerCorner().getY();
m_sampVolume.setPosition(iXVolSpace,iYVolSpace,iZVolSpace); m_sampVolume.setPosition(iXVolSpace,iYVolSpace,iZVolSpace);
computeBitmaskForCell<false, false, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask); computeBitmaskForCell<false, false, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask, uXRegSpace, uYRegSpace);
//Process the edge where x is minimal. //Process the edge where x is minimal.
iXVolSpace = m_regSliceCurrent.getLowerCorner().getX(); iXVolSpace = m_regSliceCurrent.getLowerCorner().getX();
@ -159,7 +158,7 @@ namespace PolyVox
m_sampVolume.movePositiveY(); m_sampVolume.movePositiveY();
computeBitmaskForCell<false, true, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask); computeBitmaskForCell<false, true, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask, uXRegSpace, uYRegSpace);
} }
//Process the edge where y is minimal. //Process the edge where y is minimal.
@ -172,7 +171,7 @@ namespace PolyVox
m_sampVolume.movePositiveX(); m_sampVolume.movePositiveX();
computeBitmaskForCell<true, false, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask); computeBitmaskForCell<true, false, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask, uXRegSpace, uYRegSpace);
} }
//Process all remaining elemnents of the slice. In this case, previous x and y values are always available //Process all remaining elemnents of the slice. In this case, previous x and y values are always available
@ -186,7 +185,7 @@ namespace PolyVox
m_sampVolume.movePositiveX(); m_sampVolume.movePositiveX();
computeBitmaskForCell<true, true, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask); computeBitmaskForCell<true, true, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask, uXRegSpace, uYRegSpace);
} }
} }
@ -195,7 +194,7 @@ namespace PolyVox
template<typename VolumeType, typename Controller> template<typename VolumeType, typename Controller>
template<bool isPrevXAvail, bool isPrevYAvail, bool isPrevZAvail> template<bool isPrevXAvail, bool isPrevYAvail, bool isPrevZAvail>
void MarchingCubesSurfaceExtractor<VolumeType, Controller>::computeBitmaskForCell(const Array2DUint8& pPreviousBitmask, Array2DUint8& pCurrentBitmask) void MarchingCubesSurfaceExtractor<VolumeType, Controller>::computeBitmaskForCell(const Array2DUint8& pPreviousBitmask, Array2DUint8& pCurrentBitmask, uint32_t uXRegSpace, uint32_t uYRegSpace)
{ {
uint8_t iCubeIndex = 0; uint8_t iCubeIndex = 0;
@ -385,7 +384,7 @@ namespace PolyVox
} }
//Save the bitmask //Save the bitmask
pCurrentBitmask[uXRegSpace][iYVolSpace- m_regSizeInVoxels.getLowerCorner().getY()] = iCubeIndex; pCurrentBitmask[uXRegSpace][uYRegSpace] = iCubeIndex;
if(edgeTable[iCubeIndex] != 0) if(edgeTable[iCubeIndex] != 0)
{ {

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Material_H__ #ifndef __PolyVox_Material_H__
#define __PolyVox_Material_H__ #define __PolyVox_Material_H__
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
#include "PolyVoxCore/DefaultIsQuadNeeded.h" //we'll specialise this function for this voxel type #include "PolyVoxCore/DefaultIsQuadNeeded.h" //we'll specialise this function for this voxel type
@ -34,14 +34,7 @@ namespace PolyVox
{ {
///This class represents a voxel storing only a material. ///This class represents a voxel storing only a material.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// In order to perform a surface extraction on a LargeVolume, PolyVox needs the underlying /// Detailed description...
/// voxel type to provide both getDensity() and getMaterial() functions. The getDensity()
/// function is used to determine if a voxel is 'solid', and if it is then the getMaterial()
/// funtion is used to determine what material should be assigned to the resulting mesh.
///
/// This class meets these requirements, although it only actually stores a material value.
/// For the getDensity() function it simply returns the smallest possible density if the
/// material is zero and the largest possible density if the material is not zero.
/// ///
/// \sa Density, MaterialDensityPair /// \sa Density, MaterialDensityPair
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -52,31 +45,30 @@ namespace PolyVox
class Material class Material
{ {
public: public:
//We expose DensityType and MaterialType in this way so that, when code is
//templatised on voxel type, it can determine the underlying storage type
//using code such as 'VoxelType::DensityType value = voxel.getDensity()'
//or 'VoxelType::MaterialType value = voxel.getMaterial()'.
typedef int32_t DensityType;
typedef Type MaterialType;
Material() : m_uMaterial(0) {} Material() : m_uMaterial(0) {}
Material(MaterialType uMaterial) : m_uMaterial(uMaterial) {} Material(Type uMaterial) : m_uMaterial(uMaterial) {}
bool operator==(const Material& rhs) const throw() bool operator==(const Material& rhs) const
{ {
return (m_uMaterial == rhs.m_uMaterial); return (m_uMaterial == rhs.m_uMaterial);
}; };
bool operator!=(const Material& rhs) const throw() bool operator!=(const Material& rhs) const
{ {
return !(*this == rhs); return !(*this == rhs);
} }
MaterialType getMaterial() const throw() { return m_uMaterial; } /// \return The current material value of the voxel
void setMaterial(MaterialType uMaterial) { m_uMaterial = uMaterial; } Type getMaterial() const { return m_uMaterial; }
/**
* Set the material value of the voxel
*
* \param uMaterial The material to set to
*/
void setMaterial(Type uMaterial) { m_uMaterial = uMaterial; }
private: private:
MaterialType m_uMaterial; Type m_uMaterial;
}; };
typedef Material<uint8_t> Material8; typedef Material<uint8_t> Material8;
@ -86,11 +78,11 @@ namespace PolyVox
class DefaultIsQuadNeeded< Material<Type> > class DefaultIsQuadNeeded< Material<Type> >
{ {
public: public:
bool operator()(Material<Type> back, Material<Type> front, float& materialToUse) bool operator()(Material<Type> back, Material<Type> front, uint32_t& materialToUse)
{ {
if((back.getMaterial() > 0) && (front.getMaterial() == 0)) if((back.getMaterial() > 0) && (front.getMaterial() == 0))
{ {
materialToUse = static_cast<float>(back.getMaterial()); materialToUse = static_cast<uint32_t>(back.getMaterial());
return true; return true;
} }
else else

View File

@ -27,21 +27,13 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/DefaultIsQuadNeeded.h" //we'll specialise this function for this voxel type #include "PolyVoxCore/DefaultIsQuadNeeded.h" //we'll specialise this function for this voxel type
#include "PolyVoxCore/DefaultMarchingCubesController.h" //We'll specialise the controller contained in here #include "PolyVoxCore/DefaultMarchingCubesController.h" //We'll specialise the controller contained in here
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
namespace PolyVox namespace PolyVox
{ {
/// This class represents a voxel storing only a density. /// This class represents a voxel storing only a density.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// In order to perform a surface extraction on a LargeVolume, PolyVox needs the underlying /// Detailed description...
/// voxel type to provide both getDensity() and getMaterial() functions. The getDensity()
/// function is used to determine if a voxel is 'solid', and if it is then the getMaterial()
/// funtion is used to determine what material should be assigned to the resulting mesh.
///
/// This class meets these requirements, and does so by storing and returning both a material
/// and a density value. Via the template parameters it is possible to control how much
/// precision is given to each. For example, if you create a class with 8 bits of storage,
/// you might choose to allocate 6 bits for the density and 2 bits for the material.
/// ///
/// \sa Density, Material /// \sa Density, Material
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -49,22 +41,15 @@ namespace PolyVox
class MaterialDensityPair class MaterialDensityPair
{ {
public: public:
//We expose DensityType and MaterialType in this way so that, when code is
//templatised on voxel type, it can determine the underlying storage type
//using code such as 'VoxelType::DensityType value = voxel.getDensity()'
//or 'VoxelType::MaterialType value = voxel.getMaterial()'.
typedef Type DensityType;
typedef Type MaterialType;
MaterialDensityPair() : m_uMaterial(0), m_uDensity(0) {} MaterialDensityPair() : m_uMaterial(0), m_uDensity(0) {}
MaterialDensityPair(Type uMaterial, Type uDensity) : m_uMaterial(uMaterial), m_uDensity(uDensity) {} MaterialDensityPair(Type uMaterial, Type uDensity) : m_uMaterial(uMaterial), m_uDensity(uDensity) {}
bool operator==(const MaterialDensityPair& rhs) const throw() bool operator==(const MaterialDensityPair& rhs) const
{ {
return (m_uMaterial == rhs.m_uMaterial) && (m_uDensity == rhs.m_uDensity); return (m_uMaterial == rhs.m_uMaterial) && (m_uDensity == rhs.m_uDensity);
}; };
bool operator!=(const MaterialDensityPair& rhs) const throw() bool operator!=(const MaterialDensityPair& rhs) const
{ {
return !(*this == rhs); return !(*this == rhs);
} }
@ -87,29 +72,29 @@ namespace PolyVox
return *this; return *this;
} }
DensityType getDensity() const throw() { return m_uDensity; } Type getDensity() const { return m_uDensity; }
MaterialType getMaterial() const throw() { return m_uMaterial; } Type getMaterial() const { return m_uMaterial; }
void setDensity(DensityType uDensity) { m_uDensity = uDensity; } void setDensity(Type uDensity) { m_uDensity = uDensity; }
void setMaterial(MaterialType uMaterial) { m_uMaterial = uMaterial; } void setMaterial(Type uMaterial) { m_uMaterial = uMaterial; }
static DensityType getMaxDensity() throw() { return (0x01 << NoOfDensityBits) - 1; } static Type getMaxDensity() { return (0x01 << NoOfDensityBits) - 1; }
static DensityType getMinDensity() throw() { return 0; } static Type getMinDensity() { return 0; }
private: private:
MaterialType m_uMaterial : NoOfMaterialBits; Type m_uMaterial : NoOfMaterialBits;
DensityType m_uDensity : NoOfDensityBits; Type m_uDensity : NoOfDensityBits;
}; };
template<typename Type, uint8_t NoOfMaterialBits, uint8_t NoOfDensityBits> template<typename Type, uint8_t NoOfMaterialBits, uint8_t NoOfDensityBits>
class DefaultIsQuadNeeded< MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> > class DefaultIsQuadNeeded< MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> >
{ {
public: public:
bool operator()(MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> back, MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> front, float& materialToUse) bool operator()(MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> back, MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> front, uint32_t& materialToUse)
{ {
if((back.getMaterial() > 0) && (front.getMaterial() == 0)) if((back.getMaterial() > 0) && (front.getMaterial() == 0))
{ {
materialToUse = static_cast<float>(back.getMaterial()); materialToUse = static_cast<uint32_t>(back.getMaterial());
return true; return true;
} }
else else

View File

@ -64,6 +64,8 @@ namespace PolyVox
/// The above applies for a cubic mesh, for a Marching Cubes mesh you need to parametise /// The above applies for a cubic mesh, for a Marching Cubes mesh you need to parametise
/// the MeshDecimator and resulting SurfaceMesh on the 'PositionMaterialNormal' type /// the MeshDecimator and resulting SurfaceMesh on the 'PositionMaterialNormal' type
/// instead of the 'PositionMaterial' type. /// instead of the 'PositionMaterial' type.
///
/// \deprecated
template <typename VertexType> template <typename VertexType>
class MeshDecimator class MeshDecimator
{ {
@ -141,10 +143,10 @@ namespace PolyVox
public: public:
///Constructor ///Constructor
MeshDecimator(const SurfaceMesh<VertexType>* pInputMesh, SurfaceMesh<VertexType>* pOutputMesh, float fEdgeCollapseThreshold = 0.95f); POLYVOX_DEPRECATED MeshDecimator(const SurfaceMesh<VertexType>* pInputMesh, SurfaceMesh<VertexType>* pOutputMesh, float fEdgeCollapseThreshold = 0.95f);
///Performs the decimation. ///Performs the decimation.
void execute(); POLYVOX_DEPRECATED void execute();
private: private:

View File

@ -26,7 +26,7 @@ namespace PolyVox
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Builds a MeshDecimator. /// Builds a MeshDecimator.
/// \param pInputMesh A pointer to the mesh to be decimated. /// \param pInputMesh A pointer to the mesh to be decimated.
/// \param pOutputMesh A pointer to where the result should be stored. Any existing /// \param[out] pOutputMesh A pointer to where the result should be stored. Any existing
/// contents will be deleted. /// contents will be deleted.
/// \param fEdgeCollapseThreshold This is only use in the case of a Marching Cubes /// \param fEdgeCollapseThreshold This is only use in the case of a Marching Cubes
/// surface and controls how close two normals must be to collapse. The dot product /// surface and controls how close two normals must be to collapse. The dot product

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_ForwardDeclarations_H__ #ifndef __PolyVox_ForwardDeclarations_H__
#define __PolyVox_ForwardDeclarations_H__ #define __PolyVox_ForwardDeclarations_H__
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
namespace PolyVox namespace PolyVox
{ {

View File

@ -117,10 +117,8 @@ namespace PolyVox
public: public:
/// Constructor for creating a fixed size volume. /// Constructor for creating a fixed size volume.
RawVolume RawVolume(const Region& regValid);
(
const Region& regValid
);
/// Destructor /// Destructor
~RawVolume(); ~RawVolume();
@ -141,6 +139,13 @@ namespace PolyVox
/// Calculates approximatly how many bytes of memory the volume is currently using. /// Calculates approximatly how many bytes of memory the volume is currently using.
uint32_t calculateSizeInBytes(void); uint32_t calculateSizeInBytes(void);
protected:
/// Copy constructor
RawVolume(const RawVolume& rhs);
/// Assignment operator
RawVolume& operator=(const RawVolume& rhs);
private: private:
void initialise(const Region& regValidRegion); void initialise(const Region& regValidRegion);

View File

@ -28,10 +28,7 @@ namespace PolyVox
/// \param regValid Specifies the minimum and maximum valid voxel positions. /// \param regValid Specifies the minimum and maximum valid voxel positions.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
RawVolume<VoxelType>::RawVolume RawVolume<VoxelType>::RawVolume(const Region& regValid)
(
const Region& regValid
)
:BaseVolume<VoxelType>(regValid) :BaseVolume<VoxelType>(regValid)
{ {
setBorderValue(VoxelType()); setBorderValue(VoxelType());
@ -40,6 +37,19 @@ namespace PolyVox
initialise(regValid); initialise(regValid);
} }
////////////////////////////////////////////////////////////////////////////////
/// This function should never be called. Copying volumes by value would be expensive, and we want to prevent users from doing
/// it by accident (such as when passing them as paramenters to functions). That said, there are times when you really do want to
/// make a copy of a volume and in this case you should look at the Volumeresampler.
///
/// \sa VolumeResampler
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
RawVolume<VoxelType>::RawVolume(const RawVolume<VoxelType>& /*rhs*/)
{
assert(false); // See function comment above.
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Destroys the volume /// Destroys the volume
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -50,6 +60,19 @@ namespace PolyVox
m_pData = 0; m_pData = 0;
} }
////////////////////////////////////////////////////////////////////////////////
/// This function should never be called. Copying volumes by value would be expensive, and we want to prevent users from doing
/// it by accident (such as when passing them as paramenters to functions). That said, there are times when you really do want to
/// make a copy of a volume and in this case you should look at the Volumeresampler.
///
/// \sa VolumeResampler
////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
RawVolume<VoxelType>& RawVolume<VoxelType>::operator=(const RawVolume<VoxelType>& /*rhs*/)
{
assert(false); // See function comment above.
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The border value is returned whenever an attempt is made to read a voxel which /// The border value is returned whenever an attempt is made to read a voxel which
/// is outside the extents of the volume. /// is outside the extents of the volume.

View File

@ -28,24 +28,23 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
/// Stores the result of a raycast operation. namespace RaycastResults
////////////////////////////////////////////////////////////////////////////////
/// A instance of this structure is passed to a Raycast object, and is filled in
/// as the ray traverses the volume. The 'foundIntersection' field indicates whether
/// the ray hit any solid voxels, and if so the 'intersectionVoxel' field indicates
///the voxel's position
////////////////////////////////////////////////////////////////////////////////
struct RaycastResult
{ {
///Indicates whether an intersection was found /**
bool foundIntersection; * The results of a raycast
///If an intersection was found then this field holds the intersecting voxel, otherwise it is undefined. */
Vector3DInt32 intersectionVoxel; enum RaycastResult
Vector3DInt32 previousVoxel; {
Completed, ///< If the ray passed through the volume without being interupted
Interupted ///< If the ray was interupted while travelling
}; };
}
typedef RaycastResults::RaycastResult RaycastResult;
/// The Raycast class can be used to find the fist filled voxel along a given path. /// OUT OF DATE SINCE UNCLASSING
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// \file Raycast.h
///
/// The principle behind raycasting is to fire a 'ray' through the volume and determine /// The principle behind raycasting is to fire a 'ray' through the volume and determine
/// what (if anything) that ray hits. This simple test can be used for the purpose of /// what (if anything) that ray hits. This simple test can be used for the purpose of
/// picking, visibility checks, lighting calculations, or numerous other applications. /// picking, visibility checks, lighting calculations, or numerous other applications.
@ -59,7 +58,7 @@ namespace PolyVox
/// of the RaycastResult structure and the intersectionFound flag is set to true, otherwise /// of the RaycastResult structure and the intersectionFound flag is set to true, otherwise
/// the intersectionFound flag is set to false. /// the intersectionFound flag is set to false.
/// ///
/// <b>Important Note:</b> These has been confusion in the past with people not realising /// **Important Note:** These has been confusion in the past with people not realising
/// that the length of the direction vector is important. Most graphics API can provide /// that the length of the direction vector is important. Most graphics API can provide
/// a camera position and view direction for picking purposes, but the view direction is /// a camera position and view direction for picking purposes, but the view direction is
/// usually normalised (i.e. of length one). If you use this view direction directly you /// usually normalised (i.e. of length one). If you use this view direction directly you
@ -91,35 +90,12 @@ namespace PolyVox
/// surace extractors. It's behaviour with the Marching Cubes surface extractor has not /// surace extractors. It's behaviour with the Marching Cubes surface extractor has not
/// been tested yet. /// been tested yet.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template<typename VolumeType>
class Raycast
{
public:
///Constructor
Raycast(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, RaycastResult& result, polyvox_function<bool(const typename VolumeType::Sampler& sampler)> funcIsPassable);
///Sets the start position for the ray. template<typename VolumeType, typename Callback>
void setStart(const Vector3DFloat& v3dStart); RaycastResult raycastWithEndpoints(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dEnd, Callback& callback);
///Set the direction for the ray.
void setDirection(const Vector3DFloat& v3dDirectionAndLength);
///Performs the raycast. template<typename VolumeType, typename Callback>
void execute(); RaycastResult raycastWithDirection(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, Callback& callback);
private:
RaycastResult& m_result;
polyvox_function<bool(const typename VolumeType::Sampler& position)> m_funcIsPassable;
void doRaycast(float x1, float y1, float z1, float x2, float y2, float z2);
VolumeType* m_volData;
typename VolumeType::Sampler m_sampVolume;
Vector3DFloat m_v3dStart;
Vector3DFloat m_v3dDirectionAndLength;
float m_fMaxDistance;
};
} }
#include "PolyVoxCore/Raycast.inl" #include "PolyVoxCore/Raycast.inl"

View File

@ -23,63 +23,6 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
////////////////////////////////////////////////////////////////////////////////
/// Builds a Raycast object.
/// \param volData A pointer to the volume through which the ray will be cast.
/// \param v3dStart The starting position of the ray.
/// \param v3dDirectionAndLength The direction of the ray. The length of this vector also
/// represents the length of the ray.
/// \param result An instance of RaycastResult in which the result will be stored.
////////////////////////////////////////////////////////////////////////////////
template<typename VolumeType>
Raycast<VolumeType>::Raycast(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, RaycastResult& result, polyvox_function<bool(const typename VolumeType::Sampler& sampler)> funcIsPassable)
:m_result(result)
,m_funcIsPassable(funcIsPassable)
,m_volData(volData)
,m_sampVolume(volData)
,m_v3dStart(v3dStart)
,m_v3dDirectionAndLength(v3dDirectionAndLength)
{
}
////////////////////////////////////////////////////////////////////////////////
/// \param v3dStart The starting position of the ray.
////////////////////////////////////////////////////////////////////////////////
template<typename VolumeType>
void Raycast<VolumeType>::setStart(const Vector3DFloat& v3dStart)
{
m_v3dStart = v3dStart;
}
////////////////////////////////////////////////////////////////////////////////
/// \param v3dDirectionAndLength The direction of the ray. The length of this vector also
/// represents the length of the ray.
////////////////////////////////////////////////////////////////////////////////
template<typename VolumeType>
void Raycast<VolumeType>::setDirection(const Vector3DFloat& v3dDirectionAndLength)
{
//FIXME: We should add a warning when the ray direction is of length one, as this seems to be a common mistake.
m_v3dDirectionAndLength = v3dDirectionAndLength;
}
////////////////////////////////////////////////////////////////////////////////
/// The result is stored in the RaycastResult instance which was passed to the constructor.
////////////////////////////////////////////////////////////////////////////////
template<typename VolumeType>
void Raycast<VolumeType>::execute(void)
{
//The doRaycast function is assuming that it is iterating over the areas defined between
//voxels. We actually want to define the areas as being centered on voxels (as this is
//what the CubicSurfaceExtractor generates). We add (0.5,0.5,0.5) here to adjust for this.
Vector3DFloat v3dStart = m_v3dStart + Vector3DFloat(0.5f, 0.5f, 0.5f);
//Compute the end point
Vector3DFloat v3dEnd = v3dStart + m_v3dDirectionAndLength;
//Do the raycast
doRaycast(v3dStart.getX(), v3dStart.getY(), v3dStart.getZ(), v3dEnd.getX(), v3dEnd.getY(), v3dEnd.getZ());
}
// This function is based on Christer Ericson's code and description of the 'Uniform Grid Intersection Test' in // This function is based on Christer Ericson's code and description of the 'Uniform Grid Intersection Test' in
// 'Real Time Collision Detection'. The following information from the errata on the book website is also relevent: // 'Real Time Collision Detection'. The following information from the errata on the book website is also relevent:
// //
@ -92,8 +35,8 @@ namespace PolyVox
// Thanks to Jetro Lauha of Fathammer in Helsinki, Finland for reporting this error. // Thanks to Jetro Lauha of Fathammer in Helsinki, Finland for reporting this error.
// //
// Jetro also points out that the computations of i, j, iend, and jend are incorrectly rounded if the line // Jetro also points out that the computations of i, j, iend, and jend are incorrectly rounded if the line
// coordinates are allowed to go negative. While that was not really the intent of the code that is, I // coordinates are allowed to go negative. While that was not really the intent of the code -- that is, I
// assumed grids to be numbered from (0, 0) to (m, n) I'm at fault for not making my assumption clear. // assumed grids to be numbered from (0, 0) to (m, n) -- I'm at fault for not making my assumption clear.
// Where it is important to handle negative line coordinates the computation of these variables should be // Where it is important to handle negative line coordinates the computation of these variables should be
// changed to something like this: // changed to something like this:
// //
@ -109,9 +52,37 @@ namespace PolyVox
// It should simply read "if (ty <= tz)". // It should simply read "if (ty <= tz)".
// //
// This error was reported by Joey Hammer (PixelActive). // This error was reported by Joey Hammer (PixelActive).
template<typename VolumeType>
void Raycast<VolumeType>::doRaycast(float x1, float y1, float z1, float x2, float y2, float z2) /**
* Cast a ray through a volume by specifying the start and end positions
*
* The ray will move from \a v3dStart to \a v3dEnd, calling \a callback for each
* voxel it passes through until \a callback returns \a false. In this case it
* returns a RaycastResults::Interupted. If it passes from start to end
* without \a callback returning \a false, it returns RaycastResults::Completed.
*
* \param volData The volume to pass the ray though
* \param v3dStart The start position in the volume
* \param v3dEnd The end position in the volume
* \param callback The callback to call for each voxel
*
* \return A RaycastResults designating whether the ray hit anything or not
*/
template<typename VolumeType, typename Callback>
RaycastResult raycastWithEndpoints(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dEnd, Callback& callback)
{ {
typename VolumeType::Sampler sampler(volData);
//The doRaycast function is assuming that it is iterating over the areas defined between
//voxels. We actually want to define the areas as being centered on voxels (as this is
//what the CubicSurfaceExtractor generates). We add 0.5 here to adjust for this.
float x1 = v3dStart.getX() + 0.5f;
float y1 = v3dStart.getY() + 0.5f;
float z1 = v3dStart.getZ() + 0.5f;
float x2 = v3dEnd.getX() + 0.5f;
float y2 = v3dEnd.getY() + 0.5f;
float z2 = v3dEnd.getZ() + 0.5f;
int i = (int)floorf(x1); int i = (int)floorf(x1);
int j = (int)floorf(y1); int j = (int)floorf(y1);
int k = (int)floorf(z1); int k = (int)floorf(z1);
@ -135,18 +106,14 @@ namespace PolyVox
float minz = floorf(z1), maxz = minz + 1.0f; float minz = floorf(z1), maxz = minz + 1.0f;
float tz = ((z1 > z2) ? (z1 - minz) : (maxz - z1)) * deltatz; float tz = ((z1 > z2) ? (z1 - minz) : (maxz - z1)) * deltatz;
m_sampVolume.setPosition(i,j,k); sampler.setPosition(i,j,k);
m_result.previousVoxel = Vector3DInt32(i,j,k);
for(;;) for(;;)
{ {
if(!m_funcIsPassable(m_sampVolume)) if(!callback(sampler))
{ {
m_result.foundIntersection = true; return RaycastResults::Interupted;
m_result.intersectionVoxel = Vector3DInt32(i,j,k);
return;
} }
m_result.previousVoxel = Vector3DInt32(i,j,k);
if(tx <= ty && tx <= tz) if(tx <= ty && tx <= tz)
{ {
@ -154,30 +121,58 @@ namespace PolyVox
tx += deltatx; tx += deltatx;
i += di; i += di;
if(di == 1) m_sampVolume.movePositiveX(); if(di == 1) sampler.movePositiveX();
if(di == -1) m_sampVolume.moveNegativeX(); if(di == -1) sampler.moveNegativeX();
} else if (ty <= tz) } else if (ty <= tz)
{ {
if(j == jend) break; if(j == jend) break;
ty += deltaty; ty += deltaty;
j += dj; j += dj;
if(dj == 1) m_sampVolume.movePositiveY(); if(dj == 1) sampler.movePositiveY();
if(dj == -1) m_sampVolume.moveNegativeY(); if(dj == -1) sampler.moveNegativeY();
} else } else
{ {
if(k == kend) break; if(k == kend) break;
tz += deltatz; tz += deltatz;
k += dk; k += dk;
if(dk == 1) m_sampVolume.movePositiveZ(); if(dk == 1) sampler.movePositiveZ();
if(dk == -1) m_sampVolume.moveNegativeZ(); if(dk == -1) sampler.moveNegativeZ();
} }
} }
//Didn't hit anything return RaycastResults::Completed;
m_result.foundIntersection = false; }
m_result.intersectionVoxel = Vector3DInt32(0,0,0);
m_result.previousVoxel = Vector3DInt32(0,0,0); /**
* Cast a ray through a volume by specifying the start and a direction
*
* The ray will move from \a v3dStart along \a v3dDirectionAndLength, calling
* \a callback for each voxel it passes through until \a callback returns
* \a false. In this case it returns a RaycastResults::Interupted. If it
* passes from start to end without \a callback returning \a false, it
* returns RaycastResults::Completed.
*
* \note These has been confusion in the past with people not realising
* that the length of the direction vector is important. Most graphics API can provide
* a camera position and view direction for picking purposes, but the view direction is
* usually normalised (i.e. of length one). If you use this view direction directly you
* will only iterate over a single voxel and won't find what you are looking for. Instead
* you must scale the direction vector so that it's length represents the maximum distance
* over which you want the ray to be cast.
*
* \param volData The volume to pass the ray though
* \param v3dStart The start position in the volume
* \param v3dDirectionAndLength The direction and length of the ray
* \param callback The callback to call for each voxel
*
* \return A RaycastResults designating whether the ray hit anything or not
*/
template<typename VolumeType, typename Callback>
RaycastResult raycastWithDirection(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, Callback& callback)
{
Vector3DFloat v3dEnd = v3dStart + v3dDirectionAndLength;
return raycastWithEndpoints<VolumeType, Callback>(volData, v3dStart, v3dEnd, callback);
} }
} }

View File

@ -1,62 +0,0 @@
/*******************************************************************************
Copyright (c) 2005-2009 David Williams
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*******************************************************************************/
#ifndef __PolyVox_RaycastWithCallback_H__
#define __PolyVox_RaycastWithCallback_H__
#include "PolyVoxCore/Vector.h"
namespace PolyVox
{
template<typename VolumeType>
class RaycastWithCallback
{
public:
///Constructor
RaycastWithCallback(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, polyvox_function<bool(const Vector3DInt32& position)> funcCallback);
///Sets the start position for the ray.
void setStart(const Vector3DFloat& v3dStart);
///Set the direction for the ray.
void setDirection(const Vector3DFloat& v3dDirectionAndLength);
///Performs the raycast.
void execute();
private:
polyvox_function<bool(const Vector3DInt32& position)> m_funcCallback;
void doRaycast(float x1, float y1, float z1, float x2, float y2, float z2);
VolumeType* m_volData;
typename VolumeType::Sampler m_sampVolume;
Vector3DFloat m_v3dStart;
Vector3DFloat m_v3dDirectionAndLength;
float m_fMaxDistance;
};
}
#include "PolyVoxCore/RaycastWithCallback.inl"
#endif //__PolyVox_RaycastWithCallback_H__

View File

@ -1,155 +0,0 @@
/*******************************************************************************
Copyright (c) 2005-2009 David Williams
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*******************************************************************************/
namespace PolyVox
{
template<typename VolumeType>
RaycastWithCallback<VolumeType>::RaycastWithCallback(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, polyvox_function<bool(const Vector3DInt32& position)> funcCallback)
:m_volData(volData)
,m_sampVolume(volData)
,m_v3dStart(v3dStart)
,m_v3dDirectionAndLength(v3dDirectionAndLength)
,m_funcCallback(funcCallback)
{
//Check the user provided a callback, because it
//is used to determine when to finish the raycast.
assert(m_funcCallback);
}
template<typename VolumeType>
void RaycastWithCallback<VolumeType>::setStart(const Vector3DFloat& v3dStart)
{
m_v3dStart = v3dStart;
}
template<typename VolumeType>
void RaycastWithCallback<VolumeType>::setDirection(const Vector3DFloat& v3dDirectionAndLength)
{
m_v3dDirectionAndLength = v3dDirectionAndLength;
}
template<typename VolumeType>
void RaycastWithCallback<VolumeType>::execute(void)
{
//The doRaycast function is assuming that it is iterating over the areas defined between
//voxels. We actually want to define the areas as being centered on voxels (as this is
//what the CubicSurfaceExtractor generates). We add (0.5,0.5,0.5) here to adjust for this.
Vector3DFloat v3dStart = m_v3dStart + Vector3DFloat(0.5f, 0.5f, 0.5f);
//Compute the end point
Vector3DFloat v3dEnd = v3dStart + m_v3dDirectionAndLength;
//Do the raycast
doRaycast(v3dStart.getX(), v3dStart.getY(), v3dStart.getZ(), v3dEnd.getX(), v3dEnd.getY(), v3dEnd.getZ());
}
// This function is based on Christer Ericson's code and description of the 'Uniform Grid Intersection Test' in
// 'Real Time Collision Detection'. The following information from the errata on the book website is also relevent:
//
// pages 326-327. In the function VisitCellsOverlapped() the two lines calculating tx and ty are incorrect.
// The less-than sign in each line should be a greater-than sign. That is, the two lines should read:
//
// float tx = ((x1 > x2) ? (x1 - minx) : (maxx - x1)) / Abs(x2 - x1);
// float ty = ((y1 > y2) ? (y1 - miny) : (maxy - y1)) / Abs(y2 - y1);
//
// Thanks to Jetro Lauha of Fathammer in Helsinki, Finland for reporting this error.
//
// Jetro also points out that the computations of i, j, iend, and jend are incorrectly rounded if the line
// coordinates are allowed to go negative. While that was not really the intent of the code — that is, I
// assumed grids to be numbered from (0, 0) to (m, n) — I'm at fault for not making my assumption clear.
// Where it is important to handle negative line coordinates the computation of these variables should be
// changed to something like this:
//
// // Determine start grid cell coordinates (i, j)
// int i = (int)floorf(x1 / CELL_SIDE);
// int j = (int)floorf(y1 / CELL_SIDE);
//
// // Determine end grid cell coordinates (iend, jend)
// int iend = (int)floorf(x2 / CELL_SIDE);
// int jend = (int)floorf(y2 / CELL_SIDE);
//
// page 328. The if-statement that reads "if (ty <= tx && ty <= tz)" has a superfluous condition.
// It should simply read "if (ty <= tz)".
//
// This error was reported by Joey Hammer (PixelActive).
template<typename VolumeType>
void RaycastWithCallback<VolumeType>::doRaycast(float x1, float y1, float z1, float x2, float y2, float z2)
{
int i = (int)floorf(x1);
int j = (int)floorf(y1);
int k = (int)floorf(z1);
int iend = (int)floorf(x2);
int jend = (int)floorf(y2);
int kend = (int)floorf(z2);
int di = ((x1 < x2) ? 1 : ((x1 > x2) ? -1 : 0));
int dj = ((y1 < y2) ? 1 : ((y1 > y2) ? -1 : 0));
int dk = ((z1 < z2) ? 1 : ((z1 > z2) ? -1 : 0));
float deltatx = 1.0f / std::abs(x2 - x1);
float deltaty = 1.0f / std::abs(y2 - y1);
float deltatz = 1.0f / std::abs(z2 - z1);
float minx = floorf(x1), maxx = minx + 1.0f;
float tx = ((x1 > x2) ? (x1 - minx) : (maxx - x1)) * deltatx;
float miny = floorf(y1), maxy = miny + 1.0f;
float ty = ((y1 > y2) ? (y1 - miny) : (maxy - y1)) * deltaty;
float minz = floorf(z1), maxz = minz + 1.0f;
float tz = ((z1 > z2) ? (z1 - minz) : (maxz - z1)) * deltatz;
m_sampVolume.setPosition(i,j,k);
for(;;)
{
//Call the callback. If it returns false then finish the loop.
if(!m_funcCallback(Vector3DInt32(i,j,k)))
{
break;
}
if(tx <= ty && tx <= tz)
{
tx += deltatx;
i += di;
if(di == 1) m_sampVolume.movePositiveX();
if(di == -1) m_sampVolume.moveNegativeX();
} else if (ty <= tz)
{
ty += deltaty;
j += dj;
if(dj == 1) m_sampVolume.movePositiveY();
if(dj == -1) m_sampVolume.moveNegativeY();
} else
{
tz += deltatz;
k += dk;
if(dk == 1) m_sampVolume.movePositiveZ();
if(dk == -1) m_sampVolume.moveNegativeZ();
}
}
}
}

View File

@ -24,12 +24,27 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Region_H__ #ifndef __PolyVox_Region_H__
#define __PolyVox_Region_H__ #define __PolyVox_Region_H__
#include "PolyVoxImpl/TypeDef.h" #include "Impl/TypeDef.h"
#include "PolyVoxCore/Vector.h" #include "PolyVoxCore/Vector.h"
namespace PolyVox namespace PolyVox
{ {
/**
Represents a part of a Volume.
Many operations in PolyVox are constrained to only part of a volume. For example, when running the surface extractors
it is unlikely that you will want to run it on the whole volume at once, as this will give a very large mesh which may
be too much to render. Instead you will probably want to run a surface extractor a number of times on different parts
of the volume, there by giving a number of meshes which can be culled and rendered seperately.
The Region class is used to define these parts (regions) of the volume. Essentially it consists of an upper and lower
bound which specify the range of voxels positions considered to be part of the region. Note that these bounds are
<em>inclusive</em>. The class also provides functions for modifying the regions in a variety of ways.
\Note The dimensions of a region can be measured either in voxels or in cells. See the manual for more information
about these definitions.
*/
#ifdef SWIG #ifdef SWIG
class Region class Region
#else #else
@ -45,13 +60,31 @@ namespace PolyVox
Region(int32_t iLowerX, int32_t iLowerY, int32_t iLowerZ, int32_t iUpperX, int32_t iUpperY, int32_t iUpperZ); Region(int32_t iLowerX, int32_t iLowerY, int32_t iLowerZ, int32_t iUpperX, int32_t iUpperY, int32_t iUpperZ);
///Equality Operator. ///Equality Operator.
bool operator==(const Region& rhs) const throw(); bool operator==(const Region& rhs) const;
///Inequality Operator. ///Inequality Operator.
bool operator!=(const Region& rhs) const throw(); bool operator!=(const Region& rhs) const;
const Vector3DInt32& getLowerCorner(void) const; const Vector3DInt32& getLowerCorner(void) const;
const Vector3DInt32& getUpperCorner(void) const; const Vector3DInt32& getUpperCorner(void) const;
/// Gets the width of the region measured in voxels
int32_t getWidthInVoxels(void) const;
/// Gets the height of the region measured in voxels
int32_t getHeightInVoxels(void) const;
/// Gets the depth of the region measured in voxels
int32_t getDepthInVoxels(void) const;
/// Gets the dimensions of the region measured in voxels
Vector3DInt32 getDimensionsInVoxels(void) const;
/// Gets the width of the region measured in cells
int32_t getWidthInCells(void) const;
/// Gets the height of the region measured in cells
int32_t getHeightInCells(void) const;
/// Gets the depth of the region measured in cells
int32_t getDepthInCells(void) const;
/// Gets the dimensions of the region measured in cells
Vector3DInt32 getDimensionsInCells(void) const;
void setLowerCorner(const Vector3DInt32& v3dLowerCorner); void setLowerCorner(const Vector3DInt32& v3dLowerCorner);
void setUpperCorner(const Vector3DInt32& v3dUpperCorner); void setUpperCorner(const Vector3DInt32& v3dUpperCorner);
@ -66,17 +99,17 @@ namespace PolyVox
bool containsPointInZ(int32_t pos, uint8_t boundary = 0) const; bool containsPointInZ(int32_t pos, uint8_t boundary = 0) const;
void cropTo(const Region& other); void cropTo(const Region& other);
/// Deprecated and misleading /// Deprecated and misleading
int32_t depth(void) const; POLYVOX_DEPRECATED int32_t depth(void) const;
/// Deprecated and misleading /// Deprecated and misleading
int32_t height(void) const; POLYVOX_DEPRECATED int32_t height(void) const;
void shift(const Vector3DInt32& amount); void shift(const Vector3DInt32& amount);
void shiftLowerCorner(const Vector3DInt32& amount); void shiftLowerCorner(const Vector3DInt32& amount);
void shiftUpperCorner(const Vector3DInt32& amount); void shiftUpperCorner(const Vector3DInt32& amount);
//FIXME - Add dilate and erode functions? //FIXME - Add dilate and erode functions?
/// Deprecated and misleading /// Deprecated and misleading
Vector3DInt32 dimensions(void); POLYVOX_DEPRECATED Vector3DInt32 dimensions(void);
/// Deprecated and misleading /// Deprecated and misleading
int32_t width(void) const; POLYVOX_DEPRECATED int32_t width(void) const;
private: private:
Vector3DInt32 m_v3dLowerCorner; Vector3DInt32 m_v3dLowerCorner;

View File

@ -36,8 +36,10 @@ namespace PolyVox
typedef SimpleVolume<MaterialDensityPair88> Volume; typedef SimpleVolume<MaterialDensityPair88> Volume;
typedef SurfaceMesh<PositionMaterialNormal> Mesh; typedef SurfaceMesh<PositionMaterialNormal> Mesh;
void extractCubicMesh(Volume& volume, const Region& region, Mesh& resultMesh); /// \deprecated
void extractSmoothMesh(Volume& volume, const Region& region, Mesh& resultMesh); POLYVOX_DEPRECATED void extractCubicMesh(Volume& volume, const Region& region, Mesh& resultMesh);
/// \deprecated
POLYVOX_DEPRECATED void extractSmoothMesh(Volume& volume, const Region& region, Mesh& resultMesh);
} }

View File

@ -24,7 +24,7 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_SimpleVolume_H__ #ifndef __PolyVox_SimpleVolume_H__
#define __PolyVox_SimpleVolume_H__ #define __PolyVox_SimpleVolume_H__
#include "PolyVoxImpl/Utility.h" #include "Impl/Utility.h"
#include "PolyVoxCore/BaseVolume.h" #include "PolyVoxCore/BaseVolume.h"
#include "PolyVoxCore/Log.h" #include "PolyVoxCore/Log.h"
@ -45,6 +45,7 @@ namespace PolyVox
{ {
public: public:
#ifndef SWIG #ifndef SWIG
//Could be made private?
class Block class Block
{ {
public: public:
@ -82,24 +83,35 @@ namespace PolyVox
#endif #endif
{ {
public: public:
/// Construct a new Sampler
Sampler(SimpleVolume<VoxelType>* volume); Sampler(SimpleVolume<VoxelType>* volume);
~Sampler(); ~Sampler();
Sampler& operator=(const Sampler& rhs) throw(); Sampler& operator=(const Sampler& rhs);
VoxelType getSubSampledVoxel(uint8_t uLevel) const; VoxelType getSubSampledVoxel(uint8_t uLevel) const;
/// Get the value of the current voxel
inline VoxelType getVoxel(void) const; inline VoxelType getVoxel(void) const;
/// Set the current voxel position
void setPosition(const Vector3DInt32& v3dNewPos); void setPosition(const Vector3DInt32& v3dNewPos);
/// Set the current voxel position
void setPosition(int32_t xPos, int32_t yPos, int32_t zPos); void setPosition(int32_t xPos, int32_t yPos, int32_t zPos);
/// Set the value of the current voxel
inline bool setVoxel(VoxelType tValue); inline bool setVoxel(VoxelType tValue);
/// Increase the \a x position by \a 1
void movePositiveX(void); void movePositiveX(void);
/// Increase the \a y position by \a 1
void movePositiveY(void); void movePositiveY(void);
/// Increase the \a z position by \a 1
void movePositiveZ(void); void movePositiveZ(void);
/// Decrease the \a x position by \a 1
void moveNegativeX(void); void moveNegativeX(void);
/// Decrease the \a y position by \a 1
void moveNegativeY(void); void moveNegativeY(void);
/// Decrease the \a z position by \a 1
void moveNegativeZ(void); void moveNegativeZ(void);
inline VoxelType peekVoxel1nx1ny1nz(void) const; inline VoxelType peekVoxel1nx1ny1nz(void) const;
@ -140,11 +152,8 @@ namespace PolyVox
public: public:
/// Constructor for creating a fixed size volume. /// Constructor for creating a fixed size volume.
SimpleVolume SimpleVolume(const Region& regValid, uint16_t uBlockSideLength = 32);
(
const Region& regValid,
uint16_t uBlockSideLength = 32
);
/// Destructor /// Destructor
~SimpleVolume(); ~SimpleVolume();
@ -165,6 +174,13 @@ namespace PolyVox
/// Calculates approximatly how many bytes of memory the volume is currently using. /// Calculates approximatly how many bytes of memory the volume is currently using.
uint32_t calculateSizeInBytes(void); uint32_t calculateSizeInBytes(void);
protected:
/// Copy constructor
SimpleVolume(const SimpleVolume& rhs);
/// Assignment operator
SimpleVolume& operator=(const SimpleVolume& rhs);
private: private:
void initialise(const Region& regValidRegion, uint16_t uBlockSideLength); void initialise(const Region& regValidRegion, uint16_t uBlockSideLength);

Some files were not shown because too many files have changed in this diff Show More