Changed GLunit usage to unsigned int.
This commit is contained in:
parent
c46560e478
commit
a39516c297
@ -19,9 +19,6 @@
|
|||||||
#include "BSPLoad.h"
|
#include "BSPLoad.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ReaderWriterQ3BSP: public osgDB::ReaderWriter
|
class ReaderWriterQ3BSP: public osgDB::ReaderWriter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -42,7 +39,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
osg::Geode* convertFromBSP(BSPLoad& aLoadData,const osgDB::ReaderWriter::Options* options) const;
|
osg::Geode* convertFromBSP(BSPLoad& aLoadData,const osgDB::ReaderWriter::Options* options) const;
|
||||||
osg::Geometry* createMeshFace(const BSP_LOAD_FACE& aLoadFace,const std::vector<osg::Texture2D*>& aTextureArray,
|
osg::Geometry* createMeshFace(const BSP_LOAD_FACE& aLoadFace,const std::vector<osg::Texture2D*>& aTextureArray,
|
||||||
osg::Vec3Array& aVertexArray,std::vector<GLuint>& aIndices,
|
osg::Vec3Array& aVertexArray,std::vector<unsigned int>& aIndices,
|
||||||
osg::Vec2Array& aTextureDecalCoords,osg::Vec2Array& aTextureLMapCoords
|
osg::Vec2Array& aTextureDecalCoords,osg::Vec2Array& aTextureLMapCoords
|
||||||
) const;
|
) const;
|
||||||
osg::Geometry* createPolygonFace(const BSP_LOAD_FACE& aLoadFace,const std::vector<osg::Texture2D*>& aTextureArray,const std::vector<osg::Texture2D*>& aTextureLMapArray,
|
osg::Geometry* createPolygonFace(const BSP_LOAD_FACE& aLoadFace,const std::vector<osg::Texture2D*>& aTextureArray,const std::vector<osg::Texture2D*>& aTextureLMapArray,
|
||||||
@ -164,7 +161,7 @@ protected:
|
|||||||
|
|
||||||
int m_tesselation;
|
int m_tesselation;
|
||||||
std::vector<BSP_VERTEX> m_vertices;
|
std::vector<BSP_VERTEX> m_vertices;
|
||||||
std::vector<GLuint> m_indices;
|
std::vector<unsigned int> m_indices;
|
||||||
|
|
||||||
//arrays for multi_draw_arrays
|
//arrays for multi_draw_arrays
|
||||||
std::vector<int> m_trianglesPerRow;
|
std::vector<int> m_trianglesPerRow;
|
||||||
@ -356,11 +353,8 @@ osg::Geode* ReaderWriterQ3BSP::convertFromBSP(BSPLoad& aLoadData,const osgDB::Re
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
osg::Geometry* ReaderWriterQ3BSP::createMeshFace( const BSP_LOAD_FACE& aLoadFace,const std::vector<osg::Texture2D*>& aTextureArray,
|
osg::Geometry* ReaderWriterQ3BSP::createMeshFace( const BSP_LOAD_FACE& aLoadFace,const std::vector<osg::Texture2D*>& aTextureArray,
|
||||||
osg::Vec3Array& aVertexArray,std::vector<GLuint>& aIndices,
|
osg::Vec3Array& aVertexArray,std::vector<unsigned int>& aIndices,
|
||||||
osg::Vec2Array& aTextureDecalCoords,osg::Vec2Array& aTextureLMapCoords
|
osg::Vec2Array& aTextureDecalCoords,osg::Vec2Array& aTextureLMapCoords
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
@ -538,10 +532,10 @@ bool ReaderWriterQ3BSP::loadLightMaps(const BSPLoad& aLoadData,std::vector<osg::
|
|||||||
// A continuación, añado el blanco
|
// A continuación, añado el blanco
|
||||||
osg::Image* image=new osg::Image;
|
osg::Image* image=new osg::Image;
|
||||||
unsigned char *data=new unsigned char[3];
|
unsigned char *data=new unsigned char[3];
|
||||||
for(int whiteidx=0;i<3;i++)
|
for(int whiteidx=0;whiteidx<3;whiteidx++)
|
||||||
{
|
{
|
||||||
data[i]=255;
|
data[whiteidx]=255;
|
||||||
}
|
}
|
||||||
|
|
||||||
image->setImage(1,1,1,GL_RGBA8,GL_RGB,GL_UNSIGNED_BYTE,data,osg::Image::USE_NEW_DELETE);
|
image->setImage(1,1,1,GL_RGBA8,GL_RGB,GL_UNSIGNED_BYTE,data,osg::Image::USE_NEW_DELETE);
|
||||||
|
|
||||||
@ -559,15 +553,6 @@ bool ReaderWriterQ3BSP::loadLightMaps(const BSPLoad& aLoadData,std::vector<osg::
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Tesselate a biquadratic patch
|
//Tesselate a biquadratic patch
|
||||||
bool BSP_BIQUADRATIC_PATCH::Tesselate(int newTesselation,osg::Geometry* aGeometry)
|
bool BSP_BIQUADRATIC_PATCH::Tesselate(int newTesselation,osg::Geometry* aGeometry)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user