branch updated

--HG--
branch : Gsoc14-ryzomAppImprovements
This commit is contained in:
shubham_meena 2014-07-07 02:12:40 +05:30
commit 11a3df1aaa
354 changed files with 3379 additions and 2105 deletions

View file

@ -3,3 +3,6 @@ a409552f83cb55a5c20f867fd7bcae1d0083d01a ryzomcore_0_8_0
0000000000000000000000000000000000000000 ryzomcore_0_8_0
0000000000000000000000000000000000000000 ryzomcore_0_8_0
4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore_0_8_0
950d650ca92e6041611258d7e5131ccf661e4ec2 latest-graft-to-default
950d650ca92e6041611258d7e5131ccf661e4ec2 latest-merge-from-default

View file

@ -27,7 +27,7 @@ FIND_PATH(DXSDK_DIR
MACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME}
PATHS
HINTS
"${DXSDK_LIBRARY_DIR}"
)
ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
@ -36,11 +36,16 @@ IF(DXSDK_DIR)
SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include")
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)
SET(DXSDK_LIBRARY_DIR "${DXSDK_DIR}/Lib/x86")
SET(DXSDK_LIBRARY_DIRS ${DXSDK_DIR}/Lib/x86 ${DXSDK_DIR}/lib)
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_DINPUT_LIBRARY dinput8)
FIND_DXSDK_LIBRARY(DXSDK_DSOUND_LIBRARY dsound)

View file

@ -236,8 +236,6 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_COVERAGE "With Code Coverage Support" OFF)
OPTION(WITH_PCH "With Precompiled Headers" ON )
OPTION(FINAL_VERSION "Build in Final Version mode" ON )
OPTION(WITH_PERFHUD "Build with NVIDIA PerfHUD support" OFF )
OPTION(WITH_PATCH_SUPPORT "Build with in-game Patch Support" OFF )
# Default to static building on Windows.
IF(WIN32)
@ -325,6 +323,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
OPTION(WITH_LIBOVR "With LibOVR support" OFF)
OPTION(WITH_LIBVR "With LibVR support" OFF)
OPTION(WITH_PERFHUD "With NVIDIA PerfHUD support" OFF)
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
@ -343,6 +342,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON )
OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON )
OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON )
OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF)
###
# Optional support
@ -889,7 +889,7 @@ MACRO(NL_SETUP_BUILD)
SET(NL_RELEASE_CFLAGS "${NL_RELEASE_CFLAGS} -g")
ELSE(WITH_SYMBOLS)
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)
SET(NL_RELEASE_LINKFLAGS "-Wl,-s ${NL_RELEASE_LINKFLAGS}")
ENDIF(APPLE)

View file

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

View file

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

View file

@ -42,6 +42,7 @@ namespace NLGUI
/// Constructor
CCtrlTextButton(const TCtorParam &param);
~CCtrlTextButton();
std::string getProperty( const std::string &name ) const;
void setProperty( const std::string &name, const std::string &value );
@ -123,6 +124,9 @@ namespace NLGUI
REFLECT_LUA_METHOD("getViewText", luaGetViewText)
REFLECT_EXPORT_END
void onRemoved();
void onWidgetDeleted( CInterfaceElement *e );
protected:
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:
/// Watches CInterfaceElement deletions
class IDeletionWatcher
{
public:
IDeletionWatcher(){}
virtual ~IDeletionWatcher(){}
virtual void onDeleted( const std::string &name ){}
};
enum EStrech
{
@ -424,6 +432,8 @@ namespace NLGUI
void drawHotSpot(THotSpot hs, NLMISC::CRGBA col);
void drawHighlight();
// Returns 'true' if that element can be downcasted to a view
virtual bool isView() const { return false; }
@ -473,6 +483,7 @@ namespace NLGUI
bool isInGroup( CInterfaceGroup *group );
static void setEditorMode( bool b ){ editorMode = b; }
static bool getEditorMode(){ return editorMode; }
void setEditorSelected( bool b ){ editorSelected = b; }
bool isEditorSelected() const{ return editorSelected; }
@ -483,6 +494,19 @@ namespace NLGUI
void setSerializable( bool b ){ serializable = b; }
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:
bool editorSelected;
@ -543,6 +567,11 @@ namespace NLGUI
void parseSizeRef(const char *sizeRefStr, sint32 &sizeref, sint32 &sizeDivW, sint32 &sizeDivH);
private:
/// Notifies the deletion watchers that this interface element is being deleted
void notifyDeletionWatchers();
static std::vector< IDeletionWatcher* > deletionWatchers;
//void snapSize();
bool serializable;

View file

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

View file

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

View file

@ -27,6 +27,7 @@
namespace NLGUI
{
class CInterfaceElement;
class CViewBase;
class CInterfaceGroup;
class CInterfaceAnim;
class CCtrlSheetSelection;
@ -86,6 +87,7 @@ namespace NLGUI
virtual bool serializeProcs( xmlNodePtr parentNode ) const = 0;
virtual bool serializePointerSettings( 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
{
class CEventDescriptor;
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
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

@ -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 CInterfaceAnim;
class CProcedure;
class IEditorSelectionWatcher;
class IWidgetAdditionWatcher;
/**
GUI Widget Manager
@ -341,6 +343,7 @@ namespace NLGUI
/**
* Capture
*/
CViewBase *getCapturedView(){ return _CapturedView; }
CCtrlBase *getCapturePointerLeft() { return _CapturePointerLeft; }
CCtrlBase *getCapturePointerRight() { return _CapturePointerRight; }
CCtrlBase *getCaptureKeyboard() { return _CaptureKeyboard; }
@ -484,7 +487,17 @@ namespace NLGUI
IParser* getParser() const{ return parser; }
std::string& getCurrentEditorSelection(){ return currentEditorSelection; }
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:
CWidgetManager();
@ -511,6 +524,8 @@ namespace NLGUI
NLMISC::CRefPtr<CCtrlBase> _CapturePointerLeft;
NLMISC::CRefPtr<CCtrlBase> _CapturePointerRight;
NLMISC::CRefPtr< CViewBase > _CapturedView;
// What is under pointer
std::vector< CViewBase* > _ViewsUnderPointer;
std::vector< CCtrlBase* > _CtrlsUnderPointer;
@ -567,6 +582,9 @@ namespace NLGUI
std::vector< INewScreenSizeHandler* > newScreenSizeHandlers;
std::vector< IOnWidgetsDrawnHandler* > onWidgetsDrawnHandlers;
std::vector< IEditorSelectionWatcher* > selectionWatchers;
std::vector< IWidgetAdditionWatcher* > additionWatchers;
std::string currentEditorSelection;
};

View file

@ -103,6 +103,7 @@ void CDeform2d::doDeform(const TPoint2DVect &surf, IDriver *drv, IPerturbUV *uvp
static CVertexBuffer vb;
vb.setName("CDeform2d");
vb.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag);
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);

View file

@ -6,7 +6,7 @@ extern "C" {
#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
** 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
** 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__)
@ -53,7 +53,7 @@ extern "C" {
#define GLAPI extern
#endif
#define GL_GLEXT_VERSION 20131102
#define GL_GLEXT_VERSION 20140416
/* Generated C header for:
* 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 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 PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask);
typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
#ifdef GL_GLEXT_PROTOTYPES
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);
@ -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 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 glSampleMaski (GLuint index, GLbitfield mask);
GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
#endif
#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_FRAGMENT_IMAGE_UNIFORMS 0x90CE
#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
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);
@ -2432,6 +2436,7 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum
#define GL_VERTEX_BINDING_STRIDE 0x82D8
#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
#define GL_VERTEX_BINDING_BUFFER 0x8F4F
#define GL_DISPLAY_LIST 0x82E7
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);
@ -4799,6 +4804,109 @@ GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRG
#endif
#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
#define GL_AMD_interleaved_elements 1
#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
@ -4836,6 +4944,20 @@ GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
#endif
#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
#define GL_AMD_performance_monitor 1
#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
#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
#define GL_AMD_vertex_shader_layer 1
#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 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 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 PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
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 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 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 glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
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
#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
#define GL_EXT_shader_image_load_store 1
#define GL_MAX_IMAGE_UNITS_EXT 0x8F38
@ -8108,6 +8239,52 @@ GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void
#endif
#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
#define GL_MESAX_texture_stack 1
#define GL_TEXTURE_1D_STACK_MESAX 0x8759
@ -8202,6 +8379,15 @@ GLAPI void APIENTRY glEndConditionalRenderNVX (void);
#endif
#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
#define GL_NV_bindless_multi_draw_indirect 1
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_BLEND_OVERLAP_NV 0x9281
#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
#define GL_BLUE_NV 0x1905
#define GL_COLORBURN_NV 0x929A
#define GL_COLORDODGE_NV 0x9299
#define GL_CONJOINT_NV 0x9284
@ -8261,6 +8448,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
#define GL_DST_OUT_NV 0x928D
#define GL_DST_OVER_NV 0x9289
#define GL_EXCLUSION_NV 0x92A0
#define GL_GREEN_NV 0x1904
#define GL_HARDLIGHT_NV 0x929B
#define GL_HARDMIX_NV 0x92A9
#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_DARKER_NV 0x9292
#define GL_PLUS_NV 0x9291
#define GL_RED_NV 0x1903
#define GL_SCREEN_NV 0x9295
#define GL_SOFTLIGHT_NV 0x929C
#define GL_SRC_ATOP_NV 0x928E
@ -8291,6 +8480,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
#define GL_SRC_OVER_NV 0x9288
#define GL_UNCORRELATED_NV 0x9282
#define GL_VIVIDLIGHT_NV 0x92A6
#define GL_XOR_NV 0x1506
typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
#ifdef GL_GLEXT_PROTOTYPES
@ -8640,103 +8830,6 @@ GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint
#ifndef GL_NV_gpu_shader5
#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 */
#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 PFNGLUNIFORMUI64NVPROC) (GLint location, 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 PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#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 glUniformui64NV (GLint location, 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 glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#endif
@ -9350,6 +9441,17 @@ GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLs
#define GL_NV_shader_storage_buffer_object 1
#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
#define GL_NV_tessellation_program5 1
#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 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 void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (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 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 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 void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (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 glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);

View file

@ -6,7 +6,7 @@ extern "C" {
#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
** 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
** 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:
* API: glx
@ -49,6 +49,7 @@ extern "C" {
#ifndef GLX_VERSION_1_3
#define GLX_VERSION_1_3 1
typedef XID GLXContextID;
typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef XID GLXWindow;
typedef XID GLXPbuffer;
@ -272,7 +273,6 @@ __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
#ifndef GLX_EXT_import_context
#define GLX_EXT_import_context 1
typedef XID GLXContextID;
#define GLX_SHARE_CONTEXT_EXT 0x800A
#define GLX_VISUAL_ID_EXT 0x800B
#define GLX_SCREEN_EXT 0x800C
@ -290,6 +290,23 @@ void glXFreeContextEXT (Display *dpy, GLXContext context);
#endif
#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
#define GLX_EXT_swap_control 1
#define GLX_SWAP_INTERVAL_EXT 0x20F1
@ -407,6 +424,32 @@ GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixm
#endif
#endif /* GLX_MESA_pixmap_colormap */
#ifndef GLX_MESA_query_renderer
#define GLX_MESA_query_renderer 1
#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
#define GLX_RENDERER_VERSION_MESA 0x8185
#define GLX_RENDERER_ACCELERATED_MESA 0x8186
#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
#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
#define GLX_MESA_release_buffers 1
typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
@ -433,6 +476,14 @@ void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLe
#endif
#endif /* GLX_NV_copy_image */
#ifndef GLX_NV_delay_before_swap
#define GLX_NV_delay_before_swap 1
typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds);
#ifdef GLX_GLXEXT_PROTOTYPES
Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds);
#endif
#endif /* GLX_NV_delay_before_swap */
#ifndef GLX_NV_float_buffer
#define GLX_NV_float_buffer 1
#define GLX_FLOAT_COMPONENTS_NV 0x20B0

View file

@ -6,7 +6,7 @@ extern "C" {
#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
** 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
** 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__)
@ -41,7 +41,7 @@ extern "C" {
#include <windows.h>
#endif
#define WGL_WGLEXT_VERSION 20131028
#define WGL_WGLEXT_VERSION 20140416
/* Generated C header for:
* API: wgl

View file

@ -1,7 +1,7 @@
#ifndef __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
extern "C" {
@ -1055,10 +1055,10 @@ typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum
#ifndef GL_EXT_multi_draw_arrays
#define GL_EXT_multi_draw_arrays 1
#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);
#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);
#endif

View file

@ -26,7 +26,7 @@
/* 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
* 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.
*/
#if (defined(_WIN32) || defined(__VC32__)) && !defined(__SCITECH_SNAP__) && !defined(__WINSCW__)
# if defined (_DLL_EXPORTS)
# define KHRONOS_APICALL __declspec(dllexport)
# else
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
# define KHRONOS_APICALL __declspec(dllimport)
# endif
#elif defined (__SYMBIAN32__)
# if defined (__GCC32__)
# define KHRONOS_APICALL __declspec(dllexport)
# else
# define KHRONOS_APICALL IMPORT_C
# endif
#else
# define KHRONOS_APICALL
#endif
@ -120,7 +111,7 @@
* This follows the return type of the function and precedes the function
* 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 */
# define KHRONOS_APIENTRY __stdcall
#else
@ -141,18 +132,7 @@
/*-------------------------------------------------------------------------
* basic type definitions
*-----------------------------------------------------------------------*/
#if defined(__SYMBIAN32__)
#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__)
#if (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_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
/*
@ -254,10 +221,23 @@ typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_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 unsigned long int khronos_uintptr_t;
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
#endif
#if KHRONOS_SUPPORT_FLOAT
/*

View file

@ -2195,7 +2195,7 @@ void CDriverGL::setSwapVBLInterval(uint interval)
#elif defined(NL_OS_UNIX)
if (_win && _Extensions.GLXEXTSwapControl)
{
res = nglXSwapIntervalEXT(_dpy, _win, interval) == 0;
nglXSwapIntervalEXT(_dpy, _win, interval);
}
else if (_Extensions.GLXSGISwapControl)
{
@ -2513,9 +2513,7 @@ void CDriverGL::retrieveATIDriverVersion()
RegCloseKey(parentKey);
}
#elif defined(NL_OS_MAC)
# warning "OpenGL Driver: Missing Mac Implementation for ATI version retrieval"
nlwarning("OpenGL Driver: Missing Mac Implementation for ATI version retrieval");
// TODO: Missing Mac Implementation for ATI version retrieval
#elif defined (NL_OS_UNIX)
// TODO for Linux: implement retrieveATIDriverVersion... assuming versions under linux are probably different
#endif

File diff suppressed because it is too large Load diff

View file

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

View file

@ -25,44 +25,8 @@ extern "C" {
#endif
#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_TEXTURE_CUBE_MAP_ARB GL_TEXTURE_CUBE_MAP_OES
#define GL_NONE 0
@ -86,346 +50,6 @@ typedef void (APIENTRY * NEL_PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pnam
#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)
// Mac GL extensions
@ -433,18 +57,6 @@ typedef GLvoid (APIENTRY * NEL_PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, G
#elif defined(NL_OS_UNIX)
// 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
#define NL_GLX_MESA_swap_control 1

View file

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

View file

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

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);
}
break;
default:
break;
}
#endif
}
@ -100,6 +102,8 @@ inline void CDriverGL::setUniform4fvInl(TProgram program, uint index, size_t num
}
}
break;
default:
break;
}
#endif
}

View file

@ -147,9 +147,9 @@ bool CDriverGL::setupVertexBuffer(CVertexBuffer& VB)
CVBDrvInfosGL *info = new CVBDrvInfosGL(this, it, &VB);
*it= VB.DrvInfos = info;
// Preferred memory
// Preferred memory, AGPVolatile only goes through when ARBMapBufferRange is available
CVertexBuffer::TPreferredMemory preferred = VB.getPreferredMemory ();
if ((preferred == CVertexBuffer::RAMVolatile) || (preferred == CVertexBuffer::AGPVolatile))
if ((preferred == CVertexBuffer::RAMVolatile) || (preferred == CVertexBuffer::AGPVolatile && !_Extensions.ARBMapBufferRange))
preferred = CVertexBuffer::RAMPreferred;
const uint size = VB.capacity()*VB.getVertexSize();
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);
if (info->_VBHard)
break;
if ((CVertexBuffer::TPreferredMemory)preferredMemory == CVertexBuffer::AGPVolatile)
{
preferredMemory = CVertexBuffer::RAMPreferred;
break;
}
preferredMemory--;
}
@ -170,7 +176,7 @@ bool CDriverGL::setupVertexBuffer(CVertexBuffer& VB)
}
// 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
{
H_AUTO_OGL(CDriverGL_supportVolatileVertexBuffer)
return false;
return _Extensions.ARBMapBufferRange;
}
@ -769,6 +775,7 @@ IVertexBufferHardGL *CDriverGL::createVertexBufferHard(uint size, uint numVertic
IVertexArrayRange *vertexArrayRange= NULL;
switch(vbType)
{
case CVertexBuffer::AGPVolatile:
case CVertexBuffer::AGPPreferred:
vertexArrayRange= _AGPVertexArrayRange;
break;
@ -1809,7 +1816,7 @@ void CDriverGL::fenceOnCurVBHardIfNeeded(IVertexBufferHardGL *newVBHard)
#ifndef USE_OPENGLES
// 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;
// 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();
// Free special memory.
nglDeleteObjectBufferATI(_VertexObjectId);
nglFreeObjectBufferATI(_VertexObjectId);
_Allocated= false;
_VertexArraySize= 0;
@ -839,7 +839,7 @@ bool CVertexArrayRangeMapObjectATI::allocate(uint32 size, CVertexBuffer::TPrefer
if (vertexObjectId)
{
// free the object
nglDeleteObjectBufferATI(vertexObjectId);
nglFreeObjectBufferATI(vertexObjectId);
//
_SizeAllocated = size;
_VBType = vbType;
@ -924,7 +924,7 @@ CVertexBufferHardGLMapObjectATI::CVertexBufferHardGLMapObjectATI(CDriverGL *drv,
CVertexBufferHardGLMapObjectATI::~CVertexBufferHardGLMapObjectATI()
{
H_AUTO_OGL(CVertexBufferHardGLMapObjectATI_CVertexBufferHardGLMapObjectATIDtor)
if (_VertexObjectId) nglDeleteObjectBufferATI(_VertexObjectId);
if (_VertexObjectId) nglFreeObjectBufferATI(_VertexObjectId);
#ifdef NL_DEBUG
if (_VertexPtr)
{
@ -1114,7 +1114,7 @@ void CVertexArrayRangeMapObjectATI::updateLostBuffers()
{
nlassert((*it)->_VertexObjectId);
nlassert(nglIsObjectBufferATI((*it)->_VertexObjectId));
nglDeleteObjectBufferATI((*it)->_VertexObjectId);
nglFreeObjectBufferATI((*it)->_VertexObjectId);
(*it)->_VertexObjectId = 0;
(*it)->VB->setLocation(CVertexBuffer::NotResident);
}
@ -1174,6 +1174,9 @@ bool CVertexArrayRangeARB::allocate(uint32 size, CVertexBuffer::TPreferredMemory
switch(vbType)
{
case CVertexBuffer::AGPVolatile:
glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB);
break;
case CVertexBuffer::AGPPreferred:
glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
break;
@ -1221,13 +1224,14 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff
if (glGetError() != GL_NO_ERROR) return NULL;
_Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID);
switch(_VBType)
CVertexBuffer::TPreferredMemory preferred = vb->getPreferredMemory();
switch (preferred)
{
case CVertexBuffer::AGPPreferred:
case CVertexBuffer::AGPVolatile:
#ifdef USE_OPENGLES
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STREAM_DRAW);
#else
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB);
#endif
break;
case CVertexBuffer::StaticPreferred:
@ -1244,8 +1248,13 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
#endif
break;
// case CVertexBuffer::AGPPreferred:
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;
}
if (glGetError() != GL_NO_ERROR)
@ -1259,7 +1268,7 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff
return NULL;
}
CVertexBufferHardARB *newVbHard= new CVertexBufferHardARB(_Driver, vb);
newVbHard->initGL(vertexBufferID, this, _VBType);
newVbHard->initGL(vertexBufferID, this, preferred);
_Driver->_DriverGLStates.forceBindARBVertexBuffer(0);
return newVbHard;
}
@ -1393,6 +1402,7 @@ void *CVertexBufferHardARB::lock()
H_AUTO_OGL(CVertexBufferHardARB_lock);
if (_VertexPtr) return _VertexPtr; // already locked
const uint size = VB->getNumVertices() * VB->getVertexSize();
if (_Invalid)
{
if (VB->getLocation() != CVertexBuffer::NotResident)
@ -1414,15 +1424,14 @@ void *CVertexBufferHardARB::lock()
_Driver->incrementResetCounter();
return &_DummyVB[0];
}
const uint size = VB->getNumVertices() * VB->getVertexSize();
_Driver->_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID);
switch(_MemType)
{
case CVertexBuffer::AGPPreferred:
case CVertexBuffer::AGPVolatile:
#ifdef USE_OPENGLES
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STREAM_DRAW);
#else
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB);
#endif
break;
case CVertexBuffer::StaticPreferred:
@ -1439,8 +1448,13 @@ void *CVertexBufferHardARB::lock()
nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB);
#endif
break;
// case CVertexBuffer::AGPPreferred:
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;
}
if (glGetError() != GL_NO_ERROR)
@ -1499,7 +1513,14 @@ void *CVertexBufferHardARB::lock()
_LastBufferSize = size;
}
#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);
}
if (!_VertexPtr)
{
nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB);

View file

@ -2347,7 +2347,7 @@ void CDriverGL::showWindow(bool show)
#elif defined(NL_OS_MAC)
# warning "OpenGL Driver: Missing Mac Implementation for showWindow"
// TODO: Missing Mac Implementation for showWindow
#elif defined (NL_OS_UNIX)
@ -2771,7 +2771,7 @@ bool CDriverGL::isActive()
res = (IsWindow(_win) != FALSE);
#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)
// 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
// 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 <cstdlib>
@ -67,5 +70,33 @@
#include "nel/misc/mem_stream.h"
#include "nel/misc/time_nl.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/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

@ -253,6 +253,7 @@ void CDRU::drawBitmap (float x, float y, float width, float height, ITexture& te
if (vb.getName().empty()) vb.setName("CDRU::drawBitmap");
vb.setVertexFormat (CVertexBuffer::PositionFlag|CVertexBuffer::TexCoord0Flag);
vb.setNumVertices (4);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{
CVertexBufferReadWrite vba;
vb.lock (vba);
@ -271,6 +272,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");
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes (6);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
{
CIndexBufferReadWrite iba;
pb.lock (iba);
@ -305,6 +307,7 @@ void CDRU::drawLine (float x0, float y0, float x1, float y1, IDriver& driver, CR
if (vb.getName().empty()) vb.setName("CDRU::drawLine");
vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (2);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{
CVertexBufferReadWrite vba;
vb.lock (vba);
@ -317,6 +320,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");
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes (2);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
{
CIndexBufferReadWrite iba;
pb.lock (iba);
@ -350,6 +354,7 @@ void CDRU::drawTriangle (float x0, float y0, float x1, float y1, float x2, float
if (vb.getName().empty()) vb.setName("CDRU::drawTriangle");
vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (3);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{
CVertexBufferReadWrite vba;
vb.lock (vba);
@ -363,6 +368,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");
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes (3);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
{
CIndexBufferReadWrite iba;
pb.lock (iba);
@ -397,6 +403,7 @@ void CDRU::drawQuad (float x0, float y0, float x1, float y1, IDriver& driver, CR
if (vb.getName().empty()) vb.setName("CDRU::drawQuad");
vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (4);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{
CVertexBufferReadWrite vba;
vb.lock (vba);
@ -433,6 +440,7 @@ void CDRU::drawQuad (float xcenter, float ycenter, float radius, IDriver& driver
if (vb.getName().empty()) vb.setName("CDRU::drawQuad");
vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (4);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{
CVertexBufferReadWrite vba;
vb.lock (vba);
@ -482,10 +490,12 @@ void CDRU::drawTrianglesUnlit(const NLMISC::CTriangleUV *trilist, sint ntris,
if (vb.getName().empty()) vb.setName("CDRU::drawTrianglesUnlit");
vb.setVertexFormat (CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag);
vb.setNumVertices (ntris*3);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
static CIndexBuffer pb;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(ntris*3);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
if (pb.getFormat() == CIndexBuffer::Indices16)
{
nlassert(ntris * 3 <= 0xffff);
@ -530,10 +540,12 @@ void CDRU::drawLinesUnlit(const NLMISC::CLine *linelist, sint nlines, CMateria
if (vb.getName().empty()) vb.setName("CDRU::drawLinesUnlit");
vb.setVertexFormat (CVertexBuffer::PositionFlag);
vb.setNumVertices (nlines*2);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
static CIndexBuffer pb;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(nlines*2);
pb.setPreferredMemory (CIndexBuffer::RAMVolatile, false);
{
@ -601,6 +613,7 @@ void CDRU::drawQuad (float x0, float y0, float x1, float y1, CRGBA col0, CRGBA
if (vb.getName().empty()) vb.setName("CDRU::drawQuad");
vb.setVertexFormat (CVertexBuffer::PositionFlag|CVertexBuffer::PrimaryColorFlag);
vb.setNumVertices (4);
vb.setPreferredMemory (CVertexBuffer::RAMVolatile, false);
{
CVertexBufferReadWrite vba;
vb.lock (vba);

View file

@ -59,6 +59,7 @@ void CMotionBlur::performMotionBlur(IDriver *driver, float motionBlurAmount)
static CVertexBuffer vb ;
vb.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag ) ;
vb.setNumVertices(4) ;
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);
uint32 width, height ;
driver->getWindowSize(width, height) ;

View file

@ -519,6 +519,7 @@ void CPSFanLight::getVBnIB(CVertexBuffer *&retVb, CIndexBuffer *&retIb)
vb.setName("CPSFanLight");
ib.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
ib.setNumIndexes(size * _NbFans * 3);
ib.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
// pointer on the current index to fill
CIndexBufferReadWrite iba;
ib.lock (iba);

View file

@ -421,6 +421,7 @@ void CPSGravity::show()
vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(6);
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);
{
CVertexBufferReadWrite vba;
vb.lock (vba);
@ -433,6 +434,7 @@ void CPSGravity::show()
}
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(2*4);
pb.setPreferredMemory(CIndexBuffer::RAMVolatile, false);
{
CIndexBufferReadWrite ibaWrite;
pb.lock (ibaWrite);

View file

@ -971,6 +971,7 @@ CPSRibbon::CVBnPB &CPSRibbon::getVBnPB()
);
vb.setNumVertices((_UsedNbSegs + 1) * numRibbonInVB * numVerticesInSlice); // 1 seg = 1 line + terminal vertices
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
// set the primitive block size
if (_BraceMode)
{

View file

@ -582,6 +582,7 @@ CPSRibbonLookAt::CVBnPB &CPSRibbonLookAt::getVBnPB()
CIndexBuffer &pb = VBnPB.PB;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes((_UsedNbSegs << 1) * numRibbonInVB * 3);
pb.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
CIndexBufferReadWrite iba;
pb.lock (iba);
/// Setup the pb and vb parts. Not very fast but executed only once

View file

@ -530,6 +530,7 @@ void CPSShockWave::getVBnPB(CVertexBuffer *&retVb, CIndexBuffer *&retPb)
vb.lock (vba);
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(2 * 3 * size * _NbSeg);
pb.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
CIndexBufferReadWrite ibaWrite;
pb.lock (ibaWrite);
uint finalIndex = 0;

View file

@ -422,6 +422,7 @@ CPSTailDot::CVBnPB &CPSTailDot::getVBnPB()
CIndexBuffer &pb = VBnPB.PB;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(2 * _UsedNbSegs * numRibbonInVB);
pb.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
/// Setup the pb and vb parts. Not very fast but executed only once
uint vbIndex = 0;
uint pbIndex = 0;

View file

@ -117,6 +117,7 @@ void CPSUtil::displayBBox(NL3D::IDriver *driver, const NLMISC::CAABBox &box, NLM
CVertexBuffer vb;
vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(8);
vb.setPreferredMemory(CVertexBuffer::AGPVolatile, false);
{
CVertexBufferReadWrite vba;
@ -145,6 +146,7 @@ void CPSUtil::displayBBox(NL3D::IDriver *driver, const NLMISC::CAABBox &box, NLM
CIndexBuffer pb;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(2*12);
pb.setPreferredMemory(CIndexBuffer::RAMVolatile, false);
{
CIndexBufferReadWrite ibaWrite;
pb.lock (ibaWrite);
@ -206,6 +208,7 @@ void CPSUtil::displayArrow(IDriver *driver, const CVector &start, const CVector
CVertexBuffer vb;
vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(5);
vb.setPreferredMemory(CVertexBuffer::AGPVolatile, false);
{

View file

@ -1307,6 +1307,7 @@ void CInstanceGroup::displayDebugClusters(IDriver *drv, class CTextContext *tx
const uint maxVertices= 10000;
vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(maxVertices);
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);
CIndexBuffer clusterTriangles;
CIndexBuffer clusterLines;
CIndexBuffer portalTriangles;

View file

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

View file

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

View file

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

View file

@ -205,12 +205,12 @@ namespace NLGUI
CViewRenderer &rVR = *CViewRenderer::getInstance();
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);
}
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" );
if (prop) _AHOnChangeParams = string((const char*)prop);

View file

@ -62,6 +62,17 @@ namespace NLGUI
_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 prop;
@ -113,7 +124,10 @@ namespace NLGUI
else
if( name == "hardtext" )
{
if( _ViewText != NULL )
return _ViewText->getText().toString();
else
return std::string( "" );
}
else
if( name == "text_y" )
@ -128,7 +142,10 @@ namespace NLGUI
else
if( name == "text_underlined" )
{
if( _ViewText != NULL )
return toString( _ViewText->getUnderlined() );
else
return std::string( "" );
}
else
if( name == "text_posref" )
@ -220,6 +237,11 @@ namespace NLGUI
_TextureIdNormal[ 0 ].setTexture( std::string( value + "_l.tga" ).c_str() );
_TextureIdNormal[ 1 ].setTexture( std::string( value + "_m.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;
}
else
@ -269,6 +291,7 @@ namespace NLGUI
else
if( name == "hardtext" )
{
if( _ViewText != NULL )
_ViewText->setText( value );
return;
}
@ -292,8 +315,10 @@ namespace NLGUI
if( name == "text_underlined" )
{
bool b;
if( _ViewText != NULL )
if( fromString( value, b ) )
_ViewText->setUnderlined( b );
return;
}
else
@ -766,8 +791,7 @@ namespace NLGUI
CCtrlBase *capturePointerLeft = CWidgetManager::getInstance()->getCapturePointerLeft();
// *** Draw Over
if( editorSelected ||
( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) )
if( ( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) )
)
{
if( !editorMode && (lastOver == false) && (_AHOnOver != NULL) )
@ -803,6 +827,8 @@ namespace NLGUI
}
}
// Setup ViewText color
if( _ViewText != NULL )
{
if ( pTxId==_TextureIdNormal || editorMode )
{
if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A;
@ -830,6 +856,7 @@ namespace NLGUI
if(getFrozen() && getFrozenHalfTone())
_ViewText->setAlpha(_ViewText->getAlpha()>>2);
}
}
// ***************************************************************************
@ -864,6 +891,16 @@ namespace NLGUI
{
_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
_ViewText->setParent (getParent());
_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:
return "playername";
break;
default:
break;
}
return "text";
@ -497,6 +500,9 @@ namespace NLGUI
case PlayerName:
e = "playername";
break;
default:
break;
}
xmlSetProp( node, BAD_CAST "enter_type", BAD_CAST e.c_str() );
@ -1411,6 +1417,7 @@ namespace NLGUI
// ----------------------------------------------------------------------------
void CGroupEditBox::checkCoords()
{
if( !editorMode )
setupDisplayText();
CInterfaceGroup::checkCoords();
@ -1530,7 +1537,29 @@ namespace NLGUI
_ViewText = dynamic_cast<CViewText *>(CInterfaceGroup::getView("edit_text"));
if(_ViewText == NULL)
{
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)
if(_ViewText)

View file

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

View file

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

View file

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

View file

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

View file

@ -34,6 +34,7 @@ using namespace NLMISC;
namespace NLGUI
{
bool CInterfaceElement::editorMode = false;
std::vector< CInterfaceElement::IDeletionWatcher* > CInterfaceElement::deletionWatchers;
// ------------------------------------------------------------------------------------------------
CInterfaceElement::~CInterfaceElement()
@ -46,6 +47,13 @@ namespace NLGUI
}
delete _Links;
}
if( editorMode )
{
notifyDeletionWatchers();
if( _Parent != NULL )
_Parent->onWidgetDeleted( this );
}
}
// ------------------------------------------------------------------------------------------------
@ -993,8 +1001,7 @@ namespace NLGUI
// ------------------------------------------------------------------------------------------------
bool CInterfaceElement::convertBool (const char *ptr)
{
std::string str = ptr;
NLMISC::strlwr( str );
std::string str = toLower(ptr);
bool b = false;
fromString( str, b );
return b;
@ -1296,6 +1303,11 @@ namespace NLGUI
}
void CInterfaceElement::drawHighlight()
{
CViewRenderer::getInstance()->drawWiredQuad( _XReal, _YReal, _WReal, _HReal );
}
// ***************************************************************************
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;

View file

@ -143,12 +143,12 @@ namespace NLGUI
// initStart = ryzomGetLocalTime ();
clearGroups();
// 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 ();
clearControls();
// 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);
#ifdef AJM_DEBUG_TRACK_INTERFACE_GROUPS
@ -1086,9 +1086,11 @@ namespace NLGUI
{
if (_Views[i] == child)
{
if (!dontDelete) delete _Views[i];
CViewBase *v = _Views[i];
_Views.erase(_Views.begin()+i);
delEltOrder (child);
child->onRemoved();
if (!dontDelete) delete v;
return true;
}
}
@ -1102,9 +1104,11 @@ namespace NLGUI
{
if (_Controls[i] == child)
{
if (!dontDelete) delete _Controls[i];
CCtrlBase *c = _Controls[i];
_Controls.erase(_Controls.begin()+i);
delEltOrder (child);
child->onRemoved();
if (!dontDelete) delete c;
return true;
}
}
@ -1118,9 +1122,11 @@ namespace NLGUI
{
if (_ChildrenGroups[i] == child)
{
if (!dontDelete) delete _ChildrenGroups[i];
CInterfaceGroup *g = _ChildrenGroups[i];
_ChildrenGroups.erase(_ChildrenGroups.begin()+i);
delEltOrder (child);
child->onRemoved();
if (!dontDelete) delete g;
return true;
}
}
@ -2471,4 +2477,16 @@ namespace NLGUI
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 );
}
}

View file

@ -3149,5 +3149,10 @@ namespace NLGUI
return true;
}
CViewBase* CInterfaceParser::createClass( const std::string &name )
{
return NLMISC_GET_FACTORY( CViewBase, std::string ).createObject( std::string( name ) , CViewBase::TCtorParam() );
}
}

View file

@ -47,5 +47,23 @@ namespace NLGUI
CInterfaceElement::visit(visitor);
}
bool CViewBase::handleEvent( const NLGUI::CEventDescriptor &evnt )
{
if( evnt.getType() == NLGUI::CEventDescriptor::mouse )
{
const NLGUI::CEventDescriptorMouse &eventDesc = ( const NLGUI::CEventDescriptorMouse& )evnt;
if( eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown )
{
if( editorMode )
{
CWidgetManager::getInstance()->setCurrentEditorSelection( getId() );
return true;
}
}
}
return false;
}
}

View file

@ -307,8 +307,7 @@ namespace NLGUI
prop = (char*) xmlGetProp( cur, (xmlChar*)"texture" );
if (prop)
{
string TxName = (const char *) prop;
TxName = strlwr (TxName);
string TxName = toLower((const char *) prop);
setTexture (TxName);
//CInterfaceManager *pIM = CInterfaceManager::getInstance();
//CViewRenderer &rVR = *CViewRenderer::getInstance();
@ -450,7 +449,6 @@ namespace NLGUI
// ----------------------------------------------------------------------------
void CViewBitmap::setTexture(const std::string & TxName)
{
_TextureId.setTexture (TxName.c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false);
}

View file

@ -894,11 +894,11 @@ namespace NLGUI
{
if (sGlobalTextureName.empty()) return -1;
// Look if already existing
string sLwrGTName = strlwr(sGlobalTextureName);
string sLwrGTName = toLower(sGlobalTextureName);
TGlobalTextureList::iterator ite = _GlobalTextures.begin();
while (ite != _GlobalTextures.end())
{
std::string sText = strlwr(ite->Name);
std::string sText = toLower(ite->Name);
if (sText == sLwrGTName)
break;
ite++;

View file

@ -33,6 +33,8 @@
#include "nel/gui/proc.h"
#include "nel/gui/interface_expr.h"
#include "nel/gui/reflect_register.h"
#include "nel/gui/editor_selection_watcher.h"
#include "nel/gui/widget_addition_watcher.h"
#include "nel/misc/events.h"
namespace NLGUI
@ -1033,6 +1035,7 @@ namespace NLGUI
_OldCaptureKeyboard = NULL;
setCapturePointerLeft(NULL);
setCapturePointerRight(NULL);
_CapturedView = NULL;
resetColorProps();
resetAlphaRolloverSpeedProps();
@ -2067,6 +2070,16 @@ namespace NLGUI
getPointer()->draw ();
}
if( CInterfaceElement::getEditorMode() )
{
if( !currentEditorSelection.empty() )
{
CInterfaceElement *e = getElementFromId( currentEditorSelection );
if( e != NULL )
e->drawHighlight();
}
}
// flush layers
CViewRenderer::getInstance()->flush();
@ -2099,6 +2112,12 @@ namespace NLGUI
getCapturePointerRight()->handleEvent( evnt );
setCapturePointerRight( NULL );
}
if( _CapturedView != NULL )
{
_CapturedView->handleEvent( evnt );
_CapturedView = NULL;
}
}
}
@ -2262,6 +2281,9 @@ namespace NLGUI
getCapturePointerLeft() != getCapturePointerRight() )
handled|= getCapturePointerRight()->handleEvent(evnt);
if( _CapturedView != NULL )
_CapturedView->handleEvent( evnt );
CInterfaceGroup *ptr = getWindowUnder (eventDesc.getX(), eventDesc.getY());
setCurrentWindowUnder( ptr );
@ -2339,6 +2361,8 @@ namespace NLGUI
}
}
bool captured = false;
// must not capture a new element if a sheet is currentlty being dragged.
// This may happen when alt-tab has been used => the sheet is dragged but the left button is up
if (!CCtrlDraggable::getDraggedSheet())
@ -2356,9 +2380,25 @@ namespace NLGUI
{
nMaxDepth = d;
setCapturePointerLeft( ctrl );
captured = true;
}
}
}
if( CInterfaceElement::getEditorMode() && !captured )
{
for( sint32 i = _ViewsUnderPointer.size()-1; i >= 0; i-- )
{
CViewBase *v = _ViewsUnderPointer[i];
if( ( v != NULL ) && v->isInGroup( pNewCurrentWnd ) )
{
_CapturedView = v;
captured = true;
break;
}
}
}
notifyElementCaptured( getCapturePointerLeft() );
if (clickedOutModalWindow && !clickedOutModalWindow->OnPostClickOut.empty())
{
@ -2366,13 +2406,16 @@ namespace NLGUI
}
}
//if found
if ( getCapturePointerLeft() != NULL)
if ( captured )
{
// consider clicking on a control implies handling of the event.
handled= true;
// handle the capture
if( getCapturePointerLeft() != NULL )
getCapturePointerLeft()->handleEvent(evnt);
else
_CapturedView->handleEvent( evnt );
}
}
@ -2601,6 +2644,8 @@ namespace NLGUI
// ***************************************************************************
void CWidgetManager::setCapturePointerLeft(CCtrlBase *c)
{
_CapturedView = NULL;
// additionally, abort any dragging
if( CCtrlDraggable::getDraggedSheet() != NULL )
CCtrlDraggable::getDraggedSheet()->abortDragging();
@ -3179,8 +3224,114 @@ namespace NLGUI
prev->setEditorSelected( false );
}
e->setEditorSelected( true );
currentEditorSelection = name;
}
else
if( !name.empty() )
return;
currentEditorSelection = name;
notifySelectionWatchers();
}
void CWidgetManager::notifySelectionWatchers()
{
std::vector< IEditorSelectionWatcher* >::iterator itr = selectionWatchers.begin();
while( itr != selectionWatchers.end() )
{
(*itr)->selectionChanged( currentEditorSelection );
++itr;
}
}
void CWidgetManager::registerSelectionWatcher( IEditorSelectionWatcher *watcher )
{
std::vector< IEditorSelectionWatcher* >::iterator itr =
std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher );
// We already have this watcher
if( itr != selectionWatchers.end() )
return;
selectionWatchers.push_back( watcher );
}
void CWidgetManager::unregisterSelectionWatcher( IEditorSelectionWatcher *watcher )
{
std::vector< IEditorSelectionWatcher* >::iterator itr =
std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher );
// We don't have this watcher
if( itr == selectionWatchers.end() )
return;
selectionWatchers.erase( itr );
}
void CWidgetManager::notifyAdditionWatchers( const std::string &widgetName )
{
std::vector< IWidgetAdditionWatcher* >::const_iterator itr = additionWatchers.begin();
while( itr != additionWatchers.end() )
{
(*itr)->widgetAdded( widgetName );
++itr;
}
}
void CWidgetManager::registerAdditionWatcher( IWidgetAdditionWatcher *watcher )
{
std::vector< IWidgetAdditionWatcher* >::const_iterator itr
= std::find( additionWatchers.begin(), additionWatchers.end(), watcher );
// already exists
if( itr != additionWatchers.end() )
return;
additionWatchers.push_back( watcher );
}
void CWidgetManager::unregisterAdditionWatcher( IWidgetAdditionWatcher *watcher )
{
std::vector< IWidgetAdditionWatcher* >::iterator itr
= std::find( additionWatchers.begin(), additionWatchers.end(), watcher );
// doesn't exist
if( itr == additionWatchers.end() )
return;
additionWatchers.erase( itr );
}
CInterfaceElement* CWidgetManager::addWidgetToGroup( std::string &group, std::string &widgetClass, std::string &widgetName )
{
// Check if this group exists
CInterfaceElement *e = getElementFromId( group );
if( e == NULL )
return NULL;
CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( e );
if( g == NULL )
return NULL;
// Check if an element already exists with that name
if( g->getElement( widgetName ) != NULL )
return NULL;
// Create and add the new widget
CViewBase *v = getParser()->createClass( widgetClass );
if( v == NULL )
return NULL;
v->setId( std::string( g->getId() + ":" + widgetName ) );
v->setParent( g );
if( v->isGroup() )
g->addGroup( dynamic_cast< CInterfaceGroup* >( v ) );
else
if( v->isCtrl() )
g->addCtrl( dynamic_cast< CCtrlBase* >( v ) );
else
g->addView( v );
notifyAdditionWatchers( v->getId() );
return v;
}

View file

@ -7,6 +7,7 @@ IF(WITH_NEL_TOOLS)
build_smallbank
ig_lighter
ig_elevation
lightmap_optimizer
zone_dependencies
zone_ig_lighter
zone_lighter
@ -47,7 +48,7 @@ ENDIF(WIN32)
IF(WITH_NEL_TOOLS)
IF(WIN32)
ADD_SUBDIRECTORY(lightmap_optimizer)
# ADD_SUBDIRECTORY(lightmap_optimizer)
IF(MFC_FOUND)
ADD_SUBDIRECTORY(object_viewer_exe)
ADD_SUBDIRECTORY(tile_edit)

View file

@ -32,7 +32,17 @@
#include "nel/3d/texture_file.h"
#include "nel/3d/register_3d.h"
#include "windows.h"
#ifdef NL_OS_WINDOWS
# include <windows.h>
#else
# define strnicmp NLMISC::strnicmp
# include <dirent.h> /* for directories functions */
# include <sys/types.h>
# include <sys/stat.h>
# include <unistd.h> /* getcwd, chdir -- replacement for getCurDiretory & setCurDirectory on windows */
#endif
#include <vector>
#include <string>
@ -42,20 +52,20 @@
using namespace std;
using namespace NL3D;
// ---------------------------------------------------------------------------
char sExeDir[MAX_PATH];
void outString (const string &sText)
void outString (const string &sText) ;
// ---------------------------------------------------------------------------
#ifdef NL_OS_WINDOWS // win32 code
void GetCWD (int length,char *dir)
{
char sCurDir[MAX_PATH];
GetCurrentDirectory (MAX_PATH, sCurDir);
SetCurrentDirectory (sExeDir);
NLMISC::createDebug ();
NLMISC::InfoLog->displayRaw(sText.c_str());
SetCurrentDirectory (sCurDir);
GetCurrentDirectoryA (length, dir);
}
// ---------------------------------------------------------------------------
bool ChDir(const char *path)
{
return SetCurrentDirectoryA (path);
}
void dir (const std::string &sFilter, std::vector<std::string> &sAllFiles, bool bFullPath)
{
WIN32_FIND_DATA findData;
@ -63,7 +73,8 @@ void dir (const std::string &sFilter, std::vector<std::string> &sAllFiles, bool
char sCurDir[MAX_PATH];
sAllFiles.clear ();
GetCurrentDirectory (MAX_PATH, sCurDir);
hFind = FindFirstFile (sFilter.c_str(), &findData);
std::string sFilterAsx = std::string("*") + sFilter;
hFind = FindFirstFile (sFilterAsx.c_str(), &findData);
while (hFind != INVALID_HANDLE_VALUE)
{
DWORD res = GetFileAttributes(findData.cFileName);
@ -79,16 +90,69 @@ void dir (const std::string &sFilter, std::vector<std::string> &sAllFiles, bool
}
FindClose (hFind);
}
#else // posix version of the void dir(...) function.
void GetCWD (int length, char* directory)
{
getcwd (directory,length);
}
bool ChDir(const char *path)
{
return ( chdir (path) == 0 ? true : false );
}
void dir (const string &sFilter, vector<string> &sAllFiles, bool bFullPath)
{
char sCurDir[MAX_PATH];
DIR* dp = NULL;
struct dirent *dirp= NULL;
GetCWD ( MAX_PATH,sCurDir ) ;
sAllFiles.clear ();
if ( (dp = opendir( sCurDir )) == NULL)
{
string sTmp = string("ERROR : Can't open the dir : \"")+string(sCurDir)+string("\"") ;
outString ( sTmp ) ;
return ;
}
while ( (dirp = readdir(dp)) != NULL)
{
std:string sFileName = std::string(dirp->d_name) ;
if (sFileName.substr((sFileName.length()-sFilter.length()),sFilter.length()).find(sFilter)!= std::string::npos )
{
if (bFullPath)
sAllFiles.push_back(string(sCurDir) + "/" + sFileName);
else
sAllFiles.push_back(sFileName);
}
}
closedir(dp);
}
bool DeleteFile(const char* filename){
if ( int res = unlink (filename) == -1 )
return false;
return true;
}
#endif
// ---------------------------------------------------------------------------
char sExeDir[MAX_PATH];
void outString (const string &sText)
{
char sCurDir[MAX_PATH];
GetCWD (MAX_PATH, sCurDir);
ChDir (sExeDir);
NLMISC::createDebug ();
NLMISC::InfoLog->displayRaw(sText.c_str());
ChDir (sCurDir);
}
// ---------------------------------------------------------------------------
bool fileExist (const std::string &sFileName)
{
HANDLE hFile = CreateFile (sFileName.c_str(), GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
return false;
CloseHandle (hFile);
return true;
return NLMISC::CFile::isExists(sFileName) ;
}
// -----------------------------------------------------------------------------------------------
@ -332,25 +396,25 @@ int main(int nNbArg, char **ppArgs)
char sSHPDir[MAX_PATH];
GetCurrentDirectory (MAX_PATH, sExeDir);
GetCWD (MAX_PATH, sExeDir);
// Get absolute directory for lightmaps
if (!SetCurrentDirectory(ppArgs[1]))
if (!ChDir(ppArgs[1]))
{
outString (string("ERROR : directory ") + ppArgs[1] + " do not exists\n");
outString (string("ERROR : directory ") + ppArgs[1] + " do not exists or access is denied\n");
return -1;
}
GetCurrentDirectory (MAX_PATH, sLMPDir);
SetCurrentDirectory (sExeDir);
GetCWD (MAX_PATH, sLMPDir);
ChDir (sExeDir);
// Get absolute directory for shapes
if (!SetCurrentDirectory(ppArgs[2]))
if (!ChDir(ppArgs[2]))
{
outString (string("ERROR : directory ") + ppArgs[2] + " do not exists\n");
outString (string("ERROR : directory ") + ppArgs[2] + " do not exists or access is denied\n");
return -1;
}
GetCurrentDirectory (MAX_PATH, sSHPDir);
dir ("*.shape", AllShapeNames, false);
GetCWD (MAX_PATH, sSHPDir);
dir (".shape", AllShapeNames, false);
registerSerial3d ();
for (uint32 nShp = 0; nShp < AllShapeNames.size(); ++nShp)
{
@ -374,13 +438,13 @@ int main(int nNbArg, char **ppArgs)
if (nNbArg > 3 && ppArgs[3] && strlen(ppArgs[3]) > 0)
{
SetCurrentDirectory (sExeDir);
if (!SetCurrentDirectory(ppArgs[3]))
ChDir (sExeDir);
if (!ChDir(ppArgs[3]))
{
outString (string("ERROR : directory ") + ppArgs[3] + " do not exists\n");
return -1;
}
dir ("*.tag", tags, false);
dir (".tag", tags, false);
for(uint k = 0; k < tags.size(); ++k)
{
std::string::size_type pos = tags[k].find('.');
@ -426,7 +490,7 @@ int main(int nNbArg, char **ppArgs)
// **** Parse all lightmaps, sorted by layer, and 8 or 16 bit mode
SetCurrentDirectory (sExeDir);
ChDir (sExeDir);
for (uint32 lmc8bitMode = 0; lmc8bitMode < 2; ++lmc8bitMode)
for (uint32 nNbLayer = 0; nNbLayer < 256; ++nNbLayer)
{
@ -440,8 +504,8 @@ int main(int nNbArg, char **ppArgs)
string sFilter;
// **** Get All Lightmaps that have this number of layer, and this mode
sFilter = "*_" + NLMISC::toString(nNbLayer) + ".tga";
SetCurrentDirectory (sLMPDir);
sFilter = "_" + NLMISC::toString(nNbLayer) + ".tga";
ChDir (sLMPDir);
dir (sFilter, AllLightmapNames, false);
// filter by layer
@ -697,7 +761,7 @@ int main(int nNbArg, char **ppArgs)
// Change shapes uvs related and names to the lightmap
// ---------------------------------------------------
SetCurrentDirectory (sSHPDir);
ChDir (sSHPDir);
for (k = 0; k < (sint32)AllShapes.size(); ++k)
{
@ -891,7 +955,7 @@ int main(int nNbArg, char **ppArgs)
}
}
SetCurrentDirectory (sLMPDir);
ChDir (sLMPDir);
// Get out of the j loop
break;
@ -923,7 +987,7 @@ int main(int nNbArg, char **ppArgs)
// **** Additionally, output or clear a "flag file" in a dir to info if a 8bit lihgtmap or not
if (nNbArg >=5 && ppArgs[4] && strlen(ppArgs[4]) > 0)
{
SetCurrentDirectory (sExeDir);
ChDir (sExeDir);
// out a text file, with list of
FILE *out= fopen(ppArgs[4], "wt");

View file

@ -28,6 +28,9 @@ SET(OVQT_PLUGIN_GUI_EDITOR_HDR
nelgui_widget.h
new_property_widget.h
new_widget_widget.h
add_widget_widget.h
editor_selection_watcher.h
editor_message_processor.h
)
SET(OVQT_PLUGIN_GUI_EDITOR_UIS
@ -42,6 +45,7 @@ SET(OVQT_PLUGIN_GUI_EDITOR_UIS
project_window.ui
new_property_widget.ui
new_widget_widget.ui
add_widget_widget.ui
)
SET(QT_USE_QTGUI TRUE)

View file

@ -0,0 +1,77 @@
#include "add_widget_widget.h"
#include "widget_info_tree.h"
#include <vector>
#include <string>
#include <QMessageBox>
namespace GUIEditor
{
AddWidgetWidget::AddWidgetWidget( QWidget *parent ) :
QWidget( parent )
{
setupUi( this );
setupConnections();
}
AddWidgetWidget::~AddWidgetWidget()
{
}
void AddWidgetWidget::setCurrentGroup( const QString &g )
{
groupEdit->setText( g );
}
void AddWidgetWidget::setupWidgetInfo( const CWidgetInfoTree *tree )
{
std::vector< std::string > names;
tree->getNames( names, false );
widgetCB->clear();
std::sort( names.begin(), names.end() );
std::vector< std::string >::const_iterator itr = names.begin();
while( itr != names.end() )
{
widgetCB->addItem( QString( itr->c_str() ) );
++itr;
}
}
void AddWidgetWidget::setupConnections()
{
connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( close() ) );
connect( addButton, SIGNAL( clicked( bool ) ), this, SLOT( onAddClicked() ) );
}
void AddWidgetWidget::onAddClicked()
{
if( groupEdit->text().isEmpty() )
{
QMessageBox::warning( NULL,
tr( "WARNING" ),
tr( "You need to be adding the new widget into a group!" ),
QMessageBox::Ok );
return;
}
if( nameEdit->text().isEmpty() )
{
QMessageBox::warning( NULL,
tr( "WARNING" ),
tr( "You need to specify a name for your new widget!" ),
QMessageBox::Ok );
return;
}
close();
Q_EMIT adding( groupEdit->text(), widgetCB->currentText(), nameEdit->text() );
}
}

View file

@ -0,0 +1,32 @@
#ifndef ADD_WIDGET_WIDGET_H
#define ADD_WIDGET_WIDGET_H
#include "ui_add_widget_widget.h"
namespace GUIEditor
{
class CWidgetInfoTree;
class AddWidgetWidget : public QWidget, public Ui::AddWidgetWidget
{
Q_OBJECT
public:
AddWidgetWidget( QWidget *parent = NULL );
~AddWidgetWidget();
void setCurrentGroup( const QString &g );
void setupWidgetInfo( const CWidgetInfoTree *tree );
private:
void setupConnections();
private Q_SLOTS:
void onAddClicked();
Q_SIGNALS:
void adding( const QString &parentGroup, const QString &widgetType, const QString &name );
};
}
#endif

View file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AddWidgetWidget</class>
<widget class="QWidget" name="AddWidgetWidget">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>318</width>
<height>132</height>
</rect>
</property>
<property name="windowTitle">
<string>Add new widget</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Group</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="groupEdit">
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Widget</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="widgetCB"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="nameEdit"/>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="addButton">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,134 @@
// Object Viewer Qt GUI Editor plugin <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 <QMessageBox>
#include "editor_message_processor.h"
#include "nel/gui/interface_group.h"
#include "nel/gui/widget_manager.h"
#include "widget_info_tree.h"
namespace GUIEditor
{
void CEditorMessageProcessor::onDelete()
{
std::string selection = CWidgetManager::getInstance()->getCurrentEditorSelection();
if( selection.empty() )
return;
QMessageBox::StandardButton r =
QMessageBox::question( NULL,
tr( "Deleting widget" ),
tr( "Are you sure you want to delete %1?" ).arg( selection.c_str() ),
QMessageBox::Yes | QMessageBox::No );
if( r != QMessageBox::Yes )
return;
CInterfaceElement *e =
CWidgetManager::getInstance()->getElementFromId( selection );
if( e == NULL )
return;
CInterfaceElement *p = e->getParent();
if( p == NULL )
return;
CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( p );
if( g == NULL )
return;
if( g->delElement( e ) )
{
CWidgetManager::getInstance()->setCurrentEditorSelection( "" );
}
}
void CEditorMessageProcessor::onAdd( const QString &parentGroup, const QString &widgetType, const QString &name )
{
CWidgetInfoTreeNode *node = tree->findNodeByName( std::string( widgetType.toUtf8() ) );
// No such widget
if( node == NULL )
{
QMessageBox::critical(
NULL,
tr( "Error" ),
tr( "Error adding the new widget! No such widget type!" ),
QMessageBox::Ok
);
return;
}
// No class name defined
std::string className = node->getInfo().className;
if( className.empty() )
{
QMessageBox::critical(
NULL,
tr( "Error" ),
tr( "Error adding the new widget! Missing classname!" ),
QMessageBox::Ok
);
return;
}
std::string pgName = std::string( parentGroup.toUtf8() );
std::string wName = std::string( name.toUtf8() );
CInterfaceElement *e =
CWidgetManager::getInstance()->addWidgetToGroup(
pgName,
className,
wName
);
// Failed to add widget
if( e == NULL )
{
QMessageBox::critical(
NULL,
tr( "Error" ),
tr( "Error adding the new widget!" ),
QMessageBox::Ok
);
return;
}
// Setting the defaults will override the Id too
std::string id = e->getId();
// Set up the defaults
std::vector< SPropEntry >::const_iterator itr = node->getInfo().props.begin();
while( itr != node->getInfo().props.end() )
{
e->setProperty( itr->propName, itr->propDefault );
++itr;
}
// Restore the Id
e->setId( id );
// Make the widget aligned to the top left corner
e->setParentPosRef( Hotspot_TL );
e->setPosRef( Hotspot_TL );
// Apply the new settings
e->setActive( false );
e->setActive( true );
}
}

View file

@ -0,0 +1,46 @@
// Object Viewer Qt GUI Editor plugin <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 <QObject>
namespace GUIEditor
{
class CWidgetInfoTree;
/// Processes the GUI Editor's editor messages like delete, new, etc...
class CEditorMessageProcessor : public QObject
{
Q_OBJECT
public:
CEditorMessageProcessor( QObject *parent = NULL ) :
QObject( parent )
{
tree = NULL;
}
~CEditorMessageProcessor(){}
void setTree( CWidgetInfoTree *tree ){ this->tree = tree; }
public Q_SLOTS:
void onDelete();
void onAdd( const QString &parentGroup, const QString &widgetType, const QString &name );
private:
CWidgetInfoTree *tree;
};
}

View file

@ -0,0 +1,26 @@
// 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 "editor_selection_watcher.h"
namespace GUIEditor
{
void CEditorSelectionWatcher::selectionChanged( std::string &newSelection )
{
Q_EMIT sgnSelectionChanged( newSelection );
}
}

View file

@ -0,0 +1,36 @@
// 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 "nel/gui/editor_selection_watcher.h"
#include <QObject>
namespace GUIEditor
{
/// Watches the Editor selection, and emits a signal when it changes
class CEditorSelectionWatcher : public QObject, public NLGUI::IEditorSelectionWatcher
{
Q_OBJECT
public:
CEditorSelectionWatcher() : QObject( NULL ){}
void selectionChanged( std::string &newSelection );
Q_SIGNALS:
void sgnSelectionChanged( std::string &id );
};
}

View file

@ -41,6 +41,9 @@
#include "project_file_serializer.h"
#include "project_window.h"
#include "nelgui_widget.h"
#include "editor_selection_watcher.h"
#include "editor_message_processor.h"
#include "add_widget_widget.h"
namespace GUIEditor
{
@ -53,11 +56,13 @@ namespace GUIEditor
QMainWindow(parent)
{
m_ui.setupUi(this);
messageProcessor = new CEditorMessageProcessor;
m_undoStack = new QUndoStack(this);
widgetProps = new CWidgetProperties;
linkList = new LinkList;
procList = new ProcList;
projectWindow = new ProjectWindow;
addWidgetWidget = new AddWidgetWidget;
connect( projectWindow, SIGNAL( projectFilesChanged() ), this, SLOT( onProjectFilesChanged() ) );
viewPort = new NelGUIWidget;
setCentralWidget( viewPort );
@ -73,6 +78,8 @@ namespace GUIEditor
parser.setWidgetInfoTree( widgetInfoTree );
parser.parseGUIWidgets();
widgetProps->setupWidgetInfo( widgetInfoTree );
addWidgetWidget->setupWidgetInfo( widgetInfoTree );
messageProcessor->setTree( widgetInfoTree );
QDockWidget *dock = new QDockWidget( "Widget Hierarchy", this );
dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
@ -91,17 +98,23 @@ namespace GUIEditor
viewPort->init();
connect( viewPort, SIGNAL( guiLoadComplete() ), hierarchyView, SLOT( onGUILoaded() ) );
connect( viewPort, SIGNAL( guiLoadComplete() ), procList, SLOT( onGUILoaded() ) );
connect( viewPort, SIGNAL( guiLoadComplete() ), linkList, SLOT( onGUILoaded() ) );
connect( hierarchyView, SIGNAL( selectionChanged( std::string& ) ),
&browserCtrl, SLOT( onSelectionChanged( std::string& ) ) );
connect( viewPort, SIGNAL( guiLoadComplete() ), this, SLOT( onGUILoaded() ) );
connect( widgetProps, SIGNAL( treeChanged() ), this, SLOT( onTreeChanged() ) );
connect(
addWidgetWidget,
SIGNAL( adding( const QString&, const QString&, const QString& ) ),
messageProcessor,
SLOT( onAdd( const QString&, const QString&, const QString& ) )
);
}
GUIEditorWindow::~GUIEditorWindow()
{
writeSettings();
delete messageProcessor;
messageProcessor = NULL;
delete widgetProps;
widgetProps = NULL;
@ -117,6 +130,9 @@ namespace GUIEditor
delete viewPort;
viewPort = NULL;
delete addWidgetWidget;
addWidgetWidget = NULL;
// no deletion needed for these, since dockwidget owns them
hierarchyView = NULL;
propBrowser = NULL;
@ -262,6 +278,11 @@ namespace GUIEditor
if( reply != QMessageBox::Yes )
return false;
CEditorSelectionWatcher *w = viewPort->getWatcher();
disconnect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), hierarchyView, SLOT( onSelectionChanged( std::string& ) ) );
disconnect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) );
projectFiles.clearAll();
projectWindow->clear();
hierarchyView->clearHierarchy();
@ -291,6 +312,30 @@ namespace GUIEditor
setCursor( Qt::ArrowCursor );
}
void GUIEditorWindow::onGUILoaded()
{
hierarchyView->onGUILoaded();
procList->onGUILoaded();
linkList->onGUILoaded();
CEditorSelectionWatcher *w = viewPort->getWatcher();
connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), hierarchyView, SLOT( onSelectionChanged( std::string& ) ) );
connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) );
}
void GUIEditorWindow::onAddWidgetClicked()
{
QString g;
hierarchyView->getCurrentGroup( g );
addWidgetWidget->setCurrentGroup( g );
addWidgetWidget->show();
}
void GUIEditorWindow::onTreeChanged()
{
addWidgetWidget->setupWidgetInfo( widgetInfoTree );
}
void GUIEditorWindow::createMenus()
{
@ -299,6 +344,7 @@ namespace GUIEditor
QAction *saveAction = mm->action( Core::Constants::SAVE );
QAction *saveAsAction = mm->action( Core::Constants::SAVE_AS );
QAction *closeAction = mm->action( Core::Constants::CLOSE );
QAction *delAction = mm->action( Core::Constants::DEL );
//if( newAction != NULL )
// newAction->setEnabled( true );
@ -308,6 +354,11 @@ namespace GUIEditor
saveAsAction->setEnabled( true );
if( closeAction != NULL )
closeAction->setEnabled( true );
if( delAction != NULL )
{
delAction->setEnabled( true );
connect( delAction, SIGNAL( triggered( bool ) ), messageProcessor, SLOT( onDelete() ) );
}
QMenu *menu = mm->menu( Core::Constants::M_TOOLS );
if( menu != NULL )
@ -329,6 +380,10 @@ namespace GUIEditor
a = new QAction( "Project Window", this );
connect( a, SIGNAL( triggered( bool ) ), projectWindow, SLOT( show() ) );
m->addAction( a );
a = new QAction( "Add Widget", this );
connect( a, SIGNAL( triggered( bool ) ), this, SLOT( onAddWidgetClicked() ) );
m->addAction( a );
}
}

View file

@ -36,6 +36,8 @@ namespace GUIEditor
class ProjectWindow;
class NelGUIWidget;
class CWidgetInfoTree;
class CEditorMessageProcessor;
class AddWidgetWidget;
class GUIEditorWindow: public QMainWindow
{
@ -58,6 +60,9 @@ public Q_SLOTS:
private Q_SLOTS:
void onProjectFilesChanged();
void onGUILoaded();
void onAddWidgetClicked();
void onTreeChanged();
private:
void createMenus();
@ -76,8 +81,9 @@ private:
ProcList *procList;
ProjectWindow *projectWindow;
NelGUIWidget *viewPort;
CWidgetInfoTree *widgetInfoTree;
CEditorMessageProcessor *messageProcessor;
AddWidgetWidget *addWidgetWidget;
CPropBrowserCtrl browserCtrl;
QString currentProject;

View file

@ -27,6 +27,7 @@
#include <set>
#include <string>
#include <QTimerEvent>
#include "editor_selection_watcher.h"
namespace GUIEditor
{
@ -37,6 +38,7 @@ namespace GUIEditor
{
timerID = 0;
guiLoaded = false;
watcher = NULL;
}
NelGUIWidget::~NelGUIWidget()
@ -70,6 +72,8 @@ namespace GUIEditor
NLGUI::CViewRenderer::getInstance()->init();
CWidgetManager::getInstance()->getParser()->setEditorMode( true );
watcher = new CEditorSelectionWatcher();
}
bool NelGUIWidget::parse( SProjectFiles &files )
@ -106,6 +110,8 @@ namespace GUIEditor
guiLoaded = true;
Q_EMIT guiLoadComplete();
CWidgetManager::getInstance()->registerSelectionWatcher( watcher );
return true;
}
@ -115,6 +121,7 @@ namespace GUIEditor
if( timerID != 0 )
killTimer( timerID );
timerID = 0;
CWidgetManager::getInstance()->unregisterSelectionWatcher( watcher );
CWidgetManager::getInstance()->reset();
CWidgetManager::getInstance()->getParser()->removeAll();
CViewRenderer::getInstance()->reset();

View file

@ -23,6 +23,8 @@
namespace GUIEditor
{
class CEditorSelectionWatcher;
/// Qt viewport for the Nel GUI library
class NelGUIWidget : public Nel3DWidget
{
@ -35,6 +37,7 @@ namespace GUIEditor
bool parse( SProjectFiles &files );
void draw();
void reset();
CEditorSelectionWatcher* getWatcher(){ return watcher; }
Q_SIGNALS:
void guiLoadComplete();
@ -49,6 +52,7 @@ Q_SIGNALS:
private:
int timerID;
bool guiLoaded;
CEditorSelectionWatcher *watcher;
};
}

View file

@ -78,7 +78,12 @@ namespace GUIEditor
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( id );
if( e == NULL )
{
connect( propertyMgr, SIGNAL( propertyChanged( QtProperty* ) ),
this, SLOT( onPropertyChanged( QtProperty* ) ) );
return;
}
currentElement = id;
@ -106,6 +111,12 @@ namespace GUIEditor
if( e == NULL )
return;
e->setProperty( propName.toUtf8().constData(), propValue.toUtf8().constData() );
// Make sure the changes are applied
bool active = e->getActive();
e->setActive( !active );
e->setActive( active );
}
void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element )

View file

@ -18,6 +18,7 @@
#include "widget_hierarchy.h"
#include "nel/gui/interface_group.h"
#include "nel/gui/widget_manager.h"
#include "nel/gui/widget_addition_watcher.h"
namespace
{
@ -56,6 +57,45 @@ namespace
name = s.toUtf8().constData();
return name;
}
class CWidgetDeletionWatcher : public CInterfaceElement::IDeletionWatcher
{
public:
CWidgetDeletionWatcher(){ h = NULL; }
~CWidgetDeletionWatcher(){}
void onDeleted( const std::string &id ){
if( h != NULL )
h->onWidgetDeleted( id );
}
void setWidgetHierarchy( GUIEditor::WidgetHierarchy *h ){ this->h = h; }
private:
GUIEditor::WidgetHierarchy *h;
};
class CWidgetAdditionWatcher : public IWidgetAdditionWatcher
{
public:
CWidgetAdditionWatcher(){ h = NULL; }
~CWidgetAdditionWatcher(){}
void widgetAdded( const std::string &name )
{
if( h != NULL )
h->onWidgetAdded( name );
}
void setWidgetHierarchy( GUIEditor::WidgetHierarchy *h ){ this->h = h; }
private:
GUIEditor::WidgetHierarchy *h;
};
CWidgetDeletionWatcher deletionWatcher;
CWidgetAdditionWatcher additionWatcher;
}
namespace GUIEditor
@ -66,6 +106,8 @@ namespace GUIEditor
setupUi( this );
connect( widgetHT, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ),
this, SLOT( onItemDblClicked( QTreeWidgetItem* ) ) );
deletionWatcher.setWidgetHierarchy( this );
additionWatcher.setWidgetHierarchy( this );
}
WidgetHierarchy::~WidgetHierarchy()
@ -74,12 +116,17 @@ namespace GUIEditor
void WidgetHierarchy::clearHierarchy()
{
CInterfaceElement::unregisterDeletionWatcher( &deletionWatcher );
CWidgetManager::getInstance()->unregisterAdditionWatcher( &additionWatcher );
widgetHT->clear();
widgetHierarchyMap.clear();
}
void WidgetHierarchy::buildHierarchy( std::string &masterGroup )
{
clearHierarchy();
CInterfaceElement::registerDeletionWatcher( &deletionWatcher );
CWidgetManager::getInstance()->registerAdditionWatcher( &additionWatcher );
CInterfaceGroup *mg = CWidgetManager::getInstance()->getMasterGroupFromId( masterGroup );
if( mg != NULL )
@ -87,6 +134,7 @@ namespace GUIEditor
QTreeWidgetItem *item = new QTreeWidgetItem( static_cast<QTreeWidgetItem*>(NULL) );
item->setText( 0, "ui" );
widgetHT->addTopLevelItem( item );
widgetHierarchyMap[ "ui" ] = item;
buildHierarchy( item, mg );
}
@ -96,7 +144,9 @@ namespace GUIEditor
{
// First add ourselves
QTreeWidgetItem *item = new QTreeWidgetItem( parent );
item->setText( 0, makeNodeName( group->getId() ).c_str() );
widgetHierarchyMap[ group->getId() ] = item;
// Then add recursively our subgroups
const std::vector< CInterfaceGroup* > &groups = group->getGroups();
@ -113,6 +163,7 @@ namespace GUIEditor
{
QTreeWidgetItem *subItem = new QTreeWidgetItem( item );
subItem->setText( 0, makeNodeName( (*citr)->getId() ).c_str() );
widgetHierarchyMap[ (*citr)->getId() ] = subItem;
}
// Add our views
@ -122,14 +173,134 @@ namespace GUIEditor
{
QTreeWidgetItem *subItem = new QTreeWidgetItem( item );
subItem->setText( 0, makeNodeName( (*vitr)->getId() ).c_str() );
widgetHierarchyMap[ (*vitr)->getId() ] = subItem;
}
}
void WidgetHierarchy::onWidgetDeleted( const std::string &id )
{
std::map< std::string, QTreeWidgetItem* >::iterator itr
= widgetHierarchyMap.find( id );
if( itr == widgetHierarchyMap.end() )
return;
if( widgetHT->currentItem() == itr->second )
{
QTreeWidgetItem *item = itr->second;
QTreeWidgetItem *p = item;
// Deselect item
item->setSelected( false );
widgetHT->setCurrentItem( NULL );
// Collapse the tree
while( p != NULL )
{
p->setExpanded( false );
p = p->parent();
}
currentSelection = "";
}
itr->second->setSelected( false );
delete itr->second;
itr->second = NULL;
widgetHierarchyMap.erase( itr );
}
void WidgetHierarchy::onWidgetAdded( const std::string &id )
{
// Get the parent's name
std::string::size_type p = id.find_last_of( ':' );
if( p == std::string::npos )
return;
std::string parentId = id.substr( 0, p );
// Do we have the parent in the hierarchy?
std::map< std::string, QTreeWidgetItem* >::iterator itr
= widgetHierarchyMap.find( parentId );
if( itr == widgetHierarchyMap.end() )
return;
// Add the new widget to the hierarchy
QTreeWidgetItem *parent = itr->second;
QTreeWidgetItem *item = new QTreeWidgetItem( parent );
item->setText( 0, makeNodeName( id ).c_str() );
widgetHierarchyMap[ id ] = item;
}
void WidgetHierarchy::getCurrentGroup( QString &g )
{
std::string s = CWidgetManager::getInstance()->getCurrentEditorSelection();
if( s.empty() )
{
g = "";
return;
}
NLGUI::CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( s );
if( e == NULL )
{
g = "";
return;
}
if( e->isGroup() )
{
g = e->getId().c_str();
return;
}
NLGUI::CInterfaceGroup *p = e->getParent();
if( p == NULL )
{
g = "";
return;
}
g = p->getId().c_str();
}
void WidgetHierarchy::onGUILoaded()
{
if( masterGroup.empty() )
return;
buildHierarchy( masterGroup );
currentSelection.clear();
}
void WidgetHierarchy::onSelectionChanged( std::string &newSelection )
{
if( newSelection == currentSelection )
return;
if( newSelection.empty() )
return;
std::map< std::string, QTreeWidgetItem* >::iterator itr =
widgetHierarchyMap.find( newSelection );
if( itr == widgetHierarchyMap.end() )
return;
// deselect current item
if( widgetHT->currentItem() != NULL )
widgetHT->currentItem()->setSelected( false );
// expand the tree items, so that we can see the selected item
QTreeWidgetItem *item = itr->second;
QTreeWidgetItem *currItem = item;
while( currItem != NULL )
{
currItem->setExpanded( true );
currItem = currItem->parent();
}
// select the current item
item->setSelected( true );
widgetHT->setCurrentItem( item );
currentSelection = newSelection;
}
void WidgetHierarchy::onItemDblClicked( QTreeWidgetItem *item )
@ -138,9 +309,7 @@ namespace GUIEditor
return;
std::string n = item->text( 0 ).toUtf8().constData();
std::string selection = makeFullName( item, n );
CWidgetManager::getInstance()->setCurrentEditorSelection( selection );
Q_EMIT selectionChanged( selection );
currentSelection = makeFullName( item, n );
CWidgetManager::getInstance()->setCurrentEditorSelection( currentSelection );
}
}

View file

@ -18,6 +18,8 @@
#define WIDGET_HA_H
#include "ui_widget_hierarchy.h"
#include <string>
#include <map>
namespace NLGUI
{
@ -40,11 +42,17 @@ namespace GUIEditor
void clearHierarchy();
void buildHierarchy( std::string &masterGroup );
void onWidgetDeleted( const std::string &id );
void onWidgetAdded( const std::string &id );
void getCurrentGroup( QString &g );
private:
void buildHierarchy( QTreeWidgetItem *parent, NLGUI::CInterfaceGroup *group );
public Q_SLOTS:
void onGUILoaded();
void onSelectionChanged( std::string &newSelection );
private Q_SLOTS:
void onItemDblClicked( QTreeWidgetItem *item );
@ -52,9 +60,7 @@ namespace GUIEditor
private:
std::string currentSelection;
std::string masterGroup;
Q_SIGNALS:
void selectionChanged( std::string &id );
std::map< std::string, QTreeWidgetItem* > widgetHierarchyMap;
};
}

View file

@ -53,6 +53,7 @@ namespace GUIEditor
{
std::string name;
std::string GUIName;
std::string className;
std::string ancestor;
std::string description;
bool isAbstract;

View file

@ -63,6 +63,7 @@ namespace GUIEditor
f << "\t<header>" << std::endl;
f << "\t\t<name>" << info.name << "</name>" << std::endl;
f << "\t\t<guiname>" << info.GUIName << "</guiname>" << std::endl;
f << "\t\t<classname>" << info.className << "</classname>" << std::endl;
f << "\t\t<ancestor>" << info.ancestor << "</ancestor>" << std::endl;
f << "\t\t<description>" << info.description << "</description>" << std::endl;

View file

@ -93,11 +93,11 @@ namespace GUIEditor
}
/// Get the node names and put them into the vector
void getNames( std::vector< std::string > &v ) const
void getNames( std::vector< std::string > &v, bool includeAbstract = true ) const
{
if( root == NULL )
return;
root->getNames( v );
root->getNames( v, includeAbstract );
}

View file

@ -215,11 +215,13 @@ namespace GUIEditor
}
/// Get the node names and put them into the vector
void getNames( std::vector< std::string > &v ) const
void getNames( std::vector< std::string > &v, bool includeAbstract = true ) const
{
if( !info.isAbstract || ( info.isAbstract && includeAbstract ) )
v.push_back( info.name );
for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr )
( *itr )->getNames( v );
( *itr )->getNames( v, includeAbstract );
}
/// Accepts a visitor to itself and to the children nodes

View file

@ -84,6 +84,7 @@ namespace GUIEditor{
return;
tree->removeNode( widgetName.toUtf8().constData() );
Q_EMIT treeChanged();
widgetPropTree->clear();
buildWidgetList();
}
@ -156,6 +157,7 @@ namespace GUIEditor{
void CWidgetProperties::onWidgetAdded()
{
buildWidgetList();
Q_EMIT treeChanged();
}
void CWidgetProperties::buildWidgetList()

View file

@ -74,6 +74,9 @@ namespace GUIEditor
CWidgetInfoTree *tree;
NewPropertyWidget *newPropertyWidget;
NewWidgetWidget *newWidgetWidget;
Q_SIGNALS:
void treeChanged();
};
}

View file

@ -131,6 +131,9 @@ namespace GUIEditor
if( key == "guiname" )
info.GUIName = value.toUtf8().constData();
else
if( key == "classname" )
info.className = value.toUtf8().constData();
else
if( key == "ancestor" )
info.ancestor = value.toUtf8().constData();
else

View file

@ -11,7 +11,7 @@
<property>
<name>button_type</name>
<type>string</type>
<default>toggle_button</default>
<default>push_button</default>
</property>
<property>
<name>pushed</name>

View file

@ -2,6 +2,7 @@
<header>
<name>CtrlButton</name>
<guiname>CCtrlButton</guiname>
<classname>button</classname>
<ancestor>CtrlBaseButton</ancestor>
<description></description>
<abstract>false</abstract>
@ -11,17 +12,17 @@
<property>
<name>tx_normal</name>
<type>string</type>
<default></default>
<default>log_but_r.tga</default>
</property>
<property>
<name>tx_pushed</name>
<type>string</type>
<default></default>
<default>log_but_r.tga</default>
</property>
<property>
<name>tx_over</name>
<type>string</type>
<default></default>
<default>log_but_over_r.tga</default>
</property>
<property>
<name>scale</name>

View file

@ -2,6 +2,7 @@
<header>
<name>CtrlColPick</name>
<guiname>CCtrlColPick</guiname>
<classname>colpick</classname>
<ancestor>CtrlBase</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>CtrlScroll</name>
<guiname>CCtrlScroll</guiname>
<classname>scroll</classname>
<ancestor>CtrlBase</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>CtrlTextButton</name>
<guiname>CCtrlTextButton</guiname>
<classname>text_button</classname>
<ancestor>CtrlBaseButton</ancestor>
<description></description>
<abstract>false</abstract>
@ -11,27 +12,27 @@
<property>
<name>tx_normal</name>
<type>string</type>
<default></default>
<default>but</default>
</property>
<property>
<name>tx_pushed</name>
<type>string</type>
<default></default>
<default>but</default>
</property>
<property>
<name>tx_over</name>
<type>string</type>
<default></default>
<default>but_over</default>
</property>
<property>
<name>hardtext</name>
<type>string</type>
<default></default>
<default>text</default>
</property>
<property>
<name>wmargin</name>
<type>int</type>
<default>0</default>
<default>20</default>
</property>
<property>
<name>wmin</name>
@ -151,7 +152,7 @@
<property>
<name>line_maxw</name>
<type>int</type>
<default>0</default>
<default>200</default>
</property>
<property>
<name>multi_line_space</name>

View file

@ -2,6 +2,7 @@
<header>
<name>DBGroupSelectNumber</name>
<guiname>CDBGroupSelectNumber</guiname>
<classname>select_number</classname>
<ancestor>InterfaceGroup</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>DBViewBar</name>
<guiname>CDBViewBar</guiname>
<classname>bar</classname>
<ancestor>ViewBitmap</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>DBViewBar3</name>
<guiname>CDBViewBar3</guiname>
<classname>bar3</classname>
<ancestor>ViewBitmap</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>DBViewDigit</name>
<guiname>CDBViewDigit</guiname>
<classname>digit</classname>
<ancestor>CtrlBase</ancestor>
<description></description>
<abstract>false</abstract>
@ -11,7 +12,7 @@
<property>
<name>value</name>
<type>string</type>
<default></default>
<default>0</default>
</property>
<property>
<name>numdigit</name>

View file

@ -2,6 +2,7 @@
<header>
<name>DBViewNumber</name>
<guiname>CDBViewNumber</guiname>
<classname>text_number</classname>
<ancestor>ViewText</ancestor>
<description></description>
<abstract>false</abstract>
@ -11,7 +12,7 @@
<property>
<name>value</name>
<type>string</type>
<default></default>
<default>0</default>
</property>
<property>
<name>positive</name>

View file

@ -2,6 +2,7 @@
<header>
<name>DBViewQuantity</name>
<guiname>CDBViewQuantity</guiname>
<classname>text_quantity</classname>
<ancestor>ViewText</ancestor>
<description></description>
<abstract>false</abstract>
@ -11,17 +12,17 @@
<property>
<name>value</name>
<type>string</type>
<default></default>
<default>0</default>
</property>
<property>
<name>valuemax</name>
<type>string</type>
<default></default>
<default>100</default>
</property>
<property>
<name>emptytext</name>
<type>string</type>
<default></default>
<default>empty text</default>
</property>

View file

@ -2,6 +2,7 @@
<header>
<name>GroupContainer</name>
<guiname>CGroupContainer</guiname>
<classname>container</classname>
<ancestor>InterfaceGroup</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>GroupEditBox</name>
<guiname>CGroupEditBox</guiname>
<classname>edit_box</classname>
<ancestor>InterfaceGroup</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>GroupHTML</name>
<guiname>CGroupHTML</guiname>
<classname>html</classname>
<ancestor>GroupScrollText</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>GroupHeader</name>
<guiname>CGroupHeader</guiname>
<classname>header</classname>
<ancestor>GroupList</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>GroupList</name>
<guiname>CGroupList</guiname>
<classname>list</classname>
<ancestor>InterfaceGroup</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>GroupMenu</name>
<guiname>CGroupMenu</guiname>
<classname>menu</classname>
<ancestor>GroupModal</ancestor>
<description></description>
<abstract>false</abstract>

View file

@ -2,6 +2,7 @@
<header>
<name>GroupModal</name>
<guiname>CGroupModal</guiname>
<classname>modal</classname>
<ancestor>GroupFrame</ancestor>
<description></description>
<abstract>false</abstract>

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