Merge branch 'OpenSceneGraph-3.6' into MultiView
This commit is contained in:
commit
8873381f66
@ -731,7 +731,9 @@ OPTION(BUILD_OSG_PLUGINS "Build OSG Plugins - Disable for compile testing exampl
|
||||
mark_as_advanced(BUILD_OSG_PLUGINS)
|
||||
################################################################################
|
||||
# 3rd Party Dependency Stuff
|
||||
IF(WIN32 AND NOT ANDROID)
|
||||
OPTION(OSG_FIND_3RD_PARTY_DEPS "Enable to search for Android or Windows dependencies in ./3rdparty" ON)
|
||||
|
||||
IF(WIN32 AND NOT ANDROID AND OSG_FIND_3RD_PARTY_DEPS)
|
||||
INCLUDE(Find3rdPartyDependencies)
|
||||
ENDIF()
|
||||
|
||||
@ -742,7 +744,7 @@ OPTION(OSG_USE_LOCAL_LUA_SOURCE "Enable to use local Lua source when building th
|
||||
# you can use the following style of command line option when invoking Cmake (here illustrating ignoring PythonLibs) :
|
||||
# cmake -DCMAKE_DISABLE_FIND_PACKAGE_PythonLibs=1 .
|
||||
#
|
||||
IF(ANDROID)
|
||||
IF(ANDROID AND OSG_FIND_3RD_PARTY_DEPS)
|
||||
ANDROID_3RD_PARTY()
|
||||
ELSE()
|
||||
# Common to all platforms except android:
|
||||
@ -819,7 +821,7 @@ ENDIF(BUILD_OSG_EXAMPLES AND NOT ANDROID)
|
||||
|
||||
# Image readers/writers depend on 3rd party libraries except for OS X which
|
||||
# can use Quicktime.
|
||||
IF(NOT ANDROID)
|
||||
IF(NOT (ANDROID AND OSG_FIND_3RD_PARTY_DEPS))
|
||||
IF(NOT APPLE)
|
||||
FIND_PACKAGE(GIFLIB)
|
||||
FIND_PACKAGE(JPEG)
|
||||
|
@ -63,6 +63,13 @@ class BoundingSphereImpl
|
||||
* otherwise. */
|
||||
inline bool valid() const { return _radius>=0.0; }
|
||||
|
||||
inline BoundingSphereImpl& operator = (const BoundingSphereImpl& rhs)
|
||||
{
|
||||
_center = rhs._center;
|
||||
_radius = rhs._radius;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline bool operator == (const BoundingSphereImpl& rhs) const { return _center==rhs._center && _radius==rhs._radius; }
|
||||
inline bool operator != (const BoundingSphereImpl& rhs) const { return _center!=rhs._center || _radius!=rhs._radius; }
|
||||
|
||||
|
@ -149,6 +149,15 @@ class VertexAttribAlias
|
||||
_osgName(osgName),
|
||||
_declaration(declaration) {}
|
||||
|
||||
VertexAttribAlias& operator = (const VertexAttribAlias& rhs)
|
||||
{
|
||||
_location = rhs._location;
|
||||
_glName = rhs._glName;
|
||||
_osgName = rhs._osgName;
|
||||
_declaration = rhs._declaration;
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLuint _location;
|
||||
std::string _glName;
|
||||
std::string _osgName;
|
||||
|
@ -53,6 +53,14 @@ class OSG_EXPORT Quat
|
||||
_v[3]=w;
|
||||
}
|
||||
|
||||
inline Quat( const Quat& rhs )
|
||||
{
|
||||
_v[0]=rhs._v[0];
|
||||
_v[1]=rhs._v[1];
|
||||
_v[2]=rhs._v[2];
|
||||
_v[3]=rhs._v[3];
|
||||
}
|
||||
|
||||
inline Quat( const Vec4f& v )
|
||||
{
|
||||
_v[0]=v.x();
|
||||
|
@ -62,9 +62,9 @@
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
|
||||
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
|
||||
#endif
|
||||
|
||||
|
@ -284,7 +284,7 @@ struct GraphicsWindowFunctionProxy
|
||||
static osgViewer::GraphicsWindowFunctionProxy graphicswindowproxy_##ext(graphicswindow_##ext);
|
||||
|
||||
#if defined(OSG_WINDOWING_SYSTEM_NONE)
|
||||
#define USE_GRAPHICS_WINDOW()
|
||||
#define USE_GRAPHICSWINDOW()
|
||||
#elif defined(_WIN32)
|
||||
#define USE_GRAPHICSWINDOW() USE_GRAPICSWINDOW_IMPLEMENTATION(Win32)
|
||||
#elif defined(__APPLE__)
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
Widget (const std::string& = "", point_type = 0.0f, point_type = 0.0f);
|
||||
Widget (const Widget&, const osg::CopyOp&);
|
||||
|
||||
META_Object (osgWidget, Widget);
|
||||
META_Node (osgWidget, Widget);
|
||||
|
||||
virtual ~Widget() {
|
||||
}
|
||||
|
@ -538,10 +538,10 @@ unsigned int Image::computeNumComponents(GLenum pixelFormat)
|
||||
{
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT): return 3;
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT): return 3;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): return 4;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT): return 4;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): return 4;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): return 4;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT): return 4;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): return 4;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT): return 4;
|
||||
case(GL_COMPRESSED_SIGNED_RED_RGTC1_EXT): return 1;
|
||||
case(GL_COMPRESSED_RED_RGTC1_EXT): return 1;
|
||||
@ -721,13 +721,13 @@ unsigned int Image::computePixelSizeInBits(GLenum format,GLenum type)
|
||||
|
||||
switch(format)
|
||||
{
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): return 8;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT): return 8;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): return 8;
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT): return 4;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): return 8;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT): return 8;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): return 8;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT): return 8;
|
||||
case(GL_COMPRESSED_SIGNED_RED_RGTC1_EXT): return 4;
|
||||
case(GL_COMPRESSED_RED_RGTC1_EXT): return 4;
|
||||
@ -948,14 +948,14 @@ unsigned int Image::computeBlockSize(GLenum pixelFormat, GLenum packing)
|
||||
{
|
||||
switch(pixelFormat)
|
||||
{
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT):
|
||||
return osg::maximum(8u, packing); // block size of 8
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT):
|
||||
return osg::maximum(8u, packing); // block size of 8
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG):
|
||||
case(GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG):
|
||||
@ -1106,12 +1106,12 @@ bool Image::isCompressed() const
|
||||
case(GL_COMPRESSED_RGBA_ARB):
|
||||
case(GL_COMPRESSED_RGB_ARB):
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_SIGNED_RED_RGTC1_EXT):
|
||||
case(GL_COMPRESSED_RED_RGTC1_EXT):
|
||||
@ -2030,11 +2030,11 @@ bool Image::isImageTranslucent() const
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT):
|
||||
return false;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT):
|
||||
return dxtc_tool::isCompressedImageTranslucent(_s, _t, _pixelFormat, _data);
|
||||
default:
|
||||
|
@ -304,18 +304,18 @@ void Texture::TextureProfile::computeSize()
|
||||
case(GL_RGBA): numBitsPerTexel = 32; break;
|
||||
case(4): numBitsPerTexel = 32; break;
|
||||
|
||||
case(GL_COMPRESSED_ALPHA_ARB): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_INTENSITY_ARB): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_ALPHA_ARB): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_INTENSITY_ARB): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_LUMINANCE_ALPHA_ARB): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT): numBitsPerTexel = 4; break;
|
||||
|
||||
case(GL_COMPRESSED_RGB_ARB): numBitsPerTexel = 8; break;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): numBitsPerTexel = 8; break;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT): numBitsPerTexel = 8; break;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): numBitsPerTexel = 8; break;
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT): numBitsPerTexel = 4; break;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT): numBitsPerTexel = 4; break;
|
||||
|
||||
case(GL_COMPRESSED_RGB_ARB): numBitsPerTexel = 8; break;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT): numBitsPerTexel = 8; break;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT): numBitsPerTexel = 8; break;
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT): numBitsPerTexel = 8; break;
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT): numBitsPerTexel = 8; break;
|
||||
|
||||
case(GL_COMPRESSED_SIGNED_RED_RGTC1_EXT): numBitsPerTexel = 4; break;
|
||||
@ -1797,8 +1797,8 @@ bool Texture::isCompressedInternalFormat(GLint internalFormat)
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT):
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT):
|
||||
case(GL_COMPRESSED_SIGNED_RED_RGTC1_EXT):
|
||||
case(GL_COMPRESSED_RED_RGTC1_EXT):
|
||||
@ -2156,19 +2156,19 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
|
||||
OSG_NOTICE<<"Received a request to compress an image, but image size is not a multiple of four ("<<inwidth<<"x"<<inheight<<"). Reverting to uncompressed.\n";
|
||||
switch(_internalFormat)
|
||||
{
|
||||
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG:
|
||||
case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG:
|
||||
case GL_ETC1_RGB8_OES:
|
||||
case(GL_COMPRESSED_RGB8_ETC2):
|
||||
case(GL_COMPRESSED_SRGB8_ETC2):
|
||||
case GL_COMPRESSED_RGB: _internalFormat = GL_RGB; break;
|
||||
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
|
||||
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
|
||||
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
|
||||
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG:
|
||||
case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG:
|
||||
case GL_ETC1_RGB8_OES:
|
||||
case(GL_COMPRESSED_RGB8_ETC2):
|
||||
case(GL_COMPRESSED_SRGB8_ETC2):
|
||||
case GL_COMPRESSED_RGB: _internalFormat = GL_RGB; break;
|
||||
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
|
||||
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
|
||||
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
|
||||
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
|
||||
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
|
||||
case GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:
|
||||
case GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:
|
||||
|
@ -190,11 +190,11 @@ bool isCompressedImageTranslucent(size_t width, size_t height, GLenum format, vo
|
||||
int blockCount = ((width + 3) >> 2) * ((height + 3) >> 2);
|
||||
switch(format)
|
||||
{
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT):
|
||||
return false;
|
||||
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT):
|
||||
return false;
|
||||
|
||||
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
|
||||
case(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT):
|
||||
{
|
||||
const DXT1TexelsBlock *texelsBlock = reinterpret_cast<const DXT1TexelsBlock*>(imageData);
|
||||
|
@ -213,7 +213,7 @@ osg::gluTessProperty( GLUtesselator *tess, GLenum which, GLdouble value )
|
||||
tess->windingRule = windingRule;
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
case GLU_TESS_BOUNDARY_ONLY:
|
||||
|
@ -292,6 +292,8 @@ bool daeReader::convert( std::istream& fin )
|
||||
// set fileURI to null device
|
||||
const std::string fileURI("from std::istream");
|
||||
|
||||
fin.imbue(std::locale::classic());
|
||||
|
||||
// get the size of the file and rewind
|
||||
fin.seekg(0, std::ios::end);
|
||||
unsigned long length = static_cast<unsigned long>(fin.tellg());
|
||||
|
@ -1079,15 +1079,12 @@ bool WriteDDSFile(const osg::Image *img, std::ostream& fout, bool autoFlipDDSWri
|
||||
|
||||
// Initialize ddsd structure and its members
|
||||
DDSURFACEDESC2 ddsd;
|
||||
memset( &ddsd, 0, sizeof( ddsd ) );
|
||||
DDPIXELFORMAT ddpf;
|
||||
memset( &ddpf, 0, sizeof( ddpf ) );
|
||||
//DDCOLORKEY ddckCKDestOverlay;
|
||||
//DDCOLORKEY ddckCKDestBlt;
|
||||
//DDCOLORKEY ddckCKSrcOverlay;
|
||||
//DDCOLORKEY ddckCKSrcBlt;
|
||||
DDSCAPS2 ddsCaps;
|
||||
memset( &ddsCaps, 0, sizeof( ddsCaps ) );
|
||||
|
||||
ddsd.dwSize = sizeof(ddsd);
|
||||
ddpf.dwSize = sizeof(ddpf);
|
||||
|
@ -55,7 +55,6 @@ void IndexMeshVisitor::process(osg::Geometry& geom) {
|
||||
new_primitives.reserve(primitives.size());
|
||||
|
||||
// compute duplicate vertices
|
||||
typedef std::vector<unsigned int> IndexList;
|
||||
unsigned int numVertices = geom.getVertexArray()->getNumElements();
|
||||
IndexList indices(numVertices);
|
||||
unsigned int i, j;
|
||||
|
@ -222,9 +222,6 @@ namespace glesUtil {
|
||||
virtual void apply(osg::Vec2ubArray& array) { remap(array); }
|
||||
|
||||
virtual void apply(osg::MatrixfArray& array) { remap(array); }
|
||||
|
||||
protected:
|
||||
RemapArray& operator= (const RemapArray&) { return *this; }
|
||||
};
|
||||
|
||||
|
||||
@ -252,9 +249,6 @@ namespace glesUtil {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
VertexAttribComparitor& operator= (const VertexAttribComparitor&) { return *this; }
|
||||
};
|
||||
|
||||
// Move the values in an array to new positions, based on the
|
||||
|
@ -287,7 +287,7 @@ bool DataInputStream::uncompress(std::istream& fin, std::string& destination) co
|
||||
return ret == Z_STREAM_END ? true : false;
|
||||
}
|
||||
#else
|
||||
bool DataInputStream::uncompress(std::istream& fin, std::string& destination) const
|
||||
bool DataInputStream::uncompress(std::istream& /*fin*/, std::string& /*destination*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ bool DataOutputStream::compress(std::ostream& fout, const std::string& source) c
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
bool DataOutputStream::compress(std::ostream& fout, const std::string& source) const
|
||||
bool DataOutputStream::compress(std::ostream& /*fout*/, const std::string& /*source*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(osc::Exception e) {
|
||||
catch(osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(osc::Exception e) {
|
||||
catch(osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
|
||||
@ -378,7 +378,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(osc::Exception e) {
|
||||
catch(osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(osc::Exception e) {
|
||||
catch(osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (osc::Exception e) {
|
||||
catch (osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
return false;
|
||||
@ -491,7 +491,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (osc::Exception e) {
|
||||
catch (osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
return false;
|
||||
@ -529,7 +529,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (osc::Exception e) {
|
||||
catch (osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
return false;
|
||||
@ -588,7 +588,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (osc::Exception e) {
|
||||
catch (osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
return false;
|
||||
@ -630,7 +630,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (osc::Exception e) {
|
||||
catch (osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
return false;
|
||||
@ -662,7 +662,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (osc::Exception e) {
|
||||
catch (osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
return false;
|
||||
@ -695,7 +695,7 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (osc::Exception e) {
|
||||
catch (osc::Exception& e) {
|
||||
handleException(e);
|
||||
}
|
||||
return false;
|
||||
|
@ -109,6 +109,11 @@ struct VertexAttribComparitor : public GeometryArrayGatherer
|
||||
{
|
||||
}
|
||||
|
||||
VertexAttribComparitor(const VertexAttribComparitor& rhs)
|
||||
: GeometryArrayGatherer(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
bool operator() (unsigned int lhs, unsigned int rhs) const
|
||||
{
|
||||
for(ArrayList::const_iterator itr=_arrayList.begin();
|
||||
|
@ -446,7 +446,7 @@ inline void graph_array<N>::swap(graph_type & Right)
|
||||
template <class N>
|
||||
inline void unmark_nodes(graph_array<N> & G)
|
||||
{
|
||||
std::for_each(G.begin(), G.end(), std::mem_fun_ref(&graph_array<N>::node::unmark));
|
||||
for(typename graph_array<N>::node_iterator itr = G.begin(); itr != G.end(); ++itr) itr->unmark();
|
||||
}
|
||||
|
||||
|
||||
|
@ -317,7 +317,17 @@ bool WindowManager::pickAtXY(float x, float y, WidgetList& wl)
|
||||
// Iterate over every picked result and create a list of Widgets that belong
|
||||
// to that Window.
|
||||
for(Intersections::iterator i = intr.begin(); i != intr.end(); i++) {
|
||||
Window* win = dynamic_cast<Window*>(i->nodePath.back()->getParent(0));
|
||||
|
||||
Widget* widget = dynamic_cast<Widget*>(i->drawable.get());
|
||||
if(!widget) continue;
|
||||
|
||||
Window* win = 0;
|
||||
const osg::NodePath& nodePath = i->nodePath;
|
||||
for(osg::NodePath::const_reverse_iterator np_itr = nodePath.rbegin(); np_itr != nodePath.rend(); ++np_itr)
|
||||
{
|
||||
win = dynamic_cast<Window*>(*np_itr);
|
||||
if (win) break;
|
||||
}
|
||||
|
||||
// Make sure that our window is valid, and that our pick is within the
|
||||
// "visible area" of the Window.
|
||||
@ -335,9 +345,6 @@ bool WindowManager::pickAtXY(float x, float y, WidgetList& wl)
|
||||
// If we've found a new Widnow, break out!
|
||||
else if(activeWin != win) break;
|
||||
|
||||
Widget* widget = dynamic_cast<Widget*>(i->drawable.get());
|
||||
|
||||
if(!widget) continue;
|
||||
|
||||
// We need to return a list of every Widget that was picked, so
|
||||
// that the handler can operate on it accordingly.
|
||||
|
Loading…
Reference in New Issue
Block a user