Removed more of the vendor specific VBO stuff ( function definitions for example )

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 12 years ago
parent 28c49a0427
commit d06f675c08

@ -10142,26 +10142,6 @@ typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid
#define GL_ATI_texture_mirror_once 1
#endif
#ifndef GL_NV_fence
#define GL_NV_fence 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);
GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);
GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
GLAPI void APIENTRY glFinishFenceNV (GLuint fence);
GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
#endif
#ifndef GL_NV_evaluators
#define GL_NV_evaluators 1
#ifdef GL_GLEXT_PROTOTYPES
@ -10216,10 +10196,6 @@ typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, G
#define GL_NV_texture_shader2 1
#endif
#ifndef GL_NV_vertex_array_range2
#define GL_NV_vertex_array_range2 1
#endif
#ifndef GL_NV_vertex_program
#define GL_NV_vertex_program 1
#ifdef GL_GLEXT_PROTOTYPES

@ -764,7 +764,7 @@ bool CDriverGL3::swapBuffers()
/* Yoyo: must do this (GeForce bug ??) else weird results if end render with a VBHard.
Setup a std vertex buffer to ensure NVidia synchronisation.
*/
if (!_Extensions.ARBVertexBufferObject && _Extensions.NVVertexArrayRange)
if (!_Extensions.ARBVertexBufferObject )
{
static CVertexBuffer dummyVB;
static bool dummyVBinit= false;

@ -110,19 +110,6 @@ NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC nglCompressedTexSubImage2DARB;
NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB;
NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC nglGetCompressedTexImageARB;
// VertexArrayRangeNV.
NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC nglFlushVertexArrayRangeNV;
NEL_PFNGLVERTEXARRAYRANGENVPROC nglVertexArrayRangeNV;
// FenceNV.
NEL_PFNGLDELETEFENCESNVPROC nglDeleteFencesNV;
NEL_PFNGLGENFENCESNVPROC nglGenFencesNV;
NEL_PFNGLISFENCENVPROC nglIsFenceNV;
NEL_PFNGLTESTFENCENVPROC nglTestFenceNV;
NEL_PFNGLGETFENCEIVNVPROC nglGetFenceivNV;
NEL_PFNGLFINISHFENCENVPROC nglFinishFenceNV;
NEL_PFNGLSETFENCENVPROC nglSetFenceNV;
// VertexWeighting.
NEL_PFNGLVERTEXWEIGHTFEXTPROC nglVertexWeightfEXT;
NEL_PFNGLVERTEXWEIGHTFVEXTPROC nglVertexWeightfvEXT;
@ -251,29 +238,6 @@ NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT;
// BlendColor extension
NEL_PFNGLBLENDCOLOREXTPROC nglBlendColorEXT;
//========================
NEL_PFNGLNEWOBJECTBUFFERATIPROC nglNewObjectBufferATI;
NEL_PFNGLISOBJECTBUFFERATIPROC nglIsObjectBufferATI;
NEL_PFNGLUPDATEOBJECTBUFFERATIPROC nglUpdateObjectBufferATI;
NEL_PFNGLGETOBJECTBUFFERFVATIPROC nglGetObjectBufferfvATI;
NEL_PFNGLGETOBJECTBUFFERIVATIPROC nglGetObjectBufferivATI;
NEL_PFNGLDELETEOBJECTBUFFERATIPROC nglDeleteObjectBufferATI;
NEL_PFNGLARRAYOBJECTATIPROC nglArrayObjectATI;
NEL_PFNGLGETARRAYOBJECTFVATIPROC nglGetArrayObjectfvATI;
NEL_PFNGLGETARRAYOBJECTIVATIPROC nglGetArrayObjectivATI;
NEL_PFNGLVARIANTARRAYOBJECTATIPROC nglVariantArrayObjectATI;
NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC nglGetVariantArrayObjectfvATI;
NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC nglGetVariantArrayObjectivATI;
// GL_ATI_map_object_buffer
NEL_PFNGLMAPOBJECTBUFFERATIPROC nglMapObjectBufferATI;
NEL_PFNGLUNMAPOBJECTBUFFERATIPROC nglUnmapObjectBufferATI;
// GL_ATI_vertex_attrib_array_object
NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC nglVertexAttribArrayObjectATI;
NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC nglGetVertexAttribArrayObjectfvATI;
NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC nglGetVertexAttribArrayObjectivATI;
// GL_ATI_envmap_bumpmap extension
PFNGLTEXBUMPPARAMETERIVATIPROC nglTexBumpParameterivATI;
PFNGLTEXBUMPPARAMETERFVATIPROC nglTexBumpParameterfvATI;
@ -596,41 +560,6 @@ static bool setupOESDrawTexture(const char *glext)
return true;
}
// *********************************
static bool setupNVVertexArrayRange(const char *glext)
{
H_AUTO_OGL(setupNVVertexArrayRange);
// Test if VAR is present.
CHECK_EXT("GL_NV_vertex_array_range");
// Tess Fence too.
CHECK_EXT("GL_NV_fence");
// Get VAR address.
CHECK_ADDRESS(NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC, glFlushVertexArrayRangeNV);
CHECK_ADDRESS(NEL_PFNGLVERTEXARRAYRANGENVPROC, glVertexArrayRangeNV);
#ifdef NL_OS_WINDOWS
CHECK_ADDRESS(PFNWGLALLOCATEMEMORYNVPROC, wglAllocateMemoryNV);
CHECK_ADDRESS(PFNWGLFREEMEMORYNVPROC, wglFreeMemoryNV);
#elif defined(NL_OS_UNIX) && !defined(NL_OS_MAC)
CHECK_ADDRESS(NEL_PFNGLXALLOCATEMEMORYNVPROC, glXAllocateMemoryNV);
CHECK_ADDRESS(NEL_PFNGLXFREEMEMORYNVPROC, glXFreeMemoryNV);
#endif
// Get fence address.
CHECK_ADDRESS(NEL_PFNGLDELETEFENCESNVPROC, glDeleteFencesNV);
CHECK_ADDRESS(NEL_PFNGLGENFENCESNVPROC, glGenFencesNV);
CHECK_ADDRESS(NEL_PFNGLISFENCENVPROC, glIsFenceNV);
CHECK_ADDRESS(NEL_PFNGLTESTFENCENVPROC, glTestFenceNV);
CHECK_ADDRESS(NEL_PFNGLGETFENCEIVNVPROC, glGetFenceivNV);
CHECK_ADDRESS(NEL_PFNGLFINISHFENCENVPROC, glFinishFenceNV);
CHECK_ADDRESS(NEL_PFNGLSETFENCENVPROC, glSetFenceNV);
return true;
}
// *********************************
static bool setupEXTTextureCompressionS3TC(const char *glext)
{
@ -982,65 +911,6 @@ static bool setupEXTBlendColor(const char *glext)
return true;
}
// *********************************
static bool setupNVVertexArrayRange2(const char *glext)
{
H_AUTO_OGL(setupNVVertexArrayRange2);
CHECK_EXT("GL_NV_vertex_array_range2");
return true;
}
// *********************************
static bool setupATIVertexArrayObject(const char *glext)
{
H_AUTO_OGL(setupATIVertexArrayObject);
CHECK_EXT("GL_ATI_vertex_array_object");
CHECK_ADDRESS(NEL_PFNGLNEWOBJECTBUFFERATIPROC, glNewObjectBufferATI);
CHECK_ADDRESS(NEL_PFNGLISOBJECTBUFFERATIPROC, glIsObjectBufferATI);
CHECK_ADDRESS(NEL_PFNGLUPDATEOBJECTBUFFERATIPROC, glUpdateObjectBufferATI);
CHECK_ADDRESS(NEL_PFNGLGETOBJECTBUFFERFVATIPROC, glGetObjectBufferfvATI);
CHECK_ADDRESS(NEL_PFNGLGETOBJECTBUFFERIVATIPROC, glGetObjectBufferivATI);
nglDeleteObjectBufferATI = (NEL_PFNGLDELETEOBJECTBUFFERATIPROC)nglGetProcAddress("nglDeleteObjectBufferATI");
if(!nglDeleteObjectBufferATI)
{
// seems that on matrox parhelia driver, this procedure is named nglFreeObjectBufferATI !!
nglDeleteObjectBufferATI = (NEL_PFNGLDELETEOBJECTBUFFERATIPROC)nglGetProcAddress("nglFreeObjectBufferATI");
if(!nglDeleteObjectBufferATI) return false;
}
CHECK_ADDRESS(NEL_PFNGLARRAYOBJECTATIPROC, glArrayObjectATI);
CHECK_ADDRESS(NEL_PFNGLGETARRAYOBJECTFVATIPROC, glGetArrayObjectfvATI);
CHECK_ADDRESS(NEL_PFNGLGETARRAYOBJECTIVATIPROC, glGetArrayObjectivATI);
if(strstr(glext, "GL_EXT_vertex_shader") != NULL)
{
// the following exist only if ext vertex shader is present
CHECK_ADDRESS(NEL_PFNGLVARIANTARRAYOBJECTATIPROC, glVariantArrayObjectATI);
CHECK_ADDRESS(NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC, glGetVariantArrayObjectfvATI);
CHECK_ADDRESS(NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC, glGetVariantArrayObjectivATI);
}
return true;
}
static bool setupATIMapObjectBuffer(const char *glext)
{
H_AUTO_OGL(setupATIMapObjectBuffer);
CHECK_EXT("GL_ATI_map_object_buffer");
CHECK_ADDRESS(NEL_PFNGLMAPOBJECTBUFFERATIPROC, glMapObjectBufferATI);
CHECK_ADDRESS(NEL_PFNGLUNMAPOBJECTBUFFERATIPROC, glUnmapObjectBufferATI);
return true;
}
// *********************************
static bool setupATIFragmentShader(const char *glext)
{
@ -1065,19 +935,6 @@ static bool setupATIFragmentShader(const char *glext)
return true;
}
// *********************************
static bool setupATIVertexAttribArrayObject(const char *glext)
{
H_AUTO_OGL(setupATIVertexAttribArrayObject);
CHECK_EXT("GL_ATI_vertex_attrib_array_object");
CHECK_ADDRESS(NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC, glVertexAttribArrayObjectATI);
CHECK_ADDRESS(NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC, glGetVertexAttribArrayObjectfvATI);
CHECK_ADDRESS(NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC, glGetVertexAttribArrayObjectivATI);
return true;
}
// *********************************
static bool setupARBFragmentProgram(const char *glext)
{
@ -1363,18 +1220,6 @@ void registerGlExtensions(CGlExtensions &ext)
// Check ARBMultisample
ext.ARBMultisample = setupARBMultisample(glext);
// Check NVVertexArrayRange
// Disable feature ???
if(!ext.DisableHardwareVertexArrayAGP)
ext.NVVertexArrayRange= setupNVVertexArrayRange(glext);
if(ext.NVVertexArrayRange)
{
GLint nverts = 10;
glGetIntegerv((GLenum)GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV, &nverts);
ext.NVVertexArrayRangeMaxVertex= nverts;
}
// Compression S3TC OK iff ARBTextureCompression.
ext.EXTTextureCompressionS3TC= (ext.ARBTextureCompression && setupEXTTextureCompressionS3TC(glext));
@ -1435,19 +1280,6 @@ void registerGlExtensions(CGlExtensions &ext)
// Check EXTBlendColor
ext.EXTBlendColor= setupEXTBlendColor(glext);
// Check NVVertexArrayRange2
ext.NVVertexArrayRange2= setupNVVertexArrayRange2(glext);
#ifdef GL_NV_vertex_array_range2
// if supported
if(ext.NVVertexArrayRange2)
// VBHard swap without flush of the VAR.
ext.NVStateVARWithoutFlush= GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV;
else
// VBHard with useless flush of the VAR.
ext.NVStateVARWithoutFlush= GL_VERTEX_ARRAY_RANGE_NV;
#endif
// Check NV_occlusion_query
ext.NVOcclusionQuery = setupNVOcclusionQuery(glext);
@ -1484,14 +1316,6 @@ void registerGlExtensions(CGlExtensions &ext)
// ATI extensions
// -------------
// Check ATIVertexArrayObject
// Disable feature ???
if(!ext.DisableHardwareVertexArrayAGP)
{
ext.ATIVertexArrayObject= setupATIVertexArrayObject(glext);
ext.ATIMapObjectBuffer= setupATIMapObjectBuffer(glext);
ext.ATIVertexAttribArrayObject = setupATIVertexAttribArrayObject(glext);
}
// Check ATIXTextureEnvCombine3.
ext.ATITextureEnvCombine3= setupATITextureEnvCombine3(glext);
// Check ATIXTextureEnvRoute
@ -1504,14 +1328,6 @@ void registerGlExtensions(CGlExtensions &ext)
ext.ARBVertexBufferObject = setupARBVertexBufferObject(glext);
}
// fix for radeon 7200 -> disable agp
if (ext.NbTextureStages == 3 && (ext.ATIVertexArrayObject || ext.ARBVertexBufferObject))
{
ext.ATIVertexArrayObject = false;
ext.ARBVertexBufferObject = false;
ext.ATIMapObjectBuffer = false;
ext.ATIVertexAttribArrayObject = false;
}
}

@ -42,9 +42,6 @@ struct CGlExtensions
bool EXTTextureEnvCombine;
// Optional Extensions.
// NB: Fence extension is not here, because NVVertexArrayRange is false if GL_NV_fence is not here.
bool NVVertexArrayRange;
uint NVVertexArrayRangeMaxVertex;
bool EXTTextureCompressionS3TC;
bool EXTVertexWeighting;
bool EXTSeparateSpecularColor;
@ -68,8 +65,6 @@ struct CGlExtensions
bool NVVertexProgramEmulated;
bool EXTSecondaryColor;
bool EXTBlendColor;
// NVVertexArrayRange2.
bool NVVertexArrayRange2;
// equal to GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV if possible, or GL_VERTEX_ARRAY_RANGE_NV
uint NVStateVARWithoutFlush;
@ -84,13 +79,11 @@ struct CGlExtensions
bool GLXMESASwapControl;
// ATI Extensions.
bool ATIVertexArrayObject;
bool ATIMapObjectBuffer;
bool ATITextureEnvCombine3;
bool ATIEnvMapBumpMap;
bool ATIFragmentShader;
bool ATIXTextureEnvRoute;
bool ATIVertexAttribArrayObject;
// ARB Extensions
bool ARBTextureCompression;
bool ARBFragmentProgram;
@ -120,8 +113,6 @@ public:
NbTextureStages= 1;
EXTTextureEnvCombine= false;
ARBTextureCompression= false;
NVVertexArrayRange= false;
NVVertexArrayRangeMaxVertex= 0;
EXTTextureCompressionS3TC= false;
EXTVertexWeighting= false;
EXTSeparateSpecularColor= false;
@ -140,12 +131,8 @@ public:
GLXSGISwapControl= false;
GLXMESASwapControl= false;
EXTBlendColor= false;
ATIVertexArrayObject= false;
ATIEnvMapBumpMap = false;
ATIFragmentShader = false;
ATIVertexArrayObject = false;
ATIMapObjectBuffer = false;
ATIVertexAttribArrayObject = false;
EXTVertexShader= false;
ARBFragmentProgram = false;
ARBVertexBufferObject = false;
@ -162,7 +149,6 @@ public:
FrameBufferBlit = false;
FrameBufferMultisample = false;
PackedDepthStencil = false;
NVVertexArrayRange2 = false;
NVStateVARWithoutFlush = 0;
OESDrawTexture = false;
@ -230,12 +216,7 @@ public:
#endif
result += "\n Array/VBO: ";
result += NVVertexArrayRange ? ("NVVertexArrayRange (MaxVertex = " + NLMISC::toString(NVVertexArrayRangeMaxVertex) + ") ") : "";
result += NVVertexArrayRange2 ? "NVVertexArrayRange2 " : "";
result += ATIVertexArrayObject ? "ATIVertexArrayObject " : "";
result += ATIVertexAttribArrayObject ? "ATIVertexAttribArrayObject " : "";
result += ARBVertexBufferObject ? "ARBVertexBufferObject " : "";
result += ATIMapObjectBuffer ? "ATIMapObjectBuffer " : "";
result += ARBVertexBufferObject ? "ARB VBO " : "";
result += "\n FBO: ";
result += FrameBufferObject ? "FramebufferObject " : "";
@ -329,31 +310,6 @@ extern NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB;
extern NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC nglGetCompressedTexImageARB;
// VertexArrayRangeNV.
//====================
extern NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC nglFlushVertexArrayRangeNV;
extern NEL_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;
#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;
// VertexWeighting.
//==================
extern NEL_PFNGLVERTEXWEIGHTFEXTPROC nglVertexWeightfEXT;
@ -499,28 +455,6 @@ extern NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC nglSecondaryColorPointerEXT;
extern NEL_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;
// GL_ATI_map_object_buffer
//===================================
extern NEL_PFNGLMAPOBJECTBUFFERATIPROC nglMapObjectBufferATI;
extern NEL_PFNGLUNMAPOBJECTBUFFERATIPROC nglUnmapObjectBufferATI;
// GL_ATI_fragment_shader extension
//===================================
@ -539,15 +473,6 @@ extern NEL_PFNGLALPHAFRAGMENTOP2ATIPROC nglAlphaFragmentOp2ATI;
extern NEL_PFNGLALPHAFRAGMENTOP3ATIPROC nglAlphaFragmentOp3ATI;
extern NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC nglSetFragmentShaderConstantATI;
// GL_ATI_vertex_attrib_array_object
//==================================
extern NEL_PFNGLVERTEXATTRIBARRAYOBJECTATIPROC nglVertexAttribArrayObjectATI;
extern NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC nglGetVertexAttribArrayObjectfvATI;
extern NEL_PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC nglGetVertexAttribArrayObjectivATI;
// GL_ARB_fragment_shader_extension
//==================================
extern NEL_PFNGLPROGRAMSTRINGARBPROC nglProgramStringARB;

@ -84,23 +84,6 @@ typedef void (APIENTRY * NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target
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);
@ -238,22 +221,6 @@ typedef void (APIENTRY * NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLe
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);
@ -288,22 +255,6 @@ typedef GLvoid (APIENTRY *NEL_PFNGLSETFRAGMENTSHADERCONSTANTATIPROC)(GLuint dst,
// 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);

@ -657,11 +657,6 @@ void CDriverGL3::setupUVPtr(uint stage, CVertexBufferInfo &VB, uint uvId)
// Setup ATI VBHard or std ptr.
switch(VB.VBMode)
{
case CVertexBufferInfo::HwATI:
nglArrayObjectATI(GL_TEXTURE_COORD_ARRAY, numTexCoord, GL_FLOAT, VB.VertexSize, VB.VertexObjectId,
(ptrdiff_t) VB.ValuePtr[CVertexBuffer::TexCoord0+uvId]);
break;
case CVertexBufferInfo::HwARB:
_DriverGLStates.bindARBVertexBuffer(VB.VertexObjectId);
// with arb buffers, position is relative to the start of the stream
@ -920,49 +915,6 @@ void CDriverGL3::setupGlArraysStd(CVertexBufferInfo &vb)
}
break;
case CVertexBufferInfo::HwATI:
{
// setup vertex ptr.
//-----------
uint numVertexCoord = CVertexBuffer::NumComponentsType[vb.Type[CVertexBuffer::Position]];
nlassert (numVertexCoord >= 2);
_DriverGLStates.enableVertexArray(true);
nglArrayObjectATI(GL_VERTEX_ARRAY, numVertexCoord, GL_FLOAT, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Position]);
// setup normal ptr.
//-----------
// Check for normal param in vertex buffer
if (flags & CVertexBuffer::NormalFlag)
{
// Check type
nlassert (vb.Type[CVertexBuffer::Normal]==CVertexBuffer::Float3);
_DriverGLStates.enableNormalArray(true);
nglArrayObjectATI(GL_NORMAL_ARRAY, 3, GL_FLOAT, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Normal]);
}
else
{
_DriverGLStates.enableNormalArray(false);
}
// Setup Color
//-----------
// Check for color param in vertex buffer
if (flags & CVertexBuffer::PrimaryColorFlag)
{
// Check type
nlassert (vb.Type[CVertexBuffer::PrimaryColor]==CVertexBuffer::UChar4);
_DriverGLStates.enableColorArray(true);
nglArrayObjectATI(GL_COLOR_ARRAY, 4, GL_UNSIGNED_BYTE, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::PrimaryColor]);
}
else
{
_DriverGLStates.enableColorArray(false);
}
}
break;
default:
nlassert(0);
break;
@ -1264,39 +1216,6 @@ void CDriverGL3::setupGlArraysForARBVertexProgram(CVertexBufferInfo &vb)
_DriverGLStates.bindARBVertexBuffer(vb.VertexObjectId);
}
// special case if the buffer is an ATI_vertex_array_object
if (vb.VBMode == CVertexBufferInfo::HwATI)
{
// For each value
for (uint value=0; value<CVertexBuffer::NumValue; value++)
{
// Flag
uint16 flag=1<<value;
// Type
CVertexBuffer::TType type=vb.Type[value];
{
// Index
uint glIndex=GLVertexAttribIndex[value];
// Not setuped value and used
if (flags & flag)
{
_DriverGLStates.enableVertexAttribArrayARB(glIndex, true);
GLboolean mustNormalize = GL_FALSE;
if (GLTypeIsIntegral[type])
{
mustNormalize = ARBVertexProgramMustNormalizeAttrib[value];
}
nglVertexAttribArrayObjectATI(glIndex, NumCoordinatesType[type], GLType[type], mustNormalize, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[value]);
}
else
{
_DriverGLStates.enableVertexAttribArrayARB(glIndex, false);
}
}
}
}
else
{
// For each value
for (uint value=0; value<CVertexBuffer::NumValue; value++)
@ -1368,77 +1287,7 @@ void CDriverGL3::setupGlArraysForEXTVertexShader(CVertexBufferInfo &vb)
_DriverGLStates.enableVertexAttribArrayForEXTVertexShader(glIndex, true, drvInfo->Variants);
// use variant or open gl standard array
if (vb.VBMode == CVertexBufferInfo::HwATI)
{
switch(value)
{
case CVertexBuffer::Position: // position
{
nlassert(NumCoordinatesType[type] >= 2);
nglArrayObjectATI(GL_VERTEX_ARRAY, NumCoordinatesType[type], GLType[type], vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Position]);
}
break;
case CVertexBuffer::Weight: // skin weight
{
nlassert(NumCoordinatesType[type] == 4); // variant, only 4 component supported
nglVariantArrayObjectATI(drvInfo->Variants[CDriverGL3::EVSSkinWeightVariant], GLType[type], vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Weight]);
}
break;
case CVertexBuffer::Normal: // normal
{
nlassert(NumCoordinatesType[type] == 3); // must have 3 components for normals
nglArrayObjectATI(GL_NORMAL_ARRAY, 3, GLType[type], vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[value]);
}
break;
case CVertexBuffer::PrimaryColor: // color
{
nlassert(NumCoordinatesType[type] >= 3); // must have 3 or 4 components for primary color
nglArrayObjectATI(GL_COLOR_ARRAY, NumCoordinatesType[type], GLType[type], vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::PrimaryColor]);
}
break;
case CVertexBuffer::SecondaryColor: // secondary color
{
// implemented using a variant, as not available with EXTVertexShader
nlassert(NumCoordinatesType[type] == 4); // variant, only 4 component supported
nglVariantArrayObjectATI(drvInfo->Variants[CDriverGL3::EVSSecondaryColorVariant], GLType[type], vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::SecondaryColor]);
}
break;
case CVertexBuffer::Fog: // fog coordinate
{
// implemented using a variant
nlassert(NumCoordinatesType[type] == 4); // variant, only 4 component supported
nglVariantArrayObjectATI(drvInfo->Variants[CDriverGL3::EVSFogCoordsVariant], GLType[type], vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Fog]);
}
break;
case CVertexBuffer::PaletteSkin: // palette skin
{
// implemented using a variant
nlassert(NumCoordinatesType[type] == 4); // variant, only 4 component supported
nglVariantArrayObjectATI(drvInfo->Variants[CDriverGL3::EVSPaletteSkinVariant], GLType[type], vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::PaletteSkin]);
}
break;
case CVertexBuffer::Empty: // empty
nlstop;
break;
case CVertexBuffer::TexCoord0:
case CVertexBuffer::TexCoord1:
case CVertexBuffer::TexCoord2:
case CVertexBuffer::TexCoord3:
case CVertexBuffer::TexCoord4:
case CVertexBuffer::TexCoord5:
case CVertexBuffer::TexCoord6:
case CVertexBuffer::TexCoord7:
{
_DriverGLStates.clientActiveTextureARB(value - CVertexBuffer::TexCoord0);
nglArrayObjectATI(GL_TEXTURE_COORD_ARRAY, NumCoordinatesType[type], GLType[type], vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[value]);
}
break;
default:
nlstop; // invalid value
break;
}
}
else
{
switch(value)
{

@ -42,7 +42,7 @@ class CVertexBufferHardARB;
// ***************************************************************************
/** Interface to a Big block of AGP memory either throurgh NVVertexArrayRange or ATIVertexObject
/** Interface to a Big block of video memory
*/
class IVertexArrayRange
{

Loading…
Cancel
Save