自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 OSG计算帧数,限制帧速

#include <Windows.h>#ifdef _DEBUG#pragma comment(lib,"osgDBd.lib")#pragma comment(lib,"osgViewerd.lib")#pragma comment(lib,"osgd.lib")#pragma comment(lib,"OpenThreadsd.lib")#pragma comment(lib,"osgUtild.lib")#pragma comment(lib,"osgGAd.lib").

2020-10-31 09:54:03 1314

原创 OSG一个最简单的viewer

#include"pch.h"//main.cpp#include <osgViewer/Viewer>#include <osgDB/ReadFile>using namespace std;int main(){ osg::ref_ptr<osgViewer::Viewer> viewer=new osgViewer::Viewer; osg::ref_ptr<osg::Node> node = osgDB::readNodeFile("gl

2020-10-29 14:05:53 719

原创 osg开发笔记(一)智能指针

osg程序开发中,要尽量使用osg::ref_ptr<T*>。这个智能指针构建起osg的对象树(绝大部分osg类都是继承于osg::Referenced,即可计数对象),类似于Qt的对象树,负责其内存的管理。智能指针是个模板类。比如这样一个定义:osg::ref_ptrosgViewer::Viewer viewer=new osgViewer::Viewer;这里,viewer本质上是一个ref_ptr对象(并非是指针),而之所以可以将new返回的指针赋给它是因为osg::ref_pt

2020-10-29 11:31:36 268

原创 C语言递归计算年龄

#include <stdio.h>int main() { int age(int n); age(4); system("PAUSE"); return 0; }int age(int n){ int c; printf("%d",n); if(n==1) c=1; else c=2+age(n-1); printf("%d",c); return(c);}...

2020-06-11 18:03:38 1226

原创 递归解决汉若塔问题

#include<stdio.h>int main(){ void hanoi(int n,char one,char two,char three); int m; printf("输入盘个数\n"); scanf("%d",&m); printf("step\n"); hanoi(m,'A','B','C'); return 0;}void hanoi(int n,char one,char two,char three...

2020-05-22 18:25:41 195

原创 通过递归实现n的阶乘

#include <stdio.h>int main(){ int fac(int n); int n,a; printf("输入一个整数\n"); scanf("%d",&n); a=fac(n); printf("n!=%d",a);return 0;}int fac(int n){ int f; if(n<0) printf("erro"); if(n==0||n==1) f=...

2020-05-22 16:57:30 316

原创 Cygwin中利用apt-cyg安装软件

wget https://github.com/westfly/apt-cyg/blob/master/apt-cygchmod +x apt-cygcp apt-cyg /bin/更换为国内源apt-cyg mirror http://mirrors.163.com/cygwin/安装示例apt-cyg install ——...

2019-11-18 18:32:50 232

原创 vs配置opencv时出现opencv_world411d.dll处有未经处理的异常:illegal instruction

将Ddbug模式改为release模式,在附加依赖项中添加opencv_world411.lib,把opencv\build\x64\vc14\bin下的3个*.dll文件放到c:\Windows\system32下

2019-10-15 11:04:25 2303 5

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除