Changeset 12598
- Timestamp:
- 06/22/11 14:38:53 (2 years ago)
- Location:
- OpenSceneGraph/branches/OpenSceneGraph-3.0
- Files:
-
- 37 modified
-
applications/present3D/present3D.cpp (modified) (1 diff)
-
examples/osgdistortion/osgdistortion.cpp (modified) (2 diffs)
-
examples/osgposter/osgposter.cpp (modified) (3 diffs)
-
examples/osgtext3D/TextNode.cpp (modified) (2 diffs)
-
examples/osgthreadedterrain/osgthreadedterrain.cpp (modified) (10 diffs)
-
examples/osgvolume/osgvolume.cpp (modified) (2 diffs)
-
examples/osgwidgetcanvas/osgwidgetcanvas.cpp (modified) (2 diffs)
-
src/osg/ShapeDrawable.cpp (modified) (3 diffs)
-
src/osgGA/NodeTrackerManipulator.cpp (modified) (1 diff)
-
src/osgGA/TerrainManipulator.cpp (modified) (1 diff)
-
src/osgParticle/FluidProgram.cpp (modified) (1 diff)
-
src/osgPlugins/Inventor/ConvertToInventor.cpp (modified) (3 diffs)
-
src/osgPlugins/OpenFlight/GeometryRecords.cpp (modified) (2 diffs)
-
src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp (modified) (1 diff)
-
src/osgPlugins/ac/Geode.cpp (modified) (4 diffs)
-
src/osgPlugins/cfg/ConfigParser.cpp (modified) (4 diffs)
-
src/osgPlugins/dds/ReaderWriterDDS.cpp (modified) (4 diffs)
-
src/osgPlugins/hdr/hdrloader.cpp (modified) (2 diffs)
-
src/osgPlugins/ive/ShapeAttributeList.cpp (modified) (1 diff)
-
src/osgPlugins/jp2/ReaderWriterJP2.cpp (modified) (2 diffs)
-
src/osgPlugins/p3d/ReaderWriterP3D.cpp (modified) (5 diffs)
-
src/osgPlugins/pvr/ReaderWriterPVR.cpp (modified) (2 diffs)
-
src/osgPlugins/txp/trpage_geom.cpp (modified) (1 diff)
-
src/osgPlugins/txp/trpage_material.cpp (modified) (2 diffs)
-
src/osgPlugins/txp/trpage_rarchive.cpp (modified) (1 diff)
-
src/osgPlugins/vtf/ReaderWriterVTF.cpp (modified) (2 diffs)
-
src/osgPlugins/zip/ZipArchive.cpp (modified) (1 diff)
-
src/osgPlugins/zip/unzip.cpp (modified) (3 diffs)
-
src/osgQt/QGraphicsViewAdapter.cpp (modified) (1 diff)
-
src/osgShadow/ParallelSplitShadowMap.cpp (modified) (1 diff)
-
src/osgTerrain/GeometryTechnique.cpp (modified) (2 diffs)
-
src/osgText/FadeText.cpp (modified) (2 diffs)
-
src/osgText/Text.cpp (modified) (1 diff)
-
src/osgUtil/DelaunayTriangulator.cpp (modified) (2 diffs)
-
src/osgUtil/RenderStage.cpp (modified) (3 diffs)
-
src/osgViewer/View.cpp (modified) (3 diffs)
-
src/osgVolume/FixedFunctionTechnique.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/branches/OpenSceneGraph-3.0/applications/present3D/present3D.cpp
r12362 r12598 637 637 float height = osg::DisplaySettings::instance()->getScreenHeight(); 638 638 float distance = osg::DisplaySettings::instance()->getScreenDistance(); 639 bool sizesSpecified = false;640 639 while (arguments.read("-s", width, height, distance)) 641 640 { 642 sizesSpecified = true;643 644 641 osg::DisplaySettings::instance()->setScreenDistance(distance); 645 642 osg::DisplaySettings::instance()->setScreenHeight(height); -
OpenSceneGraph/branches/OpenSceneGraph-3.0/examples/osgdistortion/osgdistortion.cpp
r12529 r12598 123 123 osg::Vec2 dy_texcoord(0.0f,1.0f/(float)(noSteps-1)); 124 124 125 osg::Vec3 cursor = bottom;126 osg::Vec2 texcoord = bottom_texcoord;127 125 int i,j; 128 126 for(i=0;i<noSteps;++i) … … 356 354 float screenRadius = heightVector.length() * 0.5f; 357 355 358 osg::Vec3 cursor = bottom;359 356 int i,j; 360 361 362 357 if (centerProjection) 363 358 { -
OpenSceneGraph/branches/OpenSceneGraph-3.0/examples/osgposter/osgposter.cpp
r12529 r12598 232 232 usage->addCommandLineOption( "--enable-output-poster", "Output the final poster file (Default)." ); 233 233 usage->addCommandLineOption( "--disable-output-poster", "Don't output the final poster file." ); 234 usage->addCommandLineOption( "--enable-output-tiles", "Output all tile files." );235 usage->addCommandLineOption( "--disable-output-tiles", "Don't output all tile files (Default)." );234 //usage->addCommandLineOption( "--enable-output-tiles", "Output all tile files." ); 235 //usage->addCommandLineOption( "--disable-output-tiles", "Don't output all tile files (Default)." ); 236 236 usage->addCommandLineOption( "--use-fb", "Use Frame Buffer for rendering tiles (Default, recommended)."); 237 237 usage->addCommandLineOption( "--use-fbo", "Use Frame Buffer Object for rendering tiles."); … … 251 251 // Poster arguments 252 252 bool activeMode = true; 253 bool outputPoster = true, outputTiles = false; 253 bool outputPoster = true; 254 //bool outputTiles = false; 254 255 int tileWidth = 640, tileHeight = 480; 255 256 int posterWidth = 640*2, posterHeight = 480*2; … … 266 267 while ( arguments.read("--enable-output-poster") ) { outputPoster = true; } 267 268 while ( arguments.read("--disable-output-poster") ) { outputPoster = false; } 268 while ( arguments.read("--enable-output-tiles") ) { outputTiles = true; }269 while ( arguments.read("--disable-output-tiles") ) { outputTiles = false; }269 //while ( arguments.read("--enable-output-tiles") ) { outputTiles = true; } 270 //while ( arguments.read("--disable-output-tiles") ) { outputTiles = false; } 270 271 while ( arguments.read("--use-fbo")) { renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; } 271 272 while ( arguments.read("--use-pbuffer")) { renderImplementation = osg::Camera::PIXEL_BUFFER; } -
OpenSceneGraph/branches/OpenSceneGraph-3.0/examples/osgtext3D/TextNode.cpp
r12292 r12598 78 78 79 79 float characterWidthScale = 1.0f; 80 float characterHeightScale = 1.0f;81 80 82 81 bool textIs3D = (style && style->getThicknessRatio()!=0.0); … … 84 83 { 85 84 characterWidthScale = 1.0f/static_cast<float>(resolution.first); 86 characterHeightScale = 1.0f/static_cast<float>(resolution.second);87 85 } 88 86 -
OpenSceneGraph/branches/OpenSceneGraph-3.0/examples/osgthreadedterrain/osgthreadedterrain.cpp
r12292 r12598 667 667 osg::Texture::FilterMode filter = osg::Texture::LINEAR; 668 668 669 bool readParameter = false;670 669 float minValue, maxValue; 671 670 float scale = 1.0f; … … 675 674 while(pos<arguments.argc()) 676 675 { 677 readParameter = false;678 676 std::string filename; 679 677 … … 681 679 { 682 680 osg::notify(osg::NOTICE)<<"Set layer number to "<<layerNum<<std::endl; 683 readParameter = true;684 681 } 685 682 … … 694 691 locator->setCoordinateSystemType(osgTerrain::Locator::GEOCENTRIC); 695 692 locator->setTransformAsExtents(x,y,x+w,y+h); 696 readParameter = true;697 693 } 698 694 … … 700 696 { 701 697 // define the extents. 702 readParameter = true;703 698 } 704 699 … … 712 707 else if (arguments.read(pos, "--hf",filename)) 713 708 { 714 readParameter = true;715 716 709 osg::notify(osg::NOTICE)<<"--hf "<<filename<<std::endl; 717 710 … … 749 742 else if (arguments.read(pos, "-d",filename) || arguments.read(pos, "--elevation-image",filename)) 750 743 { 751 readParameter = true;752 744 osg::notify(osg::NOTICE)<<"--elevation-image "<<filename<<std::endl; 753 745 … … 784 776 else if (arguments.read(pos, "-c",filename) || arguments.read(pos, "--image",filename)) 785 777 { 786 readParameter = true;787 778 osg::notify(osg::NOTICE)<<"--image "<<filename<<" x="<<x<<" y="<<y<<" w="<<w<<" h="<<h<<std::endl; 788 779 … … 819 810 else if (arguments.read(pos, "--filter",filterName)) 820 811 { 821 readParameter = true;822 823 812 if (filterName=="NEAREST") 824 813 { … … 845 834 else if (arguments.read(pos, "--tf",minValue, maxValue)) 846 835 { 847 readParameter = true;848 849 836 osg::ref_ptr<osg::TransferFunction1D> tf = new osg::TransferFunction1D; 850 837 -
OpenSceneGraph/branches/OpenSceneGraph-3.0/examples/osgvolume/osgvolume.cpp
r12508 r12598 534 534 arguments.getApplicationUsage()->addCommandLineOption("--t_maxTextureSize <size>","Set the texture maximum resolution in the t (y) dimension."); 535 535 arguments.getApplicationUsage()->addCommandLineOption("--r_maxTextureSize <size>","Set the texture maximum resolution in the r (z) dimension."); 536 arguments.getApplicationUsage()->addCommandLineOption("--compressed","Enable the usage of compressed textures.");537 arguments.getApplicationUsage()->addCommandLineOption("--compressed-arb","Enable the usage of OpenGL ARB compressed textures.");538 arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt1","Enable the usage of S3TC DXT1 compressed textures.");539 arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt3","Enable the usage of S3TC DXT3 compressed textures.");540 arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt5","Enable the usage of S3TC DXT5 compressed textures.");541 536 arguments.getApplicationUsage()->addCommandLineOption("--modulate-alpha-by-luminance","For each pixel multiply the alpha value by the luminance."); 542 537 arguments.getApplicationUsage()->addCommandLineOption("--replace-alpha-with-luminance","For each pixel set the alpha value to the luminance."); … … 675 670 while(arguments.read("--t_maxTextureSize",t_maximumTextureSize)) {} 676 671 while(arguments.read("--r_maxTextureSize",r_maximumTextureSize)) {} 677 678 osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT;679 while(arguments.read("--compressed") || arguments.read("--compressed-arb")) { internalFormatMode = osg::Texture::USE_ARB_COMPRESSION; }680 681 while(arguments.read("--compressed-dxt1")) { internalFormatMode = osg::Texture::USE_S3TC_DXT1_COMPRESSION; }682 while(arguments.read("--compressed-dxt3")) { internalFormatMode = osg::Texture::USE_S3TC_DXT3_COMPRESSION; }683 while(arguments.read("--compressed-dxt5")) { internalFormatMode = osg::Texture::USE_S3TC_DXT5_COMPRESSION; }684 685 672 686 673 // set up colour space operation. -
OpenSceneGraph/branches/OpenSceneGraph-3.0/examples/osgwidgetcanvas/osgwidgetcanvas.cpp
r12292 r12598 24 24 } 25 25 26 bool windowMouseOver(osgWidget::Event& event) { 27 osgWidget::XYCoord xy = event.getWindow()->localXY(event.x, event.y); 28 26 bool windowMouseOver(osgWidget::Event& /*event*/) { 27 //osgWidget::XYCoord xy = event.getWindow()->localXY(event.x, event.y); 29 28 // osgWidget::warn() << "WINDOW " << xy.x() << " - " << xy.y() << std::endl; 30 29 … … 32 31 } 33 32 34 bool widgetMouseOver(osgWidget::Event& event) { 35 osgWidget::XYCoord xy = event.getWidget()->localXY(event.x, event.y); 36 33 bool widgetMouseOver(osgWidget::Event& /*event*/) { 34 // osgWidget::XYCoord xy = event.getWidget()->localXY(event.x, event.y); 37 35 // osgWidget::warn() << "WIDGET mouseOver " << xy.x() << " - " << xy.y() << std::endl; 38 36 -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osg/ShapeDrawable.cpp
r11472 r12598 1407 1407 float zBase=(top?(sinf(lBase)*radius):-radius); 1408 1408 float vBase=(top?(vDelta*(numRows/2)):0.0f); 1409 float nzBase=(top?(sinf(lBase)):-1.0f);1410 float nRatioBase=(top?(cosf(lBase)):0.0f);1411 1409 1412 1410 unsigned int rowbegin = top?numRows/2:0; … … 1420 1418 float zTop = sinf(lTop)*radius; 1421 1419 float vTop = vBase+vDelta; 1422 float nzTop= sinf(lTop);1423 float nRatioTop= cosf(lTop);1424 1420 1425 1421 _functor.begin(GL_QUAD_STRIP); … … 1450 1446 zBase=zTop; 1451 1447 vBase=vTop; 1452 nzBase=nzTop;1453 nRatioBase=nRatioTop;1454 1455 1448 } 1456 1449 -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgGA/NodeTrackerManipulator.cpp
r12157 r12598 255 255 rotation_matrix.makeRotate(_rotation); 256 256 257 osg::Vec3d lookVector = -getUpVector(rotation_matrix);258 257 osg::Vec3d sideVector = getSideVector(rotation_matrix); 259 osg::Vec3d upVector = getFrontVector(rotation_matrix);260 261 258 osg::Vec3d localUp(0.0f,0.0f,1.0f); 262 259 -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgGA/TerrainManipulator.cpp
r11709 r12598 215 215 216 216 // compute look vector. 217 Vec3d lookVector = -getUpVector(rotation_matrix);218 217 Vec3d sideVector = getSideVector(rotation_matrix); 219 Vec3d upVector = getFrontVector(rotation_matrix);220 218 221 219 // CoordinateFrame coordinateFrame = getCoordinateFrame(_center); -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgParticle/FluidProgram.cpp
r11482 r12598 36 36 37 37 // compute force due to friction 38 osg::Vec3 velBefore = particle->getVelocity();39 38 osg::Vec3 relative_wind = particle->getVelocity()-_wind; 40 39 osg::Vec3 wind_force = - relative_wind * Area * (_viscosityCoefficient + _densityCoefficient*relative_wind.length()); -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/Inventor/ConvertToInventor.cpp
r12578 r12598 1654 1654 coords, normals, ivMaterial, texCoords, 1655 1655 ivState->ivTexture, shape, indexedRoot, nonIndexedRoot); 1656 if (!ok) 1657 { 1658 OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<<std::endl; 1659 } 1656 1660 break; 1657 1661 } … … 1668 1672 coords, normals, ivMaterial, texCoords, 1669 1673 ivState->ivTexture, shape, indexedRoot, nonIndexedRoot); 1674 if (!ok) 1675 { 1676 OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<<std::endl; 1677 } 1670 1678 1671 1679 break; … … 1717 1725 coords, normals, ivMaterial, texCoords, 1718 1726 ivState->ivTexture, shape, indexedRoot, nonIndexedRoot); 1727 if (!ok) 1728 { 1729 OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<<std::endl; 1730 } 1719 1731 break; 1720 1732 } -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/OpenFlight/GeometryRecords.cpp
r12090 r12598 367 367 in.forward(7); 368 368 osg::Vec4 primaryPackedColor = in.readColor32(); 369 osg::Vec4 secondaryPackedColor =in.readColor32();369 /*osg::Vec4 secondaryPackedColor =*/ in.readColor32(); 370 370 // version >= VERSION_15_1 371 371 /*int textureMappingIndex =*/ in.readInt16(-1); … … 940 940 in.forward(7); 941 941 osg::Vec4 primaryPackedColor = in.readColor32(); 942 osg::Vec4 secondaryPackedColor =in.readColor32();942 /*osg::Vec4 secondaryPackedColor =*/ in.readColor32(); 943 943 // version >= VERSION_15_1 944 944 /*int textureMappingIndex =*/ in.readInt16(-1); -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp
r12297 r12598 424 424 // The continuation record complicates things a bit. 425 425 426 // Get current read position in stream.427 std::istream::pos_type pos = fin.tellg();428 429 426 // get opcode and size 430 427 flt::DataInputStream dataStream(fin.rdbuf()); -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/ac/Geode.cpp
r6860 r12598 930 930 GLenum mode=primitiveset->getMode(); 931 931 932 unsigned int primLength;933 932 unsigned int surfaceFlags = 0x00; 934 933 … … 936 935 { 937 936 case(osg::PrimitiveSet::POINTS): 938 primLength = 1;939 937 surfaceFlags = 0x02; 940 938 break; 941 939 case(osg::PrimitiveSet::LINES): 942 primLength = 2;943 940 surfaceFlags = 0x02; 944 941 break; 945 942 case(osg::PrimitiveSet::TRIANGLES): 946 primLength = 3;947 943 break; 948 944 case(osg::PrimitiveSet::QUADS): 949 primLength = 4;950 945 break; 951 946 default: 952 primLength = 0;953 947 break; // compute later when =0. 954 948 } … … 1028 1022 break; // unknown shape 1029 1023 } 1030 /* const osg::DrawArrayLengths* drawArrayLengths = static_cast<const osg::DrawArrayLengths*>(primitiveset);1031 unsigned int vindex = drawArrayLengths->getFirst();1032 for(osg::DrawArrayLengths::const_iterator primItr = drawArrayLengths->begin(); primItr !=drawArrayLengths->end(); ++primItr)1033 {1034 unsigned int localPrimLength;1035 if (primLength == 0) localPrimLength = *primItr;1036 else localPrimLength = primLength;1037 1038 for(GLsizei primCount = 0; primCount < *primItr; ++primCount)1039 {1040 if ((primCount%localPrimLength)==0)1041 {1042 OutputSurfHead(iCurrentMaterial,surfaceFlags,localPrimLength, fout);1043 }1044 OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);1045 ++vindex;1046 }1047 1048 }*/1049 1024 break; 1050 1025 } … … 1075 1050 break; // unknown shape 1076 1051 } 1077 /* if (primLength == 0)1078 primLength = primitiveset->getNumIndices();1079 1080 const osg::DrawElementsUByte* drawElements = static_cast<const osg::DrawElementsUByte*>(primitiveset);1081 1082 unsigned int primCount = 0;1083 for(osg::DrawElementsUByte::const_iterator primItr=drawElements->begin(); primItr!=drawElements->end(); ++primCount,++primItr)1084 {1085 1086 if ((primCount%primLength) == 0)1087 {1088 OutputSurfHead(iCurrentMaterial,surfaceFlags,primLength, fout);1089 }1090 1091 unsigned int vindex=*primItr;1092 OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);1093 }1094 */1095 1052 1096 1053 break; -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/cfg/ConfigParser.cpp
r12292 r12598 226 226 #include <string.h> 227 227 #include <stdio.h> 228 #include <errno.h> 228 229 #include <string> 229 230 … … 2246 2247 int pd[2]; 2247 2248 int result = pipe( pd ); 2249 if (result<0) 2250 { 2251 fprintf( stderr, "CameraConfig::parseFile() - pipe() failed, errno= \"%d\".\n", errno); 2252 return false; 2253 } 2248 2254 2249 2255 flexer = new yyFlexLexer; … … 2253 2259 close( pd[0] ); 2254 2260 close( 1 ); 2255 result = dup( pd[1] ); 2261 int result = dup( pd[1] ); 2262 if (result<0) 2263 { 2264 fprintf( stderr, "CameraConfig::parseFile() - dup() failed, errno= \"%d\".\n", errno); 2265 return false; 2266 } 2256 2267 2257 2268 … … 2271 2282 close( pd[1]); 2272 2283 close( 0 ); 2273 result = dup( pd[0] ); 2284 int result = dup( pd[0] ); 2285 if (result<0) 2286 { 2287 fprintf( stderr, "CameraConfig::parseFile() - dup() failed, errno= \"%d\".\n", errno); 2288 return false; 2289 } 2274 2290 2275 2291 cfg = this; -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/dds/ReaderWriterDDS.cpp
r12541 r12598 312 312 } 313 313 314 bool is3dImage = false;315 314 int depth = 1; 316 315 … … 318 317 if( ddsd.dwDepth > 0 && (ddsd.dwFlags & DDSD_DEPTH)) 319 318 { 320 is3dImage = true;321 319 depth = ddsd.dwDepth; 322 320 } … … 719 717 unsigned int pixelSize = osg::Image::computePixelSizeInBits(pixelFormat, dataType); 720 718 unsigned int imageSize = img->getImageSizeInBytes(); 721 bool is3dImage = false;722 719 723 720 ddsd.dwWidth = img->s(); … … 727 724 if(r > 1) /* check for 3d image */ 728 725 { 729 is3dImage = true;730 726 ddsd.dwDepth = r; 731 727 SD_flags |= DDSD_DEPTH; -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/hdr/hdrloader.cpp
r9801 r12598 99 99 fseek(file, 1, SEEK_CUR); 100 100 101 char cmd[2000];101 //char cmd[2000]; 102 102 i = 0; 103 103 char c = 0, oldc; … … 107 107 if (c == 0xa && oldc == 0xa) 108 108 break; 109 cmd[i++] = c;109 //cmd[i++] = c; 110 110 } 111 111 -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/ive/ShapeAttributeList.cpp
r12292 r12598 29 29 30 30 // Write elements of the list 31 osgSim::ShapeAttributeList::const_iterator it = begin();32 31 for (const_iterator it = begin(); it != end(); it++) 33 32 { -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp
r12217 r12598 39 39 jas_seqent_t *d[4]; 40 40 jas_seqent_t v; 41 int linelen;42 41 int width, height; 43 42 … … 65 64 d[cmptno] = jas_matrix_getref(data[cmptno], 0, 0); 66 65 } 67 linelen = 0;68 66 for (x = 0; x < width; ++x) { 69 67 for (cmptno = 0; cmptno < numcmpts; ++cmptno) { -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/p3d/ReaderWriterP3D.cpp
r12292 r12598 2119 2119 osgDB::FilePathList previousPaths = osgDB::getDataFilePathList(); 2120 2120 2121 bool readSlide = false;2122 2123 2121 for(osgDB::XmlNode::Children::iterator itr = root->children.begin(); 2124 2122 itr != root->children.end(); … … 2243 2241 else if (readOnlyHoldingPage && cur->name == "holding_slide") 2244 2242 { 2245 readSlide = true;2246 2243 constructor.addSlide(); 2247 2244 parseSlide (constructor, cur); … … 2249 2246 else if (!readOnlyHoldingPage && cur->name == "slide") 2250 2247 { 2251 readSlide = true;2252 2248 constructor.addSlide(); 2253 2249 … … 2267 2263 else if (!readOnlyHoldingPage && cur->name == "modify_slide") 2268 2264 { 2269 readSlide = true;2270 2265 int slideNum; 2271 2266 if (getProperty(cur, "slide", slideNum)) … … 2281 2276 else if (!readOnlyHoldingPage && cur->name == "page") 2282 2277 { 2283 readSlide = true;2284 2278 parsePage (constructor, cur); 2285 2279 } 2286 2280 else if (!readOnlyHoldingPage && cur->name == "pdf_document") 2287 2281 { 2288 readSlide = true;2289 2282 parsePdfDocument(constructor, cur); 2290 2283 } 2291 2284 else if (!readOnlyHoldingPage && cur->name == "template_slide") 2292 2285 { 2293 readSlide = true;2294 2286 std::string name; 2295 2287 if (getProperty(cur, "name", name)) -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/pvr/ReaderWriterPVR.cpp
r12578 r12598 153 153 GLenum internalFormat = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; 154 154 uint32_t width, height; 155 bool hasAlpha;156 155 157 156 if(formatFlags == kPVRTextureFlagTypePVRTC_4 || formatFlags == kPVRTextureFlagTypePVRTC_2 || … … 167 166 width = header.width; 168 167 height = header.height; 169 170 if(header.bitmaskAlpha) 171 hasAlpha = true; 172 else 173 hasAlpha = false; 174 168 175 169 osg::ref_ptr<osg::Image> image = new osg::Image; 176 170 if (!image) return ReadResult::INSUFFICIENT_MEMORY_TO_LOAD; -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/txp/trpage_geom.cpp
r12536 r12598 612 612 buf.Add(td.doubleData[j]); 613 613 buf.End(); 614 615 float u;616 for (j=0;j<(unsigned int)num*2;j++)617 u = (float)td.doubleData[j];618 614 } 619 615 } -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/txp/trpage_material.cpp
r12538 r12598 101 101 102 102 int baseMat=0; 103 bool spaceInTable=false;103 //bool spaceInTable=false; 104 104 //int offset=baseMat; 105 105 … … 113 113 if (bm.shadeModel==999) { 114 114 // this is an 'empty' entry. Means we won't find it, either. 115 spaceInTable=true;115 //spaceInTable=true; 116 116 break; 117 117 } -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/txp/trpage_rarchive.cpp
r9124 r12598 259 259 { 260 260 // bool firstBlock = true; 261 bool headerHasTexTable = false;262 261 //if the master has textures, we want to use them instead of the tables in the 263 262 //block archives 264 int numTex = 0; 265 texTable.GetNumTextures(numTex); 266 if(numTex) 267 headerHasTexTable = true; 263 268 264 // int numTiles = 0; 269 265 //tileTable. -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/vtf/ReaderWriterVTF.cpp
r12292 r12598 358 358 unsigned int lrSize; 359 359 unsigned char * imageData; 360 unsigned int base;361 360 unsigned int size; 362 361 int mip; … … 499 498 500 499 // Compute the base position of the high-res image data 501 base = vtf_header.header_size + lrSize;500 // unsigned int base = vtf_header.header_size + lrSize; 502 501 503 502 // Now, get the internal format, pixel format, and data type from the -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/zip/ZipArchive.cpp
r12498 r12598 89 89 { 90 90 ZipEntryMap::const_iterator iter = mZipIndex.begin(); 91 ZipEntryMap::const_iterator iterEnd = mZipIndex.end();92 91 93 92 for(;iter != mZipIndex.end(); ++iter) -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgPlugins/zip/unzip.cpp
r12578 r12598 4043 4043 #endif 4044 4044 4045 4046 4047 4045 unsigned long a = ufi.external_fa; 4048 4046 // zip has an 'attribute' 32bit value. Its lower half is windows stuff … … 4053 4051 //bool readable= (a&0x01000000)!=0; // unused 4054 4052 //bool executable=(a&0x00400000)!=0; // unused 4055 bool hidden=false, system=false, archive=true;4056 4053 // but in normal hostmodes these are overridden by the lower half... 4057 4054 int host = ufi.version>>8; 4058 4055 if (host==0 || host==7 || host==11 || host==14) 4059 4056 { readonly= (a&0x00000001)!=0; 4060 hidden= (a&0x00000002)!=0;4061 system= (a&0x00000004)!=0;4062 4057 isdir= (a&0x00000010)!=0; 4063 archive= (a&0x00000020)!=0;4064 4058 } 4065 4059 // readonly; hidden; system; isdir; archive; … … 4070 4064 if (readonly) ze->attr &= ~S_IWUSR; 4071 4065 #else 4066 bool hidden=false, system=false, archive=true; 4067 if (host==0 || host==7 || host==11 || host==14) 4068 { 4069 hidden= (a&0x00000002)!=0; 4070 system= (a&0x00000004)!=0; 4071 archive= (a&0x00000020)!=0; 4072 } 4073 4072 4074 if (isdir) ze->attr |= FILE_ATTRIBUTE_DIRECTORY; 4075 if (readonly) ze->attr|=FILE_ATTRIBUTE_READONLY; 4073 4076 if (archive) ze->attr|=FILE_ATTRIBUTE_ARCHIVE; 4074 4077 if (hidden) ze->attr|=FILE_ATTRIBUTE_HIDDEN; 4075 if (readonly) ze->attr|=FILE_ATTRIBUTE_READONLY;4076 4078 if (system) ze->attr|=FILE_ATTRIBUTE_SYSTEM; 4077 4079 #endif -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgQt/QGraphicsViewAdapter.cpp
r12292 r12598 342 342 (rightButtonPressed ? Qt::RightButton : Qt::NoButton); 343 343 344 const QRect viewportGeometry = _graphicsView->viewport()->geometry();345 344 const QPoint globalPos(x, y); 346 347 348 345 349 346 if (buttonMask != _previousButtonMask) -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgShadow/ParallelSplitShadowMap.cpp
r12319 r12598 591 591 cbbv.setTraversalMask(getShadowedScene()->getCastsShadowTraversalMask()); 592 592 _shadowedScene->osg::Group::traverse(cbbv); 593 osg::BoundingBox bb = cbbv.getBoundingBox(); 593 594 594 ////////////////////////////////////////////////////////////////////////// 595 595 const osg::Light* selectLight = 0; -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgTerrain/GeometryTechnique.cpp
r12292 r12598 775 775 float sampleRatio = terrain ? terrain->getSampleRatio() : 1.0f; 776 776 777 double i_sampleFactor = 1.0;778 double j_sampleFactor = 1.0;779 780 777 // OSG_NOTICE<<"Sample ratio="<<sampleRatio<<std::endl; 781 778 … … 790 787 numColumns = std::max((unsigned int) (float(originalNumColumns)*sqrtf(sampleRatio)), minimumNumColumns); 791 788 numRows = std::max((unsigned int) (float(originalNumRows)*sqrtf(sampleRatio)),minimumNumRows); 792 793 i_sampleFactor = double(originalNumColumns-1)/double(numColumns-1);794 j_sampleFactor = double(originalNumRows-1)/double(numRows-1);795 789 } 796 790 -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgText/FadeText.cpp
r11477 r12598 72 72 osg::Vec3d edge01 = _vertices[1] - _vertices[0]; 73 73 osg::Vec3d edge12 = _vertices[2] - _vertices[1]; 74 osg::Vec3d edge23 = _vertices[3] - _vertices[2];75 osg::Vec3d edge30 = _vertices[0] - _vertices[3];76 74 77 75 osg::Vec3d normalFrontFace = edge01 ^ edge12; … … 90 88 OSG_NOTICE<<" edge01 = "<<edge01<<std::endl; 91 89 OSG_NOTICE<<" edge12 = "<<edge12<<std::endl; 92 OSG_NOTICE<<" edge23 = "<<edge23<<std::endl;93 90 OSG_NOTICE<<" _vertices[0]= "<<_vertices[0]<<std::endl; 94 91 OSG_NOTICE<<" _vertices[1]= "<<_vertices[1]<<std::endl; -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgText/Text.cpp
r12068 r12598 754 754 // instead of recomputing it each time. 755 755 is_valid_size = computeAverageGlyphWidthAndHeight(avg_width, avg_height); 756 757 if (!is_valid_size) return; 756 758 757 759 // now apply matrix to the glyphs. -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgUtil/DelaunayTriangulator.cpp
r11473 r12598 567 567 case osg::PrimitiveSet::TRIANGLE_FAN: 568 568 { 569 osg::Vec3 ptest=(*constraintverts)[prset->index(0)];570 569 if (prset->index(0)>=npts) 571 570 { … … 977 976 bool edgused=false;// first check for exact edge indices are used. 978 977 Triangle_list::iterator titr; 979 const osg::Vec3 curp=(*vercon)[prset->index(i)];980 978 int it=0; 981 979 for (titr=triangles.begin(); titr!=triangles.end() && !edgused; ++titr) -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgUtil/RenderStage.cpp
r12552 r12598 629 629 bool colorAttached = false; 630 630 bool depthAttached = false; 631 bool stencilAttached = false;632 631 for(osg::Camera::BufferAttachmentMap::iterator itr = bufferAttachments.begin(); 633 632 itr != bufferAttachments.end(); … … 648 647 { 649 648 traits->stencil = 8; 650 stencilAttached = true;651 649 break; 652 650 } … … 656 654 depthAttached = true; 657 655 traits->stencil = 8; 658 stencilAttached = true;659 656 } 660 657 case(osg::Camera::COLOR_BUFFER): -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgViewer/View.cpp
r12504 r12598 735 735 float screenRadius = heightVector.length() * 0.5f; 736 736 737 osg::Vec3 cursor = bottom;738 737 int i,j; 739 738 … … 1115 1114 osg::Vec4Array* colors = new osg::Vec4Array; 1116 1115 1117 osg::Vec3 bottom = origin;1118 osg::Vec3 dx = xAxis*(width/((float)(noSteps-2)));1119 osg::Vec3 dy = yAxis*(height/((float)(noSteps-1)));1120 1121 1116 osg::Vec3 top = origin + yAxis*height; 1122 1117 … … 1128 1123 for(int i=0;i<noSteps;++i) 1129 1124 { 1130 osg::Vec3 cursor = bottom+dy*(float)i;1131 1125 for(int j=0;j<noSteps;++j) 1132 1126 { -
OpenSceneGraph/branches/OpenSceneGraph-3.0/src/osgVolume/FixedFunctionTechnique.cpp
r12292 r12598 122 122 123 123 osg::Image* image_3d = 0; 124 osg::TransferFunction1D* tf = 0;125 124 osgVolume::Locator* masterLocator = _volumeTile->getLocator(); 126 125 osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT; … … 137 136 { 138 137 alphaFuncValue = cpv._isoProperty->getValue(); 139 }140 141 if (cpv._tfProperty.valid())142 {143 tf = dynamic_cast<osg::TransferFunction1D*>(cpv._tfProperty->getTransferFunction());144 138 } 145 139
