From 5622e0d202a5884d5d8f6ea2477290e70fc94ff0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 5 Jul 2006 20:56:37 +0000 Subject: [PATCH] From Brede Johansen, "Changed ">" to ">=" when testing for version 16.1 or later." --- src/osgPlugins/OpenFlight/PaletteRecords.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/osgPlugins/OpenFlight/PaletteRecords.cpp b/src/osgPlugins/OpenFlight/PaletteRecords.cpp index 3d73184c9..434c1f0d0 100644 --- a/src/osgPlugins/OpenFlight/PaletteRecords.cpp +++ b/src/osgPlugins/OpenFlight/PaletteRecords.cpp @@ -636,8 +636,8 @@ protected: // Using parent's shader pool -- ignore this record. return; - int32 index = in.readInt32(); - int32 type = in.readInt32(); + int32 index = in.readInt32(-1); + int32 type = in.readInt32(-1); std::string name = in.readString(1024); if (type == CG) @@ -650,13 +650,12 @@ protected: std::string vertexProgramEntry = in.readString(256); std::string fragmentProgramEntry = in.readString(256); } - - if (type == GLSL) + else if (type == GLSL) { - int32 vertexProgramFileCount( 1 ); - int32 fragmentProgramFileCount( 1 ); + int32 vertexProgramFileCount(1); + int32 fragmentProgramFileCount(1); - if (document.version() > VERSION_16_1) + if (document.version() >= VERSION_16_1) { // In 16.1, possibly multiple filenames for each vertex and fragment program. vertexProgramFileCount = in.readInt32();