Merge branch 'release/v0.2.0'
This commit is contained in:
commit
6d37583da5
@ -1,19 +1,57 @@
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
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. 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
|
||||
-----------------------------
|
||||
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 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.
|
||||
|
||||
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 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
|
||||
-----------------------
|
||||
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.
|
||||
|
@ -25,7 +25,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
|
||||
PROJECT(PolyVox)
|
||||
|
||||
SET(POLYVOX_VERSION_MAJOR "0")
|
||||
SET(POLYVOX_VERSION_MINOR "1")
|
||||
SET(POLYVOX_VERSION_MINOR "2")
|
||||
SET(POLYVOX_VERSION_PATCH "0")
|
||||
SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX_VERSION_PATCH}" CACHE STRING "PolyVox version")
|
||||
MARK_AS_ADVANCED(FORCE POLYVOX_VERSION)
|
||||
@ -57,7 +57,7 @@ endif()
|
||||
|
||||
if(MSVC AND (MSVC_VERSION LESS 1600))
|
||||
# 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)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
endif()
|
||||
@ -72,22 +72,28 @@ endif()
|
||||
ADD_SUBDIRECTORY(library)
|
||||
|
||||
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/Paging)
|
||||
ADD_SUBDIRECTORY(examples/OpenGL)
|
||||
ADD_SUBDIRECTORY(examples/SmoothLOD)
|
||||
ENDIF(ENABLE_EXAMPLES)
|
||||
SET(BUILD_EXAMPLES ON)
|
||||
ELSE()
|
||||
SET(BUILD_EXAMPLES OFF)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(Packaging.cmake)
|
||||
|
||||
OPTION(ENABLE_TESTS "Should the tests be built" ON)
|
||||
IF(ENABLE_TESTS)
|
||||
IF(ENABLE_TESTS AND QT_QTTEST_FOUND)
|
||||
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 BUILD_TESTING)
|
||||
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
|
||||
IF(DOXYGEN_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
|
||||
@ -98,8 +104,8 @@ ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(documentation)
|
||||
|
||||
add_feature_info("Examples" ENABLE_EXAMPLES "Examples of PolyVox usage")
|
||||
add_feature_info("Tests" ENABLE_TESTS "Unit tests")
|
||||
add_feature_info("Examples" BUILD_EXAMPLES "Examples of PolyVox usage")
|
||||
add_feature_info("Tests" BUILD_TESTS "Unit tests")
|
||||
add_feature_info("Bindings" BUILD_BINDINGS "SWIG bindings")
|
||||
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")
|
||||
@ -112,8 +118,8 @@ MESSAGE(STATUS "")
|
||||
MESSAGE(STATUS "Summary")
|
||||
MESSAGE(STATUS "-------")
|
||||
MESSAGE(STATUS "Library type: " ${LIBRARY_TYPE})
|
||||
MESSAGE(STATUS "Build examples: " ${ENABLE_EXAMPLES})
|
||||
MESSAGE(STATUS "Build tests: " ${ENABLE_TESTS})
|
||||
MESSAGE(STATUS "Build examples: " ${BUILD_EXAMPLES})
|
||||
MESSAGE(STATUS "Build tests: " ${BUILD_TESTS})
|
||||
MESSAGE(STATUS "Build bindings: " ${BUILD_BINDINGS})
|
||||
MESSAGE(STATUS "API Docs available: " ${DOXYGEN_FOUND})
|
||||
MESSAGE(STATUS " - Qt Help bundling: " ${BUILD_AND_BUNDLE_DOCS})
|
||||
|
@ -1,28 +1,28 @@
|
||||
# Copyright (c) 2010-2012 Matt 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.
|
||||
|
||||
set(CTEST_PROJECT_NAME "PolyVox")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=PolyVox")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
# Copyright (c) 2010-2012 Matt 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.
|
||||
|
||||
set(CTEST_PROJECT_NAME "PolyVox")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=PolyVox")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
PolyVox - The voxel management and manipulation library
|
||||
=======================================================
|
||||
|
||||
For installation instructions, please see INSTALL.txt
|
||||
PolyVox - The voxel management and manipulation library
|
||||
=======================================================
|
||||
|
||||
For installation instructions, please see INSTALL.txt
|
||||
|
@ -1,48 +1,49 @@
|
||||
# Copyright (c) 2010-2012 Matt 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.
|
||||
|
||||
find_program(SPHINXBUILD_EXECUTABLE sphinx-build DOC "The location of the sphinx-build executable")
|
||||
|
||||
#if(SPHINXBUILD_EXECUTABLE AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
|
||||
if(SPHINXBUILD_EXECUTABLE)
|
||||
message(STATUS "Found `sphinx-build` at ${SPHINXBUILD_EXECUTABLE}")
|
||||
set(BUILD_MANUAL ON PARENT_SCOPE)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.in.py ${CMAKE_CURRENT_BINARY_DIR}/conf.py @ONLY)
|
||||
#Generates the HTML docs and the Qt help file which can be opened with "assistant -collectionFile thermite.qhc"
|
||||
#add_custom_target(manual ${SPHINXBUILD_EXECUTABLE} -b qthelp ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${QT_QCOLLECTIONGENERATOR_EXECUTABLE} polyvox.qhcp -o polyvox.qhc)
|
||||
add_custom_target(manual
|
||||
${SPHINXBUILD_EXECUTABLE} -b html
|
||||
-c ${CMAKE_CURRENT_BINARY_DIR} #Load the conf.py from the binary dir
|
||||
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Building PolyVox manual"
|
||||
)
|
||||
add_dependencies(manual doc)
|
||||
SET_PROPERTY(TARGET manual PROPERTY FOLDER "documentation")
|
||||
else()
|
||||
if(NOT SPHINXBUILD_EXECUTABLE)
|
||||
message(STATUS "`sphinx-build` was not found. Try setting SPHINXBUILD_EXECUTABLE to its location.")
|
||||
endif()
|
||||
if(NOT QT_QCOLLECTIONGENERATOR_EXECUTABLE)
|
||||
message(STATUS "`qhelpgenerator` was not found. Try setting QT_QCOLLECTIONGENERATOR_EXECUTABLE to its location.")
|
||||
endif()
|
||||
set(BUILD_MANUAL OFF PARENT_SCOPE)
|
||||
endif()
|
||||
# Copyright (c) 2010-2012 Matt 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.
|
||||
|
||||
find_program(SPHINXBUILD_EXECUTABLE sphinx-build DOC "The location of the sphinx-build executable")
|
||||
|
||||
#if(SPHINXBUILD_EXECUTABLE AND QT_QCOLLECTIONGENERATOR_EXECUTABLE)
|
||||
if(SPHINXBUILD_EXECUTABLE)
|
||||
message(STATUS "Found `sphinx-build` at ${SPHINXBUILD_EXECUTABLE}")
|
||||
set(BUILD_MANUAL ON PARENT_SCOPE)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.in.py ${CMAKE_CURRENT_BINARY_DIR}/conf.py @ONLY)
|
||||
#Generates the HTML docs and the Qt help file which can be opened with "assistant -collectionFile thermite.qhc"
|
||||
#add_custom_target(manual ${SPHINXBUILD_EXECUTABLE} -b qthelp ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${QT_QCOLLECTIONGENERATOR_EXECUTABLE} polyvox.qhcp -o polyvox.qhc)
|
||||
add_custom_target(manual
|
||||
${SPHINXBUILD_EXECUTABLE} -b html
|
||||
-c ${CMAKE_CURRENT_BINARY_DIR} #Load the conf.py from the binary dir
|
||||
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Building PolyVox manual"
|
||||
)
|
||||
add_dependencies(manual doc)
|
||||
set_target_properties(manual PROPERTIES PROJECT_LABEL "Manual") #Set label seen in IDE
|
||||
SET_PROPERTY(TARGET manual PROPERTY FOLDER "Documentation")
|
||||
else()
|
||||
if(NOT SPHINXBUILD_EXECUTABLE)
|
||||
message(STATUS "`sphinx-build` was not found. Try setting SPHINXBUILD_EXECUTABLE to its location.")
|
||||
endif()
|
||||
if(NOT QT_QCOLLECTIONGENERATOR_EXECUTABLE)
|
||||
message(STATUS "`qhelpgenerator` was not found. Try setting QT_QCOLLECTIONGENERATOR_EXECUTABLE to its location.")
|
||||
endif()
|
||||
set(BUILD_MANUAL OFF PARENT_SCOPE)
|
||||
endif()
|
||||
|
@ -1,25 +1,25 @@
|
||||
**************************
|
||||
Frequently Asked Questions
|
||||
**************************
|
||||
|
||||
Should I store my environment in a single big volume or break it down into several smaller ones?
|
||||
------------------------------------------------------------------------------------------------
|
||||
In most cases you should store you data in a single big volume, unless you are sure you understand the implications of doing otherwise.
|
||||
|
||||
Most algorithms in PolyVox operate on only a single volume (the exception to this are some of the image processing algorithms which use source and destination volumes, but even they use a *single* source and a *single* destination). The reason for this is that many algorithms require fast access to the neighbours of any given voxel. As an example, the surface extractors need to look at the neighbours of a voxel in order to determine whether triangles should be generated.
|
||||
|
||||
PolyVox volumes make it easy to access these neighbours, but the situation gets complex on the edge of a volume because the neighbouring voxels may not exist. It is possible to define a border value (which will be returned whenever you try to read a voxel outside the volume) but this doesn't handle all scenarios in the desired way. Often the most practical solution is to make the volume slightly larger than the data it needs to contain, and then avoid having your algorithms go right to the edge.
|
||||
|
||||
Having established that edge cases can be problematic, we can now see that storing your data as a set of adjacent volumes is undesirable because these edge cases then exist throughout the data set. This causes a lot of problems such as gaps between pieces of extracted terrain or discontinuities in the computed normals.
|
||||
|
||||
The usual reason why people attempt to break their terrain into separate volumes is so that they can perform some more advanced memory management for very big terrain, for example by only loading particular volumes into memory when they are within a certain distance from the camera. However, this kind of paging behaviour is already implemented by the LargeVolume class. The LargeVolume internally stores its data as a set of blocks, and does it in such a way that it is able to perform neighbourhood access across block boundaries. Whenever you find yourself trying to break terrain data into separate volumes you should probably use the LargeVolume instead.
|
||||
|
||||
Note that although you should only use a single volume for your data, it is still recommended that you split the mesh data into multiple pieces so that they can be culled against the view frustum, and so that you can update the smaller pieces more quickly when you need to. You can extract meshes from different parts of the volume by passing a Region to the surface extractor.
|
||||
|
||||
Lastly, note that there are exceptions to the 'one volume' rule. An example might be if you had a number of planets in space, in which case each planet could safely be a separate volume. These planets never touch, and so the artifacts which would occur on volume boundaries do not cause a problem.
|
||||
|
||||
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 eachother 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.
|
||||
**************************
|
||||
Frequently Asked Questions
|
||||
**************************
|
||||
|
||||
Should I store my environment in a single big volume or break it down into several smaller ones?
|
||||
------------------------------------------------------------------------------------------------
|
||||
In most cases you should store you data in a single big volume, unless you are sure you understand the implications of doing otherwise.
|
||||
|
||||
Most algorithms in PolyVox operate on only a single volume (the exception to this are some of the image processing algorithms which use source and destination volumes, but even they use a *single* source and a *single* destination). The reason for this is that many algorithms require fast access to the neighbours of any given voxel. As an example, the surface extractors need to look at the neighbours of a voxel in order to determine whether triangles should be generated.
|
||||
|
||||
PolyVox volumes make it easy to access these neighbours, but the situation gets complex on the edge of a volume because the neighbouring voxels may not exist. It is possible to define a border value (which will be returned whenever you try to read a voxel outside the volume) but this doesn't handle all scenarios in the desired way. Often the most practical solution is to make the volume slightly larger than the data it needs to contain, and then avoid having your algorithms go right to the edge.
|
||||
|
||||
Having established that edge cases can be problematic, we can now see that storing your data as a set of adjacent volumes is undesirable because these edge cases then exist throughout the data set. This causes a lot of problems such as gaps between pieces of extracted terrain or discontinuities in the computed normals.
|
||||
|
||||
The usual reason why people attempt to break their terrain into separate volumes is so that they can perform some more advanced memory management for very big terrain, for example by only loading particular volumes into memory when they are within a certain distance from the camera. However, this kind of paging behaviour is already implemented by the LargeVolume class. The LargeVolume internally stores its data as a set of blocks, and does it in such a way that it is able to perform neighbourhood access across block boundaries. Whenever you find yourself trying to break terrain data into separate volumes you should probably use the LargeVolume instead.
|
||||
|
||||
Note that although you should only use a single volume for your data, it is still recommended that you split the mesh data into multiple pieces so that they can be culled against the view frustum, and so that you can update the smaller pieces more quickly when you need to. You can extract meshes from different parts of the volume by passing a Region to the surface extractor.
|
||||
|
||||
Lastly, note that there are exceptions to the 'one volume' rule. An example might be if you had a number of planets in space, in which case each planet could safely be a separate volume. These planets never touch, and so the artifacts which would occur on volume boundaries do not cause a problem.
|
||||
|
||||
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).
|
||||
|
||||
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.
|
@ -1,50 +1,48 @@
|
||||
***************
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
Demo correct mesh. mention we don't have a solution to generate it.
|
||||
|
||||
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 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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
However, in all volume reduction approaches there is some uncertainty about how materials should be handled. Creating a lower resolution volume means that several voxel values from the high resolution volume need to be combined into a single value. For density values this is straightforward as a simple average gives good results, but it is not clear how this extends to material identifiers. Averaging them doesn't make sense, and it is hard to imagine an approach which would not lead to visible artifacts as LOD levels change. Perhaps the visible effects can be reduced by blending between two LOD levels, but more investigation needs to be done here.
|
||||
|
||||
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 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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
region edges move
|
||||
material boundaries
|
||||
object isn't closed
|
||||
***************
|
||||
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 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, 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
|
||||
============
|
||||
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 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).
|
||||
|
||||
*Add figure here...*
|
||||
|
||||
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.
|
||||
|
||||
*Demo correct mesh. mention we don't have a solution to generate it.*
|
||||
|
||||
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
|
||||
=============
|
||||
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 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
|
||||
----------------
|
||||
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 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
|
||||
|
||||
However, in all volume reduction approaches there is some uncertainty about how materials should be handled. Creating a lower resolution volume means that several voxel values from the high resolution volume need to be combined into a single value. For density values this is straightforward as a simple average gives good results, but it is not clear how this extends to material identifiers. Averaging them doesn't make sense, and it is hard to imagine an approach which would not lead to visible artifacts as LOD levels change. Perhaps the visible effects can be reduced by blending between two LOD levels, but more investigation needs to be done here.
|
||||
|
||||
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 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 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 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.
|
||||
|
@ -1,40 +1,45 @@
|
||||
********
|
||||
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.
|
||||
|
||||
Dynamic Lighting
|
||||
================
|
||||
In general, any lighting solution for realtime 3D graphics should be directly applicable to PolyVox 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.
|
||||
|
||||
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...).
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
//GLSL code
|
||||
|
||||
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
|
||||
-------
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Overall we would recommend you make use of shadow maps for dynamic shadows.
|
||||
|
||||
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.
|
||||
********
|
||||
Lighting
|
||||
********
|
||||
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
|
||||
================
|
||||
In general, any lighting solution for real-time 3D graphics should be directly applicable to PolyVox 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.
|
||||
|
||||
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
|
||||
-----------------------------------
|
||||
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 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.
|
||||
|
||||
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:
|
||||
|
||||
.. 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.
|
||||
|
||||
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 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 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.
|
||||
|
||||
Ambient Occlusion
|
||||
=================
|
||||
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.
|
@ -1 +1,4 @@
|
||||
Placeholder.
|
||||
=================
|
||||
Modifying Terrain
|
||||
=================
|
||||
This document has yet to be written.
|
@ -1,33 +1,38 @@
|
||||
*************
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Using the library
|
||||
=================
|
||||
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:
|
||||
|
||||
Volume graphics:
|
||||
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:
|
||||
|
||||
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.
|
||||
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
|
||||
=========
|
||||
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.
|
||||
Scene management:
|
||||
-Culling, organisation, LOD.
|
||||
|
||||
Shader programming
|
||||
==================
|
||||
Triplanar texturing:
|
||||
Texture atlases:
|
||||
Lighting:
|
||||
*************
|
||||
Prerequisites
|
||||
*************
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
=================
|
||||
Several core graphics principles will be useful in understanding and using PolyVox:
|
||||
|
||||
**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.
|
||||
|
||||
**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)
|
||||
|
||||
**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.
|
||||
|
||||
Rendering
|
||||
=========
|
||||
**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:** 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.
|
||||
|
||||
**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.
|
||||
|
||||
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.
|
@ -1,159 +1,151 @@
|
||||
***************
|
||||
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.
|
||||
|
||||
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.
|
||||
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:
|
||||
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.
|
||||
|
||||
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
|
||||
=================================
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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]:
|
||||
|
||||
.. code-block:: c++
|
||||
// Take the three texture samples
|
||||
vec4 sampleX = texture2d(inputTexture, worldSpacePos.yz); // Project along x axis
|
||||
vec4 sampleY = texture2d(inputTexture, worldSpacePos.xz); // Project along y axis
|
||||
vec4 sampleZ = texture2d(inputTexture, worldSpacePos.xy); // Project along z axis
|
||||
|
||||
// Blend the samples according to the normal
|
||||
vec4 blendedColour = sampleX * normal.x + sampleY * normal.y + sampleZ * normal.z;
|
||||
|
||||
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:
|
||||
|
||||
.. code-block:: c++
|
||||
vec4 sample = vec4(0, 0, 0, 0); // We'll fill this in below
|
||||
// Assume the normal is normalised.
|
||||
if(normal.x > 0.9) // x must be one while y and z are zero
|
||||
{
|
||||
//Project onto yz plane
|
||||
sample = texture2D(inputTexture, worldSpacePos.yz);
|
||||
}
|
||||
// Now similar logic for the other two axes.
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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++
|
||||
vec4 fragmentColour = vec4(1, 1, 1, 1); // Default value
|
||||
if(materialId < 0.5) //Avoid '==' when working with floats.
|
||||
{
|
||||
fragmentColour = vec4(1, 0, 0, 1) // Draw material 0 as red.
|
||||
}
|
||||
else if(materialId < 1.5) //Avoid '==' when working with floats.
|
||||
{
|
||||
fragmentColour = vec4(0, 1, 0, 1) // Draw material 1 as green.
|
||||
}
|
||||
else if(materialId < 2.5) //Avoid '==' when working with floats.
|
||||
{
|
||||
fragmentColour = vec4(0, 0, 1, 1) // Draw material 2 as blue.
|
||||
}
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
ADD FIGURE HERE
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
===================
|
||||
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.
|
||||
|
||||
Seperate 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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
//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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
3D texture slices
|
||||
-----------------
|
||||
The idea here is similar to the texture atlas approach, but rather than packing texture side-by-side in an atlas they are instead packed as slices in a 3D texture. We haven't actually tested this but in theory it may have a couple of benefits. Firstly, it simplifies the addressing of the texture as there is no need to offset/scale the UV coordinates, and the W coordinate (the slice index) can be more easily computed from the material identifier. Secondly, a single volume texture will usually be able to hold more texels than a single 2D texture (for example, 512x512x512 is bigger than 4096x4096). Lastly, it should simplify the filtering problem as packed textures are no longer tiled and so should wrap correctly.
|
||||
|
||||
However, MIP mapping will probably be more complex than the texture atlas case because even the first MIP level will involve combining adjacent slices. Volume textures are also not so widely supported and may be particularly problematic on mobile hardware.
|
||||
|
||||
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.
|
||||
|
||||
Bindless rendering
|
||||
------------------
|
||||
***************
|
||||
Texture Mapping
|
||||
***************
|
||||
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:
|
||||
|
||||
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.
|
||||
|
||||
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 (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.
|
||||
|
||||
Mapping textures to mesh geometry
|
||||
=================================
|
||||
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
|
||||
--------
|
||||
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 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 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
|
||||
-------------------
|
||||
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:: glsl
|
||||
|
||||
// Take the three texture samples
|
||||
vec4 sampleX = texture2d(inputTexture, worldSpacePos.yz); // Project along x axis
|
||||
vec4 sampleY = texture2d(inputTexture, worldSpacePos.xz); // Project along y axis
|
||||
vec4 sampleZ = texture2d(inputTexture, worldSpacePos.xy); // Project along z axis
|
||||
|
||||
// Blend the samples according to the normal
|
||||
vec4 blendedColour = sampleX * normal.x + sampleY * normal.y + sampleZ * normal.z;
|
||||
|
||||
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 coordinates. Something like:
|
||||
|
||||
.. code-block:: glsl
|
||||
|
||||
vec4 sample = vec4(0, 0, 0, 0); // We'll fill this in below
|
||||
// Assume the normal is normalised.
|
||||
if(normal.x > 0.9) // x must be one while y and z are zero
|
||||
{
|
||||
//Project onto yz plane
|
||||
sample = texture2D(inputTexture, worldSpacePos.yz);
|
||||
}
|
||||
// Now similar logic for the other two axes.
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
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
|
||||
-----------------------------
|
||||
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 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:
|
||||
|
||||
.. code-block:: glsl
|
||||
|
||||
vec4 fragmentColour = vec4(1, 1, 1, 1); // Default value
|
||||
if(materialId < 0.5) //Avoid '==' when working with floats.
|
||||
{
|
||||
fragmentColour = vec4(1, 0, 0, 1) // Draw material 0 as red.
|
||||
}
|
||||
else if(materialId < 1.5) //Avoid '==' when working with floats.
|
||||
{
|
||||
fragmentColour = vec4(0, 1, 0, 1) // Draw material 1 as green.
|
||||
}
|
||||
else if(materialId < 2.5) //Avoid '==' when working with floats.
|
||||
{
|
||||
fragmentColour = vec4(0, 0, 1, 1) // Draw material 2 as blue.
|
||||
}
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
As off October 2012 we are actively researching alternative solutions to this problem though it will be some time before the results become available.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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 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.
|
||||
|
||||
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
|
||||
---------------
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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 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
|
||||
-----------------
|
||||
The idea here is similar to the texture atlas approach, but rather than packing texture side-by-side in an atlas they are instead packed as slices in a 3D texture. We haven't actually tested this but in theory it may have a couple of benefits. Firstly, it simplifies the addressing of the texture as there is no need to offset/scale the UV coordinates, and the W coordinate (the slice index) can be more easily computed from the material identifier. Secondly, a single volume texture will usually be able to hold more texels than a single 2D texture (for example, 512x512x512 is bigger than 4096x4096). Lastly, it should simplify the filtering problem as packed textures are no longer tiled and so should wrap correctly.
|
||||
|
||||
However, MIP mapping will probably be more complex than the texture atlas case because even the first MIP level will involve combining adjacent slices. Volume textures are also not so widely supported and may be particularly problematic on mobile hardware.
|
||||
|
||||
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 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
|
||||
------------------
|
||||
We don't have much to say about this option as it needs significant research, but bindless rendering is one of the new OpenGL extensions to come out of Nvidia. The idea is that it removes the abstraction of needing to 'bind' a texture to a particular texture unit, and instead allows more direct access to the texture data on the GPU. This means you can have access to a much larger number of textures from your shader. Sounds useful, but we've yet to investigate it.
|
@ -1,67 +1,67 @@
|
||||
*********
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Volumes
|
||||
=======
|
||||
Volumes are a core aspect of PolyVox, and so a natural question is whether it is safe to simultaneously access a given volume from multiple threads. The answer to this is actually fairly complex and is also dependent on the type of volume which is being used.
|
||||
|
||||
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 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).
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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/
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
- 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.
|
||||
- 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
|
||||
==================
|
||||
Despite the lack of thread safety built in to PolyVox, it is still possible and often desirable to make use of multiple threads for tasks such as surface extraction. Performing surface extraction does not require write access to the data, and we've already established that you can safely perform reads from different threads *provided you are not using the LargeVolume*.
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Future work
|
||||
===========
|
||||
Threading support is not a high priority for PolyVox because it can be implemented by the user at a higher level. However, there are a couple of areas we may investigate in the future.
|
||||
|
||||
Thread safe volume wrapper
|
||||
--------------------------
|
||||
It might be useful to provide a thread safe wrapper around the volume classes, and this could possibly be included in the PolyVox utilities or as a extra library. This thread safe wrapper could be templatised to work with any internal volume type, and could itself be a volume so that it can be used directly with the existing algorithms.
|
||||
|
||||
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.
|
||||
*********
|
||||
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.
|
||||
|
||||
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 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 are a core aspect of PolyVox, and so a natural question is whether it is safe to simultaneously access a given volume from multiple threads. The answer to this is actually fairly complex and is also dependent on the type of volume which is being used.
|
||||
|
||||
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 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 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 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 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 guarantees are made anyway, and it should still be safe to perform multiple concurrent reads for more complex types.
|
||||
|
||||
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 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.
|
||||
|
||||
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:
|
||||
|
||||
- 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.
|
||||
|
||||
Surface Extraction
|
||||
==================
|
||||
Despite the lack of thread safety built in to PolyVox, it is still possible and often desirable to make use of multiple threads for tasks such as surface extraction. Performing surface extraction does not require write access to the data, and we've already established that you can safely perform reads from different threads *provided you are not using the LargeVolume*.
|
||||
|
||||
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 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
|
||||
=================
|
||||
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.
|
||||
|
||||
Future work
|
||||
===========
|
||||
Threading support is not a high priority for PolyVox because it can be implemented by the user at a higher level. However, there are a couple of areas we may investigate in the future.
|
||||
|
||||
Thread safe volume wrapper
|
||||
--------------------------
|
||||
It might be useful to provide a thread safe wrapper around the volume classes, and this could possibly be included in the PolyVox utilities or as a extra library. This thread safe wrapper could be templatised to work with any internal volume type, and could itself be a volume so that it can be used directly with the existing algorithms.
|
||||
|
||||
OpenMP
|
||||
------
|
||||
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.
|
@ -1,4 +1,4 @@
|
||||
Changelog
|
||||
#########
|
||||
|
||||
.. include:: ../CHANGELOG.txt
|
||||
Changelog
|
||||
#########
|
||||
|
||||
.. include:: ../CHANGELOG.txt
|
||||
|
BIN
documentation/diagrams/CubicSurfaceExtractor1.dia
Normal file
BIN
documentation/diagrams/CubicSurfaceExtractor1.dia
Normal file
Binary file not shown.
BIN
documentation/diagrams/CubicSurfaceExtractor2.dia
Normal file
BIN
documentation/diagrams/CubicSurfaceExtractor2.dia
Normal file
Binary file not shown.
BIN
documentation/diagrams/CubicSurfaceExtractor3.dia
Normal file
BIN
documentation/diagrams/CubicSurfaceExtractor3.dia
Normal file
Binary file not shown.
BIN
documentation/images/CubicSurfaceExtractor1.png
Normal file
BIN
documentation/images/CubicSurfaceExtractor1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
documentation/images/CubicSurfaceExtractor2.png
Normal file
BIN
documentation/images/CubicSurfaceExtractor2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
documentation/images/CubicSurfaceExtractor3.png
Normal file
BIN
documentation/images/CubicSurfaceExtractor3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
documentation/images/MinecraftAndVoxatron.jpg
Normal file
BIN
documentation/images/MinecraftAndVoxatron.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 111 KiB |
@ -1,10 +1,10 @@
|
||||
Welcome to PolyVox's documentation!
|
||||
===================================
|
||||
|
||||
Contents:
|
||||
User Guide:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:maxdepth: 1
|
||||
|
||||
Prerequisites
|
||||
install
|
||||
@ -14,7 +14,20 @@ Contents:
|
||||
ModifyingTerrain
|
||||
LevelOfDetail
|
||||
Threading
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
tutorial1
|
||||
|
||||
Other Information:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
changelog
|
||||
FAQ
|
||||
|
||||
|
@ -1 +1 @@
|
||||
.. include:: ../INSTALL.txt
|
||||
.. include:: ../INSTALL.txt
|
||||
|
@ -14,20 +14,18 @@ To get started, we need to include the following headers:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
#include "PolyVoxCore/MaterialDensityPair.h"
|
||||
#include "PolyVoxCore/CubicSurfaceExtractorWithNormals.h"
|
||||
#include "PolyVoxCore/MarchingCubesSurfaceExtractor.h"
|
||||
#include "PolyVoxCore/SurfaceMesh.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++
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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++
|
||||
|
||||
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
|
||||
Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2);
|
||||
|
||||
//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 x = 0; x < volData.getDepth(); x++)
|
||||
for (int x = 0; x < volData.getWidth(); x++)
|
||||
{
|
||||
//Store our current position as a vector...
|
||||
Vector3DFloat v3dCurrentPos(x,y,z);
|
||||
//And compute how far the current position is from the center of the volume
|
||||
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(fDistToCenter <= fRadius)
|
||||
{
|
||||
//Our new density value
|
||||
uint8_t uDensity = VoxelTypeTraits<MaterialDensityPair44>::MaxDensity;
|
||||
|
||||
//Get the old voxel
|
||||
MaterialDensityPair44 voxel = volData.getVoxelAt(x,y,z);
|
||||
|
||||
//Modify the density
|
||||
voxel.setDensity(uDensity);
|
||||
|
||||
//Wrte the voxel value into the volume
|
||||
volData.setVoxelAt(x, y, z, voxel);
|
||||
//Our new voxel value
|
||||
uVoxelValue = 255;
|
||||
}
|
||||
|
||||
//Wrte the voxel value into the volume
|
||||
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.
|
||||
|
||||
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
|
||||
======================
|
||||
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++
|
||||
|
||||
SurfaceMesh<PositionMaterialNormal> mesh;
|
||||
CubicSurfaceExtractorWithNormals<SimpleVolume, MaterialDensityPair44 > 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`.
|
||||
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 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.
|
||||
|
||||
@ -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.
|
||||
|
||||
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 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);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0f,0.0f,-100.0f); //Centre volume and move back
|
||||
glRotatef(m_xRotation, 1.0f, 0.0f, 0.0f);
|
||||
glRotatef(m_yRotation, 0.0f, 1.0f, 0.0f);
|
||||
glRotatef(-m_xRotation, 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
|
||||
|
||||
//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);
|
||||
|
||||
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.
|
@ -59,7 +59,7 @@ IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(BasicExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
|
||||
ENDIF(MSVC)
|
||||
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
|
||||
IF(WIN32)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -83,13 +83,16 @@
|
||||
#ifdef __glxext_h_
|
||||
#error glxext.h included before glxew.h
|
||||
#endif
|
||||
#ifdef GLX_H
|
||||
|
||||
#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
|
||||
#error glx.h included before glxew.h
|
||||
#endif
|
||||
|
||||
#define __glxext_h_
|
||||
#define __GLX_glx_h__
|
||||
|
||||
#define GLX_H
|
||||
#define __GLX_glx_h__
|
||||
#define __glx_h__
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
@ -255,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
|
||||
typedef XID GLXFBConfigID;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
typedef XID GLXWindow;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
|
||||
typedef struct {
|
||||
@ -343,6 +346,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
|
||||
|
||||
#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 ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_create_context
|
||||
@ -362,6 +385,33 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
|
||||
|
||||
#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 ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
@ -408,6 +458,39 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
|
||||
|
||||
#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 ---------------------- */
|
||||
|
||||
#ifndef GLX_ATI_pixel_format_float
|
||||
@ -472,6 +555,28 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
|
||||
|
||||
#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 --------------------- */
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
@ -529,6 +634,33 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
|
||||
|
||||
#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 ---------------------- */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
@ -615,6 +747,20 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable dr
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
@ -683,6 +829,34 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint 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 -------------------------- */
|
||||
|
||||
#ifndef GLX_NV_float_buffer
|
||||
@ -694,6 +868,18 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
@ -749,10 +935,37 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#endif /* GLX_NV_vertex_array_range */
|
||||
|
||||
/* -------------------------- GLX_NV_video_output -------------------------- */
|
||||
/* -------------------------- GLX_NV_video_capture ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_video_output
|
||||
#define GLX_NV_video_output 1
|
||||
#ifndef GLX_NV_video_capture
|
||||
#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_ALPHA_NV 0x20C4
|
||||
@ -779,9 +992,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
|
||||
#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 -------------------------- */
|
||||
|
||||
@ -799,8 +1012,7 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
|
||||
/* -------------------------- GLX_OML_sync_control ------------------------- */
|
||||
|
||||
#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
#include <inttypes.h>
|
||||
#ifndef GLX_OML_sync_control
|
||||
#define GLX_OML_sync_control 1
|
||||
|
||||
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
|
||||
#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);
|
||||
|
||||
#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
|
||||
@ -1181,185 +1393,213 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define GLXEW_EXPORT
|
||||
#define GLXEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT
|
||||
#else
|
||||
#define GLXEW_EXPORT extern
|
||||
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
|
||||
|
||||
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
|
||||
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
|
||||
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
|
||||
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
|
||||
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
|
||||
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
|
||||
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
|
||||
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
|
||||
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
|
||||
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
|
||||
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
|
||||
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
|
||||
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
|
||||
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
|
||||
GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
|
||||
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
|
||||
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
|
||||
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
|
||||
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
|
||||
|
||||
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;
|
||||
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
|
||||
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
|
||||
|
||||
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
|
||||
|
||||
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
|
||||
#ifdef GLX_OML_sync_control
|
||||
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
|
||||
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
|
||||
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
|
||||
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
|
||||
#endif
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
|
||||
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
|
||||
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
|
||||
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
|
||||
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
|
||||
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
|
||||
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
|
||||
|
||||
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
|
||||
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
|
||||
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
|
||||
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
|
||||
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
|
||||
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
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;
|
||||
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
|
||||
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
|
||||
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
|
||||
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
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;
|
||||
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
|
||||
|
||||
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
|
||||
|
||||
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
|
||||
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
|
||||
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;
|
||||
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
|
||||
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)
|
||||
struct GLXEWContextStruct
|
||||
{
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
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
|
||||
}; /* GLXEWContextStruct */
|
||||
@ -1370,8 +1610,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
|
||||
#ifdef GLEW_MX
|
||||
|
||||
typedef struct GLXEWContextStruct GLXEWContext;
|
||||
extern GLenum glxewContextInit (GLXEWContext* ctx);
|
||||
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
|
||||
GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
|
||||
|
||||
#define glxewInit() glxewContextInit(glxewGetContext())
|
||||
#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_FUN(x) x
|
||||
|
||||
extern GLboolean glxewIsSupported (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
|
||||
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
extern GLboolean glxewGetExtension (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -62,11 +62,12 @@
|
||||
|
||||
#define __wglext_h_
|
||||
|
||||
#if !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#if !defined(WINAPI)
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN 1
|
||||
# endif
|
||||
#include <windows.h>
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#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_LAYER_PLANE_ARB 0x2093
|
||||
#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);
|
||||
|
||||
@ -161,6 +204,33 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
|
||||
|
||||
#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 ----------------------- */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
@ -400,6 +470,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
@ -605,6 +697,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
|
||||
#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 --------------------- */
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
@ -752,6 +853,59 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
@ -804,6 +958,18 @@ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#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 * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
|
||||
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);
|
||||
|
||||
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
|
||||
@ -892,6 +1058,32 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
@ -957,9 +1149,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define WGLEW_EXPORT
|
||||
#define WGLEW_FUN_EXPORT
|
||||
#define WGLEW_VAR_EXPORT
|
||||
#else
|
||||
#define WGLEW_EXPORT GLEWAPI
|
||||
#define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
@ -967,165 +1161,203 @@ struct WGLEWContextStruct
|
||||
{
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
|
||||
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_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
|
||||
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
|
||||
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
|
||||
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
|
||||
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
|
||||
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
|
||||
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
|
||||
|
||||
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_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
|
||||
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
|
||||
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
|
||||
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
|
||||
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
|
||||
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
|
||||
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
|
||||
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
|
||||
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
|
||||
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
|
||||
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_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
|
||||
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
|
||||
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
|
||||
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
|
||||
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_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
|
||||
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
|
||||
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_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
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_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
|
||||
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
||||
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
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
|
||||
}; /* WGLEWContextStruct */
|
||||
@ -1136,8 +1368,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
#ifdef GLEW_MX
|
||||
|
||||
typedef struct WGLEWContextStruct WGLEWContext;
|
||||
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);
|
||||
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
|
||||
GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
|
||||
|
||||
#define wglewInit() wglewContextInit(wglewGetContext())
|
||||
#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_FUN(x) x
|
||||
|
||||
GLEWAPI GLboolean wglewIsSupported (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
|
||||
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
GLEWAPI GLboolean wglewGetExtension (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ freely, subject to the following restrictions:
|
||||
#include "OpenGLWidget.h"
|
||||
|
||||
#include "PolyVoxCore/CubicSurfaceExtractorWithNormals.h"
|
||||
#include "PolyVoxCore/MarchingCubesSurfaceExtractor.h"
|
||||
#include "PolyVoxCore/SurfaceMesh.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);
|
||||
|
||||
//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 x = 0; x < volData.getDepth(); x++)
|
||||
for (int x = 0; x < volData.getWidth(); x++)
|
||||
{
|
||||
//Store our current position as a vector...
|
||||
Vector3DFloat v3dCurrentPos(x,y,z);
|
||||
//And compute how far the current position is from the center of the volume
|
||||
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(fDistToCenter <= fRadius)
|
||||
{
|
||||
//Our new density value
|
||||
uMaterial = 1;
|
||||
//Our new voxel value
|
||||
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
|
||||
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)));
|
||||
createSphereInVolume(volData, 30);
|
||||
|
||||
//Extract the surface
|
||||
//A mesh object to hold the result of surface extraction
|
||||
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);
|
||||
//MarchingCubesSurfaceExtractor< SimpleVolume<uint8_t> > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh);
|
||||
|
||||
//Execute the surface extractor.
|
||||
surfaceExtractor.execute();
|
||||
|
||||
//Pass the surface to the OpenGL window
|
||||
|
@ -65,7 +65,7 @@ IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(OpenGLExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
|
||||
ENDIF(MSVC)
|
||||
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
|
||||
IF(WIN32)
|
||||
|
@ -27,7 +27,6 @@ freely, subject to the following restrictions:
|
||||
|
||||
#include "PolyVoxCore/GradientEstimators.h"
|
||||
#include "PolyVoxCore/MaterialDensityPair.h"
|
||||
#include "PolyVoxCore/MeshDecimator.h"
|
||||
#include "PolyVoxCore/MarchingCubesSurfaceExtractor.h"
|
||||
|
||||
//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());
|
||||
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);
|
||||
|
||||
//computeNormalsForVertices(m_volData, *(decimatedMesh.get()), SOBEL_SMOOTHED);
|
||||
@ -110,12 +105,12 @@ void OpenGLWidget::setVolume(PolyVox::LargeVolume<MaterialDensityPair44>* volDat
|
||||
Vector3DUint8 v3dRegPos(uRegionX,uRegionY,uRegionZ);
|
||||
if(m_bUseOpenGLVertexBufferObjects)
|
||||
{
|
||||
OpenGLSurfaceMesh openGLSurfaceMesh = BuildOpenGLSurfaceMesh(*(decimatedMesh.get()));
|
||||
OpenGLSurfaceMesh openGLSurfaceMesh = BuildOpenGLSurfaceMesh(*(mesh.get()));
|
||||
m_mapOpenGLSurfaceMeshes.insert(make_pair(v3dRegPos, openGLSurfaceMesh));
|
||||
}
|
||||
//else
|
||||
//{
|
||||
m_mapSurfaceMeshes.insert(make_pair(v3dRegPos, decimatedMesh));
|
||||
m_mapSurfaceMeshes.insert(make_pair(v3dRegPos, mesh));
|
||||
//}
|
||||
//delete meshCurrent;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ freely, subject to the following restrictions:
|
||||
|
||||
#include "PolyVoxCore/LargeVolume.h"
|
||||
#include "PolyVoxCore/SurfaceMesh.h"
|
||||
#include "PolyVoxImpl/Utility.h"
|
||||
#include "PolyVoxCore/Impl/Utility.h"
|
||||
|
||||
#include "OpenGLImmediateModeSupport.h"
|
||||
#include "OpenGLVertexBufferObjectSupport.h"
|
||||
|
@ -33,11 +33,11 @@ void createSphereInVolume(LargeVolume<MaterialDensityPair44>& volData, float fRa
|
||||
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
|
||||
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 x = 0; x < volData.getDepth(); x++)
|
||||
for (int x = 0; x < volData.getWidth(); x++)
|
||||
{
|
||||
//Store our current position as a vector...
|
||||
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)
|
||||
{
|
||||
int maxDen = MaterialDensityPair44::getMaxDensity();
|
||||
int minDen = MaterialDensityPair44::getMinDensity();
|
||||
uint8_t maxDen = MaterialDensityPair44::getMaxDensity();
|
||||
uint8_t minDen = MaterialDensityPair44::getMinDensity();
|
||||
//This three-level for loop iterates over every voxel between the specified corners
|
||||
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
@ -83,13 +83,16 @@
|
||||
#ifdef __glxext_h_
|
||||
#error glxext.h included before glxew.h
|
||||
#endif
|
||||
#ifdef GLX_H
|
||||
|
||||
#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
|
||||
#error glx.h included before glxew.h
|
||||
#endif
|
||||
|
||||
#define __glxext_h_
|
||||
#define __GLX_glx_h__
|
||||
|
||||
#define GLX_H
|
||||
#define __GLX_glx_h__
|
||||
#define __glx_h__
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
@ -255,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
|
||||
typedef XID GLXFBConfigID;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
typedef XID GLXWindow;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
|
||||
typedef struct {
|
||||
@ -343,6 +346,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
|
||||
|
||||
#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 ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_create_context
|
||||
@ -362,6 +385,33 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
|
||||
|
||||
#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 ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
@ -408,6 +458,39 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
|
||||
|
||||
#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 ---------------------- */
|
||||
|
||||
#ifndef GLX_ATI_pixel_format_float
|
||||
@ -472,6 +555,28 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
|
||||
|
||||
#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 --------------------- */
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
@ -529,6 +634,33 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
|
||||
|
||||
#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 ---------------------- */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
@ -615,6 +747,20 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable dr
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
@ -683,6 +829,34 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint 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 -------------------------- */
|
||||
|
||||
#ifndef GLX_NV_float_buffer
|
||||
@ -694,6 +868,18 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
@ -749,10 +935,37 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#endif /* GLX_NV_vertex_array_range */
|
||||
|
||||
/* -------------------------- GLX_NV_video_output -------------------------- */
|
||||
/* -------------------------- GLX_NV_video_capture ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_video_output
|
||||
#define GLX_NV_video_output 1
|
||||
#ifndef GLX_NV_video_capture
|
||||
#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_ALPHA_NV 0x20C4
|
||||
@ -779,9 +992,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
|
||||
#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 -------------------------- */
|
||||
|
||||
@ -799,8 +1012,7 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
|
||||
/* -------------------------- GLX_OML_sync_control ------------------------- */
|
||||
|
||||
#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
#include <inttypes.h>
|
||||
#ifndef GLX_OML_sync_control
|
||||
#define GLX_OML_sync_control 1
|
||||
|
||||
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
|
||||
#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);
|
||||
|
||||
#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
|
||||
@ -1181,185 +1393,213 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define GLXEW_EXPORT
|
||||
#define GLXEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT
|
||||
#else
|
||||
#define GLXEW_EXPORT extern
|
||||
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
|
||||
|
||||
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
|
||||
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
|
||||
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
|
||||
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
|
||||
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
|
||||
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
|
||||
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
|
||||
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
|
||||
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
|
||||
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
|
||||
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
|
||||
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
|
||||
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
|
||||
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
|
||||
GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
|
||||
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
|
||||
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
|
||||
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
|
||||
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
|
||||
|
||||
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;
|
||||
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
|
||||
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
|
||||
|
||||
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
|
||||
|
||||
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
|
||||
#ifdef GLX_OML_sync_control
|
||||
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
|
||||
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
|
||||
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
|
||||
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
|
||||
#endif
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
|
||||
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
|
||||
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
|
||||
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
|
||||
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
|
||||
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
|
||||
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
|
||||
|
||||
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
|
||||
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
|
||||
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
|
||||
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
|
||||
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
|
||||
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
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;
|
||||
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
|
||||
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
|
||||
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
|
||||
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
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;
|
||||
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
|
||||
|
||||
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
|
||||
|
||||
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
|
||||
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
|
||||
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;
|
||||
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
|
||||
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)
|
||||
struct GLXEWContextStruct
|
||||
{
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
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
|
||||
}; /* GLXEWContextStruct */
|
||||
@ -1370,8 +1610,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
|
||||
#ifdef GLEW_MX
|
||||
|
||||
typedef struct GLXEWContextStruct GLXEWContext;
|
||||
extern GLenum glxewContextInit (GLXEWContext* ctx);
|
||||
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
|
||||
GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
|
||||
|
||||
#define glxewInit() glxewContextInit(glxewGetContext())
|
||||
#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_FUN(x) x
|
||||
|
||||
extern GLboolean glxewIsSupported (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
|
||||
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
extern GLboolean glxewGetExtension (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -62,11 +62,12 @@
|
||||
|
||||
#define __wglext_h_
|
||||
|
||||
#if !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#if !defined(WINAPI)
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN 1
|
||||
# endif
|
||||
#include <windows.h>
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#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_LAYER_PLANE_ARB 0x2093
|
||||
#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);
|
||||
|
||||
@ -161,6 +204,33 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
|
||||
|
||||
#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 ----------------------- */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
@ -400,6 +470,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
@ -605,6 +697,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
|
||||
#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 --------------------- */
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
@ -752,6 +853,59 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
@ -804,6 +958,18 @@ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#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 * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
|
||||
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);
|
||||
|
||||
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
|
||||
@ -892,6 +1058,32 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
@ -957,9 +1149,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define WGLEW_EXPORT
|
||||
#define WGLEW_FUN_EXPORT
|
||||
#define WGLEW_VAR_EXPORT
|
||||
#else
|
||||
#define WGLEW_EXPORT GLEWAPI
|
||||
#define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
@ -967,165 +1161,203 @@ struct WGLEWContextStruct
|
||||
{
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
|
||||
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_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
|
||||
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
|
||||
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
|
||||
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
|
||||
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
|
||||
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
|
||||
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
|
||||
|
||||
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_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
|
||||
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
|
||||
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
|
||||
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
|
||||
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
|
||||
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
|
||||
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
|
||||
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
|
||||
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
|
||||
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
|
||||
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_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
|
||||
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
|
||||
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
|
||||
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
|
||||
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_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
|
||||
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
|
||||
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_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
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_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
|
||||
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
||||
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
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
|
||||
}; /* WGLEWContextStruct */
|
||||
@ -1136,8 +1368,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
#ifdef GLEW_MX
|
||||
|
||||
typedef struct WGLEWContextStruct WGLEWContext;
|
||||
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);
|
||||
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
|
||||
GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
|
||||
|
||||
#define wglewInit() wglewContextInit(wglewGetContext())
|
||||
#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_FUN(x) x
|
||||
|
||||
GLEWAPI GLboolean wglewIsSupported (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
|
||||
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
GLEWAPI GLboolean wglewGetExtension (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ freely, subject to the following restrictions:
|
||||
#include "PolyVoxCore/LowPassFilter.h"
|
||||
#include "PolyVoxCore/RawVolume.h"
|
||||
#include "PolyVoxCore/SurfaceMesh.h"
|
||||
#include "PolyVoxImpl/Utility.h"
|
||||
#include "PolyVoxCore/Impl/Utility.h"
|
||||
|
||||
#include "OpenGLImmediateModeSupport.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, midPos-10 ,1), Vector3DInt32(midPos+10, midPos+10, maxPos-1), MaterialDensityPair44::getMaxDensity());
|
||||
|
||||
//Smooth part of the volume
|
||||
RawVolume<MaterialDensityPair44> tempVolume(PolyVox::Region(0,0,0,128, 128, 128));
|
||||
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);
|
||||
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();
|
||||
//I've removed this smoothing because it doesn't really make sense to apply a low pass filter to a volume with material values.
|
||||
//I could implement the mathematical operators for MaterialDensityPair in such a way that they ignores the materials but this
|
||||
//seems to be setting a bad example. Users can add this operators in their own classes if they want smoothing.
|
||||
//RawVolume<MaterialDensityPair44> tempVolume(PolyVox::Region(0,0,0,128, 128, 128));
|
||||
//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);
|
||||
//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);
|
||||
|
||||
|
@ -61,7 +61,7 @@ IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(PagingExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
|
||||
ENDIF(MSVC)
|
||||
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
|
||||
IF(WIN32)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -83,13 +83,16 @@
|
||||
#ifdef __glxext_h_
|
||||
#error glxext.h included before glxew.h
|
||||
#endif
|
||||
#ifdef GLX_H
|
||||
|
||||
#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
|
||||
#error glx.h included before glxew.h
|
||||
#endif
|
||||
|
||||
#define __glxext_h_
|
||||
#define __GLX_glx_h__
|
||||
|
||||
#define GLX_H
|
||||
#define __GLX_glx_h__
|
||||
#define __glx_h__
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
@ -255,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
|
||||
typedef XID GLXFBConfigID;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
typedef XID GLXWindow;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
|
||||
typedef struct {
|
||||
@ -343,6 +346,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
|
||||
|
||||
#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 ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_create_context
|
||||
@ -362,6 +385,33 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
|
||||
|
||||
#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 ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
@ -408,6 +458,39 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
|
||||
|
||||
#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 ---------------------- */
|
||||
|
||||
#ifndef GLX_ATI_pixel_format_float
|
||||
@ -472,6 +555,28 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
|
||||
|
||||
#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 --------------------- */
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
@ -529,6 +634,33 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
|
||||
|
||||
#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 ---------------------- */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
@ -615,6 +747,20 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable dr
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
@ -683,6 +829,34 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint 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 -------------------------- */
|
||||
|
||||
#ifndef GLX_NV_float_buffer
|
||||
@ -694,6 +868,18 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
@ -749,10 +935,37 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#endif /* GLX_NV_vertex_array_range */
|
||||
|
||||
/* -------------------------- GLX_NV_video_output -------------------------- */
|
||||
/* -------------------------- GLX_NV_video_capture ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_video_output
|
||||
#define GLX_NV_video_output 1
|
||||
#ifndef GLX_NV_video_capture
|
||||
#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_ALPHA_NV 0x20C4
|
||||
@ -779,9 +992,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
|
||||
#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 -------------------------- */
|
||||
|
||||
@ -799,8 +1012,7 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
|
||||
/* -------------------------- GLX_OML_sync_control ------------------------- */
|
||||
|
||||
#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
#include <inttypes.h>
|
||||
#ifndef GLX_OML_sync_control
|
||||
#define GLX_OML_sync_control 1
|
||||
|
||||
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
|
||||
#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);
|
||||
|
||||
#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
|
||||
@ -1181,185 +1393,213 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define GLXEW_EXPORT
|
||||
#define GLXEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT
|
||||
#else
|
||||
#define GLXEW_EXPORT extern
|
||||
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
|
||||
|
||||
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
|
||||
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
|
||||
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
|
||||
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
|
||||
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
|
||||
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
|
||||
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
|
||||
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
|
||||
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
|
||||
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
|
||||
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
|
||||
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
|
||||
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
|
||||
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
|
||||
GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
|
||||
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
|
||||
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
|
||||
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
|
||||
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
|
||||
|
||||
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;
|
||||
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
|
||||
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
|
||||
|
||||
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
|
||||
|
||||
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
|
||||
#ifdef GLX_OML_sync_control
|
||||
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
|
||||
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
|
||||
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
|
||||
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
|
||||
#endif
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
|
||||
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
|
||||
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
|
||||
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
|
||||
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
|
||||
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
|
||||
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
|
||||
|
||||
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
|
||||
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
|
||||
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
|
||||
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
|
||||
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
|
||||
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
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;
|
||||
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
|
||||
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
|
||||
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
|
||||
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
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;
|
||||
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
|
||||
|
||||
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
|
||||
|
||||
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
|
||||
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
|
||||
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;
|
||||
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
|
||||
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)
|
||||
struct GLXEWContextStruct
|
||||
{
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
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
|
||||
}; /* GLXEWContextStruct */
|
||||
@ -1370,8 +1610,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
|
||||
#ifdef GLEW_MX
|
||||
|
||||
typedef struct GLXEWContextStruct GLXEWContext;
|
||||
extern GLenum glxewContextInit (GLXEWContext* ctx);
|
||||
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
|
||||
GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
|
||||
|
||||
#define glxewInit() glxewContextInit(glxewGetContext())
|
||||
#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_FUN(x) x
|
||||
|
||||
extern GLboolean glxewIsSupported (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
|
||||
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
extern GLboolean glxewGetExtension (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -62,11 +62,12 @@
|
||||
|
||||
#define __wglext_h_
|
||||
|
||||
#if !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#if !defined(WINAPI)
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN 1
|
||||
# endif
|
||||
#include <windows.h>
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#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_LAYER_PLANE_ARB 0x2093
|
||||
#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);
|
||||
|
||||
@ -161,6 +204,33 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
|
||||
|
||||
#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 ----------------------- */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
@ -400,6 +470,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
@ -605,6 +697,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
|
||||
#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 --------------------- */
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
@ -752,6 +853,59 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
@ -804,6 +958,18 @@ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#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 * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
|
||||
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);
|
||||
|
||||
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
|
||||
@ -892,6 +1058,32 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
@ -957,9 +1149,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define WGLEW_EXPORT
|
||||
#define WGLEW_FUN_EXPORT
|
||||
#define WGLEW_VAR_EXPORT
|
||||
#else
|
||||
#define WGLEW_EXPORT GLEWAPI
|
||||
#define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
@ -967,165 +1161,203 @@ struct WGLEWContextStruct
|
||||
{
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
|
||||
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_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
|
||||
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
|
||||
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
|
||||
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
|
||||
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
|
||||
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
|
||||
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
|
||||
|
||||
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_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
|
||||
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
|
||||
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
|
||||
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
|
||||
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
|
||||
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
|
||||
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
|
||||
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
|
||||
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
|
||||
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
|
||||
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_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
|
||||
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
|
||||
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
|
||||
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
|
||||
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_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
|
||||
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
|
||||
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_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
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_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
|
||||
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
||||
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
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
|
||||
}; /* WGLEWContextStruct */
|
||||
@ -1136,8 +1368,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
#ifdef GLEW_MX
|
||||
|
||||
typedef struct WGLEWContextStruct WGLEWContext;
|
||||
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);
|
||||
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
|
||||
GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
|
||||
|
||||
#define wglewInit() wglewContextInit(wglewGetContext())
|
||||
#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_FUN(x) x
|
||||
|
||||
GLEWAPI GLboolean wglewIsSupported (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
|
||||
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
GLEWAPI GLboolean wglewGetExtension (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(SmoothLODExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127") #All warnings
|
||||
ENDIF(MSVC)
|
||||
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
|
||||
IF(WIN32)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -83,13 +83,16 @@
|
||||
#ifdef __glxext_h_
|
||||
#error glxext.h included before glxew.h
|
||||
#endif
|
||||
#ifdef GLX_H
|
||||
|
||||
#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
|
||||
#error glx.h included before glxew.h
|
||||
#endif
|
||||
|
||||
#define __glxext_h_
|
||||
#define __GLX_glx_h__
|
||||
|
||||
#define GLX_H
|
||||
#define __GLX_glx_h__
|
||||
#define __glx_h__
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
@ -255,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
|
||||
typedef XID GLXFBConfigID;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
typedef XID GLXWindow;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
|
||||
typedef struct {
|
||||
@ -343,6 +346,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
|
||||
|
||||
#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 ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_create_context
|
||||
@ -362,6 +385,33 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
|
||||
|
||||
#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 ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
@ -408,6 +458,39 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
|
||||
|
||||
#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 ---------------------- */
|
||||
|
||||
#ifndef GLX_ATI_pixel_format_float
|
||||
@ -472,6 +555,28 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
|
||||
|
||||
#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 --------------------- */
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
@ -529,6 +634,33 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
|
||||
|
||||
#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 ---------------------- */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
@ -615,6 +747,20 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable dr
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
@ -683,6 +829,34 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint 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 -------------------------- */
|
||||
|
||||
#ifndef GLX_NV_float_buffer
|
||||
@ -694,6 +868,18 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
@ -749,10 +935,37 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#endif /* GLX_NV_vertex_array_range */
|
||||
|
||||
/* -------------------------- GLX_NV_video_output -------------------------- */
|
||||
/* -------------------------- GLX_NV_video_capture ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_video_output
|
||||
#define GLX_NV_video_output 1
|
||||
#ifndef GLX_NV_video_capture
|
||||
#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_ALPHA_NV 0x20C4
|
||||
@ -779,9 +992,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
|
||||
#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 -------------------------- */
|
||||
|
||||
@ -799,8 +1012,7 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
|
||||
/* -------------------------- GLX_OML_sync_control ------------------------- */
|
||||
|
||||
#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
#include <inttypes.h>
|
||||
#ifndef GLX_OML_sync_control
|
||||
#define GLX_OML_sync_control 1
|
||||
|
||||
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
|
||||
#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);
|
||||
|
||||
#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
|
||||
@ -1181,185 +1393,213 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define GLXEW_EXPORT
|
||||
#define GLXEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT
|
||||
#else
|
||||
#define GLXEW_EXPORT extern
|
||||
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
|
||||
|
||||
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
|
||||
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
|
||||
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
|
||||
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
|
||||
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
|
||||
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
|
||||
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
|
||||
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
|
||||
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
|
||||
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
|
||||
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
|
||||
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
|
||||
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
|
||||
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
|
||||
GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
|
||||
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
|
||||
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
|
||||
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
|
||||
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
|
||||
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
|
||||
|
||||
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;
|
||||
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
|
||||
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
|
||||
|
||||
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
|
||||
|
||||
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
|
||||
#ifdef GLX_OML_sync_control
|
||||
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
|
||||
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
|
||||
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
|
||||
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
|
||||
#endif
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
|
||||
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
|
||||
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
|
||||
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
|
||||
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
|
||||
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
|
||||
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
|
||||
|
||||
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
|
||||
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
|
||||
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
|
||||
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
|
||||
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
|
||||
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
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;
|
||||
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
|
||||
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
|
||||
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
|
||||
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
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;
|
||||
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
|
||||
|
||||
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
|
||||
|
||||
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
|
||||
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
|
||||
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;
|
||||
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
|
||||
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)
|
||||
struct GLXEWContextStruct
|
||||
{
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
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
|
||||
}; /* GLXEWContextStruct */
|
||||
@ -1370,8 +1610,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
|
||||
#ifdef GLEW_MX
|
||||
|
||||
typedef struct GLXEWContextStruct GLXEWContext;
|
||||
extern GLenum glxewContextInit (GLXEWContext* ctx);
|
||||
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
|
||||
GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
|
||||
|
||||
#define glxewInit() glxewContextInit(glxewGetContext())
|
||||
#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_FUN(x) x
|
||||
|
||||
extern GLboolean glxewIsSupported (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
|
||||
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
extern GLboolean glxewGetExtension (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -62,11 +62,12 @@
|
||||
|
||||
#define __wglext_h_
|
||||
|
||||
#if !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#if !defined(WINAPI)
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN 1
|
||||
# endif
|
||||
#include <windows.h>
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#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_LAYER_PLANE_ARB 0x2093
|
||||
#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);
|
||||
|
||||
@ -161,6 +204,33 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
|
||||
|
||||
#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 ----------------------- */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
@ -400,6 +470,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
@ -605,6 +697,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
|
||||
#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 --------------------- */
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
@ -752,6 +853,59 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
@ -804,6 +958,18 @@ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
|
||||
#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 ------------------------- */
|
||||
|
||||
#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 * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
|
||||
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);
|
||||
|
||||
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
|
||||
@ -892,6 +1058,32 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#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 -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
@ -957,9 +1149,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define WGLEW_EXPORT
|
||||
#define WGLEW_FUN_EXPORT
|
||||
#define WGLEW_VAR_EXPORT
|
||||
#else
|
||||
#define WGLEW_EXPORT GLEWAPI
|
||||
#define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
@ -967,165 +1161,203 @@ struct WGLEWContextStruct
|
||||
{
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
|
||||
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_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
|
||||
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
|
||||
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
|
||||
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
|
||||
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
|
||||
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
|
||||
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
|
||||
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
|
||||
|
||||
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_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
|
||||
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
|
||||
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
|
||||
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
|
||||
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
|
||||
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
|
||||
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
|
||||
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
|
||||
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
|
||||
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
|
||||
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
|
||||
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
|
||||
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_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
|
||||
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
|
||||
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
|
||||
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
|
||||
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_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
|
||||
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
|
||||
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_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
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_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
|
||||
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
||||
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
|
||||
WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
||||
WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
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
|
||||
}; /* WGLEWContextStruct */
|
||||
@ -1136,8 +1368,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
#ifdef GLEW_MX
|
||||
|
||||
typedef struct WGLEWContextStruct WGLEWContext;
|
||||
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);
|
||||
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
|
||||
GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
|
||||
|
||||
#define wglewInit() wglewContextInit(wglewGetContext())
|
||||
#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_FUN(x) x
|
||||
|
||||
GLEWAPI GLboolean wglewIsSupported (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
|
||||
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
GLEWAPI GLboolean wglewGetExtension (const char* name);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -41,11 +41,11 @@ void createSphereInVolume(SimpleVolume<uint8_t>& volData, float fRadius)
|
||||
Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2);
|
||||
|
||||
//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 x = 0; x < volData.getDepth(); x++)
|
||||
for (int x = 0; x < volData.getWidth(); x++)
|
||||
{
|
||||
//Store our current position as a vector...
|
||||
Vector3DFloat v3dCurrentPos(x,y,z);
|
||||
|
@ -59,8 +59,8 @@ if(DOXYGEN_FOUND)
|
||||
SOURCES Doxyfile.in polyvox.qhcp.in Mainpage.dox
|
||||
VERBATIM
|
||||
)
|
||||
set_target_properties(doc PROPERTIES PROJECT_LABEL "Documentation") #Set label seen in IDE
|
||||
set_property(TARGET doc PROPERTY FOLDER "library/doc")
|
||||
set_target_properties(doc PROPERTIES PROJECT_LABEL "API Reference") #Set label seen in IDE
|
||||
set_property(TARGET doc PROPERTY FOLDER "Documentation")
|
||||
|
||||
#If we found qcollectiongenerator then do more processing
|
||||
if(QT_QCOLLECTIONGENERATOR_EXECUTABLE)
|
||||
|
1710
library/Doxyfile.in
1710
library/Doxyfile.in
File diff suppressed because it is too large
Load Diff
@ -3,9 +3,7 @@
|
||||
|
||||
The PolyVox documentation.\n
|
||||
|
||||
For a brief introduction, see the \ref tutorial.
|
||||
|
||||
To see how to use CMake with %PolyVox, see \ref cmake.
|
||||
See the <a href="../manual/index.html">manual</a> for help and tutorials.
|
||||
|
||||
|
||||
\author David Williams
|
||||
|
@ -28,13 +28,11 @@ PROJECT(PolyVoxCore)
|
||||
SET(CORE_SRC_FILES
|
||||
source/ArraySizes.cpp
|
||||
source/AStarPathfinder.cpp
|
||||
source/GradientEstimators.cpp
|
||||
source/Log.cpp
|
||||
source/MeshDecimator.cpp
|
||||
source/Region.cpp
|
||||
source/SimpleInterface.cpp
|
||||
source/VertexTypes.cpp
|
||||
source/VoxelFilters.cpp
|
||||
)
|
||||
|
||||
#Projects headers files
|
||||
@ -59,6 +57,7 @@ SET(CORE_INC_FILES
|
||||
include/PolyVoxCore/Density.h
|
||||
include/PolyVoxCore/GradientEstimators.h
|
||||
include/PolyVoxCore/GradientEstimators.inl
|
||||
include/PolyVoxCore/Interpolation.h
|
||||
include/PolyVoxCore/IteratorController.h
|
||||
include/PolyVoxCore/IteratorController.inl
|
||||
include/PolyVoxCore/LargeVolume.h
|
||||
@ -79,8 +78,6 @@ SET(CORE_INC_FILES
|
||||
include/PolyVoxCore/RawVolumeSampler.inl
|
||||
include/PolyVoxCore/Raycast.h
|
||||
include/PolyVoxCore/Raycast.inl
|
||||
include/PolyVoxCore/RaycastWithCallback.h
|
||||
include/PolyVoxCore/RaycastWithCallback.inl
|
||||
include/PolyVoxCore/Region.h
|
||||
include/PolyVoxCore/SimpleInterface.h
|
||||
include/PolyVoxCore/SimpleVolume.h
|
||||
@ -95,28 +92,29 @@ SET(CORE_INC_FILES
|
||||
include/PolyVoxCore/VolumeResampler.h
|
||||
include/PolyVoxCore/VolumeResampler.inl
|
||||
include/PolyVoxCore/VoxelFilters.h
|
||||
include/PolyVoxCore/VoxelFilters.inl
|
||||
)
|
||||
|
||||
SET(IMPL_SRC_FILES
|
||||
source/PolyVoxImpl/MarchingCubesTables.cpp
|
||||
source/PolyVoxImpl/RandomUnitVectors.cpp
|
||||
source/PolyVoxImpl/RandomVectors.cpp
|
||||
source/PolyVoxImpl/Utility.cpp
|
||||
source/Impl/MarchingCubesTables.cpp
|
||||
source/Impl/RandomUnitVectors.cpp
|
||||
source/Impl/RandomVectors.cpp
|
||||
source/Impl/Utility.cpp
|
||||
)
|
||||
|
||||
SET(IMPL_INC_FILES
|
||||
include/PolyVoxImpl/ArraySizesImpl.h
|
||||
include/PolyVoxImpl/ArraySizesImpl.inl
|
||||
include/PolyVoxImpl/AStarPathfinderImpl.h
|
||||
include/PolyVoxImpl/Block.h
|
||||
include/PolyVoxImpl/Block.inl
|
||||
include/PolyVoxImpl/MarchingCubesTables.h
|
||||
include/PolyVoxImpl/RandomUnitVectors.h
|
||||
include/PolyVoxImpl/RandomVectors.h
|
||||
include/PolyVoxImpl/SubArray.h
|
||||
include/PolyVoxImpl/SubArray.inl
|
||||
include/PolyVoxImpl/TypeDef.h
|
||||
include/PolyVoxImpl/Utility.h
|
||||
include/PolyVoxCore/Impl/ArraySizesImpl.h
|
||||
include/PolyVoxCore/Impl/ArraySizesImpl.inl
|
||||
include/PolyVoxCore/Impl/AStarPathfinderImpl.h
|
||||
include/PolyVoxCore/Impl/Block.h
|
||||
include/PolyVoxCore/Impl/Block.inl
|
||||
include/PolyVoxCore/Impl/MarchingCubesTables.h
|
||||
include/PolyVoxCore/Impl/RandomUnitVectors.h
|
||||
include/PolyVoxCore/Impl/RandomVectors.h
|
||||
include/PolyVoxCore/Impl/SubArray.h
|
||||
include/PolyVoxCore/Impl/SubArray.inl
|
||||
include/PolyVoxCore/Impl/TypeDef.h
|
||||
include/PolyVoxCore/Impl/Utility.h
|
||||
)
|
||||
|
||||
#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("Headers" FILES ${CORE_INC_FILES})
|
||||
|
||||
SOURCE_GROUP("Sources\\PolyVoxImpl" FILES ${IMPL_SRC_FILES})
|
||||
SOURCE_GROUP("Headers\\PolyVoxImpl" FILES ${IMPL_INC_FILES})
|
||||
SOURCE_GROUP("Sources\\Impl" FILES ${IMPL_SRC_FILES})
|
||||
SOURCE_GROUP("Headers\\Impl" FILES ${IMPL_INC_FILES})
|
||||
|
||||
#Tell CMake the paths
|
||||
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})
|
||||
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS "-DPOLYVOX_SHARED_EXPORTS")
|
||||
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})
|
||||
IF(MSVC)
|
||||
@ -159,7 +157,7 @@ IF(WIN32)
|
||||
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)
|
||||
|
||||
#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
|
||||
)
|
||||
|
||||
#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)
|
||||
ENDIF(WIN32)
|
||||
|
@ -24,8 +24,8 @@ freely, subject to the following restrictions:
|
||||
#ifndef __PolyVox_AStarPathfinder_H__
|
||||
#define __PolyVox_AStarPathfinder_H__
|
||||
|
||||
#include "PolyVoxImpl/AStarPathfinderImpl.h"
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "Impl/AStarPathfinderImpl.h"
|
||||
#include "Impl/TypeDef.h"
|
||||
|
||||
#include "PolyVoxCore/Array.h"
|
||||
|
||||
@ -70,7 +70,7 @@ namespace PolyVox
|
||||
std::list<Vector3DInt32>* listResult,
|
||||
float fHBias = 1.0,
|
||||
uint32_t uMaxNoOfNodes = 10000,
|
||||
Connectivity connectivity = TwentySixConnected,
|
||||
Connectivity requiredConnectivity = TwentySixConnected,
|
||||
polyvox_function<bool (const VolumeType*, const Vector3DInt32&)> funcIsVoxelValidForPath = &aStarDefaultVoxelValidator,
|
||||
polyvox_function<void (float)> funcProgressCallback = 0
|
||||
)
|
||||
@ -78,7 +78,7 @@ namespace PolyVox
|
||||
,start(v3dStart)
|
||||
,end(v3dEnd)
|
||||
,result(listResult)
|
||||
,connectivity(connectivity)
|
||||
,connectivity(requiredConnectivity)
|
||||
,hBias(fHBias)
|
||||
,maxNumberOfNodes(uMaxNoOfNodes)
|
||||
,isVoxelValidForPath(funcIsVoxelValidForPath)
|
||||
@ -174,7 +174,8 @@ namespace PolyVox
|
||||
float SixConnectedCost(const Vector3DInt32& a, const Vector3DInt32& b);
|
||||
float EighteenConnectedCost(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
|
||||
AllNodesContainer allNodes;
|
||||
|
@ -313,11 +313,17 @@ namespace PolyVox
|
||||
//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.
|
||||
//See http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#S12
|
||||
polyvox_hash<uint32_t> uint32Hash;
|
||||
uint32_t hashValX = uint32Hash(a.getX());
|
||||
uint32_t hashValY = uint32Hash(a.getY());
|
||||
uint32_t hashValZ = uint32Hash(a.getZ());
|
||||
uint32_t hashVal = hashValX ^ hashValY ^ hashValZ;
|
||||
|
||||
//Note that if the hash is zero we can have differences between the Linux vs. Windows
|
||||
//(or perhaps GCC vs. VS) versions of the code. This is probably because of the way
|
||||
//sorting inside the std::set works (i.e. one system swaps values which are identical
|
||||
//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.
|
||||
hashVal &= 0x0000FFFF;
|
||||
float fHash = hashVal / 1000000.0f;
|
||||
@ -326,4 +332,18 @@ namespace PolyVox
|
||||
hVal += fHash;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -24,49 +24,57 @@ freely, subject to the following restrictions:
|
||||
#ifndef __AmbientOcclusionCalculator_H__
|
||||
#define __AmbientOcclusionCalculator_H__
|
||||
|
||||
#include "PolyVoxImpl/RandomUnitVectors.h"
|
||||
#include "PolyVoxImpl/RandomVectors.h"
|
||||
#include "Impl/RandomUnitVectors.h"
|
||||
#include "Impl/RandomVectors.h"
|
||||
|
||||
#include "PolyVoxCore/Array.h"
|
||||
#include "PolyVoxCore/Region.h"
|
||||
#include "PolyVoxCore/Raycast.h"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
//These two should not be here!
|
||||
#include "PolyVoxCore/Material.h"
|
||||
#include "PolyVoxCore/SimpleVolume.h"
|
||||
#endif
|
||||
//These two should not be here!
|
||||
#include "PolyVoxCore/Material.h"
|
||||
#include "PolyVoxCore/SimpleVolume.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template<typename VolumeType>
|
||||
class AmbientOcclusionCalculator
|
||||
/**
|
||||
* \file
|
||||
*
|
||||
* Ambient occlusion
|
||||
*/
|
||||
|
||||
template<typename IsVoxelTransparentCallback>
|
||||
class AmbientOcclusionCalculatorRaycastCallback
|
||||
{
|
||||
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);
|
||||
~AmbientOcclusionCalculator();
|
||||
AmbientOcclusionCalculatorRaycastCallback(IsVoxelTransparentCallback isVoxelTransparentCallback) : mIsVoxelTransparentCallback(isVoxelTransparentCallback)
|
||||
{
|
||||
}
|
||||
|
||||
void execute(void);
|
||||
bool operator()(const SimpleVolume<uint8_t>::Sampler& sampler)
|
||||
{
|
||||
uint8_t sample = sampler.getVoxel();
|
||||
bool func = mIsVoxelTransparentCallback(sample);
|
||||
return func;
|
||||
}
|
||||
|
||||
private:
|
||||
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;
|
||||
IsVoxelTransparentCallback mIsVoxelTransparentCallback;
|
||||
};
|
||||
|
||||
// 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"
|
||||
|
@ -23,44 +23,40 @@ freely, subject to the following restrictions:
|
||||
|
||||
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)
|
||||
:m_region(region)
|
||||
,m_sampVolume(volInput)
|
||||
,m_volInput(volInput)
|
||||
,m_arrayResult(arrayResult)
|
||||
,m_fRayLength(fRayLength)
|
||||
,m_uNoOfSamplesPerOutputElement(uNoOfSamplesPerOutputElement)
|
||||
,mRandomUnitVectorIndex(0) //Although these could be uninitialised, we
|
||||
,mRandomVectorIndex(0) //initialise for consistant results in the tests.
|
||||
,m_funcIsTransparent(funcIsTransparent)
|
||||
/**
|
||||
* \param volInput The volume to calculate the ambient occlusion for
|
||||
* \param[out] arrayResult The output of the calculator
|
||||
* \param region The region of the volume for which the occlusion should be calculated
|
||||
* \param fRayLength The length for each test ray
|
||||
* \param uNoOfSamplesPerOutputElement The number of samples to calculate the occlusion
|
||||
* \param isVoxelTransparentCallback A callback which takes a \a VoxelType and returns a \a bool whether the voxel is transparent
|
||||
*/
|
||||
template<typename VolumeType, typename IsVoxelTransparentCallback>
|
||||
void calculateAmbientOcclusion(VolumeType* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, IsVoxelTransparentCallback isVoxelTransparentCallback)
|
||||
{
|
||||
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.
|
||||
assert(m_volInput->getWidth() % arrayResult->getDimension(0) == 0);
|
||||
assert(m_volInput->getHeight() % arrayResult->getDimension(1) == 0);
|
||||
assert(m_volInput->getDepth() % arrayResult->getDimension(2) == 0);
|
||||
assert(volInput->getWidth() % arrayResult->getDimension(0) == 0);
|
||||
assert(volInput->getHeight() % arrayResult->getDimension(1) == 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
|
||||
//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();
|
||||
mRandomVectorIndex += m_region.getLowerCorner().getX() + m_region.getLowerCorner().getY() + m_region.getLowerCorner().getZ();
|
||||
uRandomUnitVectorIndex += region.getLowerCorner().getX() + region.getLowerCorner().getY() + 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
|
||||
//nth 'random' value isn't always followed by the n+1th 'random' value.
|
||||
mIndexIncreament = 1;
|
||||
}
|
||||
uIndexIncreament = 1;
|
||||
|
||||
template<typename VolumeType>
|
||||
AmbientOcclusionCalculator<VolumeType>::~AmbientOcclusionCalculator()
|
||||
{
|
||||
}
|
||||
|
||||
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 int iRatioX = volInput->getWidth() / arrayResult->getDimension(0);
|
||||
const int iRatioY = volInput->getHeight() / arrayResult->getDimension(1);
|
||||
const int iRatioZ = volInput->getDepth() / arrayResult->getDimension(2);
|
||||
|
||||
const float fRatioX = iRatioX;
|
||||
const float fRatioY = iRatioY;
|
||||
@ -74,15 +70,12 @@ namespace PolyVox
|
||||
|
||||
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
|
||||
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
|
||||
//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
|
||||
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.
|
||||
//This jitter value moves our sample point from the center 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.
|
||||
//This jitter value moves our sample point from the centre of the array cell to somewhere else in the array cell
|
||||
Vector3DFloat v3dJitter = randomVectors[(uRandomVectorIndex += (++uIndexIncreament)) % 1019]; //Prime number helps avoid repetition on successive loops.
|
||||
v3dJitter *= v3dHalfRatio;
|
||||
const Vector3DFloat v3dRayStart = v3dStart + v3dJitter;
|
||||
|
||||
Vector3DFloat v3dRayDirection = randomUnitVectors[(mRandomUnitVectorIndex += (++mIndexIncreament)) % 1021]; //Differenct prime number.
|
||||
v3dRayDirection *= m_fRayLength;
|
||||
Vector3DFloat v3dRayDirection = randomUnitVectors[(uRandomUnitVectorIndex += (++uIndexIncreament)) % 1021]; //Different prime number.
|
||||
v3dRayDirection *= fRayLength;
|
||||
|
||||
raycast.setStart(v3dRayStart);
|
||||
raycast.setDirection(v3dRayDirection);
|
||||
raycast.execute();
|
||||
AmbientOcclusionCalculatorRaycastCallback<IsVoxelTransparentCallback> ambientOcclusionCalculatorRaycastCallback(isVoxelTransparentCallback);
|
||||
RaycastResult result = raycastWithDirection(volInput, v3dRayStart, v3dRayDirection, ambientOcclusionCalculatorRaycastCallback);
|
||||
|
||||
if(raycastResult.foundIntersection == false)
|
||||
if(result == RaycastResults::Completed)
|
||||
{
|
||||
++uVisibleDirections;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
//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
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
(*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);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ freely, subject to the following restrictions:
|
||||
#ifndef __PolyVox_Array_H__
|
||||
#define __PolyVox_Array_H__
|
||||
|
||||
#include "PolyVoxImpl/SubArray.h"
|
||||
#include "Impl/SubArray.h"
|
||||
|
||||
#include "PolyVoxCore/ArraySizes.h" //Not strictly required, but convienient
|
||||
|
||||
|
@ -24,8 +24,8 @@ distribution.
|
||||
#ifndef __PolyVox_ArraySizes_H__
|
||||
#define __PolyVox_ArraySizes_H__
|
||||
|
||||
#include "PolyVoxImpl/ArraySizesImpl.h"
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "Impl/ArraySizesImpl.h"
|
||||
#include "Impl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
|
@ -141,13 +141,17 @@ namespace PolyVox
|
||||
|
||||
protected:
|
||||
/// Constructor for creating a fixed size volume.
|
||||
BaseVolume
|
||||
(
|
||||
const Region& regValid
|
||||
);
|
||||
BaseVolume(const Region& regValid);
|
||||
|
||||
/// Copy constructor
|
||||
BaseVolume(const BaseVolume& rhs);
|
||||
|
||||
/// Destructor
|
||||
~BaseVolume();
|
||||
|
||||
/// Assignment operator
|
||||
BaseVolume& operator=(const BaseVolume& rhs);
|
||||
|
||||
//The size of the volume
|
||||
Region m_regValidRegion;
|
||||
|
||||
|
@ -23,15 +23,30 @@ freely, subject to the following restrictions:
|
||||
|
||||
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>
|
||||
BaseVolume<VoxelType>::BaseVolume
|
||||
(
|
||||
const Region& regValid
|
||||
)
|
||||
BaseVolume<VoxelType>::BaseVolume(const Region& 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -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
|
||||
/// is outside the extents of the volume.
|
||||
@ -132,7 +160,7 @@ namespace PolyVox
|
||||
/// \return The voxel value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
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);
|
||||
return VoxelType();
|
||||
@ -143,7 +171,7 @@ namespace PolyVox
|
||||
/// \return The voxel value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
template <typename VoxelType>
|
||||
VoxelType BaseVolume<VoxelType>::getVoxelAt(const Vector3DInt32& v3dPos) const
|
||||
VoxelType BaseVolume<VoxelType>::getVoxelAt(const Vector3DInt32& /*v3dPos*/) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
@ -153,7 +181,7 @@ namespace PolyVox
|
||||
/// \param tBorder The value to use for voxels outside the volume.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
template <typename VoxelType>
|
||||
void BaseVolume<VoxelType>::setBorderValue(const VoxelType& tBorder)
|
||||
void BaseVolume<VoxelType>::setBorderValue(const VoxelType& /*tBorder*/)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
@ -166,7 +194,7 @@ namespace PolyVox
|
||||
/// \return whether the requested position is inside the volume
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
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);
|
||||
return false;
|
||||
@ -178,7 +206,7 @@ namespace PolyVox
|
||||
/// \return whether the requested position is inside the volume
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
template <typename VoxelType>
|
||||
bool BaseVolume<VoxelType>::setVoxelAt(const Vector3DInt32& v3dPos, VoxelType tValue)
|
||||
bool BaseVolume<VoxelType>::setVoxelAt(const Vector3DInt32& /*v3dPos*/, VoxelType /*tValue*/)
|
||||
{
|
||||
assert(false);
|
||||
return false;
|
||||
|
@ -67,7 +67,7 @@ namespace PolyVox
|
||||
}
|
||||
|
||||
//Private assignment operator, so client code can't abuse this class.
|
||||
ConstVolumeProxy& operator=(const ConstVolumeProxy& rhs) throw()
|
||||
ConstVolumeProxy& operator=(const ConstVolumeProxy& rhs)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ freely, subject to the following restrictions:
|
||||
#ifndef __PolyVox_CubicSurfaceExtractor_H__
|
||||
#define __PolyVox_CubicSurfaceExtractor_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "Impl/TypeDef.h"
|
||||
|
||||
#include "PolyVoxCore/Array.h"
|
||||
#include "PolyVoxCore/DefaultIsQuadNeeded.h"
|
||||
@ -32,6 +32,47 @@ freely, subject to the following restrictions:
|
||||
|
||||
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> >
|
||||
class CubicSurfaceExtractor
|
||||
{
|
||||
@ -68,6 +109,7 @@ namespace PolyVox
|
||||
public:
|
||||
CubicSurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh<PositionMaterial>* result, bool bMergeQuads = true, IsQuadNeeded isQuadNeeded = IsQuadNeeded());
|
||||
|
||||
|
||||
void execute();
|
||||
|
||||
private:
|
||||
|
@ -58,10 +58,6 @@ namespace PolyVox
|
||||
memset(m_previousSliceVertices.getRawData(), 0xff, m_previousSliceVertices.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[PositiveX].resize(m_regSizeInVoxels.getUpperCorner().getX() - m_regSizeInVoxels.getLowerCorner().getX() + 2);
|
||||
|
||||
@ -87,75 +83,73 @@ namespace PolyVox
|
||||
|
||||
volumeSampler.setPosition(x,y,z);
|
||||
|
||||
uint32_t material; //Filled in by callback
|
||||
typename VolumeType::VoxelType currentVoxel = volumeSampler.getVoxel();
|
||||
bool currentVoxelIsSolid = currentVoxel.getMaterial() != 0;
|
||||
|
||||
typename VolumeType::VoxelType negXVoxel = volumeSampler.peekVoxel1nx0py0pz();
|
||||
bool negXVoxelIsSolid = negXVoxel.getMaterial() != 0;
|
||||
|
||||
if(currentVoxelIsSolid != negXVoxelIsSolid)
|
||||
{
|
||||
uint32_t material = (std::max)(currentVoxel.getMaterial(), negXVoxel.getMaterial());
|
||||
|
||||
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));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vecQuads[PositiveX][regX].push_back(Quad(v0, v3, v2, v1));
|
||||
}
|
||||
}
|
||||
|
||||
typename VolumeType::VoxelType negYVoxel = volumeSampler.peekVoxel0px1ny0pz();
|
||||
bool negYVoxelIsSolid = negYVoxel.getMaterial() != 0;
|
||||
typename VolumeType::VoxelType negZVoxel = volumeSampler.peekVoxel0px0py1nz();
|
||||
|
||||
if(currentVoxelIsSolid != negYVoxelIsSolid)
|
||||
// X
|
||||
if(m_funcIsQuadNeededCallback(currentVoxel, negXVoxel, material))
|
||||
{
|
||||
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_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 > 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));
|
||||
}
|
||||
m_vecQuads[NegativeX][regX].push_back(Quad(v0, v1, v2, v3));
|
||||
}
|
||||
|
||||
typename VolumeType::VoxelType negZVoxel = volumeSampler.peekVoxel0px0py1nz();
|
||||
bool negZVoxelIsSolid = negZVoxel.getMaterial() != 0;
|
||||
|
||||
if(currentVoxelIsSolid != negZVoxelIsSolid)
|
||||
if(m_funcIsQuadNeededCallback(negXVoxel, currentVoxel, material))
|
||||
{
|
||||
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_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_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));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vecQuads[PositiveZ][regZ].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));
|
||||
}
|
||||
|
||||
if(m_funcIsQuadNeededCallback(negYVoxel, 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_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[PositiveY][regY].push_back(Quad(v0, v3, v2, v1));
|
||||
}
|
||||
|
||||
// Z
|
||||
if(m_funcIsQuadNeededCallback(currentVoxel, negZVoxel, 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[NegativeZ][regZ].push_back(Quad(v0, v1, v2, v3));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -219,7 +213,7 @@ namespace PolyVox
|
||||
}
|
||||
|
||||
//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;
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ namespace PolyVox
|
||||
void execute();
|
||||
|
||||
private:
|
||||
//polyvox_function<bool(typename VolumeType::VoxelType voxel0, typename VolumeType::VoxelType voxel1, float& materialToUse)> m_funcIsQuadNeededCallback;
|
||||
IsQuadNeeded m_funcIsQuadNeededCallback;
|
||||
|
||||
//The volume data and a sampler to access it.
|
||||
|
@ -49,24 +49,24 @@ namespace PolyVox
|
||||
float regY = static_cast<float>(y - m_regSizeInVoxels.getLowerCorner().getY());
|
||||
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))
|
||||
{
|
||||
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 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 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 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 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), 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), 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), static_cast<float>(material)));
|
||||
|
||||
m_meshCurrent->addTriangleCubic(v0,v2,v1);
|
||||
m_meshCurrent->addTriangleCubic(v1,v2,v3);
|
||||
}
|
||||
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 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 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 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 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), 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), 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), static_cast<float>(material)));
|
||||
|
||||
m_meshCurrent->addTriangleCubic(v0,v1,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))
|
||||
{
|
||||
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 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 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 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 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), 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), 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), static_cast<float>(material)));
|
||||
|
||||
m_meshCurrent->addTriangleCubic(v0,v1,v2);
|
||||
m_meshCurrent->addTriangleCubic(v1,v3,v2);
|
||||
}
|
||||
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 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 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 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 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), 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), 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), static_cast<float>(material)));
|
||||
|
||||
m_meshCurrent->addTriangleCubic(v0,v2,v1);
|
||||
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))
|
||||
{
|
||||
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 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 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 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 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), 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), 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), static_cast<float>(material)));
|
||||
|
||||
m_meshCurrent->addTriangleCubic(v0,v2,v1);
|
||||
m_meshCurrent->addTriangleCubic(v1,v2,v3);
|
||||
}
|
||||
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 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 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 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 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), 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), 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), static_cast<float>(material)));
|
||||
|
||||
m_meshCurrent->addTriangleCubic(v0,v1,v2);
|
||||
m_meshCurrent->addTriangleCubic(v1,v3,v2);
|
||||
|
@ -24,17 +24,19 @@ freely, subject to the following restrictions:
|
||||
#ifndef __PolyVox_DefaultIsQuadNeeded_H__
|
||||
#define __PolyVox_DefaultIsQuadNeeded_H__
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template<typename VoxelType>
|
||||
class DefaultIsQuadNeeded
|
||||
{
|
||||
public:
|
||||
bool operator()(VoxelType back, VoxelType front, float& materialToUse)
|
||||
bool operator()(VoxelType back, VoxelType front, uint32_t& materialToUse)
|
||||
{
|
||||
if((back > 0) && (front == 0))
|
||||
{
|
||||
materialToUse = static_cast<float>(back);
|
||||
materialToUse = static_cast<uint32_t>(back);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -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
|
||||
/// 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;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ freely, subject to the following restrictions:
|
||||
|
||||
#include "PolyVoxCore/DefaultMarchingCubesController.h" //We'll specialise the controller contained in here
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "Impl/TypeDef.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
@ -36,17 +36,9 @@ freely, subject to the following restrictions:
|
||||
|
||||
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
|
||||
/// 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
|
||||
/// Detailed description...
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 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
|
||||
{
|
||||
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 int32_t MaterialType; //Shouldn't define this one...
|
||||
|
||||
/// Constructor
|
||||
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);
|
||||
};
|
||||
|
||||
bool operator!=(const Density& rhs) const throw()
|
||||
bool operator!=(const Density& rhs) const
|
||||
{
|
||||
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)
|
||||
{
|
||||
m_uDensity += rhs.m_uDensity;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Density<Type>& operator-=(const Density<Type>& rhs)
|
||||
{
|
||||
m_uDensity -= rhs.m_uDensity;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Density<Type>& operator/=(uint32_t rhs)
|
||||
{
|
||||
m_uDensity /= rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
DensityType getDensity() const throw() { return m_uDensity; }
|
||||
void setDensity(DensityType uDensity) { m_uDensity = uDensity; }
|
||||
/// \return The current density of the voxel
|
||||
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)(); }
|
||||
static DensityType getMinDensity() throw() { return (std::numeric_limits<DensityType>::min)(); }
|
||||
/// \return The maximum allowed density of the voxel
|
||||
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:
|
||||
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
|
||||
// most games) but 16-bit and float types do have uses particularly in medical/scientific visualisation.
|
||||
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
|
||||
@ -127,7 +167,7 @@ namespace PolyVox
|
||||
return voxel.getDensity();
|
||||
}
|
||||
|
||||
MaterialType convertToMaterial(Density<Type> voxel)
|
||||
MaterialType convertToMaterial(Density<Type> /*voxel*/)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,224 +1,223 @@
|
||||
/*******************************************************************************
|
||||
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_AStarPathfinderImpl_H__
|
||||
#define __PolyVox_AStarPathfinderImpl_H__
|
||||
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits> //For numeric_limits
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
class OpenNodesContainer;
|
||||
class ClosedNodesContainer;
|
||||
class ThermiteGameLogic;
|
||||
|
||||
/// The Connectivity of a voxel determines how many neighbours it has.
|
||||
enum Connectivity
|
||||
{
|
||||
/// Each voxel has six neighbours, which are those sharing a face.
|
||||
SixConnected,
|
||||
/// Each voxel has 18 neighbours, which are those sharing a face or an edge.
|
||||
EighteenConnected,
|
||||
/// Each voxel has 26 neighbours, which are those sharing a face, edge, or corner.
|
||||
TwentySixConnected
|
||||
};
|
||||
|
||||
struct Node
|
||||
{
|
||||
Node(int x, int y, int z)
|
||||
:gVal(std::numeric_limits<float>::quiet_NaN()) //Initilise with NaNs so that we will
|
||||
,hVal(std::numeric_limits<float>::quiet_NaN()) //know if we forget to set these properly.
|
||||
,parent(0)
|
||||
{
|
||||
position.setX(x);
|
||||
position.setY(y);
|
||||
position.setZ(z);
|
||||
}
|
||||
|
||||
bool operator==(const Node& rhs) const
|
||||
{
|
||||
return position == rhs.position;
|
||||
}
|
||||
|
||||
bool operator<(const Node& rhs) const
|
||||
{
|
||||
if (position.getX() < rhs.position.getX())
|
||||
return true;
|
||||
if (rhs.position.getX() < position.getX())
|
||||
return false;
|
||||
|
||||
if (position.getY() < rhs.position.getY())
|
||||
return true;
|
||||
if (rhs.position.getY() < position.getY())
|
||||
return false;
|
||||
|
||||
if (position.getZ() < rhs.position.getZ())
|
||||
return true;
|
||||
if (rhs.position.getZ() < position.getZ())
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
PolyVox::Vector3DInt32 position;
|
||||
float gVal;
|
||||
float hVal;
|
||||
Node* parent;
|
||||
|
||||
float f(void) const
|
||||
{
|
||||
float f = gVal + hVal;
|
||||
return f;
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::set<Node> AllNodesContainer;
|
||||
|
||||
class AllNodesContainerIteratorComparator
|
||||
{
|
||||
public:
|
||||
bool operator() (const AllNodesContainer::iterator& lhs, const AllNodesContainer::iterator& rhs) const
|
||||
{
|
||||
return (&(*lhs)) < (&(*rhs));
|
||||
}
|
||||
};
|
||||
|
||||
class NodeSort
|
||||
{
|
||||
public:
|
||||
bool operator() (const AllNodesContainer::iterator& lhs, const AllNodesContainer::iterator& rhs) const
|
||||
{
|
||||
return lhs->f() > rhs->f();
|
||||
}
|
||||
};
|
||||
|
||||
class OpenNodesContainer
|
||||
{
|
||||
public:
|
||||
typedef std::vector<AllNodesContainer::iterator>::iterator iterator;
|
||||
|
||||
public:
|
||||
void clear(void)
|
||||
{
|
||||
open.clear();
|
||||
}
|
||||
|
||||
bool empty(void) const
|
||||
{
|
||||
return open.empty();
|
||||
}
|
||||
|
||||
void insert(AllNodesContainer::iterator node)
|
||||
{
|
||||
open.push_back(node);
|
||||
push_heap(open.begin(), open.end(), NodeSort());
|
||||
}
|
||||
|
||||
AllNodesContainer::iterator getFirst(void)
|
||||
{
|
||||
return open[0];
|
||||
}
|
||||
|
||||
void removeFirst(void)
|
||||
{
|
||||
pop_heap(open.begin(), open.end(), NodeSort());
|
||||
open.pop_back();
|
||||
}
|
||||
|
||||
void remove(iterator iterToRemove)
|
||||
{
|
||||
open.erase(iterToRemove);
|
||||
make_heap(open.begin(), open.end(), NodeSort());
|
||||
}
|
||||
|
||||
iterator begin(void)
|
||||
{
|
||||
return open.begin();
|
||||
}
|
||||
|
||||
iterator end(void)
|
||||
{
|
||||
return open.end();
|
||||
}
|
||||
|
||||
iterator find(AllNodesContainer::iterator node)
|
||||
{
|
||||
std::vector<AllNodesContainer::iterator>::iterator openIter = std::find(open.begin(), open.end(), node);
|
||||
return openIter;
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<AllNodesContainer::iterator> open;
|
||||
};
|
||||
|
||||
class ClosedNodesContainer
|
||||
{
|
||||
public:
|
||||
typedef std::set<AllNodesContainer::iterator, AllNodesContainerIteratorComparator>::iterator iterator;
|
||||
|
||||
public:
|
||||
void clear(void)
|
||||
{
|
||||
closed.clear();
|
||||
}
|
||||
|
||||
void insert(AllNodesContainer::iterator node)
|
||||
{
|
||||
closed.insert(node);
|
||||
}
|
||||
|
||||
void remove(iterator iterToRemove)
|
||||
{
|
||||
closed.erase(iterToRemove);
|
||||
}
|
||||
|
||||
iterator begin(void)
|
||||
{
|
||||
return closed.begin();
|
||||
}
|
||||
|
||||
iterator end(void)
|
||||
{
|
||||
return closed.end();
|
||||
}
|
||||
|
||||
iterator find(AllNodesContainer::iterator node)
|
||||
{
|
||||
iterator iter = std::find(closed.begin(), closed.end(), node);
|
||||
return iter;
|
||||
}
|
||||
|
||||
private:
|
||||
std::set<AllNodesContainer::iterator, AllNodesContainerIteratorComparator> closed;
|
||||
};
|
||||
|
||||
|
||||
//bool operator<(const AllNodesContainer::iterator& lhs, const AllNodesContainer::iterator& rhs);
|
||||
}
|
||||
|
||||
#endif //__PolyVox_AStarPathfinderImpl_H__
|
||||
/*******************************************************************************
|
||||
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_AStarPathfinderImpl_H__
|
||||
#define __PolyVox_AStarPathfinderImpl_H__
|
||||
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits> //For numeric_limits
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
class OpenNodesContainer;
|
||||
class ClosedNodesContainer;
|
||||
class ThermiteGameLogic;
|
||||
|
||||
/// The Connectivity of a voxel determines how many neighbours it has.
|
||||
enum Connectivity
|
||||
{
|
||||
/// Each voxel has six neighbours, which are those sharing a face.
|
||||
SixConnected,
|
||||
/// Each voxel has 18 neighbours, which are those sharing a face or an edge.
|
||||
EighteenConnected,
|
||||
/// Each voxel has 26 neighbours, which are those sharing a face, edge, or corner.
|
||||
TwentySixConnected
|
||||
};
|
||||
|
||||
struct Node
|
||||
{
|
||||
Node(int x, int y, int z)
|
||||
:gVal(std::numeric_limits<float>::quiet_NaN()) //Initilise with NaNs so that we will
|
||||
,hVal(std::numeric_limits<float>::quiet_NaN()) //know if we forget to set these properly.
|
||||
,parent(0)
|
||||
{
|
||||
position.setX(x);
|
||||
position.setY(y);
|
||||
position.setZ(z);
|
||||
}
|
||||
|
||||
bool operator==(const Node& rhs) const
|
||||
{
|
||||
return position == rhs.position;
|
||||
}
|
||||
|
||||
bool operator<(const Node& rhs) const
|
||||
{
|
||||
if (position.getX() < rhs.position.getX())
|
||||
return true;
|
||||
if (rhs.position.getX() < position.getX())
|
||||
return false;
|
||||
|
||||
if (position.getY() < rhs.position.getY())
|
||||
return true;
|
||||
if (rhs.position.getY() < position.getY())
|
||||
return false;
|
||||
|
||||
if (position.getZ() < rhs.position.getZ())
|
||||
return true;
|
||||
if (rhs.position.getZ() < position.getZ())
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
PolyVox::Vector3DInt32 position;
|
||||
float gVal;
|
||||
float hVal;
|
||||
Node* parent;
|
||||
|
||||
float f(void) const
|
||||
{
|
||||
return gVal + hVal;
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::set<Node> AllNodesContainer;
|
||||
|
||||
class AllNodesContainerIteratorComparator
|
||||
{
|
||||
public:
|
||||
bool operator() (const AllNodesContainer::iterator& lhs, const AllNodesContainer::iterator& rhs) const
|
||||
{
|
||||
return (&(*lhs)) < (&(*rhs));
|
||||
}
|
||||
};
|
||||
|
||||
class NodeSort
|
||||
{
|
||||
public:
|
||||
bool operator() (const AllNodesContainer::iterator& lhs, const AllNodesContainer::iterator& rhs) const
|
||||
{
|
||||
return lhs->f() > rhs->f();
|
||||
}
|
||||
};
|
||||
|
||||
class OpenNodesContainer
|
||||
{
|
||||
public:
|
||||
typedef std::vector<AllNodesContainer::iterator>::iterator iterator;
|
||||
|
||||
public:
|
||||
void clear(void)
|
||||
{
|
||||
open.clear();
|
||||
}
|
||||
|
||||
bool empty(void) const
|
||||
{
|
||||
return open.empty();
|
||||
}
|
||||
|
||||
void insert(AllNodesContainer::iterator node)
|
||||
{
|
||||
open.push_back(node);
|
||||
push_heap(open.begin(), open.end(), NodeSort());
|
||||
}
|
||||
|
||||
AllNodesContainer::iterator getFirst(void)
|
||||
{
|
||||
return open[0];
|
||||
}
|
||||
|
||||
void removeFirst(void)
|
||||
{
|
||||
pop_heap(open.begin(), open.end(), NodeSort());
|
||||
open.pop_back();
|
||||
}
|
||||
|
||||
void remove(iterator iterToRemove)
|
||||
{
|
||||
open.erase(iterToRemove);
|
||||
make_heap(open.begin(), open.end(), NodeSort());
|
||||
}
|
||||
|
||||
iterator begin(void)
|
||||
{
|
||||
return open.begin();
|
||||
}
|
||||
|
||||
iterator end(void)
|
||||
{
|
||||
return open.end();
|
||||
}
|
||||
|
||||
iterator find(AllNodesContainer::iterator node)
|
||||
{
|
||||
std::vector<AllNodesContainer::iterator>::iterator openIter = std::find(open.begin(), open.end(), node);
|
||||
return openIter;
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<AllNodesContainer::iterator> open;
|
||||
};
|
||||
|
||||
class ClosedNodesContainer
|
||||
{
|
||||
public:
|
||||
typedef std::set<AllNodesContainer::iterator, AllNodesContainerIteratorComparator>::iterator iterator;
|
||||
|
||||
public:
|
||||
void clear(void)
|
||||
{
|
||||
closed.clear();
|
||||
}
|
||||
|
||||
void insert(AllNodesContainer::iterator node)
|
||||
{
|
||||
closed.insert(node);
|
||||
}
|
||||
|
||||
void remove(iterator iterToRemove)
|
||||
{
|
||||
closed.erase(iterToRemove);
|
||||
}
|
||||
|
||||
iterator begin(void)
|
||||
{
|
||||
return closed.begin();
|
||||
}
|
||||
|
||||
iterator end(void)
|
||||
{
|
||||
return closed.end();
|
||||
}
|
||||
|
||||
iterator find(AllNodesContainer::iterator node)
|
||||
{
|
||||
iterator iter = std::find(closed.begin(), closed.end(), node);
|
||||
return iter;
|
||||
}
|
||||
|
||||
private:
|
||||
std::set<AllNodesContainer::iterator, AllNodesContainerIteratorComparator> closed;
|
||||
};
|
||||
|
||||
|
||||
//bool operator<(const AllNodesContainer::iterator& lhs, const AllNodesContainer::iterator& rhs);
|
||||
}
|
||||
|
||||
#endif //__PolyVox_AStarPathfinderImpl_H__
|
@ -1,61 +1,61 @@
|
||||
/*******************************************************************************
|
||||
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_ArraySizesImpl_H__
|
||||
#define __PolyVox_ArraySizesImpl_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
/*
|
||||
This class provides the implementation details behind ArraySizes. It is actually
|
||||
quite similar to ArraySizes, but an important difference is that it is templatised
|
||||
whereas ArraySizes is not. This allows us to use a recursive template pattern without
|
||||
exposing the use of templates to the user.
|
||||
|
||||
It is based on the following article: http://www.drdobbs.com/cpp/184401319
|
||||
*/
|
||||
template <uint32_t N>
|
||||
class ArraySizesImpl
|
||||
{
|
||||
typedef const uint32_t (&UIntArrayN)[N];
|
||||
|
||||
friend class ArraySizes;
|
||||
friend class ArraySizesImpl<N-1>;
|
||||
|
||||
public:
|
||||
ArraySizesImpl<N+1> operator () (uint32_t uSize);
|
||||
|
||||
operator UIntArrayN () const;
|
||||
|
||||
private:
|
||||
ArraySizesImpl(const uint32_t (&pSizes)[N-1], uint32_t uSize);
|
||||
|
||||
uint32_t m_pSizes[N];
|
||||
};
|
||||
}//namespace PolyVox
|
||||
|
||||
#include "PolyVoxImpl/ArraySizesImpl.inl"
|
||||
|
||||
#endif //__PolyVox_ArraySizesImpl_H__
|
||||
/*******************************************************************************
|
||||
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_ArraySizesImpl_H__
|
||||
#define __PolyVox_ArraySizesImpl_H__
|
||||
|
||||
#include "PolyVoxCore/Impl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
/*
|
||||
This class provides the implementation details behind ArraySizes. It is actually
|
||||
quite similar to ArraySizes, but an important difference is that it is templatised
|
||||
whereas ArraySizes is not. This allows us to use a recursive template pattern without
|
||||
exposing the use of templates to the user.
|
||||
|
||||
It is based on the following article: http://www.drdobbs.com/cpp/184401319
|
||||
*/
|
||||
template <uint32_t N>
|
||||
class ArraySizesImpl
|
||||
{
|
||||
typedef const uint32_t (&UIntArrayN)[N];
|
||||
|
||||
friend class ArraySizes;
|
||||
friend class ArraySizesImpl<N-1>;
|
||||
|
||||
public:
|
||||
ArraySizesImpl<N+1> operator () (uint32_t uSize);
|
||||
|
||||
operator UIntArrayN () const;
|
||||
|
||||
private:
|
||||
ArraySizesImpl(const uint32_t (&pSizes)[N-1], uint32_t uSize);
|
||||
|
||||
uint32_t m_pSizes[N];
|
||||
};
|
||||
}//namespace PolyVox
|
||||
|
||||
#include "PolyVoxCore/Impl/ArraySizesImpl.inl"
|
||||
|
||||
#endif //__PolyVox_ArraySizesImpl_H__
|
@ -1,46 +1,46 @@
|
||||
/*******************************************************************************
|
||||
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.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <uint32_t N>
|
||||
ArraySizesImpl<N+1> ArraySizesImpl<N>::operator () (uint32_t uSize)
|
||||
{
|
||||
return ArraySizesImpl<N+1>(m_pSizes, uSize);
|
||||
}
|
||||
|
||||
template <uint32_t N>
|
||||
ArraySizesImpl<N>::operator UIntArrayN () const
|
||||
{
|
||||
return m_pSizes;
|
||||
}
|
||||
|
||||
template <uint32_t N>
|
||||
ArraySizesImpl<N>::ArraySizesImpl(const uint32_t (&pSizes)[N-1], uint32_t uSize)
|
||||
{
|
||||
std::copy(&pSizes[0],&pSizes[N-1],m_pSizes);
|
||||
m_pSizes[N-1]=uSize;
|
||||
}
|
||||
}//namespace PolyVox
|
||||
/*******************************************************************************
|
||||
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.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <uint32_t N>
|
||||
ArraySizesImpl<N+1> ArraySizesImpl<N>::operator () (uint32_t uSize)
|
||||
{
|
||||
return ArraySizesImpl<N+1>(m_pSizes, uSize);
|
||||
}
|
||||
|
||||
template <uint32_t N>
|
||||
ArraySizesImpl<N>::operator UIntArrayN () const
|
||||
{
|
||||
return m_pSizes;
|
||||
}
|
||||
|
||||
template <uint32_t N>
|
||||
ArraySizesImpl<N>::ArraySizesImpl(const uint32_t (&pSizes)[N-1], uint32_t uSize)
|
||||
{
|
||||
std::copy(&pSizes[0],&pSizes[N-1],m_pSizes);
|
||||
m_pSizes[N-1]=uSize;
|
||||
}
|
||||
}//namespace PolyVox
|
@ -1,78 +1,78 @@
|
||||
/*******************************************************************************
|
||||
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_Block_H__
|
||||
#define __PolyVox_Block_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <typename VoxelType>
|
||||
class Block
|
||||
{
|
||||
template <typename LengthType>
|
||||
struct RunlengthEntry
|
||||
{
|
||||
LengthType length;
|
||||
VoxelType value;
|
||||
|
||||
//We can parametise the length on anything up to uint32_t.
|
||||
//This lets us experiment with the optimal size in the future.
|
||||
static uint32_t maxRunlength(void) {return (std::numeric_limits<LengthType>::max)();}
|
||||
};
|
||||
|
||||
public:
|
||||
Block(uint16_t uSideLength = 0);
|
||||
|
||||
uint16_t getSideLength(void) const;
|
||||
VoxelType getVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos) const;
|
||||
VoxelType getVoxelAt(const Vector3DUint16& v3dPos) const;
|
||||
|
||||
void setVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos, VoxelType tValue);
|
||||
void setVoxelAt(const Vector3DUint16& v3dPos, VoxelType tValue);
|
||||
|
||||
void fill(VoxelType tValue);
|
||||
void initialise(uint16_t uSideLength);
|
||||
uint32_t calculateSizeInBytes(void);
|
||||
|
||||
public:
|
||||
void compress(void);
|
||||
void uncompress(void);
|
||||
|
||||
std::vector< RunlengthEntry<uint16_t> > m_vecCompressedData;
|
||||
VoxelType* m_tUncompressedData;
|
||||
uint16_t m_uSideLength;
|
||||
uint8_t m_uSideLengthPower;
|
||||
bool m_bIsCompressed;
|
||||
bool m_bIsUncompressedDataModified;
|
||||
};
|
||||
}
|
||||
|
||||
#include "PolyVoxImpl/Block.inl"
|
||||
|
||||
#endif
|
||||
/*******************************************************************************
|
||||
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_Block_H__
|
||||
#define __PolyVox_Block_H__
|
||||
|
||||
#include "PolyVoxCore/Impl/TypeDef.h"
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <typename VoxelType>
|
||||
class Block
|
||||
{
|
||||
template <typename LengthType>
|
||||
struct RunlengthEntry
|
||||
{
|
||||
LengthType length;
|
||||
VoxelType value;
|
||||
|
||||
//We can parametise the length on anything up to uint32_t.
|
||||
//This lets us experiment with the optimal size in the future.
|
||||
static uint32_t maxRunlength(void) {return (std::numeric_limits<LengthType>::max)();}
|
||||
};
|
||||
|
||||
public:
|
||||
Block(uint16_t uSideLength = 0);
|
||||
|
||||
uint16_t getSideLength(void) const;
|
||||
VoxelType getVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos) const;
|
||||
VoxelType getVoxelAt(const Vector3DUint16& v3dPos) const;
|
||||
|
||||
void setVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos, VoxelType tValue);
|
||||
void setVoxelAt(const Vector3DUint16& v3dPos, VoxelType tValue);
|
||||
|
||||
void fill(VoxelType tValue);
|
||||
void initialise(uint16_t uSideLength);
|
||||
uint32_t calculateSizeInBytes(void);
|
||||
|
||||
public:
|
||||
void compress(void);
|
||||
void uncompress(void);
|
||||
|
||||
std::vector< RunlengthEntry<uint16_t> > m_vecCompressedData;
|
||||
VoxelType* m_tUncompressedData;
|
||||
uint16_t m_uSideLength;
|
||||
uint8_t m_uSideLengthPower;
|
||||
bool m_bIsCompressed;
|
||||
bool m_bIsUncompressedDataModified;
|
||||
};
|
||||
}
|
||||
|
||||
#include "PolyVoxCore/Impl/Block.inl"
|
||||
|
||||
#endif
|
@ -1,214 +1,214 @@
|
||||
/*******************************************************************************
|
||||
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.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "PolyVoxImpl/Utility.h"
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring> //For memcpy
|
||||
#include <limits>
|
||||
#include <stdexcept> //for std::invalid_argument
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <typename VoxelType>
|
||||
Block<VoxelType>::Block(uint16_t uSideLength)
|
||||
:m_tUncompressedData(0)
|
||||
,m_uSideLength(0)
|
||||
,m_uSideLengthPower(0)
|
||||
,m_bIsCompressed(true)
|
||||
,m_bIsUncompressedDataModified(true)
|
||||
{
|
||||
if(uSideLength != 0)
|
||||
{
|
||||
initialise(uSideLength);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
uint16_t Block<VoxelType>::getSideLength(void) const
|
||||
{
|
||||
return m_uSideLength;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
VoxelType Block<VoxelType>::getVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos) const
|
||||
{
|
||||
assert(uXPos < m_uSideLength);
|
||||
assert(uYPos < m_uSideLength);
|
||||
assert(uZPos < m_uSideLength);
|
||||
|
||||
assert(m_tUncompressedData);
|
||||
|
||||
return m_tUncompressedData
|
||||
[
|
||||
uXPos +
|
||||
uYPos * m_uSideLength +
|
||||
uZPos * m_uSideLength * m_uSideLength
|
||||
];
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
VoxelType Block<VoxelType>::getVoxelAt(const Vector3DUint16& v3dPos) const
|
||||
{
|
||||
return getVoxelAt(v3dPos.getX(), v3dPos.getY(), v3dPos.getZ());
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::setVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos, VoxelType tValue)
|
||||
{
|
||||
assert(uXPos < m_uSideLength);
|
||||
assert(uYPos < m_uSideLength);
|
||||
assert(uZPos < m_uSideLength);
|
||||
|
||||
assert(m_tUncompressedData);
|
||||
|
||||
m_tUncompressedData
|
||||
[
|
||||
uXPos +
|
||||
uYPos * m_uSideLength +
|
||||
uZPos * m_uSideLength * m_uSideLength
|
||||
] = tValue;
|
||||
|
||||
m_bIsUncompressedDataModified = true;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::setVoxelAt(const Vector3DUint16& v3dPos, VoxelType tValue)
|
||||
{
|
||||
setVoxelAt(v3dPos.getX(), v3dPos.getY(), v3dPos.getZ(), tValue);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::fill(VoxelType tValue)
|
||||
{
|
||||
if(!m_bIsCompressed)
|
||||
{
|
||||
//The memset *may* be faster than the std::fill(), but it doesn't compile nicely
|
||||
//in 64-bit mode as casting the pointer to an int causes a loss of precision.
|
||||
const uint32_t uNoOfVoxels = m_uSideLength * m_uSideLength * m_uSideLength;
|
||||
std::fill(m_tUncompressedData, m_tUncompressedData + uNoOfVoxels, tValue);
|
||||
|
||||
m_bIsUncompressedDataModified = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RunlengthEntry<uint16_t> rle;
|
||||
rle.length = m_uSideLength*m_uSideLength*m_uSideLength;
|
||||
rle.value = tValue;
|
||||
m_vecCompressedData.clear();
|
||||
m_vecCompressedData.push_back(rle);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::initialise(uint16_t uSideLength)
|
||||
{
|
||||
//Debug mode validation
|
||||
assert(isPowerOf2(uSideLength));
|
||||
|
||||
//Release mode validation
|
||||
if(!isPowerOf2(uSideLength))
|
||||
{
|
||||
throw std::invalid_argument("Block side length must be a power of two.");
|
||||
}
|
||||
|
||||
//Compute the side length
|
||||
m_uSideLength = uSideLength;
|
||||
m_uSideLengthPower = logBase2(uSideLength);
|
||||
|
||||
Block<VoxelType>::fill(VoxelType());
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
uint32_t Block<VoxelType>::calculateSizeInBytes(void)
|
||||
{
|
||||
uint32_t uSizeInBytes = sizeof(Block<VoxelType>);
|
||||
uSizeInBytes += m_vecCompressedData.capacity() * sizeof(RunlengthEntry<uint16_t>);
|
||||
return uSizeInBytes;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::compress(void)
|
||||
{
|
||||
assert(m_bIsCompressed == false);
|
||||
assert(m_tUncompressedData != 0);
|
||||
|
||||
//If the uncompressed data hasn't actually been
|
||||
//modified then we don't need to redo the compression.
|
||||
if(m_bIsUncompressedDataModified)
|
||||
{
|
||||
uint32_t uNoOfVoxels = m_uSideLength * m_uSideLength * m_uSideLength;
|
||||
m_vecCompressedData.clear();
|
||||
|
||||
RunlengthEntry<uint16_t> entry;
|
||||
entry.length = 1;
|
||||
entry.value = m_tUncompressedData[0];
|
||||
|
||||
for(uint32_t ct = 1; ct < uNoOfVoxels; ++ct)
|
||||
{
|
||||
VoxelType value = m_tUncompressedData[ct];
|
||||
if((value == entry.value) && (entry.length < entry.maxRunlength()))
|
||||
{
|
||||
entry.length++;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vecCompressedData.push_back(entry);
|
||||
entry.value = value;
|
||||
entry.length = 1;
|
||||
}
|
||||
}
|
||||
|
||||
m_vecCompressedData.push_back(entry);
|
||||
|
||||
//Shrink the vectors to their contents (maybe slow?):
|
||||
//http://stackoverflow.com/questions/1111078/reduce-the-capacity-of-an-stl-vector
|
||||
//C++0x may have a shrink_to_fit() function?
|
||||
std::vector< RunlengthEntry<uint16_t> >(m_vecCompressedData).swap(m_vecCompressedData);
|
||||
}
|
||||
|
||||
//Flag the uncompressed data as no longer being used.
|
||||
delete[] m_tUncompressedData;
|
||||
m_tUncompressedData = 0;
|
||||
m_bIsCompressed = true;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::uncompress(void)
|
||||
{
|
||||
assert(m_bIsCompressed == true);
|
||||
assert(m_tUncompressedData == 0);
|
||||
m_tUncompressedData = new VoxelType[m_uSideLength * m_uSideLength * m_uSideLength];
|
||||
|
||||
VoxelType* pUncompressedData = m_tUncompressedData;
|
||||
for(uint32_t ct = 0; ct < m_vecCompressedData.size(); ++ct)
|
||||
{
|
||||
std::fill(pUncompressedData, pUncompressedData + m_vecCompressedData[ct].length, m_vecCompressedData[ct].value);
|
||||
pUncompressedData += m_vecCompressedData[ct].length;
|
||||
}
|
||||
|
||||
m_bIsCompressed = false;
|
||||
m_bIsUncompressedDataModified = false;
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
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.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "PolyVoxCore/Impl/Utility.h"
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring> //For memcpy
|
||||
#include <limits>
|
||||
#include <stdexcept> //for std::invalid_argument
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <typename VoxelType>
|
||||
Block<VoxelType>::Block(uint16_t uSideLength)
|
||||
:m_tUncompressedData(0)
|
||||
,m_uSideLength(0)
|
||||
,m_uSideLengthPower(0)
|
||||
,m_bIsCompressed(true)
|
||||
,m_bIsUncompressedDataModified(true)
|
||||
{
|
||||
if(uSideLength != 0)
|
||||
{
|
||||
initialise(uSideLength);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
uint16_t Block<VoxelType>::getSideLength(void) const
|
||||
{
|
||||
return m_uSideLength;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
VoxelType Block<VoxelType>::getVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos) const
|
||||
{
|
||||
assert(uXPos < m_uSideLength);
|
||||
assert(uYPos < m_uSideLength);
|
||||
assert(uZPos < m_uSideLength);
|
||||
|
||||
assert(m_tUncompressedData);
|
||||
|
||||
return m_tUncompressedData
|
||||
[
|
||||
uXPos +
|
||||
uYPos * m_uSideLength +
|
||||
uZPos * m_uSideLength * m_uSideLength
|
||||
];
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
VoxelType Block<VoxelType>::getVoxelAt(const Vector3DUint16& v3dPos) const
|
||||
{
|
||||
return getVoxelAt(v3dPos.getX(), v3dPos.getY(), v3dPos.getZ());
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::setVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos, VoxelType tValue)
|
||||
{
|
||||
assert(uXPos < m_uSideLength);
|
||||
assert(uYPos < m_uSideLength);
|
||||
assert(uZPos < m_uSideLength);
|
||||
|
||||
assert(m_tUncompressedData);
|
||||
|
||||
m_tUncompressedData
|
||||
[
|
||||
uXPos +
|
||||
uYPos * m_uSideLength +
|
||||
uZPos * m_uSideLength * m_uSideLength
|
||||
] = tValue;
|
||||
|
||||
m_bIsUncompressedDataModified = true;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::setVoxelAt(const Vector3DUint16& v3dPos, VoxelType tValue)
|
||||
{
|
||||
setVoxelAt(v3dPos.getX(), v3dPos.getY(), v3dPos.getZ(), tValue);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::fill(VoxelType tValue)
|
||||
{
|
||||
if(!m_bIsCompressed)
|
||||
{
|
||||
//The memset *may* be faster than the std::fill(), but it doesn't compile nicely
|
||||
//in 64-bit mode as casting the pointer to an int causes a loss of precision.
|
||||
const uint32_t uNoOfVoxels = m_uSideLength * m_uSideLength * m_uSideLength;
|
||||
std::fill(m_tUncompressedData, m_tUncompressedData + uNoOfVoxels, tValue);
|
||||
|
||||
m_bIsUncompressedDataModified = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RunlengthEntry<uint16_t> rle;
|
||||
rle.length = m_uSideLength*m_uSideLength*m_uSideLength;
|
||||
rle.value = tValue;
|
||||
m_vecCompressedData.clear();
|
||||
m_vecCompressedData.push_back(rle);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::initialise(uint16_t uSideLength)
|
||||
{
|
||||
//Debug mode validation
|
||||
assert(isPowerOf2(uSideLength));
|
||||
|
||||
//Release mode validation
|
||||
if(!isPowerOf2(uSideLength))
|
||||
{
|
||||
throw std::invalid_argument("Block side length must be a power of two.");
|
||||
}
|
||||
|
||||
//Compute the side length
|
||||
m_uSideLength = uSideLength;
|
||||
m_uSideLengthPower = logBase2(uSideLength);
|
||||
|
||||
Block<VoxelType>::fill(VoxelType());
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
uint32_t Block<VoxelType>::calculateSizeInBytes(void)
|
||||
{
|
||||
uint32_t uSizeInBytes = sizeof(Block<VoxelType>);
|
||||
uSizeInBytes += m_vecCompressedData.capacity() * sizeof(RunlengthEntry<uint16_t>);
|
||||
return uSizeInBytes;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::compress(void)
|
||||
{
|
||||
assert(m_bIsCompressed == false);
|
||||
assert(m_tUncompressedData != 0);
|
||||
|
||||
//If the uncompressed data hasn't actually been
|
||||
//modified then we don't need to redo the compression.
|
||||
if(m_bIsUncompressedDataModified)
|
||||
{
|
||||
uint32_t uNoOfVoxels = m_uSideLength * m_uSideLength * m_uSideLength;
|
||||
m_vecCompressedData.clear();
|
||||
|
||||
RunlengthEntry<uint16_t> entry;
|
||||
entry.length = 1;
|
||||
entry.value = m_tUncompressedData[0];
|
||||
|
||||
for(uint32_t ct = 1; ct < uNoOfVoxels; ++ct)
|
||||
{
|
||||
VoxelType value = m_tUncompressedData[ct];
|
||||
if((value == entry.value) && (entry.length < entry.maxRunlength()))
|
||||
{
|
||||
entry.length++;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vecCompressedData.push_back(entry);
|
||||
entry.value = value;
|
||||
entry.length = 1;
|
||||
}
|
||||
}
|
||||
|
||||
m_vecCompressedData.push_back(entry);
|
||||
|
||||
//Shrink the vectors to their contents (maybe slow?):
|
||||
//http://stackoverflow.com/questions/1111078/reduce-the-capacity-of-an-stl-vector
|
||||
//C++0x may have a shrink_to_fit() function?
|
||||
std::vector< RunlengthEntry<uint16_t> >(m_vecCompressedData).swap(m_vecCompressedData);
|
||||
}
|
||||
|
||||
//Flag the uncompressed data as no longer being used.
|
||||
delete[] m_tUncompressedData;
|
||||
m_tUncompressedData = 0;
|
||||
m_bIsCompressed = true;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void Block<VoxelType>::uncompress(void)
|
||||
{
|
||||
assert(m_bIsCompressed == true);
|
||||
assert(m_tUncompressedData == 0);
|
||||
m_tUncompressedData = new VoxelType[m_uSideLength * m_uSideLength * m_uSideLength];
|
||||
|
||||
VoxelType* pUncompressedData = m_tUncompressedData;
|
||||
for(uint32_t ct = 0; ct < m_vecCompressedData.size(); ++ct)
|
||||
{
|
||||
std::fill(pUncompressedData, pUncompressedData + m_vecCompressedData[ct].length, m_vecCompressedData[ct].value);
|
||||
pUncompressedData += m_vecCompressedData[ct].length;
|
||||
}
|
||||
|
||||
m_bIsCompressed = false;
|
||||
m_bIsUncompressedDataModified = false;
|
||||
}
|
||||
}
|
@ -1,35 +1,35 @@
|
||||
/*******************************************************************************
|
||||
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_MarchingCubeTables_H__
|
||||
#define __PolyVox_MarchingCubeTables_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
extern const POLYVOX_API int edgeTable[256];
|
||||
extern const POLYVOX_API int triTable[256][16];
|
||||
}
|
||||
|
||||
#endif
|
||||
/*******************************************************************************
|
||||
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_MarchingCubeTables_H__
|
||||
#define __PolyVox_MarchingCubeTables_H__
|
||||
|
||||
#include "PolyVoxCore/Impl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
extern const POLYVOX_API int edgeTable[256];
|
||||
extern const POLYVOX_API int triTable[256][16];
|
||||
}
|
||||
|
||||
#endif
|
@ -1,36 +1,36 @@
|
||||
/*******************************************************************************
|
||||
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_RandomUnitVectors_H__
|
||||
#define __PolyVox_RandomUnitVectors_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
extern POLYVOX_API const Vector3DFloat randomUnitVectors[];
|
||||
}
|
||||
|
||||
#endif //__PolyVox_RandomUnitVectors_H__
|
||||
/*******************************************************************************
|
||||
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_RandomUnitVectors_H__
|
||||
#define __PolyVox_RandomUnitVectors_H__
|
||||
|
||||
#include "PolyVoxCore/Impl/TypeDef.h"
|
||||
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
extern POLYVOX_API const Vector3DFloat randomUnitVectors[];
|
||||
}
|
||||
|
||||
#endif //__PolyVox_RandomUnitVectors_H__
|
@ -1,36 +1,36 @@
|
||||
/*******************************************************************************
|
||||
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_RandomVectors_H__
|
||||
#define __PolyVox_RandomVectors_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
extern POLYVOX_API const Vector3DFloat randomVectors[];
|
||||
}
|
||||
|
||||
#endif //__PolyVox_RandomVectors_H__
|
||||
/*******************************************************************************
|
||||
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_RandomVectors_H__
|
||||
#define __PolyVox_RandomVectors_H__
|
||||
|
||||
#include "PolyVoxCore/Impl/TypeDef.h"
|
||||
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
extern POLYVOX_API const Vector3DFloat randomVectors[];
|
||||
}
|
||||
|
||||
#endif //__PolyVox_RandomVectors_H__
|
@ -1,88 +1,88 @@
|
||||
/*******************************************************************************
|
||||
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_SubArray_H__
|
||||
#define __PolyVox_SubArray_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <uint32_t noOfDims, typename ElementType> class Array;
|
||||
|
||||
/*
|
||||
This class forms part of the implementation of the Array class. The operator[]
|
||||
return a SubArray of the next size down, so that multiple []'s can be chained
|
||||
together. It is a seperate class from Array so that it can have a reduced interface,
|
||||
and also so that it never takes ownership of the memory to which it points.
|
||||
|
||||
It is based on the following article: http://www.drdobbs.com/cpp/184401319
|
||||
*/
|
||||
template <uint32_t noOfDims, typename ElementType>
|
||||
class SubArray
|
||||
{
|
||||
friend class Array<noOfDims+1, ElementType>;
|
||||
friend class SubArray<noOfDims+1, ElementType>;
|
||||
|
||||
public:
|
||||
SubArray<noOfDims-1, ElementType> operator [](uint32_t uIndex);
|
||||
|
||||
const SubArray<noOfDims-1, ElementType> operator [](uint32_t uIndex) const;
|
||||
|
||||
private:
|
||||
SubArray<noOfDims, ElementType>(ElementType * pElements, uint32_t * pDimensions, uint32_t * pOffsets);
|
||||
|
||||
uint32_t * m_pDimensions;
|
||||
uint32_t * m_pOffsets;
|
||||
uint32_t m_uNoOfElements;
|
||||
ElementType * m_pElements;
|
||||
};
|
||||
|
||||
template <typename ElementType>
|
||||
class SubArray<1, ElementType>
|
||||
{
|
||||
friend class Array<2, ElementType>;
|
||||
friend class SubArray<2, ElementType>;
|
||||
|
||||
public:
|
||||
ElementType & operator [] (uint32_t uIndex);
|
||||
|
||||
const ElementType & operator [] (uint32_t uIndex) const;
|
||||
|
||||
private:
|
||||
SubArray<1, ElementType>(ElementType * pElements, uint32_t * pDimensions, uint32_t * /*pOffsets*/);
|
||||
|
||||
uint32_t * m_pDimensions;
|
||||
ElementType * m_pElements;
|
||||
};
|
||||
|
||||
template <typename ElementType>
|
||||
class SubArray<0, ElementType>
|
||||
{
|
||||
//Zero dimensional subarray is meaningless.
|
||||
};
|
||||
}//namespace PolyVox
|
||||
|
||||
#include "PolyVoxImpl/SubArray.inl"
|
||||
|
||||
#endif //__PolyVox_SubArray_H__
|
||||
/*******************************************************************************
|
||||
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_SubArray_H__
|
||||
#define __PolyVox_SubArray_H__
|
||||
|
||||
#include "PolyVoxCore/Impl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <uint32_t noOfDims, typename ElementType> class Array;
|
||||
|
||||
/*
|
||||
This class forms part of the implementation of the Array class. The operator[]
|
||||
return a SubArray of the next size down, so that multiple []'s can be chained
|
||||
together. It is a seperate class from Array so that it can have a reduced interface,
|
||||
and also so that it never takes ownership of the memory to which it points.
|
||||
|
||||
It is based on the following article: http://www.drdobbs.com/cpp/184401319
|
||||
*/
|
||||
template <uint32_t noOfDims, typename ElementType>
|
||||
class SubArray
|
||||
{
|
||||
friend class Array<noOfDims+1, ElementType>;
|
||||
friend class SubArray<noOfDims+1, ElementType>;
|
||||
|
||||
public:
|
||||
SubArray<noOfDims-1, ElementType> operator [](uint32_t uIndex);
|
||||
|
||||
const SubArray<noOfDims-1, ElementType> operator [](uint32_t uIndex) const;
|
||||
|
||||
private:
|
||||
SubArray<noOfDims, ElementType>(ElementType * pElements, uint32_t * pDimensions, uint32_t * pOffsets);
|
||||
|
||||
uint32_t * m_pDimensions;
|
||||
uint32_t * m_pOffsets;
|
||||
uint32_t m_uNoOfElements;
|
||||
ElementType * m_pElements;
|
||||
};
|
||||
|
||||
template <typename ElementType>
|
||||
class SubArray<1, ElementType>
|
||||
{
|
||||
friend class Array<2, ElementType>;
|
||||
friend class SubArray<2, ElementType>;
|
||||
|
||||
public:
|
||||
ElementType & operator [] (uint32_t uIndex);
|
||||
|
||||
const ElementType & operator [] (uint32_t uIndex) const;
|
||||
|
||||
private:
|
||||
SubArray<1, ElementType>(ElementType * pElements, uint32_t * pDimensions, uint32_t * /*pOffsets*/);
|
||||
|
||||
uint32_t * m_pDimensions;
|
||||
ElementType * m_pElements;
|
||||
};
|
||||
|
||||
template <typename ElementType>
|
||||
class SubArray<0, ElementType>
|
||||
{
|
||||
//Zero dimensional subarray is meaningless.
|
||||
};
|
||||
}//namespace PolyVox
|
||||
|
||||
#include "PolyVoxCore/Impl/SubArray.inl"
|
||||
|
||||
#endif //__PolyVox_SubArray_H__
|
@ -1,76 +1,76 @@
|
||||
/*******************************************************************************
|
||||
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.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <uint32_t noOfDims, typename ElementType>
|
||||
SubArray<noOfDims-1, ElementType> SubArray<noOfDims, ElementType>::operator[](uint32_t uIndex)
|
||||
{
|
||||
assert(uIndex<m_pDimensions[0]);
|
||||
return
|
||||
SubArray<noOfDims-1, ElementType>(&m_pElements[uIndex*m_pOffsets[0]],
|
||||
m_pDimensions+1, m_pOffsets+1);
|
||||
}
|
||||
|
||||
template <uint32_t noOfDims, typename ElementType>
|
||||
const SubArray<noOfDims-1, ElementType> SubArray<noOfDims, ElementType>::operator[](uint32_t uIndex) const
|
||||
{
|
||||
assert(uIndex<m_pDimensions[0]);
|
||||
return
|
||||
SubArray<noOfDims-1, ElementType>(&m_pElements[uIndex*m_pOffsets[0]],
|
||||
m_pDimensions+1, m_pOffsets+1);
|
||||
}
|
||||
|
||||
template <uint32_t noOfDims, typename ElementType>
|
||||
SubArray<noOfDims, ElementType>::SubArray(ElementType * pElements, uint32_t * pDimensions, uint32_t * pOffsets)
|
||||
:m_pDimensions(pDimensions)
|
||||
,m_pOffsets(pOffsets)
|
||||
,m_uNoOfElements(0)
|
||||
,m_pElements(pElements)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
template <typename ElementType>
|
||||
ElementType& SubArray<1, ElementType>::operator[] (uint32_t uIndex)
|
||||
{
|
||||
assert(uIndex<m_pDimensions[0]);
|
||||
return m_pElements[uIndex];
|
||||
}
|
||||
|
||||
template <typename ElementType>
|
||||
const ElementType& SubArray<1, ElementType>::operator[] (uint32_t uIndex) const
|
||||
{
|
||||
assert(uIndex<m_pDimensions[0]);
|
||||
return m_pElements[uIndex];
|
||||
}
|
||||
|
||||
template <typename ElementType>
|
||||
SubArray<1, ElementType>::SubArray(ElementType * pElements, uint32_t * pDimensions, uint32_t * /*pOffsets*/)
|
||||
:m_pDimensions(pDimensions)
|
||||
,m_pElements(pElements)
|
||||
{
|
||||
}
|
||||
}//namespace PolyVox
|
||||
/*******************************************************************************
|
||||
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.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <uint32_t noOfDims, typename ElementType>
|
||||
SubArray<noOfDims-1, ElementType> SubArray<noOfDims, ElementType>::operator[](uint32_t uIndex)
|
||||
{
|
||||
assert(uIndex<m_pDimensions[0]);
|
||||
return
|
||||
SubArray<noOfDims-1, ElementType>(&m_pElements[uIndex*m_pOffsets[0]],
|
||||
m_pDimensions+1, m_pOffsets+1);
|
||||
}
|
||||
|
||||
template <uint32_t noOfDims, typename ElementType>
|
||||
const SubArray<noOfDims-1, ElementType> SubArray<noOfDims, ElementType>::operator[](uint32_t uIndex) const
|
||||
{
|
||||
assert(uIndex<m_pDimensions[0]);
|
||||
return
|
||||
SubArray<noOfDims-1, ElementType>(&m_pElements[uIndex*m_pOffsets[0]],
|
||||
m_pDimensions+1, m_pOffsets+1);
|
||||
}
|
||||
|
||||
template <uint32_t noOfDims, typename ElementType>
|
||||
SubArray<noOfDims, ElementType>::SubArray(ElementType * pElements, uint32_t * pDimensions, uint32_t * pOffsets)
|
||||
:m_pDimensions(pDimensions)
|
||||
,m_pOffsets(pOffsets)
|
||||
,m_uNoOfElements(0)
|
||||
,m_pElements(pElements)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
template <typename ElementType>
|
||||
ElementType& SubArray<1, ElementType>::operator[] (uint32_t uIndex)
|
||||
{
|
||||
assert(uIndex<m_pDimensions[0]);
|
||||
return m_pElements[uIndex];
|
||||
}
|
||||
|
||||
template <typename ElementType>
|
||||
const ElementType& SubArray<1, ElementType>::operator[] (uint32_t uIndex) const
|
||||
{
|
||||
assert(uIndex<m_pDimensions[0]);
|
||||
return m_pElements[uIndex];
|
||||
}
|
||||
|
||||
template <typename ElementType>
|
||||
SubArray<1, ElementType>::SubArray(ElementType * pElements, uint32_t * pDimensions, uint32_t * /*pOffsets*/)
|
||||
:m_pDimensions(pDimensions)
|
||||
,m_pElements(pElements)
|
||||
{
|
||||
}
|
||||
}//namespace PolyVox
|
@ -1,107 +1,105 @@
|
||||
/*******************************************************************************
|
||||
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_TypeDef_H__
|
||||
#define __PolyVox_TypeDef_H__
|
||||
|
||||
//Definitions needed to make library functions accessable
|
||||
// See http://gcc.gnu.org/wiki/Visibility for more info.
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define POLYVOX_HELPER_IMPORT __declspec(dllimport)
|
||||
#define POLYVOX_HELPER_EXPORT __declspec(dllexport)
|
||||
#define POLYVOX_HELPER_LOCAL
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define POLYVOX_HELPER_IMPORT __attribute__ ((visibility("default")))
|
||||
#define POLYVOX_HELPER_EXPORT __attribute__ ((visibility("default")))
|
||||
#define POLYVOX_HELPER_LOCAL __attribute__ ((visibility("hidden")))
|
||||
#else
|
||||
#define POLYVOX_HELPER_IMPORT
|
||||
#define POLYVOX_HELPER_EXPORT
|
||||
#define POLYVOX_HELPER_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Now we use the generic helper definitions above to define POLYVOX_API and POLYVOX_LOCAL.
|
||||
// POLYVOX_API is used for the public API symbols. It either imports or exports (or does nothing for static build)
|
||||
// POLYVOX_LOCAL is used for non-api symbols.
|
||||
|
||||
#ifdef POLYVOX_SHARED // defined if PolyVox is compiled as a shared library
|
||||
#ifdef POLYVOX_SHARED_EXPORTS // defined if we are building the PolyVox shared library (instead of using it)
|
||||
#define POLYVOX_API POLYVOX_HELPER_EXPORT
|
||||
#else
|
||||
#define POLYVOX_API POLYVOX_HELPER_IMPORT
|
||||
#endif // POLYVOX_SHARED_EXPORTS
|
||||
#define POLYVOX_LOCAL POLYVOX_HELPER_LOCAL
|
||||
#else // POLYVOX_SHARED is not defined: this means PolyVox is a static library.
|
||||
#define POLYVOX_API
|
||||
#define POLYVOX_LOCAL
|
||||
#endif // POLYVOX_SHARED
|
||||
|
||||
//Check which compiler we are using and work around unsupported features as necessary.
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
//To support old (pre-vc2010) Microsoft compilers we use boost to replace the
|
||||
//std::shared_ptr and potentially other C++0x features. To use this capability you
|
||||
//will need to make sure you have boost installed on your system.
|
||||
#include <boost/smart_ptr.hpp>
|
||||
#define polyvox_shared_ptr boost::shared_ptr
|
||||
|
||||
#include <boost/function.hpp>
|
||||
#define polyvox_function boost::function
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#define polyvox_hash boost::hash
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#define polyvox_bind boost::bind
|
||||
#define polyvox_placeholder_1 _1
|
||||
#define polyvox_placeholder_2 _2
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#define static_assert BOOST_STATIC_ASSERT
|
||||
|
||||
|
||||
//As long as we're requiring boost, we'll use it to compensate
|
||||
//for the missing cstdint header too.
|
||||
#include <boost/cstdint.hpp>
|
||||
using boost::int8_t;
|
||||
using boost::int16_t;
|
||||
using boost::int32_t;
|
||||
using boost::uint8_t;
|
||||
using boost::uint16_t;
|
||||
using boost::uint32_t;
|
||||
#else
|
||||
//We have a decent compiler - use real C++0x features
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#define polyvox_shared_ptr std::shared_ptr
|
||||
#define polyvox_function std::function
|
||||
#define polyvox_bind std::bind
|
||||
#define polyvox_placeholder_1 std::placeholders::_1
|
||||
#define polyvox_placeholder_2 std::placeholders::_2
|
||||
#define polyvox_hash std::hash
|
||||
//#define static_assert static_assert //we can use this
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*******************************************************************************
|
||||
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_TypeDef_H__
|
||||
#define __PolyVox_TypeDef_H__
|
||||
|
||||
//Definitions needed to make library functions accessable
|
||||
// See http://gcc.gnu.org/wiki/Visibility for more info.
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define POLYVOX_HELPER_IMPORT __declspec(dllimport)
|
||||
#define POLYVOX_HELPER_EXPORT __declspec(dllexport)
|
||||
#define POLYVOX_HELPER_LOCAL
|
||||
#define POLYVOX_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
#define POLYVOX_DEPRECATED __attribute__((deprecated))
|
||||
#if __GNUC__ >= 4
|
||||
#define POLYVOX_HELPER_IMPORT __attribute__ ((visibility("default")))
|
||||
#define POLYVOX_HELPER_EXPORT __attribute__ ((visibility("default")))
|
||||
#define POLYVOX_HELPER_LOCAL __attribute__ ((visibility("hidden")))
|
||||
#else
|
||||
#define POLYVOX_HELPER_IMPORT
|
||||
#define POLYVOX_HELPER_EXPORT
|
||||
#define POLYVOX_HELPER_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Now we use the generic helper definitions above to define POLYVOX_API and POLYVOX_LOCAL.
|
||||
// POLYVOX_API is used for the public API symbols. It either imports or exports (or does nothing for static build)
|
||||
// POLYVOX_LOCAL is used for non-api symbols.
|
||||
|
||||
#ifdef POLYVOX_SHARED // defined if PolyVox is compiled as a shared library
|
||||
#ifdef POLYVOX_SHARED_EXPORTS // defined if we are building the PolyVox shared library (instead of using it)
|
||||
#define POLYVOX_API POLYVOX_HELPER_EXPORT
|
||||
#else
|
||||
#define POLYVOX_API POLYVOX_HELPER_IMPORT
|
||||
#endif // POLYVOX_SHARED_EXPORTS
|
||||
#define POLYVOX_LOCAL POLYVOX_HELPER_LOCAL
|
||||
#else // POLYVOX_SHARED is not defined: this means PolyVox is a static library.
|
||||
#define POLYVOX_API
|
||||
#define POLYVOX_LOCAL
|
||||
#endif // POLYVOX_SHARED
|
||||
|
||||
//Check which compiler we are using and work around unsupported features as necessary.
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
//To support old (pre-vc2010) Microsoft compilers we use boost to replace the
|
||||
//std::shared_ptr and potentially other C++0x features. To use this capability you
|
||||
//will need to make sure you have boost installed on your system.
|
||||
#include <boost/smart_ptr.hpp>
|
||||
#define polyvox_shared_ptr boost::shared_ptr
|
||||
|
||||
#include <boost/function.hpp>
|
||||
#define polyvox_function boost::function
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#define polyvox_bind boost::bind
|
||||
#define polyvox_placeholder_1 _1
|
||||
#define polyvox_placeholder_2 _2
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#define static_assert BOOST_STATIC_ASSERT
|
||||
|
||||
|
||||
//As long as we're requiring boost, we'll use it to compensate
|
||||
//for the missing cstdint header too.
|
||||
#include <boost/cstdint.hpp>
|
||||
using boost::int8_t;
|
||||
using boost::int16_t;
|
||||
using boost::int32_t;
|
||||
using boost::uint8_t;
|
||||
using boost::uint16_t;
|
||||
using boost::uint32_t;
|
||||
#else
|
||||
//We have a decent compiler - use real C++0x features
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#define polyvox_shared_ptr std::shared_ptr
|
||||
#define polyvox_function std::function
|
||||
#define polyvox_bind std::bind
|
||||
#define polyvox_placeholder_1 std::placeholders::_1
|
||||
#define polyvox_placeholder_2 std::placeholders::_2
|
||||
//#define static_assert static_assert //we can use this
|
||||
#endif
|
||||
|
||||
#endif
|
37
library/PolyVoxCore/include/PolyVoxCore/Impl/Utility.h
Normal file
37
library/PolyVoxCore/include/PolyVoxCore/Impl/Utility.h
Normal 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
|
@ -1,62 +1,82 @@
|
||||
/*******************************************************************************
|
||||
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 "PolyVoxImpl/TypeDef.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
POLYVOX_API uint8_t logBase2(uint32_t uInput);
|
||||
POLYVOX_API bool isPowerOf2(uint32_t uInput);
|
||||
|
||||
template <typename Type>
|
||||
Type trilinearlyInterpolate(
|
||||
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 float x, const float y, const float z)
|
||||
{
|
||||
assert((x >= 0.0f) && (y >= 0.0f) && (z >= 0.0f) &&
|
||||
(x <= 1.0f) && (y <= 1.0f) && (z <= 1.0f));
|
||||
|
||||
//Interpolate along X
|
||||
Type v000_v100 = (v100 - v000) * x + v000;
|
||||
Type v001_v101 = (v101 - v001) * x + v001;
|
||||
Type v010_v110 = (v110 - v010) * x + v010;
|
||||
Type v011_v111 = (v111 - v011) * x + v011;
|
||||
|
||||
//Interpolate along Y
|
||||
Type v000_v100__v010_v110 = (v010_v110 - v000_v100) * y + v000_v100;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
/*******************************************************************************
|
||||
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_Interpolation_H__
|
||||
#define __PolyVox_Interpolation_H__
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template <typename Type>
|
||||
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>
|
||||
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& v001,const Type& v101,const Type& v011,const Type& v111,
|
||||
const float x, const float y, const float z)
|
||||
{
|
||||
assert((x >= 0.0f) && (y >= 0.0f) && (z >= 0.0f) &&
|
||||
(x <= 1.0f) && (y <= 1.0f) && (z <= 1.0f));
|
||||
|
||||
// Bilinearly interpolate along Y
|
||||
Type v000_v100__v010_v110 = bilerp(v000, v100, v010, v110, x, y);
|
||||
Type v001_v101__v011_v111 = bilerp(v001, v101, v011, v111, x, y);
|
||||
|
||||
// And linearly interpolate the results along z
|
||||
Type v000_v100__v010_v110____v001_v101__v011_v111 = lerp(v000_v100__v010_v110, v001_v101__v011_v111, z);
|
||||
|
||||
return v000_v100__v010_v110____v001_v101__v011_v111;
|
||||
}
|
||||
}
|
||||
|
||||
#endif //__PolyVox_Interpolation_H__
|
@ -25,7 +25,7 @@ freely, subject to the following restrictions:
|
||||
#define __PolyVox_LargeVolume_H__
|
||||
|
||||
#include "PolyVoxCore/BaseVolume.h"
|
||||
#include "PolyVoxImpl/Block.h"
|
||||
#include "Impl/Block.h"
|
||||
#include "PolyVoxCore/Log.h"
|
||||
#include "PolyVoxCore/Region.h"
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
@ -42,13 +42,17 @@ freely, subject to the following restrictions:
|
||||
|
||||
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.
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// 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
|
||||
/// 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:
|
||||
///
|
||||
/// \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
|
||||
/// 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
|
||||
/// 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.
|
||||
@ -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
|
||||
/// 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
|
||||
/// 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
|
||||
@ -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
|
||||
/// 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,
|
||||
/// 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
|
||||
@ -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
|
||||
/// 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
|
||||
/// 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
|
||||
@ -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
|
||||
/// 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.
|
||||
/// 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).
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <typename VoxelType> class ConstVolumeProxy;
|
||||
|
||||
template <typename VoxelType>
|
||||
class LargeVolume : public BaseVolume<VoxelType>
|
||||
{
|
||||
@ -170,7 +176,7 @@ namespace PolyVox
|
||||
Sampler(LargeVolume<VoxelType>* volume);
|
||||
~Sampler();
|
||||
|
||||
Sampler& operator=(const Sampler& rhs) throw();
|
||||
Sampler& operator=(const Sampler& rhs);
|
||||
|
||||
VoxelType getSubSampledVoxel(uint8_t uLevel) const;
|
||||
inline VoxelType getVoxel(void) const;
|
||||
@ -291,7 +297,14 @@ namespace PolyVox
|
||||
/// Calculates approximatly how many bytes of memory the volume is currently using.
|
||||
uint32_t calculateSizeInBytes(void);
|
||||
|
||||
private:
|
||||
protected:
|
||||
/// Copy constructor
|
||||
LargeVolume(const LargeVolume& rhs);
|
||||
|
||||
/// Assignment operator
|
||||
LargeVolume& operator=(const LargeVolume& rhs);
|
||||
|
||||
private:
|
||||
void initialise(const Region& regValidRegion, uint16_t uBlockSideLength);
|
||||
|
||||
/// gets called when a new region is allocated and needs to be filled
|
||||
|
@ -75,6 +75,19 @@ namespace PolyVox
|
||||
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.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -85,6 +98,19 @@ namespace PolyVox
|
||||
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
|
||||
/// 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.
|
||||
/// 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.
|
||||
/// \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>
|
||||
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()
|
||||
/// \param uMaxBlocks The number of blocks
|
||||
/// \param uMaxNumberOfBlocksInMemory The number of blocks
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
template <typename VoxelType>
|
||||
void LargeVolume<VoxelType>::setMaxNumberOfBlocksInMemory(uint32_t uMaxNumberOfBlocksInMemory)
|
||||
|
@ -40,7 +40,7 @@ namespace PolyVox
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ freely, subject to the following restrictions:
|
||||
#ifndef __PolyVox_Log_H__
|
||||
#define __PolyVox_Log_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "Impl/TypeDef.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -30,7 +30,7 @@ freely, subject to the following restrictions:
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
template< typename SrcVolumeType, typename DstVolumeType>
|
||||
template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType>
|
||||
class LowPassFilter
|
||||
{
|
||||
public:
|
||||
|
@ -23,8 +23,15 @@ freely, subject to the following restrictions:
|
||||
|
||||
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_regSrc(regSrc)
|
||||
,m_pVolDst(pVolDst)
|
||||
@ -43,8 +50,8 @@ namespace PolyVox
|
||||
}
|
||||
}
|
||||
|
||||
template< typename SrcVolumeType, typename DstVolumeType>
|
||||
void LowPassFilter<SrcVolumeType, DstVolumeType>::execute()
|
||||
template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType>
|
||||
void LowPassFilter<SrcVolumeType, DstVolumeType, AccumulationType>::execute()
|
||||
{
|
||||
int32_t iSrcMinX = m_regSrc.getLowerCorner().getX();
|
||||
int32_t iSrcMinY = m_regSrc.getLowerCorner().getY();
|
||||
@ -70,52 +77,50 @@ namespace PolyVox
|
||||
{
|
||||
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);
|
||||
|
||||
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 += srcSampler.peekVoxel1nx1ny0pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel1nx1ny1pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel1nx0py1nz();
|
||||
tSrcVoxel += srcSampler.peekVoxel1nx0py0pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel1nx0py1pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel1nx1py1nz();
|
||||
tSrcVoxel += srcSampler.peekVoxel1nx1py0pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel1nx1py1pz();
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1ny1nz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1ny0pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1ny1pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px0py1nz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px0py0pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px0py1pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1py1nz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1py0pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel0px1py1pz());
|
||||
|
||||
tSrcVoxel += srcSampler.peekVoxel0px1ny1nz();
|
||||
tSrcVoxel += srcSampler.peekVoxel0px1ny0pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel0px1ny1pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel0px0py1nz();
|
||||
//tSrcVoxel += srcSampler.peekVoxel0px0py0pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel0px0py1pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel0px1py1nz();
|
||||
tSrcVoxel += srcSampler.peekVoxel0px1py0pz();
|
||||
tSrcVoxel += srcSampler.peekVoxel0px1py1pz();
|
||||
|
||||
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 += static_cast<AccumulationType>(srcSampler.peekVoxel1px1ny1nz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1ny0pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1ny1pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px0py1nz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px0py0pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px0py1pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1py1nz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1py0pz());
|
||||
tSrcVoxel += static_cast<AccumulationType>(srcSampler.peekVoxel1px1py1pz());
|
||||
|
||||
tSrcVoxel /= 27;
|
||||
|
||||
//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>
|
||||
void LowPassFilter<SrcVolumeType, DstVolumeType>::executeSAT()
|
||||
template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType>
|
||||
void LowPassFilter<SrcVolumeType, DstVolumeType, AccumulationType>::executeSAT()
|
||||
{
|
||||
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
|
||||
//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?)
|
||||
//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_Iter = &satVolumeIter;
|
||||
satIterCont.reset();
|
||||
@ -156,9 +161,8 @@ namespace PolyVox
|
||||
|
||||
do
|
||||
{
|
||||
float previousSum = satVolumeIter.peekVoxel1nx0py0pz();
|
||||
|
||||
float currentVal = static_cast<float>(srcVolumeIter.getVoxel().getDensity());
|
||||
AccumulationType previousSum = static_cast<AccumulationType>(satVolumeIter.peekVoxel1nx0py0pz());
|
||||
AccumulationType currentVal = static_cast<AccumulationType>(srcVolumeIter.getVoxel());
|
||||
|
||||
satVolumeIter.setVoxel(previousSum + currentVal);
|
||||
|
||||
@ -173,8 +177,8 @@ namespace PolyVox
|
||||
{
|
||||
for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++)
|
||||
{
|
||||
uint32_t previousSum = satVolume.getVoxelAt(x-1,y,z);
|
||||
uint32_t currentVal = m_pVolSrc->getVoxelAt(x,y,z).getDensity();
|
||||
AccumulationType previousSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x-1,y,z));
|
||||
AccumulationType currentVal = static_cast<AccumulationType>(m_pVolSrc->getVoxelAt(x,y,z));
|
||||
|
||||
satVolume.setVoxelAt(x,y,z,previousSum + currentVal);
|
||||
}
|
||||
@ -187,8 +191,8 @@ namespace PolyVox
|
||||
{
|
||||
for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++)
|
||||
{
|
||||
float previousSum = satVolume.getVoxelAt(x,y-1,z);
|
||||
float currentSum = satVolume.getVoxelAt(x,y,z);
|
||||
AccumulationType previousSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x,y-1,z));
|
||||
AccumulationType currentSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x,y,z));
|
||||
|
||||
satVolume.setVoxelAt(x,y,z,previousSum + currentSum);
|
||||
}
|
||||
@ -201,8 +205,8 @@ namespace PolyVox
|
||||
{
|
||||
for(int32_t x = satLowerCorner.getX(); x <= satUpperCorner.getX(); x++)
|
||||
{
|
||||
float previousSum = satVolume.getVoxelAt(x,y,z-1);
|
||||
float currentSum = satVolume.getVoxelAt(x,y,z);
|
||||
AccumulationType previousSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x,y,z-1));
|
||||
AccumulationType currentSum = static_cast<AccumulationType>(satVolume.getVoxelAt(x,y,z));
|
||||
|
||||
satVolume.setVoxelAt(x,y,z,previousSum + currentSum);
|
||||
}
|
||||
@ -229,38 +233,20 @@ namespace PolyVox
|
||||
int32_t satUpperY = iSrcY + border;
|
||||
int32_t satUpperZ = iSrcZ + border;
|
||||
|
||||
float a = satVolume.getVoxelAt(satLowerX,satLowerY,satLowerZ);
|
||||
float b = satVolume.getVoxelAt(satUpperX,satLowerY,satLowerZ);
|
||||
float c = satVolume.getVoxelAt(satLowerX,satUpperY,satLowerZ);
|
||||
float d = satVolume.getVoxelAt(satUpperX,satUpperY,satLowerZ);
|
||||
float e = satVolume.getVoxelAt(satLowerX,satLowerY,satUpperZ);
|
||||
float f = satVolume.getVoxelAt(satUpperX,satLowerY,satUpperZ);
|
||||
float g = satVolume.getVoxelAt(satLowerX,satUpperY,satUpperZ);
|
||||
float h = satVolume.getVoxelAt(satUpperX,satUpperY,satUpperZ);
|
||||
|
||||
float sum = h+c-d-g-f-a+b+e;
|
||||
AccumulationType a = satVolume.getVoxelAt(satLowerX,satLowerY,satLowerZ);
|
||||
AccumulationType b = satVolume.getVoxelAt(satUpperX,satLowerY,satLowerZ);
|
||||
AccumulationType c = satVolume.getVoxelAt(satLowerX,satUpperY,satLowerZ);
|
||||
AccumulationType d = satVolume.getVoxelAt(satUpperX,satUpperY,satLowerZ);
|
||||
AccumulationType e = satVolume.getVoxelAt(satLowerX,satLowerY,satUpperZ);
|
||||
AccumulationType f = satVolume.getVoxelAt(satUpperX,satLowerY,satUpperZ);
|
||||
AccumulationType g = satVolume.getVoxelAt(satLowerX,satUpperY,satUpperZ);
|
||||
AccumulationType h = satVolume.getVoxelAt(satUpperX,satUpperY,satUpperZ);
|
||||
|
||||
AccumulationType sum = h+c-d-g-f-a+b+e;
|
||||
uint32_t sideLength = border * 2 + 1;
|
||||
AccumulationType average = sum / (sideLength*sideLength*sideLength);
|
||||
|
||||
float average = sum / (static_cast<float>(sideLength*sideLength*sideLength));
|
||||
|
||||
//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
|
||||
m_pVolDst->setVoxelAt(iDstX, iDstY, iDstZ, static_cast<typename DstVolumeType::VoxelType>(average));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ freely, subject to the following restrictions:
|
||||
#ifndef __PolyVox_SurfaceExtractor_H__
|
||||
#define __PolyVox_SurfaceExtractor_H__
|
||||
|
||||
#include "PolyVoxImpl/MarchingCubesTables.h"
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "Impl/MarchingCubesTables.h"
|
||||
#include "Impl/TypeDef.h"
|
||||
|
||||
#include "PolyVoxCore/Array.h"
|
||||
#include "PolyVoxCore/SurfaceMesh.h"
|
||||
@ -48,7 +48,7 @@ namespace PolyVox
|
||||
|
||||
//Compute the cell bitmask for a given cell.
|
||||
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
|
||||
void generateVerticesForSlice(const Array2DUint8& pCurrentBitmask,
|
||||
@ -182,16 +182,6 @@ namespace PolyVox
|
||||
VolumeType* m_volData;
|
||||
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.
|
||||
uint32_t m_uNoOfOccupiedCells;
|
||||
|
||||
|
@ -136,18 +136,17 @@ namespace PolyVox
|
||||
const int32_t iMaxXVolSpace = m_regSliceCurrent.getUpperCorner().getX();
|
||||
const int32_t iMaxYVolSpace = m_regSliceCurrent.getUpperCorner().getY();
|
||||
|
||||
iZVolSpace = m_regSliceCurrent.getLowerCorner().getZ();
|
||||
uZRegSpace = iZVolSpace - m_regSizeInVoxels.getLowerCorner().getZ();
|
||||
int32_t iZVolSpace = m_regSliceCurrent.getLowerCorner().getZ();
|
||||
|
||||
//Process the lower left corner
|
||||
iYVolSpace = m_regSliceCurrent.getLowerCorner().getY();
|
||||
iXVolSpace = m_regSliceCurrent.getLowerCorner().getX();
|
||||
int32_t iYVolSpace = m_regSliceCurrent.getLowerCorner().getY();
|
||||
int32_t iXVolSpace = m_regSliceCurrent.getLowerCorner().getX();
|
||||
|
||||
uXRegSpace = iXVolSpace - m_regSizeInVoxels.getLowerCorner().getX();
|
||||
uYRegSpace = iYVolSpace - m_regSizeInVoxels.getLowerCorner().getY();
|
||||
uint32_t uXRegSpace = iXVolSpace - m_regSizeInVoxels.getLowerCorner().getX();
|
||||
uint32_t uYRegSpace = iYVolSpace - m_regSizeInVoxels.getLowerCorner().getY();
|
||||
|
||||
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.
|
||||
iXVolSpace = m_regSliceCurrent.getLowerCorner().getX();
|
||||
@ -159,7 +158,7 @@ namespace PolyVox
|
||||
|
||||
m_sampVolume.movePositiveY();
|
||||
|
||||
computeBitmaskForCell<false, true, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask);
|
||||
computeBitmaskForCell<false, true, isPrevZAvail>(pPreviousBitmask, pCurrentBitmask, uXRegSpace, uYRegSpace);
|
||||
}
|
||||
|
||||
//Process the edge where y is minimal.
|
||||
@ -172,7 +171,7 @@ namespace PolyVox
|
||||
|
||||
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
|
||||
@ -186,7 +185,7 @@ namespace PolyVox
|
||||
|
||||
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<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;
|
||||
|
||||
@ -385,7 +384,7 @@ namespace PolyVox
|
||||
}
|
||||
|
||||
//Save the bitmask
|
||||
pCurrentBitmask[uXRegSpace][iYVolSpace- m_regSizeInVoxels.getLowerCorner().getY()] = iCubeIndex;
|
||||
pCurrentBitmask[uXRegSpace][uYRegSpace] = iCubeIndex;
|
||||
|
||||
if(edgeTable[iCubeIndex] != 0)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ freely, subject to the following restrictions:
|
||||
#ifndef __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
|
||||
|
||||
@ -34,14 +34,7 @@ namespace PolyVox
|
||||
{
|
||||
///This class represents a voxel storing only a material.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// In order to perform a surface extraction on a LargeVolume, PolyVox needs the underlying
|
||||
/// 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.
|
||||
/// Detailed description...
|
||||
///
|
||||
/// \sa Density, MaterialDensityPair
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -52,31 +45,30 @@ namespace PolyVox
|
||||
class Material
|
||||
{
|
||||
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(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);
|
||||
};
|
||||
|
||||
bool operator!=(const Material& rhs) const throw()
|
||||
bool operator!=(const Material& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
MaterialType getMaterial() const throw() { return m_uMaterial; }
|
||||
void setMaterial(MaterialType uMaterial) { m_uMaterial = uMaterial; }
|
||||
/// \return The current material value of the voxel
|
||||
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:
|
||||
MaterialType m_uMaterial;
|
||||
Type m_uMaterial;
|
||||
};
|
||||
|
||||
typedef Material<uint8_t> Material8;
|
||||
@ -86,11 +78,11 @@ namespace PolyVox
|
||||
class DefaultIsQuadNeeded< Material<Type> >
|
||||
{
|
||||
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))
|
||||
{
|
||||
materialToUse = static_cast<float>(back.getMaterial());
|
||||
materialToUse = static_cast<uint32_t>(back.getMaterial());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -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/DefaultMarchingCubesController.h" //We'll specialise the controller contained in here
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "Impl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
/// This class represents a voxel storing only a density.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// In order to perform a surface extraction on a LargeVolume, PolyVox needs the underlying
|
||||
/// 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.
|
||||
/// Detailed description...
|
||||
///
|
||||
/// \sa Density, Material
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -49,22 +41,15 @@ namespace PolyVox
|
||||
class MaterialDensityPair
|
||||
{
|
||||
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(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);
|
||||
};
|
||||
|
||||
bool operator!=(const MaterialDensityPair& rhs) const throw()
|
||||
bool operator!=(const MaterialDensityPair& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
@ -87,29 +72,29 @@ namespace PolyVox
|
||||
return *this;
|
||||
}
|
||||
|
||||
DensityType getDensity() const throw() { return m_uDensity; }
|
||||
MaterialType getMaterial() const throw() { return m_uMaterial; }
|
||||
Type getDensity() const { return m_uDensity; }
|
||||
Type getMaterial() const { return m_uMaterial; }
|
||||
|
||||
void setDensity(DensityType uDensity) { m_uDensity = uDensity; }
|
||||
void setMaterial(MaterialType uMaterial) { m_uMaterial = uMaterial; }
|
||||
void setDensity(Type uDensity) { m_uDensity = uDensity; }
|
||||
void setMaterial(Type uMaterial) { m_uMaterial = uMaterial; }
|
||||
|
||||
static DensityType getMaxDensity() throw() { return (0x01 << NoOfDensityBits) - 1; }
|
||||
static DensityType getMinDensity() throw() { return 0; }
|
||||
static Type getMaxDensity() { return (0x01 << NoOfDensityBits) - 1; }
|
||||
static Type getMinDensity() { return 0; }
|
||||
|
||||
private:
|
||||
MaterialType m_uMaterial : NoOfMaterialBits;
|
||||
DensityType m_uDensity : NoOfDensityBits;
|
||||
Type m_uMaterial : NoOfMaterialBits;
|
||||
Type m_uDensity : NoOfDensityBits;
|
||||
};
|
||||
|
||||
template<typename Type, uint8_t NoOfMaterialBits, uint8_t NoOfDensityBits>
|
||||
class DefaultIsQuadNeeded< MaterialDensityPair<Type, NoOfMaterialBits, NoOfDensityBits> >
|
||||
{
|
||||
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))
|
||||
{
|
||||
materialToUse = static_cast<float>(back.getMaterial());
|
||||
materialToUse = static_cast<uint32_t>(back.getMaterial());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -64,6 +64,8 @@ namespace PolyVox
|
||||
/// 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
|
||||
/// instead of the 'PositionMaterial' type.
|
||||
///
|
||||
/// \deprecated
|
||||
template <typename VertexType>
|
||||
class MeshDecimator
|
||||
{
|
||||
@ -141,10 +143,10 @@ namespace PolyVox
|
||||
|
||||
public:
|
||||
///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.
|
||||
void execute();
|
||||
POLYVOX_DEPRECATED void execute();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace PolyVox
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Builds a MeshDecimator.
|
||||
/// \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.
|
||||
/// \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
|
||||
|
@ -24,7 +24,7 @@ freely, subject to the following restrictions:
|
||||
#ifndef __PolyVox_ForwardDeclarations_H__
|
||||
#define __PolyVox_ForwardDeclarations_H__
|
||||
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
#include "Impl/TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
|
@ -117,10 +117,8 @@ namespace PolyVox
|
||||
|
||||
public:
|
||||
/// Constructor for creating a fixed size volume.
|
||||
RawVolume
|
||||
(
|
||||
const Region& regValid
|
||||
);
|
||||
RawVolume(const Region& regValid);
|
||||
|
||||
/// Destructor
|
||||
~RawVolume();
|
||||
|
||||
@ -141,7 +139,14 @@ namespace PolyVox
|
||||
/// Calculates approximatly how many bytes of memory the volume is currently using.
|
||||
uint32_t calculateSizeInBytes(void);
|
||||
|
||||
private:
|
||||
protected:
|
||||
/// Copy constructor
|
||||
RawVolume(const RawVolume& rhs);
|
||||
|
||||
/// Assignment operator
|
||||
RawVolume& operator=(const RawVolume& rhs);
|
||||
|
||||
private:
|
||||
void initialise(const Region& regValidRegion);
|
||||
|
||||
//The block data
|
||||
|
@ -28,11 +28,8 @@ namespace PolyVox
|
||||
/// \param regValid Specifies the minimum and maximum valid voxel positions.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
template <typename VoxelType>
|
||||
RawVolume<VoxelType>::RawVolume
|
||||
(
|
||||
const Region& regValid
|
||||
)
|
||||
:BaseVolume<VoxelType>(regValid)
|
||||
RawVolume<VoxelType>::RawVolume(const Region& regValid)
|
||||
:BaseVolume<VoxelType>(regValid)
|
||||
{
|
||||
setBorderValue(VoxelType());
|
||||
|
||||
@ -40,6 +37,19 @@ namespace PolyVox
|
||||
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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -50,6 +60,19 @@ namespace PolyVox
|
||||
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
|
||||
/// is outside the extents of the volume.
|
||||
|
@ -28,24 +28,23 @@ freely, subject to the following restrictions:
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
/// Stores the result of a raycast operation.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// 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
|
||||
namespace RaycastResults
|
||||
{
|
||||
///Indicates whether an intersection was found
|
||||
bool foundIntersection;
|
||||
///If an intersection was found then this field holds the intersecting voxel, otherwise it is undefined.
|
||||
Vector3DInt32 intersectionVoxel;
|
||||
Vector3DInt32 previousVoxel;
|
||||
};
|
||||
/**
|
||||
* The results of a raycast
|
||||
*/
|
||||
enum RaycastResult
|
||||
{
|
||||
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
|
||||
/// 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.
|
||||
@ -59,7 +58,7 @@ namespace PolyVox
|
||||
/// of the RaycastResult structure and the intersectionFound flag is set to true, otherwise
|
||||
/// 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
|
||||
/// 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
|
||||
@ -91,35 +90,12 @@ namespace PolyVox
|
||||
/// surace extractors. It's behaviour with the Marching Cubes surface extractor has not
|
||||
/// 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.
|
||||
void setStart(const Vector3DFloat& v3dStart);
|
||||
///Set the direction for the ray.
|
||||
void setDirection(const Vector3DFloat& v3dDirectionAndLength);
|
||||
template<typename VolumeType, typename Callback>
|
||||
RaycastResult raycastWithEndpoints(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dEnd, Callback& callback);
|
||||
|
||||
///Performs the raycast.
|
||||
void execute();
|
||||
|
||||
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;
|
||||
};
|
||||
template<typename VolumeType, typename Callback>
|
||||
RaycastResult raycastWithDirection(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dDirectionAndLength, Callback& callback);
|
||||
}
|
||||
|
||||
#include "PolyVoxCore/Raycast.inl"
|
||||
|
@ -23,63 +23,6 @@ freely, subject to the following restrictions:
|
||||
|
||||
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
|
||||
// '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.
|
||||
//
|
||||
// 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.
|
||||
// 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:
|
||||
//
|
||||
@ -108,10 +51,38 @@ namespace PolyVox
|
||||
// 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 Raycast<VolumeType>::doRaycast(float x1, float y1, float z1, float x2, float y2, float z2)
|
||||
// This error was reported by Joey Hammer (PixelActive).
|
||||
|
||||
/**
|
||||
* 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 j = (int)floorf(y1);
|
||||
int k = (int)floorf(z1);
|
||||
@ -135,18 +106,14 @@ namespace PolyVox
|
||||
float minz = floorf(z1), maxz = minz + 1.0f;
|
||||
float tz = ((z1 > z2) ? (z1 - minz) : (maxz - z1)) * deltatz;
|
||||
|
||||
m_sampVolume.setPosition(i,j,k);
|
||||
m_result.previousVoxel = Vector3DInt32(i,j,k);
|
||||
sampler.setPosition(i,j,k);
|
||||
|
||||
for(;;)
|
||||
{
|
||||
if(!m_funcIsPassable(m_sampVolume))
|
||||
if(!callback(sampler))
|
||||
{
|
||||
m_result.foundIntersection = true;
|
||||
m_result.intersectionVoxel = Vector3DInt32(i,j,k);
|
||||
return;
|
||||
return RaycastResults::Interupted;
|
||||
}
|
||||
m_result.previousVoxel = Vector3DInt32(i,j,k);
|
||||
|
||||
if(tx <= ty && tx <= tz)
|
||||
{
|
||||
@ -154,30 +121,58 @@ namespace PolyVox
|
||||
tx += deltatx;
|
||||
i += di;
|
||||
|
||||
if(di == 1) m_sampVolume.movePositiveX();
|
||||
if(di == -1) m_sampVolume.moveNegativeX();
|
||||
if(di == 1) sampler.movePositiveX();
|
||||
if(di == -1) sampler.moveNegativeX();
|
||||
} else if (ty <= tz)
|
||||
{
|
||||
if(j == jend) break;
|
||||
ty += deltaty;
|
||||
j += dj;
|
||||
|
||||
if(dj == 1) m_sampVolume.movePositiveY();
|
||||
if(dj == -1) m_sampVolume.moveNegativeY();
|
||||
if(dj == 1) sampler.movePositiveY();
|
||||
if(dj == -1) sampler.moveNegativeY();
|
||||
} else
|
||||
{
|
||||
if(k == kend) break;
|
||||
tz += deltatz;
|
||||
k += dk;
|
||||
|
||||
if(dk == 1) m_sampVolume.movePositiveZ();
|
||||
if(dk == -1) m_sampVolume.moveNegativeZ();
|
||||
if(dk == 1) sampler.movePositiveZ();
|
||||
if(dk == -1) sampler.moveNegativeZ();
|
||||
}
|
||||
}
|
||||
|
||||
//Didn't hit anything
|
||||
m_result.foundIntersection = false;
|
||||
m_result.intersectionVoxel = Vector3DInt32(0,0,0);
|
||||
m_result.previousVoxel = Vector3DInt32(0,0,0);
|
||||
return RaycastResults::Completed;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
|
@ -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__
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user