osg中openvrml程序示例(可调试):
把IndexedFaceSet.cpp,ReaderWriterVRML2.h,ReaderWriterVRML2.cpp,Primitives.cpp这四个文件复制到新建工程内,(可能要在IndexedFaceSet.cpp,ReaderWriterVRML2.cpp,Primitives.cpp这三个.cpp文件的开头加上#include "stdafx.h"),然后在工程属性的<附加包含目录>中加上"vrml97node.h"的文件目录(如D:\openVrml\home-build),然后在主程序中加入库:
#pragma comment( lib, "D:\\osg\\3rdParty\\windows-VS9.0.30729-x86-release\\lib\\zlib1.lib");
#pragma comment( lib, "D:\\osg\\3rdParty\\windows-VS9.0.30729-x86-release\\lib\\libjpeg.lib");
#pragma comment( lib, "D:\\osg\\3rdParty\\windows-VS9.0.30729-x86-release\\lib\\libpng13.lib");
#pragma comment( lib, "D:\\openVrml\\home-build\\lib\\openvrml.lib");//openvrml开源库 D:\openVrml\home-build\lib\openvrml.lib
#pragma comment( lib, "D:\\openVrml\\home-build\\lib\\antlr.lib");
#pragma comment( lib, "D:\\openVrml\\home-build\\lib\\regex.lib");
#pragma comment( lib, "Ws2_32.lib");//要加入网络的