pangolin0.5+vs2013永久配置

匿名 (未验证) 提交于 2019-12-03 00:18:01


!!!!!!要退出360

1下载pangolin-0.5,解压,新建build文件夹

2cmake生成vscode,configure,添加eigen3.2path,然后generate


3,打开pangolin.sln

build :右键ALL_BUILD


4file-new-project-visual c++ -win32consoleapplication

5view-otherwindows-property manager-Debug| X64→Microsoft.Cpp.x64.user

可执行文件目录


包含目录


附加库目录

opengl自己下opengl32.lib


附加依赖项


pangolin.lib
jpeg.lib
libpng16d.lib
zlibd.lib
glewd.lib
libglew_sharedd.lib

OpenGL32.Lib

属性-》c/c++-》代码生成-》运行库


测试

#include <pangolin\pangolin.h>  int main(int /*argc*/, char** /*argv*/) { 	pangolin::CreateWindowAndBind("Main", 640, 480); 	glEnable(GL_DEPTH_TEST);  	// Define Projection and initial ModelView matrix 	pangolin::OpenGlRenderState s_cam( 		pangolin::ProjectionMatrix(640, 480, 420, 420, 320, 240, 0.2, 100), 		pangolin::ModelViewLookAt(-2, 2, -2, 0, 0, 0, pangolin::AxisY) 		);  	// Create Interactive View in window 	pangolin::Handler3D handler(s_cam); 	pangolin::View& d_cam = pangolin::CreateDisplay() 		.SetBounds(0.0, 1.0, 0.0, 1.0, -640.0f / 480.0f) 		.SetHandler(&handler);  	while (!pangolin::ShouldQuit()) 	{ 		// Clear screen and activate view to render into 		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 		d_cam.Activate(s_cam);  		// Render OpenGL Cube 		pangolin::glDrawColouredCube();  		// Swap frames and Process Events 		pangolin::FinishFrame(); 	}  	return 0; }

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!