Merge with default

This commit is contained in:
kaetemi 2014-07-30 22:32:27 +02:00
commit 5de85eb194
3644 changed files with 15148 additions and 7412 deletions

View file

@ -160,6 +160,7 @@ code/build/*
code/build-2010/* code/build-2010/*
build/* build/*
install/* install/*
build_vc*
code/nel/tools/build_gamedata/configuration/buildsite.py code/nel/tools/build_gamedata/configuration/buildsite.py
# Linux nel compile # Linux nel compile
@ -243,3 +244,5 @@ ryzom_tools*
code/nel/tools/build_gamedata/processes/ai_wmap/ai_build_wmap.cfg code/nel/tools/build_gamedata/processes/ai_wmap/ai_build_wmap.cfg
code/nel/tools/build_gamedata/processes/sheets/sheets_packer.cfg code/nel/tools/build_gamedata/processes/sheets/sheets_packer.cfg
code/nel/tools/build_gamedata/processes/rbank/build_rbank.cfg
code/nel/tools/build_gamedata/processes/zone/debug_zone_dependencies.cfg

View file

@ -131,6 +131,13 @@ IF(FINAL_VERSION)
ADD_DEFINITIONS(-DFINAL_VERSION=1) ADD_DEFINITIONS(-DFINAL_VERSION=1)
ENDIF(FINAL_VERSION) ENDIF(FINAL_VERSION)
IF(WITH_SSE2)
ADD_DEFINITIONS(-DNL_HAS_SSE2)
IF(WITH_SSE3)
ADD_DEFINITIONS(-DNL_HAS_SSE3)
ENDIF(WITH_SSE3)
ENDIF(WITH_SSE2)
IF(WITH_QT) IF(WITH_QT)
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED) FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
ENDIF(WITH_QT) ENDIF(WITH_QT)

View file

@ -1,45 +1,51 @@
# - Find DirectInput # - Find DirectInput
# Find the DirectSound includes and libraries # Find the DirectSound includes and libraries
# #
# MAXSDK_DIR - 3DSMAX SDK root directory
# MAXSDK_INCLUDE_DIR - where to find baseinterface.h # MAXSDK_INCLUDE_DIR - where to find baseinterface.h
# MAXSDK_LIBRARIES - List of libraries when using 3DSMAX. # MAXSDK_LIBRARIES - List of libraries when using 3DSMAX.
# MAXSDK_FOUND - True if MAX SDK found. # MAXSDK_FOUND - True if MAX SDK found.
if(MAXSDK_INCLUDE_DIR) if(MAXSDK_INCLUDE_DIR)
# Already in cache, be silent # Already in cache, be silent
set(MAXSDK_FIND_QUIETLY TRUE) SET(MAXSDK_FIND_QUIETLY TRUE)
endif(MAXSDK_INCLUDE_DIR) endif(MAXSDK_INCLUDE_DIR)
find_path(MAXSDK_INCLUDE_DIR max.h FIND_PATH(MAXSDK_DIR
"include/maxversion.h"
HINTS
"$ENV{MAXSDK_DIR}"
PATHS PATHS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/include" "$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include" "$ENV{3DSMAX_2011_SDK_PATH}/maxsdk"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/include" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/include" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/include" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/include" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk"
) )
find_path(MAXSDK_CS_INCLUDE_DIR bipexp.h FIND_PATH(MAXSDK_INCLUDE_DIR
PATHS max.h
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/include/CS" HINTS
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include/CS" ${MAXSDK_DIR}/include
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/include/CS"
) )
FIND_PATH(MAXSDK_CS_INCLUDE_DIR bipexp.h
HINTS
${MAXSDK_DIR}/include/CS
)
IF(TARGET_X64)
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/x64/lib)
ELSE(TARGET_X64)
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/lib)
ENDIF(TARGET_X64)
MACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME) MACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY} FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME} NAMES ${MYLIBRARYNAME}
PATHS HINTS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/lib" ${MAXSDK_LIBRARY_DIRS}
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/lib"
) )
ENDMACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME) ENDMACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)

View file

@ -27,7 +27,7 @@ FIND_PATH(DXSDK_DIR
MACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME) MACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY} FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME} NAMES ${MYLIBRARYNAME}
PATHS HINTS
"${DXSDK_LIBRARY_DIR}" "${DXSDK_LIBRARY_DIR}"
) )
ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME) ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
@ -36,11 +36,16 @@ IF(DXSDK_DIR)
SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include") SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include")
IF(TARGET_X64) IF(TARGET_X64)
SET(DXSDK_LIBRARY_DIR "${DXSDK_DIR}/Lib/x64") SET(DXSDK_LIBRARY_DIRS ${DXSDK_DIR}/Lib/x64 ${DXSDK_DIR}/lib/amd64)
ELSE(TARGET_X64) ELSE(TARGET_X64)
SET(DXSDK_LIBRARY_DIR "${DXSDK_DIR}/Lib/x86") SET(DXSDK_LIBRARY_DIRS ${DXSDK_DIR}/Lib/x86 ${DXSDK_DIR}/lib)
ENDIF(TARGET_X64) ENDIF(TARGET_X64)
FIND_PATH(DXSDK_LIBRARY_DIR
dxguid.lib
PATHS
${DXSDK_LIBRARY_DIRS})
FIND_DXSDK_LIBRARY(DXSDK_GUID_LIBRARY dxguid) FIND_DXSDK_LIBRARY(DXSDK_GUID_LIBRARY dxguid)
FIND_DXSDK_LIBRARY(DXSDK_DINPUT_LIBRARY dinput8) FIND_DXSDK_LIBRARY(DXSDK_DINPUT_LIBRARY dinput8)
FIND_DXSDK_LIBRARY(DXSDK_DSOUND_LIBRARY dsound) FIND_DXSDK_LIBRARY(DXSDK_DSOUND_LIBRARY dsound)

View file

@ -23,8 +23,15 @@ FIND_PATH(FMOD_INCLUDE_DIR
PATH_SUFFIXES fmod fmod3 PATH_SUFFIXES fmod fmod3
) )
IF(TARGET_X64)
SET(FMOD_LIBRARY_NAMES fmod64 fmod)
ELSE(TARGET_X64)
SET(FMOD_LIBRARY_NAMES fmodvc fmod)
ENDIF(TARGET_X64)
FIND_LIBRARY(FMOD_LIBRARY FIND_LIBRARY(FMOD_LIBRARY
NAMES fmod fmodvc libfmod fmod64 NAMES
${FMOD_LIBRARY_NAMES}
PATHS PATHS
$ENV{FMOD_DIR}/lib $ENV{FMOD_DIR}/lib
/usr/local/lib /usr/local/lib

View file

@ -71,11 +71,14 @@ SET(WINSDKENV_DIR $ENV{WINSDK_DIR})
MACRO(FIND_WINSDK_VERSION_HEADERS) MACRO(FIND_WINSDK_VERSION_HEADERS)
IF(WINSDK_DIR AND NOT WINSDK_VERSION) IF(WINSDK_DIR AND NOT WINSDK_VERSION)
# Search version in headers # Search version in headers
IF(EXISTS ${WINSDK_DIR}/include/Msi.h) FIND_FILE(_MSI_FILE Msi.h
SET(_MSI_FILE ${WINSDK_DIR}/include/Msi.h) PATHS
ENDIF(EXISTS ${WINSDK_DIR}/include/Msi.h) ${WINSDK_DIR}/Include/um
${WINSDK_DIR}/Include
)
IF(_MSI_FILE) IF(_MSI_FILE)
# Look for Windows SDK 8.0 # Look for Windows SDK 8.0
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8") FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8")
@ -88,11 +91,11 @@ MACRO(FIND_WINSDK_VERSION_HEADERS)
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN7") FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN7")
IF(_CONTENT) IF(_CONTENT)
IF(EXISTS ${WINSDK_DIR}/include/winsdkver.h) FIND_FILE(_WINSDKVER_FILE winsdkver.h WinSDKVer.h
SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/winsdkver.h) PATHS
ELSEIF(EXISTS ${WINSDK_DIR}/include/WinSDKVer.h) ${WINSDK_DIR}/Include/um
SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/WinSDKVer.h) ${WINSDK_DIR}/Include
ENDIF(EXISTS ${WINSDK_DIR}/include/winsdkver.h) )
IF(_WINSDKVER_FILE) IF(_WINSDKVER_FILE)
# Load WinSDKVer.h content # Load WinSDKVer.h content
@ -162,9 +165,13 @@ MACRO(USE_CURRENT_WINSDK)
SET(WINSDK_VERSION_FULL "") SET(WINSDK_VERSION_FULL "")
# Use WINSDK environment variable # Use WINSDK environment variable
IF(WINSDKENV_DIR AND EXISTS ${WINSDKENV_DIR}/include/Windows.h) IF(WINSDKENV_DIR)
SET(WINSDK_DIR ${WINSDKENV_DIR}) FIND_PATH(WINSDK_DIR Windows.h
ENDIF(WINSDKENV_DIR AND EXISTS ${WINSDKENV_DIR}/include/Windows.h) HINTS
${WINSDKENV_DIR}/Include/um
${WINSDKENV_DIR}/Include
)
ENDIF(WINSDKENV_DIR)
# Use INCLUDE environment variable # Use INCLUDE environment variable
IF(NOT WINSDK_DIR AND WINSDKCURRENT_VERSION_INCLUDE) IF(NOT WINSDK_DIR AND WINSDKCURRENT_VERSION_INCLUDE)
@ -173,8 +180,8 @@ MACRO(USE_CURRENT_WINSDK)
# Look for Windows.h because there are several paths # Look for Windows.h because there are several paths
IF(EXISTS ${_INCLUDE}/Windows.h) IF(EXISTS ${_INCLUDE}/Windows.h)
STRING(REGEX REPLACE "/(include|INCLUDE|Include)" "" WINSDK_DIR ${_INCLUDE}) STRING(REGEX REPLACE "/(include|INCLUDE|Include)(.*)" "" WINSDK_DIR ${_INCLUDE})
MESSAGE(STATUS "Found Windows SDK environment variable in ${WINSDK_DIR}") MESSAGE(STATUS "Found Windows SDK from include environment variable in ${WINSDK_DIR}")
BREAK() BREAK()
ENDIF(EXISTS ${_INCLUDE}/Windows.h) ENDIF(EXISTS ${_INCLUDE}/Windows.h)
ENDFOREACH(_INCLUDE) ENDFOREACH(_INCLUDE)

View file

@ -118,13 +118,13 @@ MACRO(NL_DEFAULT_PROPS name label)
ENDIF(NL_LIB_PREFIX) ENDIF(NL_LIB_PREFIX)
ENDIF(${type} STREQUAL SHARED_LIBRARY) ENDIF(${type} STREQUAL SHARED_LIBRARY)
IF(${type} STREQUAL EXECUTABLE AND WIN32) IF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(${name} PROPERTIES SET_TARGET_PROPERTIES(${name} PROPERTIES
VERSION ${NL_VERSION} VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR} SOVERSION ${NL_VERSION_MAJOR}
COMPILE_FLAGS "/GA" COMPILE_FLAGS "/GA"
LINK_FLAGS "/VERSION:${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}") LINK_FLAGS "/VERSION:${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}")
ENDIF(${type} STREQUAL EXECUTABLE AND WIN32) ENDIF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
ENDMACRO(NL_DEFAULT_PROPS) ENDMACRO(NL_DEFAULT_PROPS)
### ###
@ -323,6 +323,14 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
OPTION(WITH_LIBOVR "With LibOVR support" OFF) OPTION(WITH_LIBOVR "With LibOVR support" OFF)
OPTION(WITH_LIBVR "With LibVR support" OFF) OPTION(WITH_LIBVR "With LibVR support" OFF)
OPTION(WITH_PERFHUD "With NVIDIA PerfHUD support" OFF)
OPTION(WITH_SSE2 "With SSE2" ON )
OPTION(WITH_SSE3 "With SSE3" ON )
IF(NOT MSVC)
OPTION(WITH_GCC_FPMATH_BOTH "With GCC -mfpmath=both" OFF)
ENDIF(NOT MSVC)
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS) MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
@ -341,6 +349,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON ) OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON )
OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON ) OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON )
OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON ) OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON )
OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF)
### ###
# Optional support # Optional support
@ -612,6 +621,14 @@ MACRO(NL_SETUP_BUILD)
ENDIF(CLANG) ENDIF(CLANG)
ENDIF(WIN32) ENDIF(WIN32)
IF(WITH_SSE3)
ADD_PLATFORM_FLAGS("-msse3")
ENDIF(WITH_SSE3)
IF(WITH_GCC_FPMATH_BOTH)
ADD_PLATFORM_FLAGS("-mfpmath=both")
ENDIF(WITH_GCC_FPMATH_BOTH)
IF(APPLE) IF(APPLE)
IF(NOT XCODE) IF(NOT XCODE)
IF(CMAKE_OSX_ARCHITECTURES) IF(CMAKE_OSX_ARCHITECTURES)
@ -873,9 +890,9 @@ MACRO(NL_SETUP_BUILD)
ENDIF(APPLE) ENDIF(APPLE)
# Fix "relocation R_X86_64_32 against.." error on x64 platforms # Fix "relocation R_X86_64_32 against.." error on x64 platforms
IF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS) IF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS AND NOT MINGW)
ADD_PLATFORM_FLAGS("-fPIC") ADD_PLATFORM_FLAGS("-fPIC")
ENDIF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS) ENDIF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS AND NOT MINGW)
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -ftemplate-depth-48") SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -ftemplate-depth-48")
@ -887,7 +904,7 @@ MACRO(NL_SETUP_BUILD)
SET(NL_RELEASE_CFLAGS "${NL_RELEASE_CFLAGS} -g") SET(NL_RELEASE_CFLAGS "${NL_RELEASE_CFLAGS} -g")
ELSE(WITH_SYMBOLS) ELSE(WITH_SYMBOLS)
IF(APPLE) IF(APPLE)
SET(NL_RELEASE_LINKFLAGS "-Wl,-dead_strip -Wl,-x ${NL_RELEASE_LINKFLAGS}") SET(NL_RELEASE_LINKFLAGS "-Wl,-dead_strip ${NL_RELEASE_LINKFLAGS}")
ELSE(APPLE) ELSE(APPLE)
SET(NL_RELEASE_LINKFLAGS "-Wl,-s ${NL_RELEASE_LINKFLAGS}") SET(NL_RELEASE_LINKFLAGS "-Wl,-s ${NL_RELEASE_LINKFLAGS}")
ENDIF(APPLE) ENDIF(APPLE)

View file

@ -8,6 +8,6 @@ set(CTEST_PROJECT_NAME "RyzomCore")
set(CTEST_NIGHTLY_START_TIME "00:00:00 CST") set(CTEST_NIGHTLY_START_TIME "00:00:00 CST")
set(CTEST_UPDATE_TYPE "hg") set(CTEST_UPDATE_TYPE "hg")
set(CTEST_DROP_METHOD "http") set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.opennel.org") set(CTEST_DROP_SITE "ci.ryzomcore.org")
set(CTEST_DROP_LOCATION "/cdash/submit.php?project=RyzomCore") set(CTEST_DROP_LOCATION "/submit.php?project=RyzomCore")
set(CTEST_DROP_SITE_CDASH TRUE) set(CTEST_DROP_SITE_CDASH TRUE)

View file

@ -290,7 +290,7 @@ public:
* \param matrix transformation matrix * \param matrix transformation matrix
* \param hotspot position of string origine * \param hotspot position of string origine
*/ */
void render3D (IDriver& driver,CMatrix matrix,THotSpot hotspot = MiddleMiddle); void render3D (IDriver& driver, const CMatrix &matrix, THotSpot hotspot = MiddleMiddle);
}; };

View file

@ -182,7 +182,7 @@ public:
IDriver(); IDriver();
virtual ~IDriver(); virtual ~IDriver();
virtual bool init(uint windowIcon = 0, emptyProc exitFunc = 0) = 0; virtual bool init(uintptr_t windowIcon = 0, emptyProc exitFunc = 0) = 0;
/// Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers). /// Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers).
virtual bool release(); virtual bool release();
@ -1341,7 +1341,7 @@ public:
* NB: if implementation does not support it, 0 may be returned. OpenGL ones return the Texture ID. * NB: if implementation does not support it, 0 may be returned. OpenGL ones return the Texture ID.
* NB: unlike isTextureExist(), this method is not thread safe. * NB: unlike isTextureExist(), this method is not thread safe.
*/ */
virtual uint getTextureHandle(const ITexture&tex) = 0; virtual uintptr_t getTextureHandle(const ITexture&tex) = 0;
// see if the Multiply-Add Tex Env operator is supported (see CMaterial::Mad) // see if the Multiply-Add Tex Env operator is supported (see CMaterial::Mad)
virtual bool supportMADOperator() const = 0; virtual bool supportMADOperator() const = 0;

View file

@ -123,7 +123,7 @@ public:
/// \name Object /// \name Object
// @{ // @{
CDriverUser (uint windowIcon, UDriver::TDriver driver, emptyProc exitFunc = 0); CDriverUser (uintptr_t windowIcon, UDriver::TDriver driver, emptyProc exitFunc = 0);
virtual ~CDriverUser(); virtual ~CDriverUser();
// @} // @}

View file

@ -24,8 +24,11 @@
#include "nel/misc/geom_ext.h" #include "nel/misc/geom_ext.h"
#include "nel/misc/line.h" #include "nel/misc/line.h"
#if defined (NL_COMP_MINGW)
#ifdef NL_OS_WINDOWS # define NL3D_GL_DLL_NAME "libnel_drv_opengl_win"
# define NL3D_GLES_DLL_NAME "libnel_drv_opengles_win"
# define NL3D_D3D_DLL_NAME "libnel_drv_direct3d_win"
#elif defined (NL_OS_WINDOWS)
# define NL3D_GL_DLL_NAME "nel_drv_opengl_win" # define NL3D_GL_DLL_NAME "nel_drv_opengl_win"
# define NL3D_GLES_DLL_NAME "nel_drv_opengles_win" # define NL3D_GLES_DLL_NAME "nel_drv_opengles_win"
# define NL3D_D3D_DLL_NAME "nel_drv_direct3d_win" # define NL3D_D3D_DLL_NAME "nel_drv_direct3d_win"

View file

@ -108,281 +108,6 @@ public:
}; };
// ***************************************************************************
// ***************************************************************************
// SSE Matrix
// ***************************************************************************
// ***************************************************************************
// ***************************************************************************
#if defined(NL_OS_WINDOWS) && !defined(NL_NO_ASM)
/** For fast vector/point multiplication. Special usage for Skinning.
* NB: SSE is no more used (no speed gain, some memory problem), but keep it for possible future usage.
*/
class CMatrix3x4SSE
{
public:
// Order them in memory column first, for SSE column multiplication.
float a11, a21, a31, a41;
float a12, a22, a32, a42;
float a13, a23, a33, a43;
float a14, a24, a34, a44;
// Copy from a matrix.
void set(const CMatrix &mat)
{
const float *m =mat.get();
a11= m[0]; a12= m[4]; a13= m[8] ; a14= m[12];
a21= m[1]; a22= m[5]; a23= m[9] ; a24= m[13];
a31= m[2]; a32= m[6]; a33= m[10]; a34= m[14];
// not used.
a41= 0 ; a42= 0 ; a43= 0 ; a44= 1;
}
// mulSetvector. NB: in should be different as v!! (else don't work).
void mulSetVector(const CVector &vin, CVector &vout)
{
__asm
{
mov eax, vin
mov ebx, this
mov edi, vout
// Load in vector in op[0]
movss xmm0, [eax]vin.x
movss xmm1, [eax]vin.y
movss xmm2, [eax]vin.z
// Expand op[0] to op[1], op[2], op[3]
shufps xmm0, xmm0, 0
shufps xmm1, xmm1, 0
shufps xmm2, xmm2, 0
// Mul each vector with 3 Matrix column
mulps xmm0, [ebx]this.a11
mulps xmm1, [ebx]this.a12
mulps xmm2, [ebx]this.a13
// Add each column vector.
addps xmm0, xmm1
addps xmm0, xmm2
// write the result.
movss [edi]vout.x, xmm0
shufps xmm0, xmm0, 33
movss [edi]vout.y, xmm0
movhlps xmm0, xmm0
movss [edi]vout.z, xmm0
}
}
// mulSetpoint. NB: in should be different as v!! (else don't work).
void mulSetPoint(const CVector &vin, CVector &vout)
{
__asm
{
mov eax, vin
mov ebx, this
mov edi, vout
// Load in vector in op[0]
movss xmm0, [eax]vin.x
movss xmm1, [eax]vin.y
movss xmm2, [eax]vin.z
// Expand op[0] to op[1], op[2], op[3]
shufps xmm0, xmm0, 0
shufps xmm1, xmm1, 0
shufps xmm2, xmm2, 0
// Mul each vector with 3 Matrix column
mulps xmm0, [ebx]this.a11
mulps xmm1, [ebx]this.a12
mulps xmm2, [ebx]this.a13
// Add each column vector.
addps xmm0, xmm1
addps xmm0, xmm2
// Add Matrix translate column vector
addps xmm0, [ebx]this.a14
// write the result.
movss [edi]vout.x, xmm0
shufps xmm0, xmm0, 33
movss [edi]vout.y, xmm0
movhlps xmm0, xmm0
movss [edi]vout.z, xmm0
}
}
// mulSetvector. NB: vin should be different as v!! (else don't work).
void mulSetVector(const CVector &vin, float scale, CVector &vout)
{
__asm
{
mov eax, vin
mov ebx, this
mov edi, vout
// Load in vector in op[0]
movss xmm0, [eax]vin.x
movss xmm1, [eax]vin.y
movss xmm2, [eax]vin.z
// Load scale in op[0]
movss xmm3, scale
// Expand op[0] to op[1], op[2], op[3]
shufps xmm0, xmm0, 0
shufps xmm1, xmm1, 0
shufps xmm2, xmm2, 0
shufps xmm3, xmm3, 0
// Store vertex column in other regs.
movaps xmm5, xmm0
movaps xmm6, xmm1
movaps xmm7, xmm2
// Mul each vector with 3 Matrix column
mulps xmm0, [ebx]this.a11
mulps xmm1, [ebx]this.a12
mulps xmm2, [ebx]this.a13
// Add each column vector.
addps xmm0, xmm1
addps xmm0, xmm2
// mul final result with scale
mulps xmm0, xmm3
// store it in xmm4 for future use.
movaps xmm4, xmm0
}
}
// mulSetpoint. NB: vin should be different as v!! (else don't work).
void mulSetPoint(const CVector &vin, float scale, CVector &vout)
{
__asm
{
mov eax, vin
mov ebx, this
mov edi, vout
// Load in vector in op[0]
movss xmm0, [eax]vin.x
movss xmm1, [eax]vin.y
movss xmm2, [eax]vin.z
// Load scale in op[0]
movss xmm3, scale
// Expand op[0] to op[1], op[2], op[3]
shufps xmm0, xmm0, 0
shufps xmm1, xmm1, 0
shufps xmm2, xmm2, 0
shufps xmm3, xmm3, 0
// Store vertex column in other regs.
movaps xmm5, xmm0
movaps xmm6, xmm1
movaps xmm7, xmm2
// Mul each vector with 3 Matrix column
mulps xmm0, [ebx]this.a11
mulps xmm1, [ebx]this.a12
mulps xmm2, [ebx]this.a13
// Add each column vector.
addps xmm0, xmm1
addps xmm0, xmm2
// Add Matrix translate column vector
addps xmm0, [ebx]this.a14
// mul final result with scale
mulps xmm0, xmm3
// store it in xmm4 for future use.
movaps xmm4, xmm0
}
}
// mulAddvector. NB: vin should be different as v!! (else don't work).
void mulAddVector(const CVector &/* vin */, float scale, CVector &vout)
{
__asm
{
mov ebx, this
mov edi, vout
// Load vin vector loaded in mulSetVector
movaps xmm0, xmm5
movaps xmm1, xmm6
movaps xmm2, xmm7
// Load scale in op[0]
movss xmm3, scale
// Expand op[0] to op[1], op[2], op[3]
shufps xmm3, xmm3, 0
// Mul each vector with 3 Matrix column
mulps xmm0, [ebx]this.a11
mulps xmm1, [ebx]this.a12
mulps xmm2, [ebx]this.a13
// Add each column vector.
addps xmm0, xmm1
addps xmm0, xmm2
// mul final result with scale
mulps xmm0, xmm3
// Add result, with prec sum.
addps xmm0, xmm4
// store it in xmm4 for future use.
movaps xmm4, xmm0
// write the result.
movss [edi]vout.x, xmm0
shufps xmm0, xmm0, 33
movss [edi]vout.y, xmm0
movhlps xmm0, xmm0
movss [edi]vout.z, xmm0
}
}
// mulAddpoint. NB: vin should be different as v!! (else don't work).
void mulAddPoint(const CVector &/* vin */, float scale, CVector &vout)
{
__asm
{
mov ebx, this
mov edi, vout
// Load vin vector loaded in mulSetPoint
movaps xmm0, xmm5
movaps xmm1, xmm6
movaps xmm2, xmm7
// Load scale in op[0]
movss xmm3, scale
// Expand op[0] to op[1], op[2], op[3]
shufps xmm3, xmm3, 0
// Mul each vector with 3 Matrix column
mulps xmm0, [ebx]this.a11
mulps xmm1, [ebx]this.a12
mulps xmm2, [ebx]this.a13
// Add each column vector.
addps xmm0, xmm1
addps xmm0, xmm2
// Add Matrix translate column vector
addps xmm0, [ebx]this.a14
// mul final result with scale
mulps xmm0, xmm3
// Add result, with prec sum.
addps xmm0, xmm4
// store it in xmm4 for future use.
movaps xmm4, xmm0
// write the result.
movss [edi]vout.x, xmm0
shufps xmm0, xmm0, 33
movss [edi]vout.y, xmm0
movhlps xmm0, xmm0
movss [edi]vout.z, xmm0
}
}
};
#else // NL_OS_WINDOWS
/// dummy CMatrix3x4SSE for non windows platform
class CMatrix3x4SSE : public CMatrix3x4 { };
#endif
} // NL3D } // NL3D

View file

@ -1178,9 +1178,6 @@ private:
CPSMultiMap<uint32, CPSLocatedBindable *>::M TLBMap; CPSMultiMap<uint32, CPSLocatedBindable *>::M TLBMap;
TLBMap _LBMap; TLBMap _LBMap;
float _AutoLODStartDistPercent;
uint8 _AutoLODDegradationExponent;
CPSAttribMaker<NLMISC::CRGBA> *_ColorAttenuationScheme; CPSAttribMaker<NLMISC::CRGBA> *_ColorAttenuationScheme;
NLMISC::CRGBA _GlobalColor; NLMISC::CRGBA _GlobalColor;
NLMISC::CRGBA _GlobalColorLighted; NLMISC::CRGBA _GlobalColorLighted;
@ -1206,6 +1203,11 @@ private:
bool _HiddenAtCurrentFrame : 1; bool _HiddenAtCurrentFrame : 1;
bool _HiddenAtPreviousFrame : 1; bool _HiddenAtPreviousFrame : 1;
// The two following members have been moved after the bitfield to workaround a MSVC 64-bit compiler bug (fixed in VS2013)
// For more info, see: http://connect.microsoft.com/VisualStudio/feedback/details/777184/c-compiler-bug-vtable-pointer-put-at-wrong-offset-in-64-bit-mode
float _AutoLODStartDistPercent;
uint8 _AutoLODDegradationExponent;
static bool _SerialIdentifiers; static bool _SerialIdentifiers;
static bool _ForceDisplayBBox; static bool _ForceDisplayBBox;

View file

@ -54,7 +54,7 @@ public:
// The index of the skin rdrPass // The index of the skin rdrPass
uint16 RdrPassIndex; uint16 RdrPassIndex;
// The texture id of the specular texture. This is the sort Key. // The texture id of the specular texture. This is the sort Key.
uint32 SpecId; uintptr_t SpecId;
bool operator<(const CSkinSpecularRdrPass &o) const bool operator<(const CSkinSpecularRdrPass &o) const
{ {

View file

@ -845,8 +845,8 @@ public:
/** /**
* This is the static function which build a UDriver, the root for all 3D functions. * This is the static function which build a UDriver, the root for all 3D functions.
*/ */
static UDriver *createDriver(uint windowIcon = 0, bool direct3d = false, emptyProc exitFunc = 0); static UDriver *createDriver(uintptr_t windowIcon = 0, bool direct3d = false, emptyProc exitFunc = 0);
static UDriver *createDriver(uint windowIcon, TDriver driver, emptyProc exitFunc = 0); static UDriver *createDriver(uintptr_t windowIcon, TDriver driver, emptyProc exitFunc = 0);
/** /**
* Purge static memory * Purge static memory

View file

@ -68,9 +68,7 @@ namespace NLGUI
// special parse // special parse
virtual bool parse(xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual bool parse(xmlNodePtr cur, CInterfaceGroup *parentGroup);
bool handleEvent (const NLGUI::CEventDescriptor &event);
/// Handle all events (implemented by derived classes) (return true to signal event handled)
virtual bool handleEvent (const NLGUI::CEventDescriptor &event);
virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; } virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; }

View file

@ -42,6 +42,7 @@ namespace NLGUI
/// Constructor /// Constructor
CCtrlTextButton(const TCtorParam &param); CCtrlTextButton(const TCtorParam &param);
~CCtrlTextButton();
std::string getProperty( const std::string &name ) const; std::string getProperty( const std::string &name ) const;
void setProperty( const std::string &name, const std::string &value ); void setProperty( const std::string &name, const std::string &value );
@ -123,6 +124,9 @@ namespace NLGUI
REFLECT_LUA_METHOD("getViewText", luaGetViewText) REFLECT_LUA_METHOD("getViewText", luaGetViewText)
REFLECT_EXPORT_END REFLECT_EXPORT_END
void onRemoved();
void onWidgetDeleted( CInterfaceElement *e );
protected: protected:
enum {NumTexture= 3}; enum {NumTexture= 3};

View file

@ -0,0 +1,30 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <string>
namespace NLGUI
{
/// Watches the currently selected GUI widget
class IEditorSelectionWatcher
{
public:
/// Notifies the watcher about the change
virtual void selectionChanged( std::string &newSelection ) = 0;
};
}

View file

@ -70,6 +70,14 @@ namespace NLGUI
{ {
public: public:
/// Watches CInterfaceElement deletions
class IDeletionWatcher
{
public:
IDeletionWatcher(){}
virtual ~IDeletionWatcher(){}
virtual void onDeleted( const std::string &name ){}
};
enum EStrech enum EStrech
{ {
@ -424,6 +432,8 @@ namespace NLGUI
void drawHotSpot(THotSpot hs, NLMISC::CRGBA col); void drawHotSpot(THotSpot hs, NLMISC::CRGBA col);
void drawHighlight();
// Returns 'true' if that element can be downcasted to a view // Returns 'true' if that element can be downcasted to a view
virtual bool isView() const { return false; } virtual bool isView() const { return false; }
@ -473,6 +483,7 @@ namespace NLGUI
bool isInGroup( CInterfaceGroup *group ); bool isInGroup( CInterfaceGroup *group );
static void setEditorMode( bool b ){ editorMode = b; } static void setEditorMode( bool b ){ editorMode = b; }
static bool getEditorMode(){ return editorMode; }
void setEditorSelected( bool b ){ editorSelected = b; } void setEditorSelected( bool b ){ editorSelected = b; }
bool isEditorSelected() const{ return editorSelected; } bool isEditorSelected() const{ return editorSelected; }
@ -483,6 +494,19 @@ namespace NLGUI
void setSerializable( bool b ){ serializable = b; } void setSerializable( bool b ){ serializable = b; }
bool IsSerializable() const{ return serializable; } bool IsSerializable() const{ return serializable; }
/// Called when the widget is removed from it's parent group
virtual void onRemoved(){}
/// Registers a deletion watcher
static void registerDeletionWatcher( IDeletionWatcher *watcher );
/// Unregisters a deletion watcher
static void unregisterDeletionWatcher( IDeletionWatcher *watcher );
/// Called when the widget is deleted,
/// so other widgets in the group can check if it belongs to them
virtual void onWidgetDeleted( CInterfaceElement *e ){}
protected: protected:
bool editorSelected; bool editorSelected;
@ -543,6 +567,11 @@ namespace NLGUI
void parseSizeRef(const char *sizeRefStr, sint32 &sizeref, sint32 &sizeDivW, sint32 &sizeDivH); void parseSizeRef(const char *sizeRefStr, sint32 &sizeref, sint32 &sizeDivW, sint32 &sizeDivH);
private: private:
/// Notifies the deletion watchers that this interface element is being deleted
void notifyDeletionWatchers();
static std::vector< IDeletionWatcher* > deletionWatchers;
//void snapSize(); //void snapSize();
bool serializable; bool serializable;

View file

@ -322,6 +322,8 @@ namespace NLGUI
// Return the current Depth, with no ZBias applied. // Return the current Depth, with no ZBias applied.
float getDepthForZSort() const { return _DepthForZSort; } float getDepthForZSort() const { return _DepthForZSort; }
void onWidgetDeleted( CInterfaceElement *e );
protected: protected:
void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH); void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH);

View file

@ -382,6 +382,7 @@ namespace NLGUI
bool serializeProcs( xmlNodePtr parentNode ) const; bool serializeProcs( xmlNodePtr parentNode ) const;
bool serializePointerSettings( xmlNodePtr parentNode ) const; bool serializePointerSettings( xmlNodePtr parentNode ) const;
bool serializeKeySettings( xmlNodePtr parentNode ) const; bool serializeKeySettings( xmlNodePtr parentNode ) const;
CViewBase* createClass( const std::string &name );
}; };
} }

View file

@ -27,6 +27,7 @@
namespace NLGUI namespace NLGUI
{ {
class CInterfaceElement; class CInterfaceElement;
class CViewBase;
class CInterfaceGroup; class CInterfaceGroup;
class CInterfaceAnim; class CInterfaceAnim;
class CCtrlSheetSelection; class CCtrlSheetSelection;
@ -86,6 +87,7 @@ namespace NLGUI
virtual bool serializeProcs( xmlNodePtr parentNode ) const = 0; virtual bool serializeProcs( xmlNodePtr parentNode ) const = 0;
virtual bool serializePointerSettings( xmlNodePtr parentNode ) const = 0; virtual bool serializePointerSettings( xmlNodePtr parentNode ) const = 0;
virtual bool serializeKeySettings( xmlNodePtr parentNode ) const = 0; virtual bool serializeKeySettings( xmlNodePtr parentNode ) const = 0;
virtual CViewBase* createClass( const std::string &name ) = 0;
}; };
} }

View file

@ -25,6 +25,7 @@
namespace NLGUI namespace NLGUI
{ {
class CEventDescriptor;
class CViewBase : public CInterfaceElement class CViewBase : public CInterfaceElement
{ {
@ -77,6 +78,9 @@ namespace NLGUI
// special for mouse over : return true and fill the name of the cursor to display // special for mouse over : return true and fill the name of the cursor to display
virtual bool getMouseOverShape(std::string &/* texName */, uint8 &/* rot */, NLMISC::CRGBA &/* col */) { return false; } virtual bool getMouseOverShape(std::string &/* texName */, uint8 &/* rot */, NLMISC::CRGBA &/* col */) { return false; }
/// Handle all events (implemented by derived classes) (return true to signal event handled)
virtual bool handleEvent (const NLGUI::CEventDescriptor &evnt);
}; };
} }

View file

@ -59,6 +59,8 @@ namespace NLGUI
/// get buttons state /// get buttons state
NLMISC::TMouseButton getButtonState() const { return _Buttons; } NLMISC::TMouseButton getButtonState() const { return _Buttons; }
static const sint32 InvalidCoord = 0x80000000;
protected: protected:
// (x,y) is from the TopLeft corner of the window // (x,y) is from the TopLeft corner of the window
sint32 _PointerX; // Current pointer position (raw, before snapping) sint32 _PointerX; // Current pointer position (raw, before snapping)

View file

@ -0,0 +1,32 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef WIDGET_ADD_WATCHER
#define WIDGET_ADD_WATCHER
#include <string>
namespace NLGUI
{
class IWidgetAdditionWatcher
{
public:
virtual void widgetAdded( const std::string &name ) = 0;
};
}
#endif

View file

@ -47,6 +47,8 @@ namespace NLGUI
class CInterfaceOptions; class CInterfaceOptions;
class CInterfaceAnim; class CInterfaceAnim;
class CProcedure; class CProcedure;
class IEditorSelectionWatcher;
class IWidgetAdditionWatcher;
/** /**
GUI Widget Manager GUI Widget Manager
@ -341,6 +343,7 @@ namespace NLGUI
/** /**
* Capture * Capture
*/ */
CViewBase *getCapturedView(){ return _CapturedView; }
CCtrlBase *getCapturePointerLeft() { return _CapturePointerLeft; } CCtrlBase *getCapturePointerLeft() { return _CapturePointerLeft; }
CCtrlBase *getCapturePointerRight() { return _CapturePointerRight; } CCtrlBase *getCapturePointerRight() { return _CapturePointerRight; }
CCtrlBase *getCaptureKeyboard() { return _CaptureKeyboard; } CCtrlBase *getCaptureKeyboard() { return _CaptureKeyboard; }
@ -484,7 +487,17 @@ namespace NLGUI
IParser* getParser() const{ return parser; } IParser* getParser() const{ return parser; }
std::string& getCurrentEditorSelection(){ return currentEditorSelection; }
void setCurrentEditorSelection( const std::string &name ); void setCurrentEditorSelection( const std::string &name );
void notifySelectionWatchers();
void registerSelectionWatcher( IEditorSelectionWatcher *watcher );
void unregisterSelectionWatcher( IEditorSelectionWatcher *watcher );
void notifyAdditionWatchers( const std::string &widgetName );
void registerAdditionWatcher( IWidgetAdditionWatcher *watcher );
void unregisterAdditionWatcher( IWidgetAdditionWatcher *watcher );
CInterfaceElement* addWidgetToGroup( std::string &group, std::string &widgetClass, std::string &widgetName );
private: private:
CWidgetManager(); CWidgetManager();
@ -511,6 +524,8 @@ namespace NLGUI
NLMISC::CRefPtr<CCtrlBase> _CapturePointerLeft; NLMISC::CRefPtr<CCtrlBase> _CapturePointerLeft;
NLMISC::CRefPtr<CCtrlBase> _CapturePointerRight; NLMISC::CRefPtr<CCtrlBase> _CapturePointerRight;
NLMISC::CRefPtr< CViewBase > _CapturedView;
// What is under pointer // What is under pointer
std::vector< CViewBase* > _ViewsUnderPointer; std::vector< CViewBase* > _ViewsUnderPointer;
std::vector< CCtrlBase* > _CtrlsUnderPointer; std::vector< CCtrlBase* > _CtrlsUnderPointer;
@ -567,6 +582,9 @@ namespace NLGUI
std::vector< INewScreenSizeHandler* > newScreenSizeHandlers; std::vector< INewScreenSizeHandler* > newScreenSizeHandlers;
std::vector< IOnWidgetsDrawnHandler* > onWidgetsDrawnHandlers; std::vector< IOnWidgetsDrawnHandler* > onWidgetsDrawnHandlers;
std::vector< IEditorSelectionWatcher* > selectionWatchers;
std::vector< IWidgetAdditionWatcher* > additionWatchers;
std::string currentEditorSelection; std::string currentEditorSelection;
}; };

View file

@ -34,7 +34,9 @@
#include "events.h" #include "events.h"
#include "rect.h" #include "rect.h"
#include "game_device.h" #include "game_device.h"
#define NOMINMAX #ifndef NL_COMP_MINGW
# define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#include <dinput.h> #include <dinput.h>
@ -101,7 +103,7 @@ public:
* \param we A windows eventsemitter. Can be NULL. Needed if you want to mix WIN32 events and Direct Input events * \param we A windows eventsemitter. Can be NULL. Needed if you want to mix WIN32 events and Direct Input events
* (for example, a Direct Input Mouse and a Win32 Keyboard) * (for example, a Direct Input Mouse and a Win32 Keyboard)
*/ */
static CDIEventEmitter *create(HINSTANCE hinst, HWND hwnd, CWinEventEmitter *we); static CDIEventEmitter *create(HINSTANCE hinst, HWND hwnd, CWinEventEmitter *we) throw(EDirectInput);
~CDIEventEmitter(); ~CDIEventEmitter();
public: public:

View file

@ -53,7 +53,8 @@ public:
uint getNumAllocatedBlocks() const { return _NumAlloc; } uint getNumAllocatedBlocks() const { return _NumAlloc; }
private: private:
class CChunk; class CChunk;
class CNode
class NL_ALIGN(NL_DEFAULT_MEMORY_ALIGNMENT) CNode
{ {
public: public:
CChunk *Chunk; // the Chunk this node belongs to. CChunk *Chunk; // the Chunk this node belongs to.

View file

@ -74,7 +74,7 @@
namespace NLMISC namespace NLMISC
{ {
#ifdef NL_OS_WINDOWS #ifdef NL_COMP_VC
// Visual C++ warning : ebp maybe modified // Visual C++ warning : ebp maybe modified
# pragma warning(disable:4731) # pragma warning(disable:4731)
#endif #endif

View file

@ -220,7 +220,7 @@ private:
static TOldWinProcMap _OldWinProcMap; static TOldWinProcMap _OldWinProcMap;
bool initInternal(HINSTANCE hInstance, HWND ownerWindow, uint32 localId, uint32 foreignId = NULL); bool initInternal(HINSTANCE hInstance, HWND ownerWindow, uint32 localId, uint32 foreignId = 0);
private: private:
static LRESULT CALLBACK listenerProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK listenerProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

View file

@ -53,7 +53,8 @@ class CPlane;
* \author Nevrax France * \author Nevrax France
* \date 2000 * \date 2000
*/ */
class CMatrix
class NL_ALIGN_SSE2 CMatrix
{ {
public: public:
/// Rotation Order. /// Rotation Order.

View file

@ -29,6 +29,12 @@
# endif // NLMISC_HEAP_ALLOCATION_NDEBUG # endif // NLMISC_HEAP_ALLOCATION_NDEBUG
#endif // NL_USE_DEFAULT_MEMORY_MANAGER #endif // NL_USE_DEFAULT_MEMORY_MANAGER
#ifndef NL_OV_USE_NEW_ALLOCATOR
# ifdef NL_HAS_SSE2
# define NL_OV_USE_NEW_ALLOCATOR
# endif // NL_HAS_SSE2
#endif // NL_OV_USE_NEW_ALLOCATOR
namespace NLMISC { namespace NLMISC {

View file

@ -86,6 +86,10 @@
# define NL_COMP_VC_VERSION 60 # define NL_COMP_VC_VERSION 60
# define NL_COMP_NEED_PARAM_ON_METHOD # define NL_COMP_NEED_PARAM_ON_METHOD
# endif # endif
# elif defined(__MINGW32__)
# define NL_COMP_MINGW
# define NL_COMP_GCC
# define NL_NO_ASM
# endif # endif
# if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack or later # if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack or later
# define NL_ISO_STDTR1_AVAILABLE # define NL_ISO_STDTR1_AVAILABLE
@ -93,9 +97,13 @@
# define NL_ISO_STDTR1_NAMESPACE std::tr1 # define NL_ISO_STDTR1_NAMESPACE std::tr1
# endif # endif
# ifdef _DEBUG # ifdef _DEBUG
# ifndef NL_DEBUG
# define NL_DEBUG # define NL_DEBUG
# endif
# elif defined (NDEBUG) # elif defined (NDEBUG)
# ifndef NL_RELEASE
# define NL_RELEASE # define NL_RELEASE
# endif
# else # else
# error "Don't know the compilation mode" # error "Don't know the compilation mode"
# endif # endif
@ -109,7 +117,9 @@
# define _WIN32_WINNT 0x0600 // force VISTA minimal version in 64 bits # define _WIN32_WINNT 0x0600 // force VISTA minimal version in 64 bits
# endif # endif
// define NOMINMAX to be sure that windows includes will not define min max macros, but instead, use the stl template // define NOMINMAX to be sure that windows includes will not define min max macros, but instead, use the stl template
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
#else #else
# ifdef __APPLE__ # ifdef __APPLE__
# define NL_OS_MAC # define NL_OS_MAC
@ -142,7 +152,7 @@
// //
// NL_ISO_TEMPLATE_SPEC can be used in front of an instanciated class-template member data definition, // NL_ISO_TEMPLATE_SPEC can be used in front of an instanciated class-template member data definition,
// because sometimes MSVC++ 6 produces an error C2908 with a definition with template <>. // because sometimes MSVC++ 6 produces an error C2908 with a definition with template <>.
#if defined(NL_OS_WINDOWS) || (defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ <= 3))) #if defined(NL_COMP_VC) || (defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ <= 3)))
# define NL_ISO_SYNTAX 0 # define NL_ISO_SYNTAX 0
# define NL_ISO_TEMPLATE_SPEC # define NL_ISO_TEMPLATE_SPEC
#else #else
@ -328,6 +338,57 @@ typedef unsigned int uint; // at least 32bits (depend of processor)
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
// #ifdef NL_ENABLE_FORCE_INLINE
# ifdef NL_COMP_VC
# define NL_FORCE_INLINE __forceinline
# elif defined(NL_COMP_GCC)
# define NL_FORCE_INLINE inline __attribute__((always_inline))
# else
# define NL_FORCE_INLINE inline
# endif
// #else
// # define NL_FORCE_INLINE inline
// #endif
#ifdef NL_COMP_VC
#define NL_ALIGN(nb) __declspec(align(nb))
#else
#define NL_ALIGN(nb) __attribute__((aligned(nb)))
#endif
#ifdef NL_OS_WINDOWS
#include <stdlib.h>
#include <intrin.h>
#include <malloc.h>
inline void *aligned_malloc(size_t size, size_t alignment) { return _aligned_malloc(size, alignment); }
inline void aligned_free(void *ptr) { _aligned_free(ptr); }
#else
#include <malloc.h>
inline void *aligned_malloc(size_t size, size_t alignment) { return memalign(alignment, size); }
inline void aligned_free(void *ptr) { free(ptr); }
#endif /* NL_COMP_ */
#ifdef NL_HAS_SSE2
#define NL_DEFAULT_MEMORY_ALIGNMENT 16
#define NL_ALIGN_SSE2 NL_ALIGN(NL_DEFAULT_MEMORY_ALIGNMENT)
extern void *operator new(size_t size) throw(std::bad_alloc);
extern void *operator new[](size_t size) throw(std::bad_alloc);
extern void operator delete(void *p) throw();
extern void operator delete[](void *p) throw();
#else /* NL_HAS_SSE2 */
#define NL_DEFAULT_MEMORY_ALIGNMENT 4
#define NL_ALIGN_SSE2
#endif /* NL_HAS_SSE2 */
// CHashMap, CHashSet and CHashMultiMap definitions // CHashMap, CHashSet and CHashMultiMap definitions
#if defined(_STLPORT_VERSION) // STLport detected #if defined(_STLPORT_VERSION) // STLport detected
# include <hash_map> # include <hash_map>
@ -388,8 +449,8 @@ typedef uint16 ucchar;
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234) // To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)
#ifdef NL_OS_WINDOWS #ifdef NL_COMP_VC
# if defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 80) # if (NL_COMP_VC_VERSION >= 80)
# define INT64_CONSTANT(c) (c##LL) # define INT64_CONSTANT(c) (c##LL)
# define SINT64_CONSTANT(c) (c##LL) # define SINT64_CONSTANT(c) (c##LL)
# define UINT64_CONSTANT(c) (c##LL) # define UINT64_CONSTANT(c) (c##LL)

View file

@ -22,7 +22,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX #ifndef NL_COMP_MINGW
# define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#include "displayer.h" #include "displayer.h"

View file

@ -50,10 +50,10 @@ public:
virtual ~CBufSock(); virtual ~CBufSock();
/// Sets the application identifier /// Sets the application identifier
void setAppId( uint64 id ) { _AppId = id; } void setAppId( uintptr_t id ) { _AppId = id; }
/// Returns the application identifier /// Returns the application identifier
uint64 appId() const { return _AppId; } uintptr_t appId() const { return _AppId; }
/// Returns a string with the characteristics of the object /// Returns a string with the characteristics of the object
std::string asString() const; std::string asString() const;
@ -256,7 +256,7 @@ private:
NLMISC::CObjectVector<uint8> _ReadyToSendBuffer; NLMISC::CObjectVector<uint8> _ReadyToSendBuffer;
TBlockSize _RTSBIndex; TBlockSize _RTSBIndex;
uint64 _AppId; uintptr_t _AppId;
// Connected state (from the user's point of view, i.e. changed when the connection/disconnection event is at the front of the receive queue) // Connected state (from the user's point of view, i.e. changed when the connection/disconnection event is at the front of the receive queue)
bool _ConnectedState; bool _ConnectedState;

View file

@ -34,8 +34,8 @@ extern uint16 gScreenHeight;
class NeLDriver { class NeLDriver {
public: public:
NeLDriver(NL3D::UDriver *driver) { m_Driver=driver; } NeLDriver(NL3D::UDriver *driver):m_Driver(driver), m_TextContext(NULL), m_Scene(NULL) { }
virtual ~NeLDriver() { ; } virtual ~NeLDriver() { }
void init(); void init();
void update(); void update();

View file

@ -38,7 +38,9 @@
#include "nel/3d/event_mouse_listener.h" #include "nel/3d/event_mouse_listener.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
@ -360,7 +362,7 @@ int main()
} }
++itAcc; ++itAcc;
} }
if ((vCluster.size() == 0) && (DispCS[0].pIG == pCurIG)) if (vCluster.empty() && (DispCS[0].pIG == pCurIG))
{ {
vCluster.push_back (pClipTrav->RootCluster); vCluster.push_back (pClipTrav->RootCluster);
} }

View file

@ -30,7 +30,9 @@
#include "nel/3d/driver_user.h" #include "nel/3d/driver_user.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
#define NOMINMAX #define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -47,7 +47,7 @@ CConfiguration::~CConfiguration()
void CConfiguration::init() void CConfiguration::init()
{ {
// verify data // verify data
nlassert(!m_ConfigCallbacks.size()); nlassert(m_ConfigCallbacks.empty());
// load config // load config
m_ConfigFile.load(NLQT_CONFIG_FILE); m_ConfigFile.load(NLQT_CONFIG_FILE);

View file

@ -29,7 +29,9 @@
#include <nel/3d/u_instance.h> #include <nel/3d/u_instance.h>
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
#define NOMINMAX #define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -14,7 +14,9 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef __GNUC__ #include "nel/misc/types_nl.h"
#ifndef NL_OS_WINDOWS
#include "kbhit.h" #include "kbhit.h"
#include <termios.h> #include <termios.h>
#include <unistd.h> // for read() #include <unistd.h> // for read()

View file

@ -24,7 +24,9 @@
#include "nel/net/callback_server.h" #include "nel/net/callback_server.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -37,7 +37,9 @@
#include "nel/net/transport_class.h" #include "nel/net/transport_class.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -37,7 +37,9 @@
#include "nel/net/transport_class.h" #include "nel/net/transport_class.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -34,7 +34,9 @@
#include "nel/net/login_server.h" #include "nel/net/login_server.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -43,7 +43,9 @@
#include "receive_task.h" #include "receive_task.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -18,7 +18,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#elif defined NL_OS_UNIX #elif defined NL_OS_UNIX

View file

@ -143,11 +143,13 @@ void CComputedString::render2D (IDriver& driver,
/*------------------------------------------------------------------*\ /*------------------------------------------------------------------*\
render3D() render3D()
\*------------------------------------------------------------------*/ \*------------------------------------------------------------------*/
void CComputedString::render3D (IDriver& driver,CMatrix matrix,THotSpot hotspot) void CComputedString::render3D (IDriver& driver, const CMatrix &matrixp, THotSpot hotspot)
{ {
if (Vertices.getNumVertices() == 0) if (Vertices.getNumVertices() == 0)
return; return;
CMatrix matrix = matrixp;
// get window size // get window size
uint32 wndWidth, wndHeight; uint32 wndWidth, wndHeight;
driver.getWindowSize(wndWidth, wndHeight); driver.getWindowSize(wndWidth, wndHeight);

View file

@ -10,7 +10,7 @@ NL_DEFAULT_PROPS(nel_drv_direct3d_win "NeL, Driver, Video: Direct3D")
NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win) NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win)
NL_ADD_LIB_SUFFIX(nel_drv_direct3d_win) NL_ADD_LIB_SUFFIX(nel_drv_direct3d_win)
ADD_DEFINITIONS(/Ddriver_direct3d_EXPORTS) ADD_DEFINITIONS(-DRIVER_DIRECT3D_EXPORTS)
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp)

View file

@ -110,6 +110,10 @@ IDriver* createD3DDriverInstance ()
#else #else
#ifdef NL_COMP_MINGW
extern "C"
{
#endif
__declspec(dllexport) IDriver* NL3D_createIDriverInstance () __declspec(dllexport) IDriver* NL3D_createIDriverInstance ()
{ {
return new CDriverD3D; return new CDriverD3D;
@ -119,7 +123,9 @@ __declspec(dllexport) uint32 NL3D_interfaceVersion ()
{ {
return IDriver::InterfaceVersion; return IDriver::InterfaceVersion;
} }
#ifdef NL_COMP_MINGW
}
#endif
#endif #endif
/*static*/ bool CDriverD3D::_CacheTest[CacheTest_Count] = /*static*/ bool CDriverD3D::_CacheTest[CacheTest_Count] =
@ -379,7 +385,7 @@ void CDriverD3D::resetRenderVariables()
} }
for (i=0; i<MaxTexture; i++) for (i=0; i<MaxTexture; i++)
{ {
if ((uint32)(_TexturePtrStateCache[i].Texture) != 0xcccccccc) if ((uintptr_t)(_TexturePtrStateCache[i].Texture) != 0xcccccccc)
{ {
touchRenderVariable (&(_TexturePtrStateCache[i])); touchRenderVariable (&(_TexturePtrStateCache[i]));
// reset texture because it may reference an old render target // reset texture because it may reference an old render target
@ -419,7 +425,7 @@ void CDriverD3D::resetRenderVariables()
for (i=0; i<MaxLight; i++) for (i=0; i<MaxLight; i++)
{ {
if (*(uint32*)(&(_LightCache[i].Light)) != 0xcccccccc) if (*(uintptr_t*)(&(_LightCache[i].Light)) != 0xcccccccc)
{ {
_LightCache[i].EnabledTouched = true; _LightCache[i].EnabledTouched = true;
touchRenderVariable (&(_LightCache[i])); touchRenderVariable (&(_LightCache[i]));
@ -514,7 +520,7 @@ void CDriverD3D::initRenderVariables()
for (i=0; i<MaxTexture; i++) for (i=0; i<MaxTexture; i++)
{ {
_TexturePtrStateCache[i].StageID = i; _TexturePtrStateCache[i].StageID = i;
*(uint32*)&(_TexturePtrStateCache[i].Texture) = 0xcccccccc; *(uintptr_t*)&(_TexturePtrStateCache[i].Texture) = 0xcccccccc;
_TexturePtrStateCache[i].Modified = false; _TexturePtrStateCache[i].Modified = false;
} }
for (i=0; i<MaxSampler; i++) for (i=0; i<MaxSampler; i++)
@ -543,7 +549,7 @@ void CDriverD3D::initRenderVariables()
for (i=0; i<MaxLight; ++i) for (i=0; i<MaxLight; ++i)
{ {
_LightCache[i].LightIndex = uint8(i); _LightCache[i].LightIndex = uint8(i);
*(uint32*)&(_LightCache[i].Light) = 0xcccccccc; *(uintptr_t*)&(_LightCache[i].Light) = 0xcccccccc;
_LightCache[i].Modified = false; _LightCache[i].Modified = false;
} }
_VertexProgramCache.Modified = false; _VertexProgramCache.Modified = false;
@ -1063,7 +1069,7 @@ void CDriverD3D::updateRenderVariablesInternal()
// *************************************************************************** // ***************************************************************************
static void D3DWndProc(CDriverD3D *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) void D3DWndProc(CDriverD3D *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
H_AUTO_D3D(D3DWndProc); H_AUTO_D3D(D3DWndProc);
@ -1231,7 +1237,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
// *************************************************************************** // ***************************************************************************
bool CDriverD3D::init (uint windowIcon, emptyProc exitFunc) bool CDriverD3D::init (uintptr_t windowIcon, emptyProc exitFunc)
{ {
H_AUTO_D3D(CDriver3D_init ); H_AUTO_D3D(CDriver3D_init );
@ -1464,6 +1470,24 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r
return false; return false;
} }
#if WITH_PERFHUD
// Look for 'NVIDIA PerfHUD' adapter
// If it is present, override default settings
for (UINT gAdapter=0;gAdapter<_D3D->GetAdapterCount();gAdapter++)
{
D3DADAPTER_IDENTIFIER9 Identifier;
HRESULT Res;
Res = _D3D->GetAdapterIdentifier(gAdapter,0,&Identifier);
if (strstr(Identifier.Description,"PerfHUD") != 0)
{
nlinfo ("Setting up with PerfHUD");
adapter=gAdapter;
_Rasterizer=D3DDEVTYPE_REF;
break;
}
}
#endif /* WITH_PERFHUD */
// Create the D3D device // Create the D3D device
HRESULT result = _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING|D3DCREATE_PUREDEVICE, &parameters, &_DeviceInterface); HRESULT result = _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING|D3DCREATE_PUREDEVICE, &parameters, &_DeviceInterface);
if (result != D3D_OK) if (result != D3D_OK)
@ -1487,6 +1511,8 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r
} }
} }
// _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &parameters, &_DeviceInterface); // _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &parameters, &_DeviceInterface);
// Check some caps // Check some caps
@ -2635,6 +2661,7 @@ bool CDriverD3D::reset (const GfxMode& mode)
#ifndef NL_NO_ASM #ifndef NL_NO_ASM
CFpuRestorer fpuRestorer; // fpu control word is changed by "Reset" CFpuRestorer fpuRestorer; // fpu control word is changed by "Reset"
#endif #endif
if (_Rasterizer!=D3DDEVTYPE_REF) {
HRESULT hr = _DeviceInterface->Reset (&parameters); HRESULT hr = _DeviceInterface->Reset (&parameters);
if (hr != D3D_OK) if (hr != D3D_OK)
{ {
@ -2644,6 +2671,7 @@ bool CDriverD3D::reset (const GfxMode& mode)
return false; return false;
} }
} }
}
_Lost = false; _Lost = false;
// BeginScene now // BeginScene now

View file

@ -1,2 +1,4 @@
EXPORTS NL3D_createIDriverInstance LIBRARY nel_drv_direct3d_win_r
EXPORTS NL3D_interfaceVersion EXPORTS
NL3D_createIDriverInstance
NL3D_interfaceVersion

View file

@ -839,7 +839,7 @@ public:
// *************************************************************************** // ***************************************************************************
// Mode initialisation, requests // Mode initialisation, requests
virtual bool init (uint windowIcon = 0, emptyProc exitFunc = 0); virtual bool init (uintptr_t windowIcon = 0, emptyProc exitFunc = 0);
virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay); virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay);
virtual bool release(); virtual bool release();
virtual bool setMode(const GfxMode& mode); virtual bool setMode(const GfxMode& mode);
@ -953,7 +953,7 @@ public:
virtual void setSwapVBLInterval(uint interval); virtual void setSwapVBLInterval(uint interval);
virtual uint getSwapVBLInterval(); virtual uint getSwapVBLInterval();
virtual void swapTextureHandle(ITexture &tex0, ITexture &tex1); virtual void swapTextureHandle(ITexture &tex0, ITexture &tex1);
virtual uint getTextureHandle(const ITexture&tex); virtual uintptr_t getTextureHandle(const ITexture&tex);
// Matrix, viewport and frustum // Matrix, viewport and frustum
virtual void setFrustum(float left, float right, float bottom, float top, float znear, float zfar, bool perspective = true); virtual void setFrustum(float left, float right, float bottom, float top, float znear, float zfar, bool perspective = true);
@ -1893,7 +1893,7 @@ public:
H_AUTO_D3D(CDriverD3D_setSamplerState); H_AUTO_D3D(CDriverD3D_setSamplerState);
nlassert (_DeviceInterface); nlassert (_DeviceInterface);
nlassert (sampler<MaxSampler); nlassert (sampler<MaxSampler);
nlassert (samplerState<MaxSamplerState); nlassert ((int)samplerState<(int)MaxSamplerState);
// Ref on the state // Ref on the state
CSamplerState &_samplerState = _SamplerStateCache[sampler][samplerState]; CSamplerState &_samplerState = _SamplerStateCache[sampler][samplerState];
@ -2025,7 +2025,7 @@ public:
// Remap high matrices indexes // Remap high matrices indexes
type = (D3DTRANSFORMSTATETYPE)remapMatrixIndex (type); type = (D3DTRANSFORMSTATETYPE)remapMatrixIndex (type);
nlassert (type<MaxMatrixState); nlassert ((int)type<(int)MaxMatrixState);
CMatrixState &theMatrix = _MatrixCache[type]; CMatrixState &theMatrix = _MatrixCache[type];
#ifdef NL_D3D_USE_RENDER_STATE_CACHE #ifdef NL_D3D_USE_RENDER_STATE_CACHE

View file

@ -46,7 +46,7 @@ CIBDrvInfosD3D::CIBDrvInfosD3D(CDriverD3D *drv, ItIBDrvInfoPtrList it, CIndexBuf
// *************************************************************************** // ***************************************************************************
extern uint indexCount=0; uint indexCount=0;
CIBDrvInfosD3D::~CIBDrvInfosD3D() CIBDrvInfosD3D::~CIBDrvInfosD3D()
{ {

View file

@ -1091,7 +1091,7 @@ void CDriverD3D::swapTextureHandle(ITexture &tex0, ITexture &tex1)
// *************************************************************************** // ***************************************************************************
uint CDriverD3D::getTextureHandle(const ITexture &tex) uintptr_t CDriverD3D::getTextureHandle(const ITexture &tex)
{ {
H_AUTO_D3D(CDriverD3D_getTextureHandle) H_AUTO_D3D(CDriverD3D_getTextureHandle)
// If DrvShare not setuped // If DrvShare not setuped
@ -1104,7 +1104,7 @@ uint CDriverD3D::getTextureHandle(const ITexture &tex)
if(!d3dtext) if(!d3dtext)
return 0; return 0;
return (uint)(d3dtext->Texture); return (uintptr_t)(d3dtext->Texture);
} }
// *************************************************************************** // ***************************************************************************

View file

@ -59,7 +59,7 @@ CVBDrvInfosD3D::CVBDrvInfosD3D(CDriverD3D *drv, ItVBDrvInfoPtrList it, CVertexBu
// *************************************************************************** // ***************************************************************************
extern uint vertexCount=0; uint vertexCount=0;
CVBDrvInfosD3D::~CVBDrvInfosD3D() CVBDrvInfosD3D::~CVBDrvInfosD3D()
{ {
@ -173,7 +173,7 @@ uint8 *CVBDrvInfosD3D::lock (uint begin, uint end, bool readOnly)
void *pbData; void *pbData;
if (VertexBuffer->Lock ( begin, end-begin, &pbData, readOnly?D3DLOCK_READONLY:0) != D3D_OK) if (VertexBuffer->Lock ( begin, end-begin, &pbData, readOnly?D3DLOCK_READONLY:0) != D3D_OK)
return false; return NULL;
// Lock Profile? // Lock Profile?
if(driver->_VBHardProfiling /*&& Hardware*/) if(driver->_VBHardProfiling /*&& Hardware*/)

View file

@ -19,7 +19,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#endif #endif

View file

@ -37,7 +37,7 @@ NL_ADD_RUNTIME_FLAGS(${NLDRV_OGL_LIB})
IF(WIN32) IF(WIN32)
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
ADD_DEFINITIONS(/DDRIVER_OPENGL_EXPORTS) ADD_DEFINITIONS(-DDRIVER_OPENGL_EXPORTS)
ENDIF(WIN32) ENDIF(WIN32)
IF(APPLE) IF(APPLE)

View file

@ -6,7 +6,7 @@ extern "C" {
#endif #endif
/* /*
** Copyright (c) 2013 The Khronos Group Inc. ** Copyright (c) 2013-2014 The Khronos Group Inc.
** **
** Permission is hereby granted, free of charge, to any person obtaining a ** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the ** copy of this software and/or associated documentation files (the
@ -33,7 +33,7 @@ extern "C" {
** used to make the header, and the header can be found at ** used to make the header, and the header can be found at
** http://www.opengl.org/registry/ ** http://www.opengl.org/registry/
** **
** Khronos $Revision: 23855 $ on $Date: 2013-11-02 22:54:48 -0700 (Sat, 02 Nov 2013) $ ** Khronos $Revision: 26290 $ on $Date: 2014-04-16 05:35:38 -0700 (Wed, 16 Apr 2014) $
*/ */
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
@ -53,7 +53,7 @@ extern "C" {
#define GLAPI extern #define GLAPI extern
#endif #endif
#define GL_GLEXT_VERSION 20131102 #define GL_GLEXT_VERSION 20140416
/* Generated C header for: /* Generated C header for:
* API: gl * API: gl
@ -1485,7 +1485,7 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum atta
typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
#ifdef GL_GLEXT_PROTOTYPES #ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
@ -1505,7 +1505,7 @@ GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLui
GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask); GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
#endif #endif
#endif /* GL_VERSION_3_2 */ #endif /* GL_VERSION_3_2 */
@ -2144,6 +2144,10 @@ GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data)
#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F #define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
@ -2432,6 +2436,7 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum
#define GL_VERTEX_BINDING_STRIDE 0x82D8 #define GL_VERTEX_BINDING_STRIDE 0x82D8
#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 #define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA #define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
#define GL_VERTEX_BINDING_BUFFER 0x8F4F
#define GL_DISPLAY_LIST 0x82E7 #define GL_DISPLAY_LIST 0x82E7
typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
@ -4799,6 +4804,109 @@ GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRG
#endif #endif
#endif /* GL_AMD_draw_buffers_blend */ #endif /* GL_AMD_draw_buffers_blend */
#ifndef GL_AMD_gpu_shader_int64
#define GL_AMD_gpu_shader_int64 1
typedef int64_t GLint64EXT;
#define GL_INT64_NV 0x140E
#define GL_UNSIGNED_INT64_NV 0x140F
#define GL_INT8_NV 0x8FE0
#define GL_INT8_VEC2_NV 0x8FE1
#define GL_INT8_VEC3_NV 0x8FE2
#define GL_INT8_VEC4_NV 0x8FE3
#define GL_INT16_NV 0x8FE4
#define GL_INT16_VEC2_NV 0x8FE5
#define GL_INT16_VEC3_NV 0x8FE6
#define GL_INT16_VEC4_NV 0x8FE7
#define GL_INT64_VEC2_NV 0x8FE9
#define GL_INT64_VEC3_NV 0x8FEA
#define GL_INT64_VEC4_NV 0x8FEB
#define GL_UNSIGNED_INT8_NV 0x8FEC
#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
#define GL_UNSIGNED_INT16_NV 0x8FF0
#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
#define GL_FLOAT16_NV 0x8FF8
#define GL_FLOAT16_VEC2_NV 0x8FF9
#define GL_FLOAT16_VEC3_NV 0x8FFA
#define GL_FLOAT16_VEC4_NV 0x8FFB
typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#endif
#endif /* GL_AMD_gpu_shader_int64 */
#ifndef GL_AMD_interleaved_elements #ifndef GL_AMD_interleaved_elements
#define GL_AMD_interleaved_elements 1 #define GL_AMD_interleaved_elements 1
#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4 #define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
@ -4836,6 +4944,20 @@ GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
#endif #endif
#endif /* GL_AMD_name_gen_delete */ #endif /* GL_AMD_name_gen_delete */
#ifndef GL_AMD_occlusion_query_event
#define GL_AMD_occlusion_query_event 1
#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF
typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);
#endif
#endif /* GL_AMD_occlusion_query_event */
#ifndef GL_AMD_performance_monitor #ifndef GL_AMD_performance_monitor
#define GL_AMD_performance_monitor 1 #define GL_AMD_performance_monitor 1
#define GL_COUNTER_TYPE_AMD 0x8BC0 #define GL_COUNTER_TYPE_AMD 0x8BC0
@ -4947,6 +5069,11 @@ GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);
#define GL_AMD_transform_feedback3_lines_triangles 1 #define GL_AMD_transform_feedback3_lines_triangles 1
#endif /* GL_AMD_transform_feedback3_lines_triangles */ #endif /* GL_AMD_transform_feedback3_lines_triangles */
#ifndef GL_AMD_transform_feedback4
#define GL_AMD_transform_feedback4 1
#define GL_STREAM_RASTERIZATION_AMD 0x91A0
#endif /* GL_AMD_transform_feedback4 */
#ifndef GL_AMD_vertex_shader_layer #ifndef GL_AMD_vertex_shader_layer
#define GL_AMD_vertex_shader_layer 1 #define GL_AMD_vertex_shader_layer 1
#endif /* GL_AMD_vertex_shader_layer */ #endif /* GL_AMD_vertex_shader_layer */
@ -6163,7 +6290,7 @@ typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintp
typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);
@ -6419,7 +6546,7 @@ GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, G
GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);
GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);
GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);
@ -7062,6 +7189,10 @@ GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *strin
#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA #define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
#endif /* GL_EXT_separate_specular_color */ #endif /* GL_EXT_separate_specular_color */
#ifndef GL_EXT_shader_image_load_formatted
#define GL_EXT_shader_image_load_formatted 1
#endif /* GL_EXT_shader_image_load_formatted */
#ifndef GL_EXT_shader_image_load_store #ifndef GL_EXT_shader_image_load_store
#define GL_EXT_shader_image_load_store 1 #define GL_EXT_shader_image_load_store 1
#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 #define GL_MAX_IMAGE_UNITS_EXT 0x8F38
@ -8108,6 +8239,52 @@ GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void
#endif #endif
#endif /* GL_INTEL_parallel_arrays */ #endif /* GL_INTEL_parallel_arrays */
#ifndef GL_INTEL_performance_query
#define GL_INTEL_performance_query 1
#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
#define GL_PERFQUERY_WAIT_INTEL 0x83FB
#define GL_PERFQUERY_FLUSH_INTEL 0x83FA
#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
#endif
#endif /* GL_INTEL_performance_query */
#ifndef GL_MESAX_texture_stack #ifndef GL_MESAX_texture_stack
#define GL_MESAX_texture_stack 1 #define GL_MESAX_texture_stack 1
#define GL_TEXTURE_1D_STACK_MESAX 0x8759 #define GL_TEXTURE_1D_STACK_MESAX 0x8759
@ -8202,6 +8379,15 @@ GLAPI void APIENTRY glEndConditionalRenderNVX (void);
#endif #endif
#endif /* GL_NVX_conditional_render */ #endif /* GL_NVX_conditional_render */
#ifndef GL_NVX_gpu_memory_info
#define GL_NVX_gpu_memory_info 1
#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
#endif /* GL_NVX_gpu_memory_info */
#ifndef GL_NV_bindless_multi_draw_indirect #ifndef GL_NV_bindless_multi_draw_indirect
#define GL_NV_bindless_multi_draw_indirect 1 #define GL_NV_bindless_multi_draw_indirect 1
typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
@ -8248,6 +8434,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
#define GL_NV_blend_equation_advanced 1 #define GL_NV_blend_equation_advanced 1
#define GL_BLEND_OVERLAP_NV 0x9281 #define GL_BLEND_OVERLAP_NV 0x9281
#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 #define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
#define GL_BLUE_NV 0x1905
#define GL_COLORBURN_NV 0x929A #define GL_COLORBURN_NV 0x929A
#define GL_COLORDODGE_NV 0x9299 #define GL_COLORDODGE_NV 0x9299
#define GL_CONJOINT_NV 0x9284 #define GL_CONJOINT_NV 0x9284
@ -8261,6 +8448,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
#define GL_DST_OUT_NV 0x928D #define GL_DST_OUT_NV 0x928D
#define GL_DST_OVER_NV 0x9289 #define GL_DST_OVER_NV 0x9289
#define GL_EXCLUSION_NV 0x92A0 #define GL_EXCLUSION_NV 0x92A0
#define GL_GREEN_NV 0x1904
#define GL_HARDLIGHT_NV 0x929B #define GL_HARDLIGHT_NV 0x929B
#define GL_HARDMIX_NV 0x92A9 #define GL_HARDMIX_NV 0x92A9
#define GL_HSL_COLOR_NV 0x92AF #define GL_HSL_COLOR_NV 0x92AF
@ -8282,6 +8470,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
#define GL_PLUS_CLAMPED_NV 0x92B1 #define GL_PLUS_CLAMPED_NV 0x92B1
#define GL_PLUS_DARKER_NV 0x9292 #define GL_PLUS_DARKER_NV 0x9292
#define GL_PLUS_NV 0x9291 #define GL_PLUS_NV 0x9291
#define GL_RED_NV 0x1903
#define GL_SCREEN_NV 0x9295 #define GL_SCREEN_NV 0x9295
#define GL_SOFTLIGHT_NV 0x929C #define GL_SOFTLIGHT_NV 0x929C
#define GL_SRC_ATOP_NV 0x928E #define GL_SRC_ATOP_NV 0x928E
@ -8291,6 +8480,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
#define GL_SRC_OVER_NV 0x9288 #define GL_SRC_OVER_NV 0x9288
#define GL_UNCORRELATED_NV 0x9282 #define GL_UNCORRELATED_NV 0x9282
#define GL_VIVIDLIGHT_NV 0x92A6 #define GL_VIVIDLIGHT_NV 0x92A6
#define GL_XOR_NV 0x1506
typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
#ifdef GL_GLEXT_PROTOTYPES #ifdef GL_GLEXT_PROTOTYPES
@ -8640,103 +8830,6 @@ GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint
#ifndef GL_NV_gpu_shader5 #ifndef GL_NV_gpu_shader5
#define GL_NV_gpu_shader5 1 #define GL_NV_gpu_shader5 1
typedef int64_t GLint64EXT;
#define GL_INT64_NV 0x140E
#define GL_UNSIGNED_INT64_NV 0x140F
#define GL_INT8_NV 0x8FE0
#define GL_INT8_VEC2_NV 0x8FE1
#define GL_INT8_VEC3_NV 0x8FE2
#define GL_INT8_VEC4_NV 0x8FE3
#define GL_INT16_NV 0x8FE4
#define GL_INT16_VEC2_NV 0x8FE5
#define GL_INT16_VEC3_NV 0x8FE6
#define GL_INT16_VEC4_NV 0x8FE7
#define GL_INT64_VEC2_NV 0x8FE9
#define GL_INT64_VEC3_NV 0x8FEA
#define GL_INT64_VEC4_NV 0x8FEB
#define GL_UNSIGNED_INT8_NV 0x8FEC
#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
#define GL_UNSIGNED_INT16_NV 0x8FF0
#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
#define GL_FLOAT16_NV 0x8FF8
#define GL_FLOAT16_VEC2_NV 0x8FF9
#define GL_FLOAT16_VEC3_NV 0x8FFA
#define GL_FLOAT16_VEC4_NV 0x8FFB
typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#endif
#endif /* GL_NV_gpu_shader5 */ #endif /* GL_NV_gpu_shader5 */
#ifndef GL_NV_half_float #ifndef GL_NV_half_float
@ -9320,7 +9413,6 @@ typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer,
typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#ifdef GL_GLEXT_PROTOTYPES #ifdef GL_GLEXT_PROTOTYPES
@ -9335,7 +9427,6 @@ GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pnam
GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);
GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);
GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);
GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#endif #endif
@ -9350,6 +9441,17 @@ GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLs
#define GL_NV_shader_storage_buffer_object 1 #define GL_NV_shader_storage_buffer_object 1
#endif /* GL_NV_shader_storage_buffer_object */ #endif /* GL_NV_shader_storage_buffer_object */
#ifndef GL_NV_shader_thread_group
#define GL_NV_shader_thread_group 1
#define GL_WARP_SIZE_NV 0x9339
#define GL_WARPS_PER_SM_NV 0x933A
#define GL_SM_COUNT_NV 0x933B
#endif /* GL_NV_shader_thread_group */
#ifndef GL_NV_shader_thread_shuffle
#define GL_NV_shader_thread_shuffle 1
#endif /* GL_NV_shader_thread_shuffle */
#ifndef GL_NV_tessellation_program5 #ifndef GL_NV_tessellation_program5
#define GL_NV_tessellation_program5 1 #define GL_NV_tessellation_program5 1
#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 #define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
@ -9625,7 +9727,7 @@ typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void
typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);
typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
@ -9636,7 +9738,7 @@ GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAdd
GLAPI void APIENTRY glVDPAUFiniNV (void); GLAPI void APIENTRY glVDPAUFiniNV (void);
GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);
GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);

View file

@ -6,7 +6,7 @@ extern "C" {
#endif #endif
/* /*
** Copyright (c) 2013 The Khronos Group Inc. ** Copyright (c) 2013-2014 The Khronos Group Inc.
** **
** Permission is hereby granted, free of charge, to any person obtaining a ** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the ** copy of this software and/or associated documentation files (the
@ -33,10 +33,10 @@ extern "C" {
** used to make the header, and the header can be found at ** used to make the header, and the header can be found at
** http://www.opengl.org/registry/ ** http://www.opengl.org/registry/
** **
** Khronos $Revision: 23730 $ on $Date: 2013-10-28 15:16:34 -0700 (Mon, 28 Oct 2013) $ ** Khronos $Revision: 26290 $ on $Date: 2014-04-16 05:35:38 -0700 (Wed, 16 Apr 2014) $
*/ */
#define GLX_GLXEXT_VERSION 20131028 #define GLX_GLXEXT_VERSION 20140416
/* Generated C header for: /* Generated C header for:
* API: glx * API: glx
@ -49,6 +49,7 @@ extern "C" {
#ifndef GLX_VERSION_1_3 #ifndef GLX_VERSION_1_3
#define GLX_VERSION_1_3 1 #define GLX_VERSION_1_3 1
typedef XID GLXContextID;
typedef struct __GLXFBConfigRec *GLXFBConfig; typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef XID GLXWindow; typedef XID GLXWindow;
typedef XID GLXPbuffer; typedef XID GLXPbuffer;
@ -272,7 +273,6 @@ __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
#ifndef GLX_EXT_import_context #ifndef GLX_EXT_import_context
#define GLX_EXT_import_context 1 #define GLX_EXT_import_context 1
typedef XID GLXContextID;
#define GLX_SHARE_CONTEXT_EXT 0x800A #define GLX_SHARE_CONTEXT_EXT 0x800A
#define GLX_VISUAL_ID_EXT 0x800B #define GLX_VISUAL_ID_EXT 0x800B
#define GLX_SCREEN_EXT 0x800C #define GLX_SCREEN_EXT 0x800C
@ -290,6 +290,23 @@ void glXFreeContextEXT (Display *dpy, GLXContext context);
#endif #endif
#endif /* GLX_EXT_import_context */ #endif /* GLX_EXT_import_context */
#ifndef GLX_EXT_stereo_tree
#define GLX_EXT_stereo_tree 1
typedef struct {
int type;
unsigned long serial;
Bool send_event;
Display *display;
int extension;
int evtype;
GLXDrawable window;
Bool stereo_tree;
} GLXStereoNotifyEventEXT;
#define GLX_STEREO_TREE_EXT 0x20F5
#define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001
#define GLX_STEREO_NOTIFY_EXT 0x00000000
#endif /* GLX_EXT_stereo_tree */
#ifndef GLX_EXT_swap_control #ifndef GLX_EXT_swap_control
#define GLX_EXT_swap_control 1 #define GLX_EXT_swap_control 1
#define GLX_SWAP_INTERVAL_EXT 0x20F1 #define GLX_SWAP_INTERVAL_EXT 0x20F1
@ -407,6 +424,32 @@ GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixm
#endif #endif
#endif /* GLX_MESA_pixmap_colormap */ #endif /* GLX_MESA_pixmap_colormap */
#ifndef GLX_MESA_query_renderer
#define GLX_MESA_query_renderer 1
#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
#define GLX_RENDERER_VERSION_MESA 0x8185
#define GLX_RENDERER_ACCELERATED_MESA 0x8186
#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
#define GLX_RENDERER_ID_MESA 0x818E
typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
#ifdef GLX_GLXEXT_PROTOTYPES
Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value);
const char *glXQueryCurrentRendererStringMESA (int attribute);
Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute);
#endif
#endif /* GLX_MESA_query_renderer */
#ifndef GLX_MESA_release_buffers #ifndef GLX_MESA_release_buffers
#define GLX_MESA_release_buffers 1 #define GLX_MESA_release_buffers 1
typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
@ -433,6 +476,14 @@ void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLe
#endif #endif
#endif /* GLX_NV_copy_image */ #endif /* GLX_NV_copy_image */
#ifndef GLX_NV_delay_before_swap
#define GLX_NV_delay_before_swap 1
typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds);
#ifdef GLX_GLXEXT_PROTOTYPES
Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds);
#endif
#endif /* GLX_NV_delay_before_swap */
#ifndef GLX_NV_float_buffer #ifndef GLX_NV_float_buffer
#define GLX_NV_float_buffer 1 #define GLX_NV_float_buffer 1
#define GLX_FLOAT_COMPONENTS_NV 0x20B0 #define GLX_FLOAT_COMPONENTS_NV 0x20B0

View file

@ -6,7 +6,7 @@ extern "C" {
#endif #endif
/* /*
** Copyright (c) 2013 The Khronos Group Inc. ** Copyright (c) 2013-2014 The Khronos Group Inc.
** **
** Permission is hereby granted, free of charge, to any person obtaining a ** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the ** copy of this software and/or associated documentation files (the
@ -33,7 +33,7 @@ extern "C" {
** used to make the header, and the header can be found at ** used to make the header, and the header can be found at
** http://www.opengl.org/registry/ ** http://www.opengl.org/registry/
** **
** Khronos $Revision: 23730 $ on $Date: 2013-10-28 15:16:34 -0700 (Mon, 28 Oct 2013) $ ** Khronos $Revision: 26290 $ on $Date: 2014-04-16 05:35:38 -0700 (Wed, 16 Apr 2014) $
*/ */
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
@ -41,7 +41,7 @@ extern "C" {
#include <windows.h> #include <windows.h>
#endif #endif
#define WGL_WGLEXT_VERSION 20131028 #define WGL_WGLEXT_VERSION 20140416
/* Generated C header for: /* Generated C header for:
* API: wgl * API: wgl

View file

@ -1,7 +1,7 @@
#ifndef __glext_h_ #ifndef __glext_h_
#define __glext_h_ #define __glext_h_
/* $Revision: 19260 $ on $Date:: 2012-09-20 11:30:36 -0700 #$ */ /* $Revision: 20798 $ on $Date:: 2013-03-07 01:19:34 -0800 #$ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -1055,10 +1055,10 @@ typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum
#ifndef GL_EXT_multi_draw_arrays #ifndef GL_EXT_multi_draw_arrays
#define GL_EXT_multi_draw_arrays 1 #define GL_EXT_multi_draw_arrays 1
#ifdef GL_GLEXT_PROTOTYPES #ifdef GL_GLEXT_PROTOTYPES
GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei);
GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */ #endif /* GL_GLEXT_PROTOTYPES */
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
#endif #endif

View file

@ -26,7 +26,7 @@
/* Khronos platform-specific types and definitions. /* Khronos platform-specific types and definitions.
* *
* $Revision: 1.5 $ on $Date: 2010/06/03 16:51:55 $ * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
* *
* Adopters may modify this file to suit their platform. Adopters are * Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos * encouraged to submit platform specific modifications to the Khronos
@ -97,19 +97,10 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
* This precedes the return type of the function in the function prototype. * This precedes the return type of the function in the function prototype.
*/ */
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
#if (defined(_WIN32) || defined(__VC32__)) && !defined(__SCITECH_SNAP__) && !defined(__WINSCW__)
# if defined (_DLL_EXPORTS)
# define KHRONOS_APICALL __declspec(dllexport)
# else
# define KHRONOS_APICALL __declspec(dllimport) # define KHRONOS_APICALL __declspec(dllimport)
# endif
#elif defined (__SYMBIAN32__) #elif defined (__SYMBIAN32__)
# if defined (__GCC32__)
# define KHRONOS_APICALL __declspec(dllexport)
# else
# define KHRONOS_APICALL IMPORT_C # define KHRONOS_APICALL IMPORT_C
# endif
#else #else
# define KHRONOS_APICALL # define KHRONOS_APICALL
#endif #endif
@ -120,7 +111,7 @@
* This follows the return type of the function and precedes the function * This follows the return type of the function and precedes the function
* name in the function prototype. * name in the function prototype.
*/ */
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) && !defined(__WINSCW__) #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */ /* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall # define KHRONOS_APIENTRY __stdcall
#else #else
@ -141,18 +132,7 @@
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* basic type definitions * basic type definitions
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
#if defined(__SYMBIAN32__) #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
#include <e32def.h>
typedef TInt32 khronos_int32_t;
typedef TUint32 khronos_uint32_t;
typedef TInt64 khronos_int64_t;
typedef TUint64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
/* /*
@ -208,19 +188,6 @@ typedef unsigned long long int khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1 #define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1 #define KHRONOS_SUPPORT_FLOAT 1
#elif defined(_UITRON_)
/*
* uITRON
*/
typedef signed int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
typedef long long khronos_int64_t;
typedef unsigned long long khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif 0 #elif 0
/* /*
@ -254,10 +221,23 @@ typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t; typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t; typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t; typedef unsigned short int khronos_uint16_t;
/*
* Types that differ between LLP64 and LP64 architectures - in LLP64,
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
* to be the only LLP64 architecture in current use.
*/
#ifdef _WIN64
typedef signed long long int khronos_intptr_t;
typedef unsigned long long int khronos_uintptr_t;
typedef signed long long int khronos_ssize_t;
typedef unsigned long long int khronos_usize_t;
#else
typedef signed long int khronos_intptr_t; typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t; typedef unsigned long int khronos_uintptr_t;
typedef signed long int khronos_ssize_t; typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t; typedef unsigned long int khronos_usize_t;
#endif
#if KHRONOS_SUPPORT_FLOAT #if KHRONOS_SUPPORT_FLOAT
/* /*

View file

@ -108,7 +108,10 @@ IDriver* createGlDriverInstance ()
#else #else
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifdef NL_COMP_MINGW
extern "C"
{
#endif
__declspec(dllexport) IDriver* NL3D_createIDriverInstance () __declspec(dllexport) IDriver* NL3D_createIDriverInstance ()
{ {
return new CDriverGL; return new CDriverGL;
@ -118,7 +121,9 @@ __declspec(dllexport) uint32 NL3D_interfaceVersion ()
{ {
return IDriver::InterfaceVersion; return IDriver::InterfaceVersion;
} }
#ifdef NL_COMP_MINGW
}
#endif
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
extern "C" extern "C"
@ -479,6 +484,11 @@ bool CDriverGL::setupDisplay()
#endif #endif
} }
if (_Extensions.ARBFragmentShader)
{
_ForceNativeFragmentPrograms = false;
}
_VertexProgramEnabled= false; _VertexProgramEnabled= false;
_PixelProgramEnabled= false; _PixelProgramEnabled= false;
_LastSetupGLArrayVertexProgram= false; _LastSetupGLArrayVertexProgram= false;
@ -2195,7 +2205,7 @@ void CDriverGL::setSwapVBLInterval(uint interval)
#elif defined(NL_OS_UNIX) #elif defined(NL_OS_UNIX)
if (_win && _Extensions.GLXEXTSwapControl) if (_win && _Extensions.GLXEXTSwapControl)
{ {
res = nglXSwapIntervalEXT(_dpy, _win, interval) == 0; nglXSwapIntervalEXT(_dpy, _win, interval);
} }
else if (_Extensions.GLXSGISwapControl) else if (_Extensions.GLXSGISwapControl)
{ {
@ -2513,9 +2523,7 @@ void CDriverGL::retrieveATIDriverVersion()
RegCloseKey(parentKey); RegCloseKey(parentKey);
} }
#elif defined(NL_OS_MAC) #elif defined(NL_OS_MAC)
# warning "OpenGL Driver: Missing Mac Implementation for ATI version retrieval" // TODO: Missing Mac Implementation for ATI version retrieval
nlwarning("OpenGL Driver: Missing Mac Implementation for ATI version retrieval");
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
// TODO for Linux: implement retrieveATIDriverVersion... assuming versions under linux are probably different // TODO for Linux: implement retrieveATIDriverVersion... assuming versions under linux are probably different
#endif #endif
@ -2654,7 +2662,7 @@ void CDriverGL::checkTextureOn() const
bool CDriverGL::supportOcclusionQuery() const bool CDriverGL::supportOcclusionQuery() const
{ {
H_AUTO_OGL(CDriverGL_supportOcclusionQuery) H_AUTO_OGL(CDriverGL_supportOcclusionQuery)
return _Extensions.NVOcclusionQuery; return _Extensions.NVOcclusionQuery || _Extensions.ARBOcclusionQuery;
} }
// *************************************************************************** // ***************************************************************************
@ -2685,11 +2693,14 @@ bool CDriverGL::supportFrameBufferObject() const
IOcclusionQuery *CDriverGL::createOcclusionQuery() IOcclusionQuery *CDriverGL::createOcclusionQuery()
{ {
H_AUTO_OGL(CDriverGL_createOcclusionQuery) H_AUTO_OGL(CDriverGL_createOcclusionQuery)
nlassert(_Extensions.NVOcclusionQuery); nlassert(_Extensions.NVOcclusionQuery || _Extensions.ARBOcclusionQuery);
#ifndef USE_OPENGLES #ifndef USE_OPENGLES
GLuint id; GLuint id;
if (_Extensions.NVOcclusionQuery)
nglGenOcclusionQueriesNV(1, &id); nglGenOcclusionQueriesNV(1, &id);
else
nglGenQueriesARB(1, &id);
if (id == 0) return NULL; if (id == 0) return NULL;
COcclusionQueryGL *oqgl = new COcclusionQueryGL; COcclusionQueryGL *oqgl = new COcclusionQueryGL;
oqgl->Driver = this; oqgl->Driver = this;
@ -2716,7 +2727,10 @@ void CDriverGL::deleteOcclusionQuery(IOcclusionQuery *oq)
oqgl->Driver = NULL; oqgl->Driver = NULL;
nlassert(oqgl->ID != 0); nlassert(oqgl->ID != 0);
GLuint id = oqgl->ID; GLuint id = oqgl->ID;
if (_Extensions.NVOcclusionQuery)
nglDeleteOcclusionQueriesNV(1, &id); nglDeleteOcclusionQueriesNV(1, &id);
else
nglDeleteQueriesARB(1, &id);
_OcclusionQueryList.erase(oqgl->Iterator); _OcclusionQueryList.erase(oqgl->Iterator);
if (oqgl == _CurrentOcclusionQuery) if (oqgl == _CurrentOcclusionQuery)
{ {
@ -2735,7 +2749,10 @@ void COcclusionQueryGL::begin()
nlassert(Driver); nlassert(Driver);
nlassert(Driver->_CurrentOcclusionQuery == NULL); // only one query at a time nlassert(Driver->_CurrentOcclusionQuery == NULL); // only one query at a time
nlassert(ID); nlassert(ID);
if (Driver->_Extensions.NVOcclusionQuery)
nglBeginOcclusionQueryNV(ID); nglBeginOcclusionQueryNV(ID);
else
nglBeginQueryARB(GL_SAMPLES_PASSED, ID);
Driver->_CurrentOcclusionQuery = this; Driver->_CurrentOcclusionQuery = this;
OcclusionType = NotAvailable; OcclusionType = NotAvailable;
VisibleCount = 0; VisibleCount = 0;
@ -2751,7 +2768,10 @@ void COcclusionQueryGL::end()
nlassert(Driver); nlassert(Driver);
nlassert(Driver->_CurrentOcclusionQuery == this); // only one query at a time nlassert(Driver->_CurrentOcclusionQuery == this); // only one query at a time
nlassert(ID); nlassert(ID);
if (Driver->_Extensions.NVOcclusionQuery)
nglEndOcclusionQueryNV(); nglEndOcclusionQueryNV();
else
nglEndQueryARB(GL_SAMPLES_PASSED);
Driver->_CurrentOcclusionQuery = NULL; Driver->_CurrentOcclusionQuery = NULL;
#endif #endif
} }
@ -2766,6 +2786,8 @@ IOcclusionQuery::TOcclusionType COcclusionQueryGL::getOcclusionType()
nlassert(ID); nlassert(ID);
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair! nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
if (OcclusionType == NotAvailable) if (OcclusionType == NotAvailable)
{
if (Driver->_Extensions.NVOcclusionQuery)
{ {
GLuint result; GLuint result;
// retrieve result // retrieve result
@ -2778,6 +2800,14 @@ IOcclusionQuery::TOcclusionType COcclusionQueryGL::getOcclusionType()
// Note : we could return the exact number of pixels that passed the z-test, but this value is not supported by all implementation (Direct3D ...) // Note : we could return the exact number of pixels that passed the z-test, but this value is not supported by all implementation (Direct3D ...)
} }
} }
else
{
GLuint result;
nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result);
OcclusionType = result != 0 ? NotOccluded : Occluded;
VisibleCount = (uint) result;
}
}
#endif #endif
return OcclusionType; return OcclusionType;
} }

View file

@ -1,2 +1,4 @@
EXPORTS NL3D_createIDriverInstance LIBRARY nel_drv_opengl_win_r
EXPORTS NL3D_interfaceVersion EXPORTS
NL3D_createIDriverInstance
NL3D_interfaceVersion

View file

@ -304,7 +304,7 @@ public:
virtual bool isLost() const { return false; } // there's no notion of 'lost device" in OpenGL virtual bool isLost() const { return false; } // there's no notion of 'lost device" in OpenGL
virtual bool init (uint windowIcon = 0, emptyProc exitFunc = 0); virtual bool init (uintptr_t windowIcon = 0, emptyProc exitFunc = 0);
virtual void disableHardwareVertexProgram(); virtual void disableHardwareVertexProgram();
virtual void disableHardwarePixelProgram(); virtual void disableHardwarePixelProgram();
@ -632,7 +632,7 @@ public:
virtual void swapTextureHandle(ITexture &tex0, ITexture &tex1); virtual void swapTextureHandle(ITexture &tex0, ITexture &tex1);
virtual uint getTextureHandle(const ITexture&tex); virtual uintptr_t getTextureHandle(const ITexture&tex);
/// \name Material multipass. /// \name Material multipass.
/** NB: setupMaterial() must be called before thoses methods. /** NB: setupMaterial() must be called before thoses methods.
@ -1591,6 +1591,7 @@ private:
// @} // @}
// misc // misc
public: public:
friend class COcclusionQueryGL;
static GLenum NLCubeFaceToGLCubeFace[6]; static GLenum NLCubeFaceToGLCubeFace[6];
static CMaterial::CTexEnv _TexEnvReplace; static CMaterial::CTexEnv _TexEnvReplace;
// occlusion query // occlusion query

File diff suppressed because it is too large Load diff

View file

@ -58,6 +58,7 @@ struct CGlExtensions
bool EXTVertexShader; bool EXTVertexShader;
bool NVTextureShader; bool NVTextureShader;
bool NVOcclusionQuery; bool NVOcclusionQuery;
bool ARBOcclusionQuery;
bool NVTextureRectangle; bool NVTextureRectangle;
bool EXTTextureRectangle; bool EXTTextureRectangle;
bool ARBTextureRectangle; bool ARBTextureRectangle;
@ -99,9 +100,11 @@ struct CGlExtensions
bool ARBTextureCompression; bool ARBTextureCompression;
bool ARBFragmentProgram; bool ARBFragmentProgram;
bool ARBVertexBufferObject; bool ARBVertexBufferObject;
bool ARBMapBufferRange;
bool ARBVertexProgram; bool ARBVertexProgram;
bool ARBTextureNonPowerOfTwo; bool ARBTextureNonPowerOfTwo;
bool ARBMultisample; bool ARBMultisample;
bool ARBFragmentShader;
// NV Pixel Programs // NV Pixel Programs
bool NVFragmentProgram2; bool NVFragmentProgram2;
@ -109,6 +112,17 @@ struct CGlExtensions
bool OESDrawTexture; bool OESDrawTexture;
bool OESMapBuffer; bool OESMapBuffer;
// extensions to get memory info
// GL_NVX_gpu_memory_info
bool NVXGPUMemoryInfo;
// GL_ATI_meminfo
bool ATIMeminfo;
// WGL_AMD_gpu_association
bool WGLAMDGPUAssociation;
public: public:
/// \name Disable Hardware feature. False by default. setuped by IDriver /// \name Disable Hardware feature. False by default. setuped by IDriver
@ -151,12 +165,12 @@ public:
ATIVertexArrayObject= false; ATIVertexArrayObject= false;
ATIEnvMapBumpMap = false; ATIEnvMapBumpMap = false;
ATIFragmentShader = false; ATIFragmentShader = false;
ATIVertexArrayObject = false;
ATIMapObjectBuffer = false; ATIMapObjectBuffer = false;
ATIVertexAttribArrayObject = false; ATIVertexAttribArrayObject = false;
EXTVertexShader= false; EXTVertexShader= false;
ARBFragmentProgram = false; ARBFragmentProgram = false;
ARBVertexBufferObject = false; ARBVertexBufferObject = false;
ARBMapBufferRange = false;
ARBVertexProgram = false; ARBVertexProgram = false;
NVTextureRectangle = false; NVTextureRectangle = false;
EXTTextureRectangle = false; EXTTextureRectangle = false;
@ -165,7 +179,9 @@ public:
ARBTextureRectangle = false; ARBTextureRectangle = false;
ARBTextureNonPowerOfTwo = false; ARBTextureNonPowerOfTwo = false;
ARBMultisample = false; ARBMultisample = false;
ARBFragmentShader = false;
NVOcclusionQuery = false; NVOcclusionQuery = false;
ARBOcclusionQuery = false;
FrameBufferObject = false; FrameBufferObject = false;
FrameBufferBlit = false; FrameBufferBlit = false;
FrameBufferMultisample = false; FrameBufferMultisample = false;
@ -176,6 +192,10 @@ public:
OESDrawTexture = false; OESDrawTexture = false;
OESMapBuffer = false; OESMapBuffer = false;
NVXGPUMemoryInfo = false;
ATIMeminfo = false;
WGLAMDGPUAssociation = false;
/// \name Disable Hardware feature. False by default. setuped by IDriver /// \name Disable Hardware feature. False by default. setuped by IDriver
DisableHardwareVertexProgram= false; DisableHardwareVertexProgram= false;
DisableHardwarePixelProgram= false; DisableHardwarePixelProgram= false;
@ -223,14 +243,18 @@ public:
result += EXTSecondaryColor ? "EXTSecondaryColor " : ""; result += EXTSecondaryColor ? "EXTSecondaryColor " : "";
result += EXTBlendColor ? "EXTBlendColor " : ""; result += EXTBlendColor ? "EXTBlendColor " : "";
result += NVOcclusionQuery ? "NVOcclusionQuery " : ""; result += NVOcclusionQuery ? "NVOcclusionQuery " : "";
result += ARBOcclusionQuery ? "ARBOcclusionQuery " : "";
result += NVStateVARWithoutFlush ? "NVStateVARWithoutFlush " : ""; result += NVStateVARWithoutFlush ? "NVStateVARWithoutFlush " : "";
result += ARBMultisample ? "ARBMultisample " : ""; result += ARBMultisample ? "ARBMultisample " : "";
result += NVXGPUMemoryInfo ? "NVXGPUMemoryInfo " : "";
result += ATIMeminfo ? "ATIMeminfo " : "";
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
result += "\n WindowsGL: "; result += "\n WindowsGL: ";
result += WGLARBPBuffer ? "WGLARBPBuffer " : ""; result += WGLARBPBuffer ? "WGLARBPBuffer " : "";
result += WGLARBPixelFormat ? "WGLARBPixelFormat " : ""; result += WGLARBPixelFormat ? "WGLARBPixelFormat " : "";
result += WGLEXTSwapControl ? "WGLEXTSwapControl " : ""; result += WGLEXTSwapControl ? "WGLEXTSwapControl " : "";
result += WGLAMDGPUAssociation ? "WGLAMDGPUAssociation " : "";
#elif defined(NL_OS_MAC) #elif defined(NL_OS_MAC)
#elif defined(NL_OS_UNIX) #elif defined(NL_OS_UNIX)
result += "\n GLX: "; result += "\n GLX: ";
@ -245,6 +269,7 @@ public:
result += ATIVertexArrayObject ? "ATIVertexArrayObject " : ""; result += ATIVertexArrayObject ? "ATIVertexArrayObject " : "";
result += ATIVertexAttribArrayObject ? "ATIVertexAttribArrayObject " : ""; result += ATIVertexAttribArrayObject ? "ATIVertexAttribArrayObject " : "";
result += ARBVertexBufferObject ? "ARBVertexBufferObject " : ""; result += ARBVertexBufferObject ? "ARBVertexBufferObject " : "";
result += ARBMapBufferRange ? "ARBMapBufferRange " : "";
result += ATIMapObjectBuffer ? "ATIMapObjectBuffer " : ""; result += ATIMapObjectBuffer ? "ATIMapObjectBuffer " : "";
result += "\n FBO: "; result += "\n FBO: ";
@ -294,230 +319,228 @@ void registerGlExtensions(CGlExtensions &ext);
// OES_mapbuffer. // OES_mapbuffer.
//=============== //===============
extern NEL_PFNGLMAPBUFFEROESPROC nglMapBufferOES; extern PFNGLMAPBUFFEROESPROC nglMapBufferOES;
extern NEL_PFNGLUNMAPBUFFEROESPROC nglUnmapBufferOES; extern PFNGLUNMAPBUFFEROESPROC nglUnmapBufferOES;
extern NEL_PFNGLGETBUFFERPOINTERVOESPROC nglGetBufferPointervOES; extern PFNGLGETBUFFERPOINTERVOESPROC nglGetBufferPointervOES;
extern NEL_PFNGLBUFFERSUBDATAPROC nglBufferSubData;
extern PFNGLDRAWTEXFOESPROC nglDrawTexfOES; extern PFNGLDRAWTEXFOESPROC nglDrawTexfOES;
// GL_OES_framebuffer_object // GL_OES_framebuffer_object
extern NEL_PFNGLISRENDERBUFFEROESPROC nglIsRenderbufferOES; extern PFNGLISRENDERBUFFEROESPROC nglIsRenderbufferOES;
extern NEL_PFNGLBINDRENDERBUFFEROESPROC nglBindRenderbufferOES; extern PFNGLBINDRENDERBUFFEROESPROC nglBindRenderbufferOES;
extern NEL_PFNGLDELETERENDERBUFFERSOESPROC nglDeleteRenderbuffersOES; extern PFNGLDELETERENDERBUFFERSOESPROC nglDeleteRenderbuffersOES;
extern NEL_PFNGLGENRENDERBUFFERSOESPROC nglGenRenderbuffersOES; extern PFNGLGENRENDERBUFFERSOESPROC nglGenRenderbuffersOES;
extern NEL_PFNGLRENDERBUFFERSTORAGEOESPROC nglRenderbufferStorageOES; extern PFNGLRENDERBUFFERSTORAGEOESPROC nglRenderbufferStorageOES;
extern NEL_PFNGLGETRENDERBUFFERPARAMETERIVOESPROC nglGetRenderbufferParameterivOES; extern PFNGLGETRENDERBUFFERPARAMETERIVOESPROC nglGetRenderbufferParameterivOES;
extern NEL_PFNGLISFRAMEBUFFEROESPROC nglIsFramebufferOES; extern PFNGLISFRAMEBUFFEROESPROC nglIsFramebufferOES;
extern NEL_PFNGLBINDFRAMEBUFFEROESPROC nglBindFramebufferOES; extern PFNGLBINDFRAMEBUFFEROESPROC nglBindFramebufferOES;
extern NEL_PFNGLDELETEFRAMEBUFFERSOESPROC nglDeleteFramebuffersOES; extern PFNGLDELETEFRAMEBUFFERSOESPROC nglDeleteFramebuffersOES;
extern NEL_PFNGLGENFRAMEBUFFERSOESPROC nglGenFramebuffersOES; extern PFNGLGENFRAMEBUFFERSOESPROC nglGenFramebuffersOES;
extern NEL_PFNGLCHECKFRAMEBUFFERSTATUSOESPROC nglCheckFramebufferStatusOES; extern PFNGLCHECKFRAMEBUFFERSTATUSOESPROC nglCheckFramebufferStatusOES;
extern NEL_PFNGLFRAMEBUFFERRENDERBUFFEROESPROC nglFramebufferRenderbufferOES; extern PFNGLFRAMEBUFFERRENDERBUFFEROESPROC nglFramebufferRenderbufferOES;
extern NEL_PFNGLFRAMEBUFFERTEXTURE2DOESPROC nglFramebufferTexture2DOES; extern PFNGLFRAMEBUFFERTEXTURE2DOESPROC nglFramebufferTexture2DOES;
extern NEL_PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC nglGetFramebufferAttachmentParameterivOES; extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC nglGetFramebufferAttachmentParameterivOES;
extern NEL_PFNGLGENERATEMIPMAPOESPROC nglGenerateMipmapOES; extern PFNGLGENERATEMIPMAPOESPROC nglGenerateMipmapOES;
// GL_OES_texture_cube_map // GL_OES_texture_cube_map
extern NEL_PFNGLTEXGENFOESPROC nglTexGenfOES; extern PFNGLTEXGENFOESPROC nglTexGenfOES;
extern NEL_PFNGLTEXGENFVOESPROC nglTexGenfvOES; extern PFNGLTEXGENFVOESPROC nglTexGenfvOES;
extern NEL_PFNGLTEXGENIOESPROC nglTexGeniOES; extern PFNGLTEXGENIOESPROC nglTexGeniOES;
extern NEL_PFNGLTEXGENIVOESPROC nglTexGenivOES; extern PFNGLTEXGENIVOESPROC nglTexGenivOES;
extern NEL_PFNGLTEXGENXOESPROC nglTexGenxOES; extern PFNGLTEXGENXOESPROC nglTexGenxOES;
extern NEL_PFNGLTEXGENXVOESPROC nglTexGenxvOES; extern PFNGLTEXGENXVOESPROC nglTexGenxvOES;
extern NEL_PFNGLGETTEXGENFVOESPROC nglGetTexGenfvOES; extern PFNGLGETTEXGENFVOESPROC nglGetTexGenfvOES;
extern NEL_PFNGLGETTEXGENIVOESPROC nglGetTexGenivOES; extern PFNGLGETTEXGENIVOESPROC nglGetTexGenivOES;
extern NEL_PFNGLGETTEXGENXVOESPROC nglGetTexGenxvOES; extern PFNGLGETTEXGENXVOESPROC nglGetTexGenxvOES;
#else #else
// ARB_multitexture // ARB_multitexture
//================= //=================
extern NEL_PFNGLACTIVETEXTUREARBPROC nglActiveTextureARB; extern PFNGLACTIVETEXTUREARBPROC nglActiveTextureARB;
extern NEL_PFNGLCLIENTACTIVETEXTUREARBPROC nglClientActiveTextureARB; extern PFNGLCLIENTACTIVETEXTUREARBPROC nglClientActiveTextureARB;
extern NEL_PFNGLMULTITEXCOORD1SARBPROC nglMultiTexCoord1sARB; extern PFNGLMULTITEXCOORD1SARBPROC nglMultiTexCoord1sARB;
extern NEL_PFNGLMULTITEXCOORD1IARBPROC nglMultiTexCoord1iARB; extern PFNGLMULTITEXCOORD1IARBPROC nglMultiTexCoord1iARB;
extern NEL_PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB; extern PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB;
extern NEL_PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB; extern PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB;
extern NEL_PFNGLMULTITEXCOORD1DARBPROC nglMultiTexCoord1dARB; extern PFNGLMULTITEXCOORD1DARBPROC nglMultiTexCoord1dARB;
extern NEL_PFNGLMULTITEXCOORD2SARBPROC nglMultiTexCoord2sARB; extern PFNGLMULTITEXCOORD2SARBPROC nglMultiTexCoord2sARB;
extern NEL_PFNGLMULTITEXCOORD2IARBPROC nglMultiTexCoord2iARB; extern PFNGLMULTITEXCOORD2IARBPROC nglMultiTexCoord2iARB;
extern NEL_PFNGLMULTITEXCOORD2FARBPROC nglMultiTexCoord2fARB; extern PFNGLMULTITEXCOORD2FARBPROC nglMultiTexCoord2fARB;
extern NEL_PFNGLMULTITEXCOORD2DARBPROC nglMultiTexCoord2dARB; extern PFNGLMULTITEXCOORD2DARBPROC nglMultiTexCoord2dARB;
extern NEL_PFNGLMULTITEXCOORD3SARBPROC nglMultiTexCoord3sARB; extern PFNGLMULTITEXCOORD3SARBPROC nglMultiTexCoord3sARB;
extern NEL_PFNGLMULTITEXCOORD3IARBPROC nglMultiTexCoord3iARB; extern PFNGLMULTITEXCOORD3IARBPROC nglMultiTexCoord3iARB;
extern NEL_PFNGLMULTITEXCOORD3FARBPROC nglMultiTexCoord3fARB; extern PFNGLMULTITEXCOORD3FARBPROC nglMultiTexCoord3fARB;
extern NEL_PFNGLMULTITEXCOORD3DARBPROC nglMultiTexCoord3dARB; extern PFNGLMULTITEXCOORD3DARBPROC nglMultiTexCoord3dARB;
extern NEL_PFNGLMULTITEXCOORD4SARBPROC nglMultiTexCoord4sARB; extern PFNGLMULTITEXCOORD4SARBPROC nglMultiTexCoord4sARB;
extern NEL_PFNGLMULTITEXCOORD4IARBPROC nglMultiTexCoord4iARB; extern PFNGLMULTITEXCOORD4IARBPROC nglMultiTexCoord4iARB;
extern NEL_PFNGLMULTITEXCOORD4FARBPROC nglMultiTexCoord4fARB; extern PFNGLMULTITEXCOORD4FARBPROC nglMultiTexCoord4fARB;
extern NEL_PFNGLMULTITEXCOORD4DARBPROC nglMultiTexCoord4dARB; extern PFNGLMULTITEXCOORD4DARBPROC nglMultiTexCoord4dARB;
extern NEL_PFNGLMULTITEXCOORD1SVARBPROC nglMultiTexCoord1svARB; extern PFNGLMULTITEXCOORD1SVARBPROC nglMultiTexCoord1svARB;
extern NEL_PFNGLMULTITEXCOORD1IVARBPROC nglMultiTexCoord1ivARB; extern PFNGLMULTITEXCOORD1IVARBPROC nglMultiTexCoord1ivARB;
extern NEL_PFNGLMULTITEXCOORD1FVARBPROC nglMultiTexCoord1fvARB; extern PFNGLMULTITEXCOORD1FVARBPROC nglMultiTexCoord1fvARB;
extern NEL_PFNGLMULTITEXCOORD1DVARBPROC nglMultiTexCoord1dvARB; extern PFNGLMULTITEXCOORD1DVARBPROC nglMultiTexCoord1dvARB;
extern NEL_PFNGLMULTITEXCOORD2SVARBPROC nglMultiTexCoord2svARB; extern PFNGLMULTITEXCOORD2SVARBPROC nglMultiTexCoord2svARB;
extern NEL_PFNGLMULTITEXCOORD2IVARBPROC nglMultiTexCoord2ivARB; extern PFNGLMULTITEXCOORD2IVARBPROC nglMultiTexCoord2ivARB;
extern NEL_PFNGLMULTITEXCOORD2FVARBPROC nglMultiTexCoord2fvARB; extern PFNGLMULTITEXCOORD2FVARBPROC nglMultiTexCoord2fvARB;
extern NEL_PFNGLMULTITEXCOORD2DVARBPROC nglMultiTexCoord2dvARB; extern PFNGLMULTITEXCOORD2DVARBPROC nglMultiTexCoord2dvARB;
extern NEL_PFNGLMULTITEXCOORD3SVARBPROC nglMultiTexCoord3svARB; extern PFNGLMULTITEXCOORD3SVARBPROC nglMultiTexCoord3svARB;
extern NEL_PFNGLMULTITEXCOORD3IVARBPROC nglMultiTexCoord3ivARB; extern PFNGLMULTITEXCOORD3IVARBPROC nglMultiTexCoord3ivARB;
extern NEL_PFNGLMULTITEXCOORD3FVARBPROC nglMultiTexCoord3fvARB; extern PFNGLMULTITEXCOORD3FVARBPROC nglMultiTexCoord3fvARB;
extern NEL_PFNGLMULTITEXCOORD3DVARBPROC nglMultiTexCoord3dvARB; extern PFNGLMULTITEXCOORD3DVARBPROC nglMultiTexCoord3dvARB;
extern NEL_PFNGLMULTITEXCOORD4SVARBPROC nglMultiTexCoord4svARB; extern PFNGLMULTITEXCOORD4SVARBPROC nglMultiTexCoord4svARB;
extern NEL_PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB; extern PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB;
extern NEL_PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB; extern PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB;
extern NEL_PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB; extern PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB;
// ARB_TextureCompression. // ARB_TextureCompression.
//======================== //========================
extern NEL_PFNGLCOMPRESSEDTEXIMAGE3DARBPROC nglCompressedTexImage3DARB; extern PFNGLCOMPRESSEDTEXIMAGE3DARBPROC nglCompressedTexImage3DARB;
extern NEL_PFNGLCOMPRESSEDTEXIMAGE2DARBPROC nglCompressedTexImage2DARB; extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC nglCompressedTexImage2DARB;
extern NEL_PFNGLCOMPRESSEDTEXIMAGE1DARBPROC nglCompressedTexImage1DARB; extern PFNGLCOMPRESSEDTEXIMAGE1DARBPROC nglCompressedTexImage1DARB;
extern NEL_PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC nglCompressedTexSubImage3DARB; extern PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC nglCompressedTexSubImage3DARB;
extern NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC nglCompressedTexSubImage2DARB; extern PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC nglCompressedTexSubImage2DARB;
extern NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB; extern PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB;
extern NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC nglGetCompressedTexImageARB; extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC nglGetCompressedTexImageARB;
// VertexArrayRangeNV. // VertexArrayRangeNV.
//==================== //====================
extern NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC nglFlushVertexArrayRangeNV; extern PFNGLFLUSHVERTEXARRAYRANGENVPROC nglFlushVertexArrayRangeNV;
extern NEL_PFNGLVERTEXARRAYRANGENVPROC nglVertexArrayRangeNV; extern PFNGLVERTEXARRAYRANGENVPROC nglVertexArrayRangeNV;
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
extern PFNWGLALLOCATEMEMORYNVPROC nwglAllocateMemoryNV; extern PFNWGLALLOCATEMEMORYNVPROC nwglAllocateMemoryNV;
extern PFNWGLFREEMEMORYNVPROC nwglFreeMemoryNV; extern PFNWGLFREEMEMORYNVPROC nwglFreeMemoryNV;
#elif defined(NL_OS_UNIX) && !defined(NL_OS_MAC) #elif defined(NL_OS_UNIX) && !defined(NL_OS_MAC)
extern NEL_PFNGLXALLOCATEMEMORYNVPROC nglXAllocateMemoryNV; extern PFNGLXALLOCATEMEMORYNVPROC nglXAllocateMemoryNV;
extern NEL_PFNGLXFREEMEMORYNVPROC nglXFreeMemoryNV; extern PFNGLXFREEMEMORYNVPROC nglXFreeMemoryNV;
#endif #endif
// FenceNV. // FenceNV.
//==================== //====================
extern NEL_PFNGLDELETEFENCESNVPROC nglDeleteFencesNV; extern PFNGLDELETEFENCESNVPROC nglDeleteFencesNV;
extern NEL_PFNGLGENFENCESNVPROC nglGenFencesNV; extern PFNGLGENFENCESNVPROC nglGenFencesNV;
extern NEL_PFNGLISFENCENVPROC nglIsFenceNV; extern PFNGLISFENCENVPROC nglIsFenceNV;
extern NEL_PFNGLTESTFENCENVPROC nglTestFenceNV; extern PFNGLTESTFENCENVPROC nglTestFenceNV;
extern NEL_PFNGLGETFENCEIVNVPROC nglGetFenceivNV; extern PFNGLGETFENCEIVNVPROC nglGetFenceivNV;
extern NEL_PFNGLFINISHFENCENVPROC nglFinishFenceNV; extern PFNGLFINISHFENCENVPROC nglFinishFenceNV;
extern NEL_PFNGLSETFENCENVPROC nglSetFenceNV; extern PFNGLSETFENCENVPROC nglSetFenceNV;
// VertexWeighting. // VertexWeighting.
//================== //==================
extern NEL_PFNGLVERTEXWEIGHTFEXTPROC nglVertexWeightfEXT; extern PFNGLVERTEXWEIGHTFEXTPROC nglVertexWeightfEXT;
extern NEL_PFNGLVERTEXWEIGHTFVEXTPROC nglVertexWeightfvEXT; extern PFNGLVERTEXWEIGHTFVEXTPROC nglVertexWeightfvEXT;
extern NEL_PFNGLVERTEXWEIGHTPOINTEREXTPROC nglVertexWeightPointerEXT; extern PFNGLVERTEXWEIGHTPOINTEREXTPROC nglVertexWeightPointerEXT;
// VertexProgramExtension. // VertexProgramExtension.
//======================== //========================
extern NEL_PFNGLAREPROGRAMSRESIDENTNVPROC nglAreProgramsResidentNV; extern PFNGLAREPROGRAMSRESIDENTNVPROC nglAreProgramsResidentNV;
extern NEL_PFNGLBINDPROGRAMNVPROC nglBindProgramNV; extern PFNGLBINDPROGRAMNVPROC nglBindProgramNV;
extern NEL_PFNGLDELETEPROGRAMSNVPROC nglDeleteProgramsNV; extern PFNGLDELETEPROGRAMSNVPROC nglDeleteProgramsNV;
extern NEL_PFNGLEXECUTEPROGRAMNVPROC nglExecuteProgramNV; extern PFNGLEXECUTEPROGRAMNVPROC nglExecuteProgramNV;
extern NEL_PFNGLGENPROGRAMSNVPROC nglGenProgramsNV; extern PFNGLGENPROGRAMSNVPROC nglGenProgramsNV;
extern NEL_PFNGLGETPROGRAMPARAMETERDVNVPROC nglGetProgramParameterdvNV; extern PFNGLGETPROGRAMPARAMETERDVNVPROC nglGetProgramParameterdvNV;
extern NEL_PFNGLGETPROGRAMPARAMETERFVNVPROC nglGetProgramParameterfvNV; extern PFNGLGETPROGRAMPARAMETERFVNVPROC nglGetProgramParameterfvNV;
extern NEL_PFNGLGETPROGRAMIVNVPROC nglGetProgramivNV; extern PFNGLGETPROGRAMIVNVPROC nglGetProgramivNV;
extern NEL_PFNGLGETPROGRAMSTRINGNVPROC nglGetProgramStringNV; extern PFNGLGETPROGRAMSTRINGNVPROC nglGetProgramStringNV;
extern NEL_PFNGLGETTRACKMATRIXIVNVPROC nglGetTrackMatrixivNV; extern PFNGLGETTRACKMATRIXIVNVPROC nglGetTrackMatrixivNV;
extern NEL_PFNGLGETVERTEXATTRIBDVNVPROC nglGetVertexAttribdvNV; extern PFNGLGETVERTEXATTRIBDVNVPROC nglGetVertexAttribdvNV;
extern NEL_PFNGLGETVERTEXATTRIBFVNVPROC nglGetVertexAttribfvNV; extern PFNGLGETVERTEXATTRIBFVNVPROC nglGetVertexAttribfvNV;
extern NEL_PFNGLGETVERTEXATTRIBIVNVPROC nglGetVertexAttribivNV; extern PFNGLGETVERTEXATTRIBIVNVPROC nglGetVertexAttribivNV;
extern NEL_PFNGLGETVERTEXATTRIBPOINTERVNVPROC nglGetVertexAttribPointervNV; extern PFNGLGETVERTEXATTRIBPOINTERVNVPROC nglGetVertexAttribPointervNV;
extern NEL_PFNGLISPROGRAMNVPROC nglIsProgramNV; extern PFNGLISPROGRAMNVPROC nglIsProgramNV;
extern NEL_PFNGLLOADPROGRAMNVPROC nglLoadProgramNV; extern PFNGLLOADPROGRAMNVPROC nglLoadProgramNV;
extern NEL_PFNGLPROGRAMPARAMETER4DNVPROC nglProgramParameter4dNV; extern PFNGLPROGRAMPARAMETER4DNVPROC nglProgramParameter4dNV;
extern NEL_PFNGLPROGRAMPARAMETER4DVNVPROC nglProgramParameter4dvNV; extern PFNGLPROGRAMPARAMETER4DVNVPROC nglProgramParameter4dvNV;
extern NEL_PFNGLPROGRAMPARAMETER4FNVPROC nglProgramParameter4fNV; extern PFNGLPROGRAMPARAMETER4FNVPROC nglProgramParameter4fNV;
extern NEL_PFNGLPROGRAMPARAMETER4FVNVPROC nglProgramParameter4fvNV; extern PFNGLPROGRAMPARAMETER4FVNVPROC nglProgramParameter4fvNV;
extern NEL_PFNGLPROGRAMPARAMETERS4DVNVPROC nglProgramParameters4dvNV; extern PFNGLPROGRAMPARAMETERS4DVNVPROC nglProgramParameters4dvNV;
extern NEL_PFNGLPROGRAMPARAMETERS4FVNVPROC nglProgramParameters4fvNV; extern PFNGLPROGRAMPARAMETERS4FVNVPROC nglProgramParameters4fvNV;
extern NEL_PFNGLREQUESTRESIDENTPROGRAMSNVPROC nglRequestResidentProgramsNV; extern PFNGLREQUESTRESIDENTPROGRAMSNVPROC nglRequestResidentProgramsNV;
extern NEL_PFNGLTRACKMATRIXNVPROC nglTrackMatrixNV; extern PFNGLTRACKMATRIXNVPROC nglTrackMatrixNV;
extern NEL_PFNGLVERTEXATTRIBPOINTERNVPROC nglVertexAttribPointerNV; extern PFNGLVERTEXATTRIBPOINTERNVPROC nglVertexAttribPointerNV;
extern NEL_PFNGLVERTEXATTRIB1DNVPROC nglVertexAttrib1dNV; extern PFNGLVERTEXATTRIB1DNVPROC nglVertexAttrib1dNV;
extern NEL_PFNGLVERTEXATTRIB1DVNVPROC nglVertexAttrib1dvNV; extern PFNGLVERTEXATTRIB1DVNVPROC nglVertexAttrib1dvNV;
extern NEL_PFNGLVERTEXATTRIB1FNVPROC nglVertexAttrib1fNV; extern PFNGLVERTEXATTRIB1FNVPROC nglVertexAttrib1fNV;
extern NEL_PFNGLVERTEXATTRIB1FVNVPROC nglVertexAttrib1fvNV; extern PFNGLVERTEXATTRIB1FVNVPROC nglVertexAttrib1fvNV;
extern NEL_PFNGLVERTEXATTRIB1SNVPROC nglVertexAttrib1sNV; extern PFNGLVERTEXATTRIB1SNVPROC nglVertexAttrib1sNV;
extern NEL_PFNGLVERTEXATTRIB1SVNVPROC nglVertexAttrib1svNV; extern PFNGLVERTEXATTRIB1SVNVPROC nglVertexAttrib1svNV;
extern NEL_PFNGLVERTEXATTRIB2DNVPROC nglVertexAttrib2dNV; extern PFNGLVERTEXATTRIB2DNVPROC nglVertexAttrib2dNV;
extern NEL_PFNGLVERTEXATTRIB2DVNVPROC nglVertexAttrib2dvNV; extern PFNGLVERTEXATTRIB2DVNVPROC nglVertexAttrib2dvNV;
extern NEL_PFNGLVERTEXATTRIB2FNVPROC nglVertexAttrib2fNV; extern PFNGLVERTEXATTRIB2FNVPROC nglVertexAttrib2fNV;
extern NEL_PFNGLVERTEXATTRIB2FVNVPROC nglVertexAttrib2fvNV; extern PFNGLVERTEXATTRIB2FVNVPROC nglVertexAttrib2fvNV;
extern NEL_PFNGLVERTEXATTRIB2SNVPROC nglVertexAttrib2sNV; extern PFNGLVERTEXATTRIB2SNVPROC nglVertexAttrib2sNV;
extern NEL_PFNGLVERTEXATTRIB2SVNVPROC nglVertexAttrib2svNV; extern PFNGLVERTEXATTRIB2SVNVPROC nglVertexAttrib2svNV;
extern NEL_PFNGLVERTEXATTRIB3DNVPROC nglVertexAttrib3dNV; extern PFNGLVERTEXATTRIB3DNVPROC nglVertexAttrib3dNV;
extern NEL_PFNGLVERTEXATTRIB3DVNVPROC nglVertexAttrib3dvNV; extern PFNGLVERTEXATTRIB3DVNVPROC nglVertexAttrib3dvNV;
extern NEL_PFNGLVERTEXATTRIB3FNVPROC nglVertexAttrib3fNV; extern PFNGLVERTEXATTRIB3FNVPROC nglVertexAttrib3fNV;
extern NEL_PFNGLVERTEXATTRIB3FVNVPROC nglVertexAttrib3fvNV; extern PFNGLVERTEXATTRIB3FVNVPROC nglVertexAttrib3fvNV;
extern NEL_PFNGLVERTEXATTRIB3SNVPROC nglVertexAttrib3sNV; extern PFNGLVERTEXATTRIB3SNVPROC nglVertexAttrib3sNV;
extern NEL_PFNGLVERTEXATTRIB3SVNVPROC nglVertexAttrib3svNV; extern PFNGLVERTEXATTRIB3SVNVPROC nglVertexAttrib3svNV;
extern NEL_PFNGLVERTEXATTRIB4DNVPROC nglVertexAttrib4dNV; extern PFNGLVERTEXATTRIB4DNVPROC nglVertexAttrib4dNV;
extern NEL_PFNGLVERTEXATTRIB4DVNVPROC nglVertexAttrib4dvNV; extern PFNGLVERTEXATTRIB4DVNVPROC nglVertexAttrib4dvNV;
extern NEL_PFNGLVERTEXATTRIB4FNVPROC nglVertexAttrib4fNV; extern PFNGLVERTEXATTRIB4FNVPROC nglVertexAttrib4fNV;
extern NEL_PFNGLVERTEXATTRIB4FVNVPROC nglVertexAttrib4fvNV; extern PFNGLVERTEXATTRIB4FVNVPROC nglVertexAttrib4fvNV;
extern NEL_PFNGLVERTEXATTRIB4SNVPROC nglVertexAttrib4sNV; extern PFNGLVERTEXATTRIB4SNVPROC nglVertexAttrib4sNV;
extern NEL_PFNGLVERTEXATTRIB4SVNVPROC nglVertexAttrib4svNV; extern PFNGLVERTEXATTRIB4SVNVPROC nglVertexAttrib4svNV;
extern NEL_PFNGLVERTEXATTRIB4UBVNVPROC nglVertexAttrib4ubvNV; extern PFNGLVERTEXATTRIB4UBVNVPROC nglVertexAttrib4ubvNV;
extern NEL_PFNGLVERTEXATTRIBS1DVNVPROC nglVertexAttribs1dvNV; extern PFNGLVERTEXATTRIBS1DVNVPROC nglVertexAttribs1dvNV;
extern NEL_PFNGLVERTEXATTRIBS1FVNVPROC nglVertexAttribs1fvNV; extern PFNGLVERTEXATTRIBS1FVNVPROC nglVertexAttribs1fvNV;
extern NEL_PFNGLVERTEXATTRIBS1SVNVPROC nglVertexAttribs1svNV; extern PFNGLVERTEXATTRIBS1SVNVPROC nglVertexAttribs1svNV;
extern NEL_PFNGLVERTEXATTRIBS2DVNVPROC nglVertexAttribs2dvNV; extern PFNGLVERTEXATTRIBS2DVNVPROC nglVertexAttribs2dvNV;
extern NEL_PFNGLVERTEXATTRIBS2FVNVPROC nglVertexAttribs2fvNV; extern PFNGLVERTEXATTRIBS2FVNVPROC nglVertexAttribs2fvNV;
extern NEL_PFNGLVERTEXATTRIBS2SVNVPROC nglVertexAttribs2svNV; extern PFNGLVERTEXATTRIBS2SVNVPROC nglVertexAttribs2svNV;
extern NEL_PFNGLVERTEXATTRIBS3DVNVPROC nglVertexAttribs3dvNV; extern PFNGLVERTEXATTRIBS3DVNVPROC nglVertexAttribs3dvNV;
extern NEL_PFNGLVERTEXATTRIBS3FVNVPROC nglVertexAttribs3fvNV; extern PFNGLVERTEXATTRIBS3FVNVPROC nglVertexAttribs3fvNV;
extern NEL_PFNGLVERTEXATTRIBS3SVNVPROC nglVertexAttribs3svNV; extern PFNGLVERTEXATTRIBS3SVNVPROC nglVertexAttribs3svNV;
extern NEL_PFNGLVERTEXATTRIBS4DVNVPROC nglVertexAttribs4dvNV; extern PFNGLVERTEXATTRIBS4DVNVPROC nglVertexAttribs4dvNV;
extern NEL_PFNGLVERTEXATTRIBS4FVNVPROC nglVertexAttribs4fvNV; extern PFNGLVERTEXATTRIBS4FVNVPROC nglVertexAttribs4fvNV;
extern NEL_PFNGLVERTEXATTRIBS4SVNVPROC nglVertexAttribs4svNV; extern PFNGLVERTEXATTRIBS4SVNVPROC nglVertexAttribs4svNV;
extern NEL_PFNGLVERTEXATTRIBS4UBVNVPROC nglVertexAttribs4ubvNV; extern PFNGLVERTEXATTRIBS4UBVNVPROC nglVertexAttribs4ubvNV;
// VertexShaderExtension. // VertexShaderExtension.
//======================== //========================
extern NEL_PFNGLBEGINVERTEXSHADEREXTPROC nglBeginVertexShaderEXT; extern PFNGLBEGINVERTEXSHADEREXTPROC nglBeginVertexShaderEXT;
extern NEL_PFNGLENDVERTEXSHADEREXTPROC nglEndVertexShaderEXT; extern PFNGLENDVERTEXSHADEREXTPROC nglEndVertexShaderEXT;
extern NEL_PFNGLBINDVERTEXSHADEREXTPROC nglBindVertexShaderEXT; extern PFNGLBINDVERTEXSHADEREXTPROC nglBindVertexShaderEXT;
extern NEL_PFNGLGENVERTEXSHADERSEXTPROC nglGenVertexShadersEXT; extern PFNGLGENVERTEXSHADERSEXTPROC nglGenVertexShadersEXT;
extern NEL_PFNGLDELETEVERTEXSHADEREXTPROC nglDeleteVertexShaderEXT; extern PFNGLDELETEVERTEXSHADEREXTPROC nglDeleteVertexShaderEXT;
extern NEL_PFNGLSHADEROP1EXTPROC nglShaderOp1EXT; extern PFNGLSHADEROP1EXTPROC nglShaderOp1EXT;
extern NEL_PFNGLSHADEROP2EXTPROC nglShaderOp2EXT; extern PFNGLSHADEROP2EXTPROC nglShaderOp2EXT;
extern NEL_PFNGLSHADEROP3EXTPROC nglShaderOp3EXT; extern PFNGLSHADEROP3EXTPROC nglShaderOp3EXT;
extern NEL_PFNGLSWIZZLEEXTPROC nglSwizzleEXT; extern PFNGLSWIZZLEEXTPROC nglSwizzleEXT;
extern NEL_PFNGLWRITEMASKEXTPROC nglWriteMaskEXT; extern PFNGLWRITEMASKEXTPROC nglWriteMaskEXT;
extern NEL_PFNGLINSERTCOMPONENTEXTPROC nglInsertComponentEXT; extern PFNGLINSERTCOMPONENTEXTPROC nglInsertComponentEXT;
extern NEL_PFNGLEXTRACTCOMPONENTEXTPROC nglExtractComponentEXT; extern PFNGLEXTRACTCOMPONENTEXTPROC nglExtractComponentEXT;
extern NEL_PFNGLGENSYMBOLSEXTPROC nglGenSymbolsEXT; extern PFNGLGENSYMBOLSEXTPROC nglGenSymbolsEXT;
extern NEL_PFNGLSETINVARIANTEXTPROC nglSetInvariantEXT; extern PFNGLSETINVARIANTEXTPROC nglSetInvariantEXT;
extern NEL_PFNGLSETLOCALCONSTANTEXTPROC nglSetLocalConstantEXT; extern PFNGLSETLOCALCONSTANTEXTPROC nglSetLocalConstantEXT;
extern NEL_PFNGLVARIANTPOINTEREXTPROC nglVariantPointerEXT; extern PFNGLVARIANTPOINTEREXTPROC nglVariantPointerEXT;
extern NEL_PFNGLENABLEVARIANTCLIENTSTATEEXTPROC nglEnableVariantClientStateEXT; extern PFNGLENABLEVARIANTCLIENTSTATEEXTPROC nglEnableVariantClientStateEXT;
extern NEL_PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC nglDisableVariantClientStateEXT; extern PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC nglDisableVariantClientStateEXT;
extern NEL_PFNGLBINDLIGHTPARAMETEREXTPROC nglBindLightParameterEXT; extern PFNGLBINDLIGHTPARAMETEREXTPROC nglBindLightParameterEXT;
extern NEL_PFNGLBINDMATERIALPARAMETEREXTPROC nglBindMaterialParameterEXT; extern PFNGLBINDMATERIALPARAMETEREXTPROC nglBindMaterialParameterEXT;
extern NEL_PFNGLBINDTEXGENPARAMETEREXTPROC nglBindTexGenParameterEXT; extern PFNGLBINDTEXGENPARAMETEREXTPROC nglBindTexGenParameterEXT;
extern NEL_PFNGLBINDTEXTUREUNITPARAMETEREXTPROC nglBindTextureUnitParameterEXT; extern PFNGLBINDTEXTUREUNITPARAMETEREXTPROC nglBindTextureUnitParameterEXT;
extern NEL_PFNGLBINDPARAMETEREXTPROC nglBindParameterEXT; extern PFNGLBINDPARAMETEREXTPROC nglBindParameterEXT;
extern NEL_PFNGLISVARIANTENABLEDEXTPROC nglIsVariantEnabledEXT; extern PFNGLISVARIANTENABLEDEXTPROC nglIsVariantEnabledEXT;
extern NEL_PFNGLGETVARIANTBOOLEANVEXTPROC nglGetVariantBooleanvEXT; extern PFNGLGETVARIANTBOOLEANVEXTPROC nglGetVariantBooleanvEXT;
extern NEL_PFNGLGETVARIANTINTEGERVEXTPROC nglGetVariantIntegervEXT; extern PFNGLGETVARIANTINTEGERVEXTPROC nglGetVariantIntegervEXT;
extern NEL_PFNGLGETVARIANTFLOATVEXTPROC nglGetVariantFloatvEXT; extern PFNGLGETVARIANTFLOATVEXTPROC nglGetVariantFloatvEXT;
extern NEL_PFNGLGETVARIANTPOINTERVEXTPROC nglGetVariantPointervEXT; extern PFNGLGETVARIANTPOINTERVEXTPROC nglGetVariantPointervEXT;
extern NEL_PFNGLGETINVARIANTBOOLEANVEXTPROC nglGetInvariantBooleanvEXT; extern PFNGLGETINVARIANTBOOLEANVEXTPROC nglGetInvariantBooleanvEXT;
extern NEL_PFNGLGETINVARIANTINTEGERVEXTPROC nglGetInvariantIntegervEXT; extern PFNGLGETINVARIANTINTEGERVEXTPROC nglGetInvariantIntegervEXT;
extern NEL_PFNGLGETINVARIANTFLOATVEXTPROC nglGetInvariantFloatvEXT; extern PFNGLGETINVARIANTFLOATVEXTPROC nglGetInvariantFloatvEXT;
extern NEL_PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC nglGetLocalConstantBooleanvEXT; extern PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC nglGetLocalConstantBooleanvEXT;
extern NEL_PFNGLGETLOCALCONSTANTINTEGERVEXTPROC nglGetLocalConstantIntegervEXT; extern PFNGLGETLOCALCONSTANTINTEGERVEXTPROC nglGetLocalConstantIntegervEXT;
extern NEL_PFNGLGETLOCALCONSTANTFLOATVEXTPROC nglGetLocalConstantFloatvEXT; extern PFNGLGETLOCALCONSTANTFLOATVEXTPROC nglGetLocalConstantFloatvEXT;
// ATI_envmap_bumpmap extension // ATI_envmap_bumpmap extension
@ -530,100 +553,100 @@ extern PFNGLGETTEXBUMPPARAMETERFVATIPROC nglGetTexBumpParameterfvATI;
// SecondaryColor extension // SecondaryColor extension
//======================== //========================
extern NEL_PFNGLSECONDARYCOLOR3BEXTPROC nglSecondaryColor3bEXT; extern PFNGLSECONDARYCOLOR3BEXTPROC nglSecondaryColor3bEXT;
extern NEL_PFNGLSECONDARYCOLOR3BVEXTPROC nglSecondaryColor3bvEXT; extern PFNGLSECONDARYCOLOR3BVEXTPROC nglSecondaryColor3bvEXT;
extern NEL_PFNGLSECONDARYCOLOR3DEXTPROC nglSecondaryColor3dEXT; extern PFNGLSECONDARYCOLOR3DEXTPROC nglSecondaryColor3dEXT;
extern NEL_PFNGLSECONDARYCOLOR3DVEXTPROC nglSecondaryColor3dvEXT; extern PFNGLSECONDARYCOLOR3DVEXTPROC nglSecondaryColor3dvEXT;
extern NEL_PFNGLSECONDARYCOLOR3FEXTPROC nglSecondaryColor3fEXT; extern PFNGLSECONDARYCOLOR3FEXTPROC nglSecondaryColor3fEXT;
extern NEL_PFNGLSECONDARYCOLOR3FVEXTPROC nglSecondaryColor3fvEXT; extern PFNGLSECONDARYCOLOR3FVEXTPROC nglSecondaryColor3fvEXT;
extern NEL_PFNGLSECONDARYCOLOR3IEXTPROC nglSecondaryColor3iEXT; extern PFNGLSECONDARYCOLOR3IEXTPROC nglSecondaryColor3iEXT;
extern NEL_PFNGLSECONDARYCOLOR3IVEXTPROC nglSecondaryColor3ivEXT; extern PFNGLSECONDARYCOLOR3IVEXTPROC nglSecondaryColor3ivEXT;
extern NEL_PFNGLSECONDARYCOLOR3SEXTPROC nglSecondaryColor3sEXT; extern PFNGLSECONDARYCOLOR3SEXTPROC nglSecondaryColor3sEXT;
extern NEL_PFNGLSECONDARYCOLOR3SVEXTPROC nglSecondaryColor3svEXT; extern PFNGLSECONDARYCOLOR3SVEXTPROC nglSecondaryColor3svEXT;
extern NEL_PFNGLSECONDARYCOLOR3UBEXTPROC nglSecondaryColor3ubEXT; extern PFNGLSECONDARYCOLOR3UBEXTPROC nglSecondaryColor3ubEXT;
extern NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC nglSecondaryColor3ubvEXT; extern PFNGLSECONDARYCOLOR3UBVEXTPROC nglSecondaryColor3ubvEXT;
extern NEL_PFNGLSECONDARYCOLOR3UIEXTPROC nglSecondaryColor3uiEXT; extern PFNGLSECONDARYCOLOR3UIEXTPROC nglSecondaryColor3uiEXT;
extern NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC nglSecondaryColor3uivEXT; extern PFNGLSECONDARYCOLOR3UIVEXTPROC nglSecondaryColor3uivEXT;
extern NEL_PFNGLSECONDARYCOLOR3USEXTPROC nglSecondaryColor3usEXT; extern PFNGLSECONDARYCOLOR3USEXTPROC nglSecondaryColor3usEXT;
extern NEL_PFNGLSECONDARYCOLOR3USVEXTPROC nglSecondaryColor3usvEXT; extern PFNGLSECONDARYCOLOR3USVEXTPROC nglSecondaryColor3usvEXT;
extern NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT; extern PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT;
// BlendColor extension // BlendColor extension
//======================== //========================
extern NEL_PFNGLBLENDCOLOREXTPROC nglBlendColorEXT; extern PFNGLBLENDCOLOREXTPROC nglBlendColorEXT;
// GL_ATI_vertex_array_object extension // GL_ATI_vertex_array_object extension
//======================== //========================
extern NEL_PFNGLNEWOBJECTBUFFERATIPROC nglNewObjectBufferATI; extern PFNGLNEWOBJECTBUFFERATIPROC nglNewObjectBufferATI;
extern NEL_PFNGLISOBJECTBUFFERATIPROC nglIsObjectBufferATI; extern PFNGLISOBJECTBUFFERATIPROC nglIsObjectBufferATI;
extern NEL_PFNGLUPDATEOBJECTBUFFERATIPROC nglUpdateObjectBufferATI; extern PFNGLUPDATEOBJECTBUFFERATIPROC nglUpdateObjectBufferATI;
extern NEL_PFNGLGETOBJECTBUFFERFVATIPROC nglGetObjectBufferfvATI; extern PFNGLGETOBJECTBUFFERFVATIPROC nglGetObjectBufferfvATI;
extern NEL_PFNGLGETOBJECTBUFFERIVATIPROC nglGetObjectBufferivATI; extern PFNGLGETOBJECTBUFFERIVATIPROC nglGetObjectBufferivATI;
extern NEL_PFNGLDELETEOBJECTBUFFERATIPROC nglDeleteObjectBufferATI; extern PFNGLFREEOBJECTBUFFERATIPROC nglFreeObjectBufferATI;
extern NEL_PFNGLARRAYOBJECTATIPROC nglArrayObjectATI; extern PFNGLARRAYOBJECTATIPROC nglArrayObjectATI;
extern NEL_PFNGLGETARRAYOBJECTFVATIPROC nglGetArrayObjectfvATI; extern PFNGLGETARRAYOBJECTFVATIPROC nglGetArrayObjectfvATI;
extern NEL_PFNGLGETARRAYOBJECTIVATIPROC nglGetArrayObjectivATI; extern PFNGLGETARRAYOBJECTIVATIPROC nglGetArrayObjectivATI;
extern NEL_PFNGLVARIANTARRAYOBJECTATIPROC nglVariantArrayObjectATI; extern PFNGLVARIANTARRAYOBJECTATIPROC nglVariantArrayObjectATI;
extern NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC nglGetVariantArrayObjectfvATI; extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC nglGetVariantArrayObjectfvATI;
extern NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC nglGetVariantArrayObjectivATI; extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC nglGetVariantArrayObjectivATI;
// GL_ATI_map_object_buffer // GL_ATI_map_object_buffer
//=================================== //===================================
extern NEL_PFNGLMAPOBJECTBUFFERATIPROC nglMapObjectBufferATI; extern PFNGLMAPOBJECTBUFFERATIPROC nglMapObjectBufferATI;
extern NEL_PFNGLUNMAPOBJECTBUFFERATIPROC nglUnmapObjectBufferATI; extern PFNGLUNMAPOBJECTBUFFERATIPROC nglUnmapObjectBufferATI;
// GL_ATI_fragment_shader extension // GL_ATI_fragment_shader extension
//=================================== //===================================
extern NEL_PFNGLGENFRAGMENTSHADERSATIPROC nglGenFragmentShadersATI; extern PFNGLGENFRAGMENTSHADERSATIPROC nglGenFragmentShadersATI;
extern NEL_PFNGLBINDFRAGMENTSHADERATIPROC nglBindFragmentShaderATI; extern PFNGLBINDFRAGMENTSHADERATIPROC nglBindFragmentShaderATI;
extern NEL_PFNGLDELETEFRAGMENTSHADERATIPROC nglDeleteFragmentShaderATI; extern PFNGLDELETEFRAGMENTSHADERATIPROC nglDeleteFragmentShaderATI;
extern NEL_PFNGLBEGINFRAGMENTSHADERATIPROC nglBeginFragmentShaderATI; extern PFNGLBEGINFRAGMENTSHADERATIPROC nglBeginFragmentShaderATI;
extern NEL_PFNGLENDFRAGMENTSHADERATIPROC nglEndFragmentShaderATI; extern PFNGLENDFRAGMENTSHADERATIPROC nglEndFragmentShaderATI;
extern NEL_PFNGLPASSTEXCOORDATIPROC nglPassTexCoordATI; extern PFNGLPASSTEXCOORDATIPROC nglPassTexCoordATI;
extern NEL_PFNGLSAMPLEMAPATIPROC nglSampleMapATI; extern PFNGLSAMPLEMAPATIPROC nglSampleMapATI;
extern NEL_PFNGLCOLORFRAGMENTOP1ATIPROC nglColorFragmentOp1ATI; extern PFNGLCOLORFRAGMENTOP1ATIPROC nglColorFragmentOp1ATI;
extern NEL_PFNGLCOLORFRAGMENTOP2ATIPROC nglColorFragmentOp2ATI; extern PFNGLCOLORFRAGMENTOP2ATIPROC nglColorFragmentOp2ATI;
extern NEL_PFNGLCOLORFRAGMENTOP3ATIPROC nglColorFragmentOp3ATI; extern PFNGLCOLORFRAGMENTOP3ATIPROC nglColorFragmentOp3ATI;
extern NEL_PFNGLALPHAFRAGMENTOP1ATIPROC nglAlphaFragmentOp1ATI; extern PFNGLALPHAFRAGMENTOP1ATIPROC nglAlphaFragmentOp1ATI;
extern NEL_PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI; extern PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI;
extern NEL_PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI; extern PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI;
extern NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI; extern PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI;
// GL_ATI_vertex_attrib_array_object // GL_ATI_vertex_attrib_array_object
//================================== //==================================
extern NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC nglVertexAttribArrayObjectATI; extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC nglVertexAttribArrayObjectATI;
extern NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC nglGetVertexAttribArrayObjectfvATI; extern PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC nglGetVertexAttribArrayObjectfvATI;
extern NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC nglGetVertexAttribArrayObjectivATI; extern PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC nglGetVertexAttribArrayObjectivATI;
// GL_ARB_fragment_shader_extension // GL_ARB_fragment_shader_extension
//================================== //==================================
extern NEL_PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB; extern PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB;
extern NEL_PFNGLBINDPROGRAMARBPROC nglBindProgramARB; extern PFNGLBINDPROGRAMARBPROC nglBindProgramARB;
extern NEL_PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB; extern PFNGLDELETEPROGRAMSARBPROC nglDeleteProgramsARB;
extern NEL_PFNGLGENPROGRAMSARBPROC nglGenProgramsARB; extern PFNGLGENPROGRAMSARBPROC nglGenProgramsARB;
extern NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB; extern PFNGLPROGRAMENVPARAMETER4DARBPROC nglProgramEnvParameter4dARB;
extern NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB; extern PFNGLPROGRAMENVPARAMETER4DVARBPROC nglProgramEnvParameter4dvARB;
extern NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB; extern PFNGLPROGRAMENVPARAMETER4FARBPROC nglProgramEnvParameter4fARB;
extern NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB; extern PFNGLPROGRAMENVPARAMETER4FVARBPROC nglProgramEnvParameter4fvARB;
extern NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglGetProgramLocalParameter4dARB; extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC nglGetProgramLocalParameter4dARB;
extern NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglGetProgramLocalParameter4dvARB; extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC nglGetProgramLocalParameter4dvARB;
extern NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglGetProgramLocalParameter4fARB; extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC nglGetProgramLocalParameter4fARB;
extern NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB; extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC nglGetProgramLocalParameter4fvARB;
extern NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB; extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC nglGetProgramEnvParameterdvARB;
extern NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB; extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC nglGetProgramEnvParameterfvARB;
extern NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB; extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC nglGetProgramLocalParameterdvARB;
extern NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB; extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC nglGetProgramLocalParameterfvARB;
extern NEL_PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB; extern PFNGLGETPROGRAMIVARBPROC nglGetProgramivARB;
extern NEL_PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB; extern PFNGLGETPROGRAMSTRINGARBPROC nglGetProgramStringARB;
extern NEL_PFNGLISPROGRAMARBPROC nglIsProgramARB; extern PFNGLISPROGRAMARBPROC nglIsProgramARB;
// GL_ARB_vertex_buffer_object // GL_ARB_vertex_buffer_object
//================================== //==================================
@ -639,7 +662,10 @@ extern PFNGLUNMAPBUFFERARBPROC nglUnmapBufferARB;
extern PFNGLGETBUFFERPARAMETERIVARBPROC nglGetBufferParameterivARB; extern PFNGLGETBUFFERPARAMETERIVARBPROC nglGetBufferParameterivARB;
extern PFNGLGETBUFFERPOINTERVARBPROC nglGetBufferPointervARB; extern PFNGLGETBUFFERPOINTERVARBPROC nglGetBufferPointervARB;
// GL_ARB_map_buffer_range
//==================================
extern PFNGLMAPBUFFERRANGEPROC nglMapBufferRange;
extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC nglFlushMappedBufferRange;
// GL_ARB_vertex_program // GL_ARB_vertex_program
//================================== //==================================
@ -708,15 +734,24 @@ extern PFNGLISPROGRAMARBPROC nglIsProgramARB;
// GL_NV_occlusion_query // GL_NV_occlusion_query
//================================== //==================================
extern NEL_PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV; extern PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV;
extern NEL_PFNGLDELETEOCCLUSIONQUERIESNVPROC nglDeleteOcclusionQueriesNV; extern PFNGLDELETEOCCLUSIONQUERIESNVPROC nglDeleteOcclusionQueriesNV;
extern NEL_PFNGLISOCCLUSIONQUERYNVPROC nglIsOcclusionQueryNV; extern PFNGLISOCCLUSIONQUERYNVPROC nglIsOcclusionQueryNV;
extern NEL_PFNGLBEGINOCCLUSIONQUERYNVPROC nglBeginOcclusionQueryNV; extern PFNGLBEGINOCCLUSIONQUERYNVPROC nglBeginOcclusionQueryNV;
extern NEL_PFNGLENDOCCLUSIONQUERYNVPROC nglEndOcclusionQueryNV; extern PFNGLENDOCCLUSIONQUERYNVPROC nglEndOcclusionQueryNV;
extern NEL_PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV; extern PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV;
extern NEL_PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV; extern PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV;
// ARB_occlusion_query
//==================================
extern PFNGLGENQUERIESPROC nglGenQueriesARB;
extern PFNGLDELETEQUERIESPROC nglDeleteQueriesARB;
extern PFNGLISQUERYPROC nglIsQueryARB;
extern PFNGLBEGINQUERYPROC nglBeginQueryARB;
extern PFNGLENDQUERYPROC nglEndQueryARB;
extern PFNGLGETQUERYIVPROC nglGetQueryivARB;
extern PFNGLGETQUERYOBJECTIVPROC nglGetQueryObjectivARB;
extern PFNGLGETQUERYOBJECTUIVPROC nglGetQueryObjectuivARB;
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
@ -745,44 +780,58 @@ extern PFNWGLGETSWAPINTERVALEXTPROC nwglGetSwapIntervalEXT;
// WGL_ARB_extensions_string // WGL_ARB_extensions_string
extern PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB; extern PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB;
// WGL_AMD_gpu_association
//========================
extern PFNWGLGETGPUIDSAMDPROC nwglGetGPUIDsAMD;
extern PFNWGLGETGPUINFOAMDPROC nwglGetGPUInfoAMD;
extern PFNWGLGETCONTEXTGPUIDAMDPROC nwglGetContextGPUIDAMD;
extern PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC nwglCreateAssociatedContextAMD;
extern PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC nwglCreateAssociatedContextAttribsAMD;
extern PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC nwglDeleteAssociatedContextAMD;
extern PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC nwglMakeAssociatedContextCurrentAMD;
extern PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC nwglGetCurrentAssociatedContextAMD;
extern PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC nwglBlitContextFramebufferAMD;
#elif defined(NL_OS_MAC) #elif defined(NL_OS_MAC)
#elif defined(NL_OS_UNIX) #elif defined(NL_OS_UNIX)
// Swap control extensions // Swap control extensions
//=========================== //===========================
extern NEL_PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; extern PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT;
extern PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI; extern PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI;
extern NEL_PFNGLXSWAPINTERVALMESAPROC nglXSwapIntervalMESA; extern PFNGLXSWAPINTERVALMESAPROC nglXSwapIntervalMESA;
extern NEL_PFNGLXGETSWAPINTERVALMESAPROC nglXGetSwapIntervalMESA; extern PFNGLXGETSWAPINTERVALMESAPROC nglXGetSwapIntervalMESA;
#endif #endif
// GL_EXT_framebuffer_object // GL_EXT_framebuffer_object
extern NEL_PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT; extern PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT;
extern NEL_PFNGLISFRAMEBUFFEREXTPROC nglIsFramebufferEXT; extern PFNGLISFRAMEBUFFEREXTPROC nglIsFramebufferEXT;
extern NEL_PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC nglCheckFramebufferStatusEXT; extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC nglCheckFramebufferStatusEXT;
extern NEL_PFNGLGENFRAMEBUFFERSEXTPROC nglGenFramebuffersEXT; extern PFNGLGENFRAMEBUFFERSEXTPROC nglGenFramebuffersEXT;
extern NEL_PFNGLBINDFRAMEBUFFEREXTPROC nglBindFramebufferEXT; extern PFNGLBINDFRAMEBUFFEREXTPROC nglBindFramebufferEXT;
extern NEL_PFNGLFRAMEBUFFERTEXTURE2DEXTPROC nglFramebufferTexture2DEXT; extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC nglFramebufferTexture2DEXT;
extern NEL_PFNGLGENRENDERBUFFERSEXTPROC nglGenRenderbuffersEXT; extern PFNGLGENRENDERBUFFERSEXTPROC nglGenRenderbuffersEXT;
extern NEL_PFNGLBINDRENDERBUFFEREXTPROC nglBindRenderbufferEXT; extern PFNGLBINDRENDERBUFFEREXTPROC nglBindRenderbufferEXT;
extern NEL_PFNGLRENDERBUFFERSTORAGEEXTPROC nglRenderbufferStorageEXT; extern PFNGLRENDERBUFFERSTORAGEEXTPROC nglRenderbufferStorageEXT;
extern NEL_PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC nglFramebufferRenderbufferEXT; extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC nglFramebufferRenderbufferEXT;
extern NEL_PFNGLDELETERENDERBUFFERSEXTPROC nglDeleteRenderbuffersEXT; extern PFNGLDELETERENDERBUFFERSEXTPROC nglDeleteRenderbuffersEXT;
extern NEL_PFNGLDELETEFRAMEBUFFERSEXTPROC nglDeleteFramebuffersEXT; extern PFNGLDELETEFRAMEBUFFERSEXTPROC nglDeleteFramebuffersEXT;
extern NEL_PFNGETRENDERBUFFERPARAMETERIVEXTPROC nglGetRenderbufferParameterivEXT; extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC nglGetRenderbufferParameterivEXT;
extern NEL_PFNGENERATEMIPMAPEXTPROC nglGenerateMipmapEXT; extern PFNGLGENERATEMIPMAPEXTPROC nglGenerateMipmapEXT;
// GL_EXT_framebuffer_blit // GL_EXT_framebuffer_blit
extern NEL_PFNGLBLITFRAMEBUFFEREXTPROC nglBlitFramebufferEXT; extern PFNGLBLITFRAMEBUFFEREXTPROC nglBlitFramebufferEXT;
// GL_EXT_framebuffer_multisample // GL_EXT_framebuffer_multisample
extern NEL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC nglRenderbufferStorageMultisampleEXT; extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC nglRenderbufferStorageMultisampleEXT;
// GL_ARB_multisample // GL_ARB_multisample
extern NEL_PFNGLSAMPLECOVERAGEARBPROC nglSampleCoverageARB; extern PFNGLSAMPLECOVERAGEARBPROC nglSampleCoverageARB;
#endif // USE_OPENGLES #endif // USE_OPENGLES

View file

@ -25,44 +25,8 @@ extern "C" {
#endif #endif
#ifdef USE_OPENGLES #ifdef USE_OPENGLES
// OES_mapbuffer
//==============
typedef void* (APIENTRY * NEL_PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
typedef GLboolean (APIENTRY * NEL_PFNGLUNMAPBUFFEROESPROC) (GLenum target);
typedef void (APIENTRY * NEL_PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
typedef void (APIENTRY * NEL_PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
// GL_OES_framebuffer_object
//==================================
typedef GLboolean (APIENTRY * NEL_PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer);
typedef void (APIENTRY * NEL_PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer);
typedef void (APIENTRY * NEL_PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers);
typedef void (APIENTRY * NEL_PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers);
typedef void (APIENTRY * NEL_PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (APIENTRY * NEL_PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params);
typedef GLboolean (APIENTRY * NEL_PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer);
typedef void (APIENTRY * NEL_PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer);
typedef void (APIENTRY * NEL_PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers);
typedef void (APIENTRY * NEL_PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers);
typedef GLenum (APIENTRY * NEL_PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target);
typedef void (APIENTRY * NEL_PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
typedef void (APIENTRY * NEL_PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
typedef void (APIENTRY * NEL_PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
typedef void (APIENTRY * NEL_PFNGLGENERATEMIPMAPOESPROC) (GLenum target);
// GL_OES_texture_cube_map
//==================================
typedef void (APIENTRY * NEL_PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param);
typedef void (APIENTRY * NEL_PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params);
typedef void (APIENTRY * NEL_PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param);
typedef void (APIENTRY * NEL_PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params);
typedef void (APIENTRY * NEL_PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
typedef void (APIENTRY * NEL_PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
typedef void (APIENTRY * NEL_PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params);
typedef void (APIENTRY * NEL_PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params);
typedef void (APIENTRY * NEL_PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
// use same defines for OpenGL and OpenGL ES to simplify the code
#define GL_MULTISAMPLE_ARB GL_MULTISAMPLE #define GL_MULTISAMPLE_ARB GL_MULTISAMPLE
#define GL_TEXTURE_CUBE_MAP_ARB GL_TEXTURE_CUBE_MAP_OES #define GL_TEXTURE_CUBE_MAP_ARB GL_TEXTURE_CUBE_MAP_OES
#define GL_NONE 0 #define GL_NONE 0
@ -86,346 +50,6 @@ typedef void (APIENTRY * NEL_PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pnam
#else #else
// ***************************************************************************
// ***************************************************************************
// The NEL Functions Typedefs.
// Must do it for compatibilities with futures version of gl.h
// eg: version 1.2 does not define PFNGLACTIVETEXTUREARBPROC. Hence, do it now, with our special name
// ***************************************************************************
// ***************************************************************************
#define WGL_COVERAGE_SAMPLES_NV 0x2042
#define WGL_COLOR_SAMPLES_NV 0x20B9
// ARB_multitexture
//=================
typedef void (APIENTRY * NEL_PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
typedef void (APIENTRY * NEL_PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
typedef void (APIENTRY * NEL_PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
// ARB_TextureCompression.
//========================
typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRY * NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);
// VertexArrayRangeNV.
//====================
typedef void (APIENTRY * NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
typedef void (APIENTRY * NEL_PFNGLVERTEXARRAYRANGENVPROC) (GLsizei size, const GLvoid *pointer);
// FenceNV.
//====================
typedef void (APIENTRY * NEL_PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
typedef void (APIENTRY * NEL_PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
typedef GLboolean (APIENTRY * NEL_PFNGLISFENCENVPROC) (GLuint fence);
typedef GLboolean (APIENTRY * NEL_PFNGLTESTFENCENVPROC) (GLuint fence);
typedef void (APIENTRY * NEL_PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
typedef void (APIENTRY * NEL_PFNGLFINISHFENCENVPROC) (GLuint fence);
typedef void (APIENTRY * NEL_PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
// VertexWeighting.
//==================
typedef void (APIENTRY * NEL_PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
typedef void (APIENTRY * NEL_PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
typedef void (APIENTRY * NEL_PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
// VertexProgramExtension.
//========================
typedef GLboolean (APIENTRY * NEL_PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
typedef void (APIENTRY * NEL_PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
typedef void (APIENTRY * NEL_PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
typedef void (APIENTRY * NEL_PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
typedef void (APIENTRY * NEL_PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
typedef void (APIENTRY * NEL_PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
typedef void (APIENTRY * NEL_PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
typedef void (APIENTRY * NEL_PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
typedef void (APIENTRY * NEL_PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
typedef void (APIENTRY * NEL_PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
typedef void (APIENTRY * NEL_PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
typedef void (APIENTRY * NEL_PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
typedef void (APIENTRY * NEL_PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
typedef void (APIENTRY * NEL_PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
typedef GLboolean (APIENTRY * NEL_PFNGLISPROGRAMNVPROC) (GLuint id);
typedef void (APIENTRY * NEL_PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
typedef void (APIENTRY * NEL_PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
// VertexShaderExtension (EXT)
//============================
typedef void (APIENTRY * NEL_PFNGLBEGINVERTEXSHADEREXTPROC) ( void );
typedef void (APIENTRY * NEL_PFNGLENDVERTEXSHADEREXTPROC) ( void );
typedef void (APIENTRY * NEL_PFNGLBINDVERTEXSHADEREXTPROC) ( GLuint id );
typedef GLuint (APIENTRY * NEL_PFNGLGENVERTEXSHADERSEXTPROC) ( GLuint range );
typedef void (APIENTRY * NEL_PFNGLDELETEVERTEXSHADEREXTPROC) ( GLuint id );
typedef void (APIENTRY * NEL_PFNGLSHADEROP1EXTPROC) ( GLenum op, GLuint res, GLuint arg1 );
typedef void (APIENTRY * NEL_PFNGLSHADEROP2EXTPROC) ( GLenum op, GLuint res, GLuint arg1, GLuint arg2 );
typedef void (APIENTRY * NEL_PFNGLSHADEROP3EXTPROC) ( GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3 );
typedef void (APIENTRY * NEL_PFNGLSWIZZLEEXTPROC) ( GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW );
typedef void (APIENTRY * NEL_PFNGLWRITEMASKEXTPROC) ( GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW );
typedef void (APIENTRY * NEL_PFNGLINSERTCOMPONENTEXTPROC) ( GLuint res, GLuint src, GLuint num );
typedef void (APIENTRY * NEL_PFNGLEXTRACTCOMPONENTEXTPROC) ( GLuint res, GLuint src, GLuint num );
typedef GLuint (APIENTRY * NEL_PFNGLGENSYMBOLSEXTPROC) ( GLenum datatype, GLenum storagetype, GLenum range, GLuint components ) ;
typedef void (APIENTRY * NEL_PFNGLSETINVARIANTEXTPROC) ( GLuint id, GLenum type, void *addr );
typedef void (APIENTRY * NEL_PFNGLSETLOCALCONSTANTEXTPROC) ( GLuint id, GLenum type, void *addr );
typedef void (APIENTRY * NEL_PFNGLVARIANTPOINTEREXTPROC) ( GLuint id, GLenum type, GLuint stride, void *addr );
typedef void (APIENTRY * NEL_PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) ( GLuint id);
typedef void (APIENTRY * NEL_PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) ( GLuint id);
typedef GLuint (APIENTRY * NEL_PFNGLBINDLIGHTPARAMETEREXTPROC) ( GLenum light, GLenum value);
typedef GLuint (APIENTRY * NEL_PFNGLBINDMATERIALPARAMETEREXTPROC) ( GLenum face, GLenum value);
typedef GLuint (APIENTRY * NEL_PFNGLBINDTEXGENPARAMETEREXTPROC) ( GLenum unit, GLenum coord, GLenum value);
typedef GLuint (APIENTRY * NEL_PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) ( GLenum unit, GLenum value);
typedef GLuint (APIENTRY * NEL_PFNGLBINDPARAMETEREXTPROC) ( GLenum value);
typedef GLboolean (APIENTRY * NEL_PFNGLISVARIANTENABLEDEXTPROC) ( GLuint id, GLenum cap);
typedef void (APIENTRY * NEL_PFNGLGETVARIANTBOOLEANVEXTPROC) ( GLuint id, GLenum value, GLboolean *data);
typedef void (APIENTRY * NEL_PFNGLGETVARIANTINTEGERVEXTPROC) ( GLuint id, GLenum value, GLint *data);
typedef void (APIENTRY * NEL_PFNGLGETVARIANTFLOATVEXTPROC) ( GLuint id, GLenum value, GLfloat *data);
typedef void (APIENTRY * NEL_PFNGLGETVARIANTPOINTERVEXTPROC) ( GLuint id, GLenum value, void **data);
typedef void (APIENTRY * NEL_PFNGLGETINVARIANTBOOLEANVEXTPROC) ( GLuint id, GLenum value, GLboolean *data);
typedef void (APIENTRY * NEL_PFNGLGETINVARIANTINTEGERVEXTPROC) ( GLuint id, GLenum value, GLint *data);
typedef void (APIENTRY * NEL_PFNGLGETINVARIANTFLOATVEXTPROC) ( GLuint id, GLenum value, GLfloat *data);
typedef void (APIENTRY * NEL_PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) ( GLuint id, GLenum value, GLboolean *data);
typedef void (APIENTRY * NEL_PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) ( GLuint id, GLenum value, GLint *data);
typedef void (APIENTRY * NEL_PFNGLGETLOCALCONSTANTFLOATVEXTPROC) ( GLuint id, GLenum value, GLfloat *data);
// SecondaryColor extension
//========================
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
// BlendColor extension
//========================
typedef void (APIENTRY * NEL_PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
// GL_ATI_vertex_array_object extension
//========================
typedef GLuint (APIENTRY * NEL_PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
typedef GLboolean (APIENTRY * NEL_PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
typedef void (APIENTRY * NEL_PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
typedef void (APIENTRY * NEL_PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
typedef void (APIENTRY * NEL_PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
typedef void (APIENTRY * NEL_PFNGLDELETEOBJECTBUFFERATIPROC) (GLuint buffer);
typedef void (APIENTRY * NEL_PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
typedef void (APIENTRY * NEL_PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
typedef void (APIENTRY * NEL_PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
typedef void (APIENTRY * NEL_PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
typedef void (APIENTRY * NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
typedef void (APIENTRY * NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
// GL_ATI_fragment_shader extension
//==================================
typedef GLuint (APIENTRY *NEL_PFNGLGENFRAGMENTSHADERSATIPROC)(GLuint range);
typedef GLvoid (APIENTRY *NEL_PFNGLBINDFRAGMENTSHADERATIPROC)(GLuint id);
typedef GLvoid (APIENTRY *NEL_PFNGLDELETEFRAGMENTSHADERATIPROC)(GLuint id);
typedef GLvoid (APIENTRY *NEL_PFNGLBEGINFRAGMENTSHADERATIPROC)();
typedef GLvoid (APIENTRY *NEL_PFNGLENDFRAGMENTSHADERATIPROC)();
typedef GLvoid (APIENTRY *NEL_PFNGLPASSTEXCOORDATIPROC)(GLuint dst, GLuint coord, GLenum swizzle);
typedef GLvoid (APIENTRY *NEL_PFNGLSAMPLEMAPATIPROC)(GLuint dst, GLuint interp, GLenum swizzle);
typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMask,
GLuint dstMod, GLuint arg1, GLuint arg1Rep,
GLuint arg1Mod);
typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMask,
GLuint dstMod, GLuint arg1, GLuint arg1Rep,
GLuint arg1Mod, GLuint arg2, GLuint arg2Rep,
GLuint arg2Mod);
typedef GLvoid (APIENTRY *NEL_PFNGLCOLORFRAGMENTOP3ATIPROC)(GLenum op, GLuint dst, GLuint dstMask,
GLuint dstMod, GLuint arg1, GLuint arg1Rep,
GLuint arg1Mod, GLuint arg2, GLuint arg2Rep,
GLuint arg2Mod, GLuint arg3, GLuint arg3Rep,
GLuint arg3Mod);
typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP1ATIPROC)(GLenum op, GLuint dst, GLuint dstMod,
GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP2ATIPROC)(GLenum op, GLuint dst, GLuint dstMod,
GLuint arg1, GLuint arg1Rep, GLuint arg1Mod,
GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
typedef GLvoid (APIENTRY *NEL_PFNGLALPHAFRAGMENTOP3ATIPROC)(GLenum op, GLuint dst, GLuint dstMod,
GLuint arg1, GLuint arg1Rep, GLuint arg1Mod,
GLuint arg2, GLuint arg2Rep, GLuint arg2Mod,
GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
typedef GLvoid (APIENTRY *NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC)(GLuint dst, const GLfloat *value);
// GL_ATI_map_object_buffer
//==================================
typedef void *(APIENTRY * NEL_PFNGLMAPOBJECTBUFFERATIPROC)(GLuint buffer);
typedef void (APIENTRY * NEL_PFNGLUNMAPOBJECTBUFFERATIPROC)(GLuint buffer);
// GL_ATI_vertex_attrib_array_object
//==================================
typedef GLvoid (APIENTRY * NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
typedef GLvoid (APIENTRY * NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC)(GLuint index, GLenum pname, GLfloat *params);
typedef GLvoid (APIENTRY * NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC)(GLuint index, GLenum pname, GLint *params);
// GL_ARB_fragment_program
//==================================
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMSTRINGARBPROC)(GLenum target, GLenum format, GLsizei len,const GLvoid *string);
typedef GLvoid (APIENTRY *NEL_PFNGLBINDPROGRAMARBPROC)(GLenum target, GLuint program);
typedef GLvoid (APIENTRY *NEL_PFNGLDELETEPROGRAMSARBPROC)(GLsizei n, const GLuint *programs);
typedef GLvoid (APIENTRY *NEL_PFNGLGENPROGRAMSARBPROC)(GLsizei n, GLuint *programs);
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4DARBPROC)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4DVARBPROC)(GLenum target, GLuint index, const GLdouble *params);
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4FARBPROC)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMENVPARAMETER4FVARBPROC)(GLenum target, GLuint index, const GLfloat *params);
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4DARBPROC)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4DVARBPROC)(GLenum target, GLuint index, const GLdouble *params);
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4FARBPROC)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef GLvoid (APIENTRY *NEL_PFNGLPROGRAMLOCALPARAMETER4FVARBPROC)(GLenum target, GLuint index, const GLfloat *params);
typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMENVPARAMETERDVARBPROC)(GLenum target, GLuint index, GLdouble *params);
typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMENVPARAMETERFVARBPROC)(GLenum target, GLuint index, GLfloat *params);
typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC)(GLenum target, GLuint index, GLdouble *params);
typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC)(GLenum target, GLuint index, GLfloat *params);
typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMIVARBPROC)(GLenum target, GLenum pname, int *params);
typedef GLvoid (APIENTRY *NEL_PFNGLGETPROGRAMSTRINGARBPROC)(GLenum target, GLenum pname, GLvoid *string);
typedef GLboolean (APIENTRY *NEL_PFNGLISPROGRAMARBPROC)(GLuint program);
typedef GLboolean (APIENTRY * NEL_PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
typedef GLboolean (APIENTRY * NEL_PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
typedef GLenum (APIENTRY * NEL_PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum pname);
typedef GLvoid (APIENTRY * NEL_PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
typedef GLvoid (APIENTRY * NEL_PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
typedef GLvoid (APIENTRY * NEL_PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
typedef GLvoid (APIENTRY * NEL_PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
typedef GLvoid (APIENTRY * NEL_PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
typedef GLvoid (APIENTRY * NEL_PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
typedef GLvoid (APIENTRY * NEL_PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
typedef GLvoid (APIENTRY * NEL_PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
typedef GLvoid (APIENTRY * NEL_PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
typedef GLvoid (APIENTRY * NEL_PFNGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
typedef GLvoid (APIENTRY * NEL_PFNGENERATEMIPMAPEXTPROC) (GLenum target);
typedef GLvoid (APIENTRY * NEL_PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
typedef GLvoid (APIENTRY * NEL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
#ifndef NL_GL_NV_occlusion_query
#define NL_GL_NV_occlusion_query 1
typedef GLvoid (APIENTRY * NEL_PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
typedef GLvoid (APIENTRY * NEL_PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
typedef GLboolean (APIENTRY * NEL_PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
typedef GLvoid (APIENTRY * NEL_PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
typedef GLvoid (APIENTRY * NEL_PFNGLENDOCCLUSIONQUERYNVPROC) ();
typedef GLvoid (APIENTRY * NEL_PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
typedef GLvoid (APIENTRY * NEL_PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
#endif /* GL_NV_occlusion_query */
#ifndef NL_GL_ARB_multisample
#define NL_GL_ARB_multisample 1
typedef GLvoid (APIENTRY * NEL_PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
#endif
#if defined(NL_OS_MAC) #if defined(NL_OS_MAC)
// Mac GL extensions // Mac GL extensions
@ -433,18 +57,6 @@ typedef GLvoid (APIENTRY * NEL_PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, G
#elif defined(NL_OS_UNIX) #elif defined(NL_OS_UNIX)
// GLX extensions // GLX extensions
#ifndef NL_GLX_EXT_swap_control
#define NL_GLX_EXT_swap_control 1
#ifndef GLX_EXT_swap_control
#define GLX_SWAP_INTERVAL_EXT 0x20F1
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
#endif
typedef GLint (APIENTRY * NEL_PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, GLint interval);
#endif // NL_GLX_EXT_swap_control
#ifndef NL_GLX_MESA_swap_control #ifndef NL_GLX_MESA_swap_control
#define NL_GLX_MESA_swap_control 1 #define NL_GLX_MESA_swap_control 1

View file

@ -799,9 +799,7 @@ uint CDriverGL::getDoubleClickDelay(bool hardwareMouse)
} }
#elif defined(NL_OS_MAC) #elif defined(NL_OS_MAC)
# warning "OpenGL Driver: Missing Mac Implementation for getDoubleClickDelay" // TODO: Missing Mac Implementation for getDoubleClickDelay
nlwarning("OpenGL Driver: Missing Mac Implementation for getDoubleClickDelay");
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
// TODO for Linux // TODO for Linux

View file

@ -70,13 +70,16 @@ CPixelProgamDrvInfosGL::CPixelProgamDrvInfosGL (CDriverGL *drv, ItGPUPrgDrvInfoP
bool CDriverGL::supportPixelProgram(CPixelProgram::TProfile profile) const bool CDriverGL::supportPixelProgram(CPixelProgram::TProfile profile) const
{ {
H_AUTO_OGL(CPixelProgamDrvInfosGL_supportPixelProgram_profile) H_AUTO_OGL(CPixelProgamDrvInfosGL_supportPixelProgram_profile);
switch (profile) switch (profile)
{ {
case CPixelProgram::arbfp1: case CPixelProgram::arbfp1:
return _Extensions.ARBFragmentProgram; return _Extensions.ARBFragmentProgram;
case CPixelProgram::fp40: case CPixelProgram::fp40:
return _Extensions.NVFragmentProgram2; return _Extensions.NVFragmentProgram2;
default:
break;
} }
return false; return false;
} }

View file

@ -2269,7 +2269,7 @@ void CDriverGL::swapTextureHandle(ITexture &tex0, ITexture &tex1)
// *************************************************************************** // ***************************************************************************
uint CDriverGL::getTextureHandle(const ITexture &tex) uintptr_t CDriverGL::getTextureHandle(const ITexture &tex)
{ {
H_AUTO_OGL(CDriverGL_getTextureHandle) H_AUTO_OGL(CDriverGL_getTextureHandle)
// If DrvShare not setuped // If DrvShare not setuped

View file

@ -60,6 +60,8 @@ inline void CDriverGL::setUniform4fInl(TProgram program, uint index, float f0, f
nglProgramEnvParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, index, f0, f1, f2, f3); nglProgramEnvParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, index, f0, f1, f2, f3);
} }
break; break;
default:
break;
} }
#endif #endif
} }
@ -100,6 +102,8 @@ inline void CDriverGL::setUniform4fvInl(TProgram program, uint index, size_t num
} }
} }
break; break;
default:
break;
} }
#endif #endif
} }

View file

@ -147,9 +147,9 @@ bool CDriverGL::setupVertexBuffer(CVertexBuffer& VB)
CVBDrvInfosGL *info = new CVBDrvInfosGL(this, it, &VB); CVBDrvInfosGL *info = new CVBDrvInfosGL(this, it, &VB);
*it= VB.DrvInfos = info; *it= VB.DrvInfos = info;
// Preferred memory // Preferred memory, AGPVolatile only goes through when ARBMapBufferRange is available
CVertexBuffer::TPreferredMemory preferred = VB.getPreferredMemory (); CVertexBuffer::TPreferredMemory preferred = VB.getPreferredMemory ();
if ((preferred == CVertexBuffer::RAMVolatile) || (preferred == CVertexBuffer::AGPVolatile)) if ((preferred == CVertexBuffer::RAMVolatile) || (preferred == CVertexBuffer::AGPVolatile && !_Extensions.ARBMapBufferRange))
preferred = CVertexBuffer::RAMPreferred; preferred = CVertexBuffer::RAMPreferred;
const uint size = VB.capacity()*VB.getVertexSize(); const uint size = VB.capacity()*VB.getVertexSize();
uint preferredMemory = _Extensions.DisableHardwareVertexArrayAGP ? CVertexBuffer::RAMPreferred : preferred; uint preferredMemory = _Extensions.DisableHardwareVertexArrayAGP ? CVertexBuffer::RAMPreferred : preferred;
@ -159,6 +159,12 @@ bool CDriverGL::setupVertexBuffer(CVertexBuffer& VB)
info->_VBHard = createVertexBufferHard(size, VB.capacity(), (CVertexBuffer::TPreferredMemory)preferredMemory, &VB); info->_VBHard = createVertexBufferHard(size, VB.capacity(), (CVertexBuffer::TPreferredMemory)preferredMemory, &VB);
if (info->_VBHard) if (info->_VBHard)
break; break;
if ((CVertexBuffer::TPreferredMemory)preferredMemory == CVertexBuffer::AGPVolatile)
{
preferredMemory = CVertexBuffer::RAMPreferred;
break;
}
preferredMemory--; preferredMemory--;
} }
@ -170,7 +176,7 @@ bool CDriverGL::setupVertexBuffer(CVertexBuffer& VB)
} }
// Upload the data // Upload the data
VB.setLocation ((CVertexBuffer::TLocation)preferredMemory); VB.setLocation(preferredMemory == CVertexBuffer::AGPVolatile ? CVertexBuffer::AGPResident : (CVertexBuffer::TLocation)preferredMemory);
} }
} }
@ -740,7 +746,7 @@ bool CDriverGL::supportVertexBufferHard() const
bool CDriverGL::supportVolatileVertexBuffer() const bool CDriverGL::supportVolatileVertexBuffer() const
{ {
H_AUTO_OGL(CDriverGL_supportVolatileVertexBuffer) H_AUTO_OGL(CDriverGL_supportVolatileVertexBuffer)
return false; return _Extensions.ARBMapBufferRange;
} }
@ -769,6 +775,7 @@ IVertexBufferHardGL *CDriverGL::createVertexBufferHard(uint size, uint numVertic
IVertexArrayRange *vertexArrayRange= NULL; IVertexArrayRange *vertexArrayRange= NULL;
switch(vbType) switch(vbType)
{ {
case CVertexBuffer::AGPVolatile:
case CVertexBuffer::AGPPreferred: case CVertexBuffer::AGPPreferred:
vertexArrayRange= _AGPVertexArrayRange; vertexArrayRange= _AGPVertexArrayRange;
break; break;
@ -1809,7 +1816,7 @@ void CDriverGL::fenceOnCurVBHardIfNeeded(IVertexBufferHardGL *newVBHard)
#ifndef USE_OPENGLES #ifndef USE_OPENGLES
// If old is not a VBHard, or if not a NVidia VBHard, no-op. // If old is not a VBHard, or if not a NVidia VBHard, no-op.
if( _CurrentVertexBufferHard==NULL || !_CurrentVertexBufferHard->VBType == IVertexBufferHardGL::NVidiaVB) if( _CurrentVertexBufferHard==NULL || _CurrentVertexBufferHard->VBType != IVertexBufferHardGL::NVidiaVB)
return; return;
// if we do not activate the same (NB: newVBHard==NULL if not a VBHard). // if we do not activate the same (NB: newVBHard==NULL if not a VBHard).

View file

@ -551,7 +551,7 @@ void CVertexArrayRangeATI::free()
_HeapMemory.reset(); _HeapMemory.reset();
// Free special memory. // Free special memory.
nglDeleteObjectBufferATI(_VertexObjectId); nglFreeObjectBufferATI(_VertexObjectId);
_Allocated= false; _Allocated= false;
_VertexArraySize= 0; _VertexArraySize= 0;
@ -839,7 +839,7 @@ bool CVertexArrayRangeMapObjectATI::allocate(uint32 size, CVertexBuffer::TPrefer
if (vertexObjectId) if (vertexObjectId)
{ {
// free the object // free the object
nglDeleteObjectBufferATI(vertexObjectId); nglFreeObjectBufferATI(vertexObjectId);
// //
_SizeAllocated = size; _SizeAllocated = size;
_VBType = vbType; _VBType = vbType;
@ -924,7 +924,7 @@ CVertexBufferHardGLMapObjectATI::CVertexBufferHardGLMapObjectATI(CDriverGL *drv,
CVertexBufferHardGLMapObjectATI::~CVertexBufferHardGLMapObjectATI() CVertexBufferHardGLMapObjectATI::~CVertexBufferHardGLMapObjectATI()
{ {
H_AUTO_OGL(CVertexBufferHardGLMapObjectATI_CVertexBufferHardGLMapObjectATIDtor) H_AUTO_OGL(CVertexBufferHardGLMapObjectATI_CVertexBufferHardGLMapObjectATIDtor)
if (_VertexObjectId) nglDeleteObjectBufferATI(_VertexObjectId); if (_VertexObjectId) nglFreeObjectBufferATI(_VertexObjectId);
#ifdef NL_DEBUG #ifdef NL_DEBUG
if (_VertexPtr) if (_VertexPtr)
{ {
@ -1114,7 +1114,7 @@ void CVertexArrayRangeMapObjectATI::updateLostBuffers()
{ {
nlassert((*it)->_VertexObjectId); nlassert((*it)->_VertexObjectId);
nlassert(nglIsObjectBufferATI((*it)->_VertexObjectId)); nlassert(nglIsObjectBufferATI((*it)->_VertexObjectId));
nglDeleteObjectBufferATI((*it)->_VertexObjectId); nglFreeObjectBufferATI((*it)->_VertexObjectId);
(*it)->_VertexObjectId = 0; (*it)->_VertexObjectId = 0;
(*it)->VB->setLocation(CVertexBuffer::NotResident); (*it)->VB->setLocation(CVertexBuffer::NotResident);
} }
@ -1174,6 +1174,9 @@ bool CVertexArrayRangeARB::allocate(uint32 size, CVertexBuffer::TPreferredMemory
switch(vbType) switch(vbType)
{ {
case CVertexBuffer::AGPVolatile:
glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB);
break;
case CVertexBuffer::AGPPreferred: case CVertexBuffer::AGPPreferred:
glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
break; break;
@ -1221,13 +1224,14 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff
if (glGetError() != GL_NO_ERROR) return NULL; if (glGetError() != GL_NO_ERROR) return NULL;
_Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID); _Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID);
switch(_VBType) CVertexBuffer::TPreferredMemory preferred = vb->getPreferredMemory();
switch (preferred)
{ {
case CVertexBuffer::AGPPreferred: case CVertexBuffer::AGPVolatile:
#ifdef USE_OPENGLES #ifdef USE_OPENGLES
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STREAM_DRAW);
#else #else
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB);
#endif #endif
break; break;
case CVertexBuffer::StaticPreferred: case CVertexBuffer::StaticPreferred:
@ -1244,8 +1248,13 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
#endif #endif
break; break;
// case CVertexBuffer::AGPPreferred:
default: default:
nlassert(0); #ifdef USE_OPENGLES
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW);
#else
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
#endif
break; break;
} }
if (glGetError() != GL_NO_ERROR) if (glGetError() != GL_NO_ERROR)
@ -1259,7 +1268,7 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff
return NULL; return NULL;
} }
CVertexBufferHardARB *newVbHard= new CVertexBufferHardARB(_Driver, vb); CVertexBufferHardARB *newVbHard= new CVertexBufferHardARB(_Driver, vb);
newVbHard->initGL(vertexBufferID, this, _VBType); newVbHard->initGL(vertexBufferID, this, preferred);
_Driver->_DriverGLStates.forceBindARBVertexBuffer(0); _Driver->_DriverGLStates.forceBindARBVertexBuffer(0);
return newVbHard; return newVbHard;
} }
@ -1393,6 +1402,7 @@ void *CVertexBufferHardARB::lock()
H_AUTO_OGL(CVertexBufferHardARB_lock); H_AUTO_OGL(CVertexBufferHardARB_lock);
if (_VertexPtr) return _VertexPtr; // already locked if (_VertexPtr) return _VertexPtr; // already locked
const uint size = VB->getNumVertices() * VB->getVertexSize();
if (_Invalid) if (_Invalid)
{ {
if (VB->getLocation() != CVertexBuffer::NotResident) if (VB->getLocation() != CVertexBuffer::NotResident)
@ -1414,15 +1424,14 @@ void *CVertexBufferHardARB::lock()
_Driver->incrementResetCounter(); _Driver->incrementResetCounter();
return &_DummyVB[0]; return &_DummyVB[0];
} }
const uint size = VB->getNumVertices() * VB->getVertexSize();
_Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID); _Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID);
switch(_MemType) switch(_MemType)
{ {
case CVertexBuffer::AGPPreferred: case CVertexBuffer::AGPVolatile:
#ifdef USE_OPENGLES #ifdef USE_OPENGLES
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STREAM_DRAW);
#else #else
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB);
#endif #endif
break; break;
case CVertexBuffer::StaticPreferred: case CVertexBuffer::StaticPreferred:
@ -1439,8 +1448,13 @@ void *CVertexBufferHardARB::lock()
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
#endif #endif
break; break;
// case CVertexBuffer::AGPPreferred:
default: default:
nlassert(0); #ifdef USE_OPENGLES
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW);
#else
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
#endif
break; break;
} }
if (glGetError() != GL_NO_ERROR) if (glGetError() != GL_NO_ERROR)
@ -1499,7 +1513,14 @@ void *CVertexBufferHardARB::lock()
_LastBufferSize = size; _LastBufferSize = size;
} }
#else #else
if (_MemType == CVertexBuffer::AGPVolatile)
{
_VertexPtr = nglMapBufferRange(GL_ARRAY_BUFFER, 0, size, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
}
else
{
_VertexPtr = nglMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); _VertexPtr = nglMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
if (!_VertexPtr) if (!_VertexPtr)
{ {
nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB); nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB);

View file

@ -296,7 +296,7 @@ bool GlWndProc(CDriverGL *driver, XEvent &e)
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
// *************************************************************************** // ***************************************************************************
bool CDriverGL::init (uint windowIcon, emptyProc exitFunc) bool CDriverGL::init (uintptr_t windowIcon, emptyProc exitFunc)
{ {
H_AUTO_OGL(CDriverGL_init) H_AUTO_OGL(CDriverGL_init)
@ -2347,7 +2347,7 @@ void CDriverGL::showWindow(bool show)
#elif defined(NL_OS_MAC) #elif defined(NL_OS_MAC)
# warning "OpenGL Driver: Missing Mac Implementation for showWindow" // TODO: Missing Mac Implementation for showWindow
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
@ -2771,7 +2771,7 @@ bool CDriverGL::isActive()
res = (IsWindow(_win) != FALSE); res = (IsWindow(_win) != FALSE);
#elif defined(NL_OS_MAC) #elif defined(NL_OS_MAC)
# warning "OpenGL Driver: Missing Mac Implementation for isActive (always true if a window is set)" // TODO: Missing Mac Implementation for isActive (always true if a window is set)
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
// check if our window is still active // check if our window is still active

View file

@ -14,6 +14,9 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef STDOPENGL_H
#define STDOPENGL_H
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include <cstdlib> #include <cstdlib>
@ -34,7 +37,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
# include <windowsx.h> # include <windowsx.h>
#endif #endif
@ -67,5 +72,33 @@
#include "nel/misc/mem_stream.h" #include "nel/misc/mem_stream.h"
#include "nel/misc/time_nl.h" #include "nel/misc/time_nl.h"
#include "nel/misc/command.h" #include "nel/misc/command.h"
#include "nel/misc/matrix.h"
#include "nel/misc/smart_ptr.h"
#include "nel/misc/rgba.h"
#include "nel/misc/event_emitter.h"
#include "nel/misc/bit_set.h"
#include "nel/misc/hierarchical_timer.h"
#include "nel/misc/bitmap.h"
#include "nel/misc/heap_memory.h"
#include "nel/misc/event_emitter_multi.h"
#include "nel/misc/time_nl.h"
#include "nel/misc/rect.h"
#include "nel/misc/mouse_device.h"
#include "nel/misc/dynloadlib.h"
#include "nel/misc/file.h"
#include "nel/3d/driver.h" #include "nel/3d/driver.h"
#include "nel/3d/material.h"
#include "nel/3d/vertex_buffer.h"
#include "nel/3d/ptr_set.h"
#include "nel/3d/texture_cube.h"
#include "nel/3d/vertex_program_parse.h"
#include "nel/3d/viewport.h"
#include "nel/3d/scissor.h"
#include "nel/3d/light.h"
#include "nel/3d/occlusion_query.h"
#include "nel/3d/u_driver.h"
#include "nel/3d/light.h"
#include "nel/3d/index_buffer.h"
#endif

View file

@ -82,13 +82,13 @@ void UDriver::setMatrixMode2D43()
} }
// *************************************************************************** // ***************************************************************************
UDriver *UDriver::createDriver(uint windowIcon, bool direct3d, emptyProc exitFunc) UDriver *UDriver::createDriver(uintptr_t windowIcon, bool direct3d, emptyProc exitFunc)
{ {
return new CDriverUser (windowIcon, direct3d ? CDriverUser::Direct3d:CDriverUser::OpenGl, exitFunc); return new CDriverUser (windowIcon, direct3d ? CDriverUser::Direct3d:CDriverUser::OpenGl, exitFunc);
} }
// *************************************************************************** // ***************************************************************************
UDriver *UDriver::createDriver(uint windowIcon, TDriver driver, emptyProc exitFunc) UDriver *UDriver::createDriver(uintptr_t windowIcon, TDriver driver, emptyProc exitFunc)
{ {
return new CDriverUser (windowIcon, (CDriverUser::TDriver)driver, exitFunc); return new CDriverUser (windowIcon, (CDriverUser::TDriver)driver, exitFunc);
} }
@ -114,7 +114,7 @@ bool CDriverUser::_StaticInit= false;
// *************************************************************************** // ***************************************************************************
CDriverUser::CDriverUser (uint windowIcon, TDriver driver, emptyProc exitFunc) CDriverUser::CDriverUser (uintptr_t windowIcon, TDriver driver, emptyProc exitFunc)
{ {
// The enum of IDriver and UDriver MUST be the same!!! // The enum of IDriver and UDriver MUST be the same!!!
nlassert((uint)IDriver::idCount == (uint)UDriver::idCount); nlassert((uint)IDriver::idCount == (uint)UDriver::idCount);

View file

@ -35,7 +35,9 @@
#endif // HAVE_CONFIG_H #endif // HAVE_CONFIG_H
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
#else // NL_OS_WINDOWS #else // NL_OS_WINDOWS
# include <dlfcn.h> # include <dlfcn.h>
@ -253,6 +255,7 @@ void CDRU::drawBitmap (float x, float y, float width, float height, ITexture& te
if (vb.getName().empty()) vb.setName("CDRU::drawBitmap"); if (vb.getName().empty()) vb.setName("CDRU::drawBitmap");
vb.setVertexFormat (CVertexBuffer::PositionFlag|CVertexBuffer::TexCoord0Flag); vb.setVertexFormat (CVertexBuffer::PositionFlag|CVertexBuffer::TexCoord0Flag);
vb.setNumVertices (4); vb.setNumVertices (4);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
vb.lock (vba); vb.lock (vba);
@ -271,6 +274,7 @@ void CDRU::drawBitmap (float x, float y, float width, float height, ITexture& te
if (pb.getName().empty()) NL_SET_IB_NAME(pb, "CDRU::drawBitmap"); if (pb.getName().empty()) NL_SET_IB_NAME(pb, "CDRU::drawBitmap");
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes (6); pb.setNumIndexes (6);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
{ {
CIndexBufferReadWrite iba; CIndexBufferReadWrite iba;
pb.lock (iba); pb.lock (iba);
@ -305,6 +309,7 @@ void CDRU::drawLine (float x0, float y0, float x1, float y1, IDriver& driver, CR
if (vb.getName().empty()) vb.setName("CDRU::drawLine"); if (vb.getName().empty()) vb.setName("CDRU::drawLine");
vb.setVertexFormat (CVertexBuffer::PositionFlag); vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (2); vb.setNumVertices (2);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
vb.lock (vba); vb.lock (vba);
@ -317,6 +322,7 @@ void CDRU::drawLine (float x0, float y0, float x1, float y1, IDriver& driver, CR
if (pb.getName().empty()) NL_SET_IB_NAME(pb, "CDRU::drawLine"); if (pb.getName().empty()) NL_SET_IB_NAME(pb, "CDRU::drawLine");
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes (2); pb.setNumIndexes (2);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
{ {
CIndexBufferReadWrite iba; CIndexBufferReadWrite iba;
pb.lock (iba); pb.lock (iba);
@ -350,6 +356,7 @@ void CDRU::drawTriangle (float x0, float y0, float x1, float y1, float x2, float
if (vb.getName().empty()) vb.setName("CDRU::drawTriangle"); if (vb.getName().empty()) vb.setName("CDRU::drawTriangle");
vb.setVertexFormat (CVertexBuffer::PositionFlag); vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (3); vb.setNumVertices (3);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
vb.lock (vba); vb.lock (vba);
@ -363,6 +370,7 @@ void CDRU::drawTriangle (float x0, float y0, float x1, float y1, float x2, float
if (pb.getName().empty()) NL_SET_IB_NAME(pb, "CDRU::drawTriangle"); if (pb.getName().empty()) NL_SET_IB_NAME(pb, "CDRU::drawTriangle");
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes (3); pb.setNumIndexes (3);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
{ {
CIndexBufferReadWrite iba; CIndexBufferReadWrite iba;
pb.lock (iba); pb.lock (iba);
@ -397,6 +405,7 @@ void CDRU::drawQuad (float x0, float y0, float x1, float y1, IDriver& driver, CR
if (vb.getName().empty()) vb.setName("CDRU::drawQuad"); if (vb.getName().empty()) vb.setName("CDRU::drawQuad");
vb.setVertexFormat (CVertexBuffer::PositionFlag); vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (4); vb.setNumVertices (4);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
vb.lock (vba); vb.lock (vba);
@ -433,6 +442,7 @@ void CDRU::drawQuad (float xcenter, float ycenter, float radius, IDriver& driver
if (vb.getName().empty()) vb.setName("CDRU::drawQuad"); if (vb.getName().empty()) vb.setName("CDRU::drawQuad");
vb.setVertexFormat (CVertexBuffer::PositionFlag); vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (4); vb.setNumVertices (4);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
vb.lock (vba); vb.lock (vba);
@ -482,10 +492,12 @@ void CDRU::drawTrianglesUnlit(const NLMISC::CTriangleUV *trilist, sint ntris,
if (vb.getName().empty()) vb.setName("CDRU::drawTrianglesUnlit"); if (vb.getName().empty()) vb.setName("CDRU::drawTrianglesUnlit");
vb.setVertexFormat (CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag); vb.setVertexFormat (CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag);
vb.setNumVertices (ntris*3); vb.setNumVertices (ntris*3);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
static CIndexBuffer pb; static CIndexBuffer pb;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(ntris*3); pb.setNumIndexes(ntris*3);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
if (pb.getFormat() == CIndexBuffer::Indices16) if (pb.getFormat() == CIndexBuffer::Indices16)
{ {
nlassert(ntris * 3 <= 0xffff); nlassert(ntris * 3 <= 0xffff);
@ -530,10 +542,12 @@ void CDRU::drawLinesUnlit(const NLMISC::CLine *linelist, sint nlines, CMateria
if (vb.getName().empty()) vb.setName("CDRU::drawLinesUnlit"); if (vb.getName().empty()) vb.setName("CDRU::drawLinesUnlit");
vb.setVertexFormat (CVertexBuffer::PositionFlag); vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (nlines*2); vb.setNumVertices (nlines*2);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
static CIndexBuffer pb; static CIndexBuffer pb;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(nlines*2); pb.setNumIndexes(nlines*2);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
{ {
@ -601,6 +615,7 @@ void CDRU::drawQuad (float x0, float y0, float x1, float y1, CRGBA col0, CRGBA
if (vb.getName().empty()) vb.setName("CDRU::drawQuad"); if (vb.getName().empty()) vb.setName("CDRU::drawQuad");
vb.setVertexFormat (CVertexBuffer::PositionFlag|CVertexBuffer::PrimaryColorFlag); vb.setVertexFormat (CVertexBuffer::PositionFlag|CVertexBuffer::PrimaryColorFlag);
vb.setNumVertices (4); vb.setNumVertices (4);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
vb.lock (vba); vb.lock (vba);

View file

@ -109,7 +109,7 @@ CRGBA CFastHLSModifier::convert(uint H, uint L, uint S)
return col; return col;
} }
#if defined(NL_COMP_VC) && NL_COMP_VC_VERSION >= 71 #if defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 71)
# pragma warning( push ) # pragma warning( push )
# pragma warning( disable : 4799 ) # pragma warning( disable : 4799 )
#endif #endif
@ -124,7 +124,6 @@ uint16 CFastHLSModifier::applyHLSMod(uint16 colorIn, uint8 dHue, uint dLum, uin
static uint64 mmBlank = 0; static uint64 mmBlank = 0;
static uint64 mmOne = INT64_CONSTANT(0x00FF00FF00FF00FF); static uint64 mmOne = INT64_CONSTANT(0x00FF00FF00FF00FF);
static uint64 mmGray = INT64_CONSTANT(0x0080008000800080); static uint64 mmGray = INT64_CONSTANT(0x0080008000800080);
static uint64 mmInterpBufer[4]= {0,0,0,INT64_CONSTANT(0x00FF00FF00FF00FF)};
/* /*
dLum is actually 0xFFFFFF00 + realDLum dLum is actually 0xFFFFFF00 + realDLum
@ -136,6 +135,8 @@ uint16 CFastHLSModifier::applyHLSMod(uint16 colorIn, uint8 dHue, uint dLum, uin
#if defined(NL_OS_WINDOWS) && !defined(NL_NO_ASM) #if defined(NL_OS_WINDOWS) && !defined(NL_NO_ASM)
if(CSystemInfo::hasMMX()) if(CSystemInfo::hasMMX())
{ {
static uint64 mmInterpBufer[4]= {0,0,0,INT64_CONSTANT(0x00FF00FF00FF00FF)};
__asm __asm
{ {
mov edi, offset mmInterpBufer mov edi, offset mmInterpBufer
@ -262,7 +263,7 @@ uint16 CFastHLSModifier::applyHLSMod(uint16 colorIn, uint8 dHue, uint dLum, uin
#pragma managed(pop) #pragma managed(pop)
#endif #endif
#if defined(NL_COMP_VC) && NL_COMP_VC_VERSION >= 71 #if defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 71)
# pragma warning( pop ) # pragma warning( pop )
#endif #endif

View file

@ -271,7 +271,7 @@ void CFlareModel::traverseRender()
float depthRangeNear, depthRangeFar; float depthRangeNear, depthRangeFar;
drv->getDepthRange(depthRangeNear, depthRangeFar); drv->getDepthRange(depthRangeNear, depthRangeFar);
z = (depthRangeFar - depthRangeNear) * z + depthRangeNear; z = (depthRangeFar - depthRangeNear) * z + depthRangeNear;
if (!v.size() || z > v[0]) // test against z-buffer if (v.empty() || z > v[0]) // test against z-buffer
{ {
visibilityRatio = 0.f; visibilityRatio = 0.f;
} }

View file

@ -354,7 +354,7 @@ void CLodCharacterShape::buildMesh(const std::string &name, const CLodCharacte
const vector<CVector> &normals= lodBuild.Normals; const vector<CVector> &normals= lodBuild.Normals;
nlassert(numVertices>0); nlassert(numVertices>0);
nlassert(triangleIndices.size()>0); nlassert(!triangleIndices.empty());
nlassert((triangleIndices.size()%3)==0); nlassert((triangleIndices.size()%3)==0);
nlassert(skinWeights.size() == numVertices); nlassert(skinWeights.size() == numVertices);
nlassert(uvs.size() == numVertices); nlassert(uvs.size() == numVertices);

View file

@ -16,6 +16,10 @@
#include "std3d.h" #include "std3d.h"
#ifdef NL_HAS_SSE2
# include <xmmintrin.h>
#endif
#include "nel/misc/bsphere.h" #include "nel/misc/bsphere.h"
#include "nel/misc/fast_mem.h" #include "nel/misc/fast_mem.h"
#include "nel/misc/system_info.h" #include "nel/misc/system_info.h"
@ -39,124 +43,6 @@ namespace NL3D
{ {
// ***************************************************************************
// ***************************************************************************
// CMatrix3x4SSE array correctly aligned
// ***************************************************************************
// ***************************************************************************
// ***************************************************************************
#define NL3D_SSE_ALIGNEMENT 16
/**
* A CMatrix3x4SSE array correctly aligned
* NB: SSE is no more used (no speed gain, some memory problem), but keep it for possible future usage.
*/
class CMatrix3x4SSEArray
{
private:
void *_AllocData;
void *_Data;
uint _Size;
uint _Capacity;
public:
CMatrix3x4SSEArray()
{
_AllocData= NULL;
_Data= NULL;
_Size= 0;
_Capacity= 0;
}
~CMatrix3x4SSEArray()
{
clear();
}
CMatrix3x4SSEArray(const CMatrix3x4SSEArray &other)
{
_AllocData= NULL;
_Data= NULL;
_Size= 0;
_Capacity= 0;
*this= other;
}
CMatrix3x4SSEArray &operator=(const CMatrix3x4SSEArray &other)
{
if( this == &other)
return *this;
resize(other.size());
// copy data from aligned pointers to aligned pointers.
memcpy(_Data, other._Data, size() * sizeof(CMatrix3x4SSE) );
return *this;
}
CMatrix3x4SSE *getPtr()
{
return (CMatrix3x4SSE*)_Data;
}
void clear()
{
delete [] ((uint8 *)_AllocData);
_AllocData= NULL;
_Data= NULL;
_Size= 0;
_Capacity= 0;
}
void resize(uint n)
{
// reserve ??
if(n>_Capacity)
reserve( max(2*_Capacity, n));
_Size= n;
}
void reserve(uint n)
{
if(n==0)
clear();
else if(n>_Capacity)
{
// Alloc new data.
void *newAllocData;
void *newData;
// Alloc for alignement.
newAllocData= new uint8 [n * sizeof(CMatrix3x4SSE) + NL3D_SSE_ALIGNEMENT-1];
if(newAllocData==NULL)
throw Exception("SSE Allocation Failed");
// Align ptr
newData= (void*) ( ((ptrdiff_t)newAllocData+NL3D_SSE_ALIGNEMENT-1) & (~(NL3D_SSE_ALIGNEMENT-1)) );
// copy valid data from old to new.
memcpy(newData, _Data, size() * sizeof(CMatrix3x4SSE) );
// release old.
if(_AllocData)
delete [] ((uint8*)_AllocData);
// change ptrs and capacity.
_Data= newData;
_AllocData= newAllocData;
_Capacity= n;
// TestYoyo
//nlwarning("YOYO Tst SSE P4: %X, %d", _Data, n);
}
}
uint size() const {return _Size;}
CMatrix3x4SSE &operator[](uint i) {return ((CMatrix3x4SSE*)_Data)[i];}
};
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************

View file

@ -39,7 +39,23 @@ static void applyArraySkinNormalT(uint numMatrixes, uint32 *infPtr, CMesh::CSkin
{ {
/* Prefetch all vertex/normal before, it is to be faster. /* Prefetch all vertex/normal before, it is to be faster.
*/ */
#if defined(NL_OS_WINDOWS) && !defined(NL_NO_ASM) #ifdef NL_HAS_SSE2
{
uint nInfTmp= nInf;
uint32 *infTmpPtr= infPtr;
for(;nInfTmp>0;nInfTmp--, infTmpPtr++)
{
uint index= *infTmpPtr;
CMesh::CSkinWeight *srcSkin= srcSkinPtr + index;
CVector *srcVertex= srcVertexPtr + index;
CVector *srcNormal= srcNormalPtr + index;
_mm_prefetch((const char *)(void *)srcSkin, _MM_HINT_T1);
_mm_prefetch((const char *)(void *)srcVertex, _MM_HINT_T1);
_mm_prefetch((const char *)(void *)srcNormal, _MM_HINT_T1);
}
}
#elif defined(NL_OS_WINDOWS) && !defined(NL_NO_ASM)
{ {
uint nInfTmp= nInf; uint nInfTmp= nInf;
uint32 *infTmpPtr= infPtr; uint32 *infTmpPtr= infPtr;
@ -176,7 +192,25 @@ static void applyArraySkinTangentSpaceT(uint numMatrixes, uint32 *infPtr, CMesh:
{ {
/* Prefetch all vertex/normal/tgSpace before, it is faster. /* Prefetch all vertex/normal/tgSpace before, it is faster.
*/ */
#if defined(NL_OS_WINDOWS) && !defined(NL_NO_ASM) #ifdef NL_HAS_SSE2
{
uint nInfTmp= nInf;
uint32 *infTmpPtr= infPtr;
for(;nInfTmp>0;nInfTmp--, infTmpPtr++)
{
uint index= *infTmpPtr;
CMesh::CSkinWeight *srcSkin= srcSkinPtr + index;
CVector *srcVertex= srcVertexPtr + index;
CVector *srcNormal= srcNormalPtr + index;
CVector *srcTgSpace= tgSpacePtr + index;
_mm_prefetch((const char *)(void *)srcSkin, _MM_HINT_T1);
_mm_prefetch((const char *)(void *)srcVertex, _MM_HINT_T1);
_mm_prefetch((const char *)(void *)srcNormal, _MM_HINT_T1);
_mm_prefetch((const char *)(void *)srcTgSpace, _MM_HINT_T1);
}
}
#elif defined(NL_OS_WINDOWS) && !defined(NL_NO_ASM)
{ {
uint nInfTmp= nInf; uint nInfTmp= nInf;
uint32 *infTmpPtr= infPtr; uint32 *infTmpPtr= infPtr;

View file

@ -2247,123 +2247,6 @@ void CMeshMRMSkinnedGeom::getSkinWeights (std::vector<CMesh::CSkinWeight> &skinW
} }
} }
// ***************************************************************************
// ***************************************************************************
// CMatrix3x4SSE array correctly aligned
// ***************************************************************************
// ***************************************************************************
// ***************************************************************************
#define NL3D_SSE_ALIGNEMENT 16
/**
* A CMatrix3x4SSEArray array correctly aligned
* NB: SSE is no more used (no speed gain, some memory problem), but keep it for possible future usage.
*/
class CMatrix3x4SSEArray
{
private:
void *_AllocData;
void *_Data;
uint _Size;
uint _Capacity;
public:
CMatrix3x4SSEArray()
{
_AllocData= NULL;
_Data= NULL;
_Size= 0;
_Capacity= 0;
}
~CMatrix3x4SSEArray()
{
clear();
}
CMatrix3x4SSEArray(const CMatrix3x4SSEArray &other)
{
_AllocData= NULL;
_Data= NULL;
_Size= 0;
_Capacity= 0;
*this= other;
}
CMatrix3x4SSEArray &operator=(const CMatrix3x4SSEArray &other)
{
if( this == &other)
return *this;
resize(other.size());
// copy data from aligned pointers to aligned pointers.
memcpy(_Data, other._Data, size() * sizeof(CMatrix3x4SSE) );
return *this;
}
CMatrix3x4SSE *getPtr()
{
return (CMatrix3x4SSE*)_Data;
}
void clear()
{
delete [] ((uint8 *) _AllocData);
_AllocData= NULL;
_Data= NULL;
_Size= 0;
_Capacity= 0;
}
void resize(uint n)
{
// reserve ??
if(n>_Capacity)
reserve( max(2*_Capacity, n));
_Size= n;
}
void reserve(uint n)
{
if(n==0)
clear();
else if(n>_Capacity)
{
// Alloc new data.
void *newAllocData;
void *newData;
// Alloc for alignement.
newAllocData= new uint8 [n * sizeof(CMatrix3x4SSE) + NL3D_SSE_ALIGNEMENT-1];
if(newAllocData==NULL)
throw Exception("SSE Allocation Failed");
// Align ptr
newData= (void*) ( ((ptrdiff_t)newAllocData+NL3D_SSE_ALIGNEMENT-1) & (~(NL3D_SSE_ALIGNEMENT-1)) );
// copy valid data from old to new.
memcpy(newData, _Data, size() * sizeof(CMatrix3x4SSE) );
// release old.
if(_AllocData)
delete [] ((uint8*)_AllocData);
// change ptrs and capacity.
_Data= newData;
_AllocData= newAllocData;
_Capacity= n;
// TestYoyo
//nlwarning("YOYO Tst SSE P4: %X, %d", _Data, n);
}
}
uint size() const {return _Size;}
CMatrix3x4SSE &operator[](uint i) {return ((CMatrix3x4SSE*)_Data)[i];}
};
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************

View file

@ -791,17 +791,20 @@ void CMeshMultiLod::compileCoarseMeshes()
{ {
slotRef.CoarseTriangles.resize(slotRef.CoarseNumTris * 3); slotRef.CoarseTriangles.resize(slotRef.CoarseNumTris * 3);
TCoarseMeshIndexType *dstPtr= &slotRef.CoarseTriangles[0]; TCoarseMeshIndexType *dstPtr= &slotRef.CoarseTriangles[0];
uint totalTris = 0;
for(uint i=0;i<meshGeom->getNbRdrPass(0);i++) for(uint i=0;i<meshGeom->getNbRdrPass(0);i++)
{ {
const CIndexBuffer &pb= meshGeom->getRdrPassPrimitiveBlock(0, i); const CIndexBuffer &pb= meshGeom->getRdrPassPrimitiveBlock(0, i);
CIndexBufferRead ibaRead; CIndexBufferRead ibaRead;
pb.lock (ibaRead); pb.lock (ibaRead);
uint numTris= pb.getNumIndexes()/3; uint numTris= pb.getNumIndexes()/3;
totalTris += numTris;
if (pb.getFormat() == CIndexBuffer::Indices16) if (pb.getFormat() == CIndexBuffer::Indices16)
{ {
if (sizeof(TCoarseMeshIndexType) == sizeof(uint16)) if (sizeof(TCoarseMeshIndexType) == sizeof(uint16))
{ {
memcpy(dstPtr, (uint16 *) ibaRead.getPtr(), numTris*3*sizeof(uint16)); memcpy(dstPtr, (uint16 *) ibaRead.getPtr(), numTris*3*sizeof(uint16));
dstPtr+= numTris*3;
} }
else else
{ {
@ -820,6 +823,7 @@ void CMeshMultiLod::compileCoarseMeshes()
if (sizeof(TCoarseMeshIndexType) == sizeof(uint32)) if (sizeof(TCoarseMeshIndexType) == sizeof(uint32))
{ {
memcpy(dstPtr, (uint32 *) ibaRead.getPtr(), numTris*3*sizeof(uint32)); memcpy(dstPtr, (uint32 *) ibaRead.getPtr(), numTris*3*sizeof(uint32));
dstPtr+= numTris*3;
} }
else else
{ {
@ -836,8 +840,8 @@ void CMeshMultiLod::compileCoarseMeshes()
} }
} }
} }
dstPtr+= numTris*3;
} }
nlassert(totalTris == slotRef.CoarseNumTris);
} }
} }
} }

View file

@ -94,7 +94,7 @@ const char *CProgramIndex::Names[NUM_UNIFORMS] =
void IProgram::buildInfo(CSource *source) void IProgram::buildInfo(CSource *source)
{ {
nlassert(!m_Source); // nlassert(!m_Source); // VALID: When deleting driver and creating new one.
m_Source = source; m_Source = source;

View file

@ -37,7 +37,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# ifndef NL_COMP_MINGW
# define NOMINMAX # define NOMINMAX
# endif
# include <windows.h> # include <windows.h>
# include <winbase.h> # include <winbase.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -39,6 +39,9 @@ namespace NLGUI
// *************************************************************************** // ***************************************************************************
bool CCtrlBase::handleEvent(const NLGUI::CEventDescriptor &event) bool CCtrlBase::handleEvent(const NLGUI::CEventDescriptor &event)
{ {
if( CViewBase::handleEvent( event ) )
return true;
if (event.getType() == NLGUI::CEventDescriptor::system) if (event.getType() == NLGUI::CEventDescriptor::system)
{ {
NLGUI::CEventDescriptorSystem &eds = (NLGUI::CEventDescriptorSystem&)event; NLGUI::CEventDescriptorSystem &eds = (NLGUI::CEventDescriptorSystem&)event;
@ -78,6 +81,9 @@ namespace NLGUI
case TTSpecialWindow: case TTSpecialWindow:
return "special"; return "special";
break; break;
default:
break;
} }
return ""; return "";

View file

@ -669,12 +669,6 @@ namespace NLGUI
if (CWidgetManager::getInstance()->getCapturePointerLeft() != this) if (CWidgetManager::getInstance()->getCapturePointerLeft() != this)
return false; return false;
if( editorMode )
{
CWidgetManager::getInstance()->setCurrentEditorSelection( getId() );
return true;
}
if (_LeftDblClickHandled) // no effect on mouse up after double click has been handled if (_LeftDblClickHandled) // no effect on mouse up after double click has been handled
{ {
_LeftDblClickHandled = false; _LeftDblClickHandled = false;
@ -801,7 +795,10 @@ namespace NLGUI
return "radio_button"; return "radio_button";
break; break;
default:
break;
} }
return ""; return "";
} }

View file

@ -356,7 +356,7 @@ namespace NLGUI
if ( ( _Over && !editorMode ) || editorSelected ) if ( ( _Over && !editorMode ) )
{ {
if( !editorMode && (lastOver == false) && (_AHOnOver != NULL)) if( !editorMode && (lastOver == false) && (_AHOnOver != NULL))

View file

@ -205,12 +205,12 @@ namespace NLGUI
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
if(prop) if(prop)
{ {
string sTmp = NLMISC::strlwr((const char*)prop); string sTmp = NLMISC::toLower((const char*)prop);
_Texture = rVR.createTexture (sTmp, 0, 0, 256, 64, false, false); _Texture = rVR.createTexture (sTmp, 0, 0, 256, 64, false, false);
} }
prop = (char*) xmlGetProp( node, (xmlChar*)"onchange" ); prop = (char*) xmlGetProp( node, (xmlChar*)"onchange" );
if (prop) _AHOnChange = NLMISC::strlwr(prop); if (prop) _AHOnChange = NLMISC::toLower((const char*)prop);
prop = (char*) xmlGetProp( node, (xmlChar*)"onchange_params" ); prop = (char*) xmlGetProp( node, (xmlChar*)"onchange_params" );
if (prop) _AHOnChangeParams = string((const char*)prop); if (prop) _AHOnChangeParams = string((const char*)prop);

View file

@ -62,6 +62,17 @@ namespace NLGUI
_ForceTextOver = false; _ForceTextOver = false;
} }
CCtrlTextButton::~CCtrlTextButton()
{
if( _ViewText != NULL )
{
if( _Parent != NULL )
_Parent->delView( _ViewText, true );
delete _ViewText;
_ViewText = NULL;
}
}
std::string CCtrlTextButton::getProperty( const std::string &name ) const std::string CCtrlTextButton::getProperty( const std::string &name ) const
{ {
std::string prop; std::string prop;
@ -113,7 +124,10 @@ namespace NLGUI
else else
if( name == "hardtext" ) if( name == "hardtext" )
{ {
if( _ViewText != NULL )
return _ViewText->getText().toString(); return _ViewText->getText().toString();
else
return std::string( "" );
} }
else else
if( name == "text_y" ) if( name == "text_y" )
@ -128,7 +142,10 @@ namespace NLGUI
else else
if( name == "text_underlined" ) if( name == "text_underlined" )
{ {
if( _ViewText != NULL )
return toString( _ViewText->getUnderlined() ); return toString( _ViewText->getUnderlined() );
else
return std::string( "" );
} }
else else
if( name == "text_posref" ) if( name == "text_posref" )
@ -220,6 +237,11 @@ namespace NLGUI
_TextureIdNormal[ 0 ].setTexture( std::string( value + "_l.tga" ).c_str() ); _TextureIdNormal[ 0 ].setTexture( std::string( value + "_l.tga" ).c_str() );
_TextureIdNormal[ 1 ].setTexture( std::string( value + "_m.tga" ).c_str() ); _TextureIdNormal[ 1 ].setTexture( std::string( value + "_m.tga" ).c_str() );
_TextureIdNormal[ 2 ].setTexture( std::string( value + "_r.tga" ).c_str() ); _TextureIdNormal[ 2 ].setTexture( std::string( value + "_r.tga" ).c_str() );
CViewRenderer &rVR = *CViewRenderer::getInstance();
rVR.getTextureSizeFromId(_TextureIdNormal[0], _BmpLeftW, _BmpH);
rVR.getTextureSizeFromId(_TextureIdNormal[1], _BmpMiddleW, _BmpH);
rVR.getTextureSizeFromId(_TextureIdNormal[2], _BmpRightW, _BmpH);
return; return;
} }
else else
@ -269,6 +291,7 @@ namespace NLGUI
else else
if( name == "hardtext" ) if( name == "hardtext" )
{ {
if( _ViewText != NULL )
_ViewText->setText( value ); _ViewText->setText( value );
return; return;
} }
@ -292,8 +315,10 @@ namespace NLGUI
if( name == "text_underlined" ) if( name == "text_underlined" )
{ {
bool b; bool b;
if( _ViewText != NULL )
if( fromString( value, b ) ) if( fromString( value, b ) )
_ViewText->setUnderlined( b ); _ViewText->setUnderlined( b );
return; return;
} }
else else
@ -766,8 +791,7 @@ namespace NLGUI
CCtrlBase *capturePointerLeft = CWidgetManager::getInstance()->getCapturePointerLeft(); CCtrlBase *capturePointerLeft = CWidgetManager::getInstance()->getCapturePointerLeft();
// *** Draw Over // *** Draw Over
if( editorSelected || if( ( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) )
( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) )
) )
{ {
if( !editorMode && (lastOver == false) && (_AHOnOver != NULL) ) if( !editorMode && (lastOver == false) && (_AHOnOver != NULL) )
@ -803,6 +827,8 @@ namespace NLGUI
} }
} }
// Setup ViewText color // Setup ViewText color
if( _ViewText != NULL )
{
if ( pTxId==_TextureIdNormal || editorMode ) if ( pTxId==_TextureIdNormal || editorMode )
{ {
if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A; if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A;
@ -830,6 +856,7 @@ namespace NLGUI
if(getFrozen() && getFrozenHalfTone()) if(getFrozen() && getFrozenHalfTone())
_ViewText->setAlpha(_ViewText->getAlpha()>>2); _ViewText->setAlpha(_ViewText->getAlpha()>>2);
} }
}
// *************************************************************************** // ***************************************************************************
@ -864,6 +891,16 @@ namespace NLGUI
{ {
_Setuped= true; _Setuped= true;
if( _ViewText == NULL )
{
CViewBase *v = CWidgetManager::getInstance()->getParser()->createClass( "text" );
nlassert( v != NULL );
_ViewText = dynamic_cast< CViewText* >( v );
_ViewText->setId( _Id + "_text" );
_ViewText->setText( ucstring( "text" ) );
_ViewText->setSerializable( false );
}
// setup the viewText and add to parent // setup the viewText and add to parent
_ViewText->setParent (getParent()); _ViewText->setParent (getParent());
_ViewText->setParentPos (this); _ViewText->setParentPos (this);
@ -960,6 +997,19 @@ namespace NLGUI
} }
// *************************************************************************** // ***************************************************************************
void CCtrlTextButton::onRemoved()
{
if( _ViewText != NULL )
{
if( _Parent != NULL )
_Parent->delView( _ViewText, true );
}
}
void CCtrlTextButton::onWidgetDeleted( CInterfaceElement *e )
{
if( e == _ViewText )
_ViewText = NULL;
}
} }

View file

@ -208,6 +208,9 @@ namespace NLGUI
case PlayerName: case PlayerName:
return "playername"; return "playername";
break; break;
default:
break;
} }
return "text"; return "text";
@ -497,6 +500,9 @@ namespace NLGUI
case PlayerName: case PlayerName:
e = "playername"; e = "playername";
break; break;
default:
break;
} }
xmlSetProp( node, BAD_CAST "enter_type", BAD_CAST e.c_str() ); xmlSetProp( node, BAD_CAST "enter_type", BAD_CAST e.c_str() );
@ -1411,6 +1417,7 @@ namespace NLGUI
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void CGroupEditBox::checkCoords() void CGroupEditBox::checkCoords()
{ {
if( !editorMode )
setupDisplayText(); setupDisplayText();
CInterfaceGroup::checkCoords(); CInterfaceGroup::checkCoords();
@ -1530,7 +1537,29 @@ namespace NLGUI
_ViewText = dynamic_cast<CViewText *>(CInterfaceGroup::getView("edit_text")); _ViewText = dynamic_cast<CViewText *>(CInterfaceGroup::getView("edit_text"));
if(_ViewText == NULL) if(_ViewText == NULL)
{
nlwarning("Interface: CGroupEditBox: text 'edit_text' missing or bad type"); nlwarning("Interface: CGroupEditBox: text 'edit_text' missing or bad type");
if( editorMode )
{
nlwarning( "Trying to create a new 'edit_text' for %s", getId().c_str() );
_ViewText = dynamic_cast< CViewText* >( CWidgetManager::getInstance()->getParser()->createClass( "text" ) );
if( _ViewText != NULL )
{
_ViewText->setParent( this );
_ViewText->setIdRecurse( "edit_text" );
_ViewText->setHardText( "sometext" );
_ViewText->setPosRef( Hotspot_TL );
_ViewText->setParentPosRef( Hotspot_TL );
addView( _ViewText );
setH( _ViewText->getFontHeight() );
setW( _ViewText->getFontWidth() * _ViewText->getText().size() );
}
else
nlwarning( "Failed to create new 'edit_text' for %s", getId().c_str() );
}
}
// For MultiLine editbox, clip the end space, else weird when edit space at end of line (nothing happens) // For MultiLine editbox, clip the end space, else weird when edit space at end of line (nothing happens)
if(_ViewText) if(_ViewText)

View file

@ -4094,7 +4094,8 @@ namespace NLGUI
void CGroupHTML::requestTerminated(HTRequest * request ) void CGroupHTML::requestTerminated(HTRequest * request )
{ {
// this callback is being called for every request terminated // this callback is being called for every request terminated
if( request == _LibWWW->Request ){ if (request == _LibWWW->Request)
{
// set the browser as complete // set the browser as complete
_Browsing = false; _Browsing = false;
updateRefreshButton(); updateRefreshButton();

View file

@ -199,77 +199,77 @@ namespace NLGUI
{ {
return toString( _MaxElements ); return toString( _MaxElements );
} }
else
if( name == "addelt" ) if( name == "addelt" )
{ {
switch( _AddElt ) switch( _AddElt )
{ {
case Top: case Top:
return "T"; return "T";
break;
case Left: case Left:
return "L"; return "L";
break;
case Right: case Right:
return "R"; return "R";
break;
}
case Bottom:
return "B"; return "B";
} }
else
nlassert(false);
}
if( name == "align" ) if( name == "align" )
{ {
switch( _Align ) switch( _Align )
{ {
case Top: case Top:
return "T"; return "T";
break;
case Left: case Left:
return "L"; return "L";
break;
case Right: case Right:
return "R"; return "R";
break;
}
case Bottom:
return "B"; return "B";
} }
else
nlassert(false);
}
if( name == "space" ) if( name == "space" )
{ {
return toString( _Space ); return toString( _Space );
} }
else
if( name == "over" ) if( name == "over" )
{ {
return toString( _Over ); return toString( _Over );
} }
else
if( name == "dynamic_display_size" ) if( name == "dynamic_display_size" )
{ {
return toString( _DynamicDisplaySize ); return toString( _DynamicDisplaySize );
} }
else
if( name == "col_over" ) if( name == "col_over" )
{ {
return toString( _OverColor ); return toString( _OverColor );
} }
else
if( name == "hardtext" ) if( name == "hardtext" )
{ {
return _HardText; return _HardText;
} }
else
if( name == "textid" ) if( name == "textid" )
{ {
return toString( _TextId ); return toString( _TextId );
} }
else
return CInterfaceGroup::getProperty( name ); return CInterfaceGroup::getProperty( name );
} }
@ -282,7 +282,7 @@ namespace NLGUI
_MaxElements = i; _MaxElements = i;
return; return;
} }
else
if( name == "addelt" ) if( name == "addelt" )
{ {
if( value == "T" ) if( value == "T" )
@ -300,7 +300,7 @@ namespace NLGUI
setupSizes(); setupSizes();
return; return;
} }
else
if( name == "align" ) if( name == "align" )
{ {
if( value == "T" ) if( value == "T" )
@ -317,7 +317,7 @@ namespace NLGUI
return; return;
} }
else
if( name == "space" ) if( name == "space" )
{ {
sint32 i; sint32 i;
@ -325,7 +325,7 @@ namespace NLGUI
_Space = i; _Space = i;
return; return;
} }
else
if( name == "over" ) if( name == "over" )
{ {
bool b; bool b;
@ -333,7 +333,7 @@ namespace NLGUI
_Over = b; _Over = b;
return; return;
} }
else
if( name == "dynamic_display_size" ) if( name == "dynamic_display_size" )
{ {
bool b; bool b;
@ -341,7 +341,7 @@ namespace NLGUI
_DynamicDisplaySize = b; _DynamicDisplaySize = b;
return; return;
} }
else
if( name == "col_over" ) if( name == "col_over" )
{ {
CRGBA c; CRGBA c;
@ -349,7 +349,7 @@ namespace NLGUI
_OverColor = c; _OverColor = c;
return; return;
} }
else
if( name == "hardtext" ) if( name == "hardtext" )
{ {
_HardText = value; _HardText = value;
@ -357,7 +357,7 @@ namespace NLGUI
onTextChanged(); onTextChanged();
return; return;
} }
else
if( name == "textid" ) if( name == "textid" )
{ {
uint32 i; uint32 i;
@ -367,7 +367,7 @@ namespace NLGUI
onTextChanged(); onTextChanged();
return; return;
} }
else
CInterfaceGroup::setProperty( name, value ); CInterfaceGroup::setProperty( name, value );
} }

View file

@ -197,18 +197,18 @@ namespace NLGUI
{ {
case Top: case Top:
return "T"; return "T";
break;
case Left: case Left:
return "L"; return "L";
break;
case Right: case Right:
return "R"; return "R";
break;
case Bottom:
return "B";
} }
return "B"; nlassert(false);
} }
else else
if( name == "align" ) if( name == "align" )
@ -217,18 +217,18 @@ namespace NLGUI
{ {
case Top: case Top:
return "T"; return "T";
break;
case Left: case Left:
return "L"; return "L";
break;
case Right: case Right:
return "R"; return "R";
break;
case Bottom:
return "B";
} }
return "B"; nlassert(false);
} }
else else
if( name == "space" ) if( name == "space" )

View file

@ -80,15 +80,15 @@ namespace NLGUI
{ {
case Right: case Right:
return "right"; return "right";
break;
case Center: case Center:
return "center"; return "center";
break;
case Left:
return "left";
} }
return "left"; nlassert(false);
} }
else else
if( name == "valign" ) if( name == "valign" )
@ -97,14 +97,15 @@ namespace NLGUI
{ {
case Middle: case Middle:
return "middle"; return "middle";
break;
case Bottom: case Bottom:
return "bottom"; return "bottom";
break;
case Top:
return "top";
} }
return "top"; nlassert(false);
} }
else else
if( name == "left_margin" ) if( name == "left_margin" )

View file

@ -34,6 +34,7 @@ using namespace NLMISC;
namespace NLGUI namespace NLGUI
{ {
bool CInterfaceElement::editorMode = false; bool CInterfaceElement::editorMode = false;
std::vector< CInterfaceElement::IDeletionWatcher* > CInterfaceElement::deletionWatchers;
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
CInterfaceElement::~CInterfaceElement() CInterfaceElement::~CInterfaceElement()
@ -46,6 +47,13 @@ namespace NLGUI
} }
delete _Links; delete _Links;
} }
if( editorMode )
{
notifyDeletionWatchers();
if( _Parent != NULL )
_Parent->onWidgetDeleted( this );
}
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -993,8 +1001,7 @@ namespace NLGUI
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
bool CInterfaceElement::convertBool (const char *ptr) bool CInterfaceElement::convertBool (const char *ptr)
{ {
std::string str = ptr; std::string str = toLower(ptr);
NLMISC::strlwr( str );
bool b = false; bool b = false;
fromString( str, b ); fromString( str, b );
return b; return b;
@ -1296,6 +1303,11 @@ namespace NLGUI
} }
void CInterfaceElement::drawHighlight()
{
CViewRenderer::getInstance()->drawWiredQuad( _XReal, _YReal, _WReal, _HReal );
}
// *************************************************************************** // ***************************************************************************
void CInterfaceElement::invalidateContent() void CInterfaceElement::invalidateContent()
{ {
@ -1542,6 +1554,36 @@ namespace NLGUI
} }
} }
void CInterfaceElement::registerDeletionWatcher( IDeletionWatcher *watcher )
{
std::vector< IDeletionWatcher* >::iterator itr
= std::find( deletionWatchers.begin(), deletionWatchers.end(), watcher );
// Already registered
if( itr != deletionWatchers.end() )
return;
deletionWatchers.push_back( watcher );
}
void CInterfaceElement::unregisterDeletionWatcher( IDeletionWatcher *watcher )
{
std::vector< IDeletionWatcher* >::iterator itr
= std::find( deletionWatchers.begin(), deletionWatchers.end(), watcher );
// Not registered
if( itr == deletionWatchers.end() )
return;
deletionWatchers.erase( itr );
}
void CInterfaceElement::notifyDeletionWatchers()
{
std::vector< IDeletionWatcher* >::iterator itr = deletionWatchers.begin();
while( itr != deletionWatchers.end() )
{
(*itr)->onDeleted( _Id );
++itr;
}
}
CStringMapper* CStringShared::_UIStringMapper = NULL; CStringMapper* CStringShared::_UIStringMapper = NULL;

View file

@ -143,12 +143,12 @@ namespace NLGUI
// initStart = ryzomGetLocalTime (); // initStart = ryzomGetLocalTime ();
clearGroups(); clearGroups();
// nlinfo ("%d seconds for clearGroups '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); // nlinfo ("%d seconds for clearGroups '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str());
// initStart = ryzomGetLocalTime ();
clearViews();
// nlinfo ("%d seconds for clearViews '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str());
// initStart = ryzomGetLocalTime (); // initStart = ryzomGetLocalTime ();
clearControls(); clearControls();
// nlinfo ("%d seconds for clearControls '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); // nlinfo ("%d seconds for clearControls '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str());
// initStart = ryzomGetLocalTime ();
clearViews();
// nlinfo ("%d seconds for clearViews '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str());
CWidgetManager::getInstance()->removeRefOnGroup (this); CWidgetManager::getInstance()->removeRefOnGroup (this);
#ifdef AJM_DEBUG_TRACK_INTERFACE_GROUPS #ifdef AJM_DEBUG_TRACK_INTERFACE_GROUPS
@ -1086,9 +1086,11 @@ namespace NLGUI
{ {
if (_Views[i] == child) if (_Views[i] == child)
{ {
if (!dontDelete) delete _Views[i]; CViewBase *v = _Views[i];
_Views.erase(_Views.begin()+i); _Views.erase(_Views.begin()+i);
delEltOrder (child); delEltOrder (child);
child->onRemoved();
if (!dontDelete) delete v;
return true; return true;
} }
} }
@ -1102,9 +1104,11 @@ namespace NLGUI
{ {
if (_Controls[i] == child) if (_Controls[i] == child)
{ {
if (!dontDelete) delete _Controls[i]; CCtrlBase *c = _Controls[i];
_Controls.erase(_Controls.begin()+i); _Controls.erase(_Controls.begin()+i);
delEltOrder (child); delEltOrder (child);
child->onRemoved();
if (!dontDelete) delete c;
return true; return true;
} }
} }
@ -1118,9 +1122,11 @@ namespace NLGUI
{ {
if (_ChildrenGroups[i] == child) if (_ChildrenGroups[i] == child)
{ {
if (!dontDelete) delete _ChildrenGroups[i]; CInterfaceGroup *g = _ChildrenGroups[i];
_ChildrenGroups.erase(_ChildrenGroups.begin()+i); _ChildrenGroups.erase(_ChildrenGroups.begin()+i);
delEltOrder (child); delEltOrder (child);
child->onRemoved();
if (!dontDelete) delete g;
return true; return true;
} }
} }
@ -2471,4 +2477,16 @@ namespace NLGUI
return "IMPLEMENT ME!"; return "IMPLEMENT ME!";
} }
void CInterfaceGroup::onWidgetDeleted( CInterfaceElement *e )
{
for( std::vector< CViewBase* >::iterator itr = _Views.begin(); itr != _Views.end(); ++itr )
(*itr)->onWidgetDeleted( e );
for( std::vector< CCtrlBase* >::iterator itr = _Controls.begin(); itr != _Controls.end(); ++itr )
(*itr)->onWidgetDeleted( e );
for( std::vector< CInterfaceGroup* >::iterator itr = _ChildrenGroups.begin(); itr != _ChildrenGroups.end(); ++itr )
(*itr)->onWidgetDeleted( e );
}
} }

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