openscenegraph

WIN10系统下OSG+VS2017或者vs2019环境搭建

天涯浪子 提交于 2020-03-26 15:29:35
** WIN10系统下OSG+VS2017或者vs2019环境搭建 ** 一、资料准备 1、OSG源码下载地址: http://www.openscenegraph.org/index.php/download-section/stable-releases (OpenSceneGraph-3.4.1 release 稳定版本)。 2、OSG第三方依赖库下载地址: http://www.openscenegraph.org/index.php/download-section/dependencies (3rdParty_VS2017_v141_x64_V11) vs2019也适用。 注:第三方库版本必须与Visual Studio版本相对应,本文所用只适用于Visual Studio2017 以上版本,,平台工具集版本为v141的情况下。 3、数据包下载地址: http://www.openscenegraph.org/index.php/download-section/data (OpenSceneGraph-3.4 standard dataset)。 4、编码工具下载地址: https://cmake.org/download/ (我用的是CMake 3.9.3版本)。 二、编译准备 为了编译的顺利进行,将下载的文件组织如下: 在D盘建立一个OSG的文件夹

OpenGL : thick and smooth/non-broken lines *in 3D*

僤鯓⒐⒋嵵緔 提交于 2020-02-26 10:35:09
问题 I have a 3D CAD-like application for which I use OpenGL wrapper library (OpenSceneGraph). For the application I am trying to come up with the best strategy on how to render thick and smooth lines in 3D . By thick and smooth I mean: line thickness can be more than OpenGL maximum linewidth value (it seems to be 10.f on my machine) when composing polylines I want to avoid the look of "broken lines" (see example image below) At the moment I render my polylines by using GL_LINE_STRIP_ADJACENCY . I

OpenGL : thick and smooth/non-broken lines *in 3D*

那年仲夏 提交于 2020-02-26 10:34:58
问题 I have a 3D CAD-like application for which I use OpenGL wrapper library (OpenSceneGraph). For the application I am trying to come up with the best strategy on how to render thick and smooth lines in 3D . By thick and smooth I mean: line thickness can be more than OpenGL maximum linewidth value (it seems to be 10.f on my machine) when composing polylines I want to avoid the look of "broken lines" (see example image below) At the moment I render my polylines by using GL_LINE_STRIP_ADJACENCY . I

Solving error MSB8011: Failed to register output

元气小坏坏 提交于 2020-01-31 03:39:10
问题 A strange error: error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 744 I got this error when trying to use OpenSceneGraph (OSG) in an ActiveX control. A Google search showed all kinds of solutions which didn't really solve the problem or locate the exact cause of the error, so I'd like to put the solution in one

OSG在VS2008下的配置安装

雨燕双飞 提交于 2020-01-24 13:10:45
这两天心血来潮,突然想学点 OSG 的东西,其实 OSG 本身是挺好用的,就是编译安装有点让人头疼,佛祖保佑,终于编译成功了,为便来着参考,将过程记录如下: 一、 准备工作 下载相关的工具软件: 1, 最新版的 OSG 库: OpenSceneGraph-2.8.2.zip 。 2, 安装源代码所需要的工具: cmake-2.6.4-win32-x86.zip 3, Windows 支持的图像库: 3rdParty_Win32Binaries_vc90sp1.zip ,因为我用的是 vc2008, 如果用 vc05 应该有其它针对的版本 4, 数据文件包: OpenSceneGraph-Data-2.8.0.zip 二、 编译准备 为了编译的顺利进行,将下载的文件组织如下: 在 C 盘建立一个 OSG 的文件夹,然后其他文件如下放置: C:\OSG\OpenSceneGraph( 放置 OSG 最新库文件 ) C:\OSG\3rdParty( 放置图像库 ) C:\OSG\data( 放置 OpenSceneGraph-Data-2.8.0.zip 的加压数据 ) ,主要用于 examples 演示 三、 用 cmake 生成 Project & Solution files 1, 在 C:\OSG\OpenSceneGraph 下新建两个文件夹,分别命名为 build, bin

OSGViewer in Qt's TabWidget

戏子无情 提交于 2020-01-06 12:28:47
问题 I am using OpenSceneGraph 3.0.1 and having a problem with the Qt integration using the osgQt::GLWidget when adding it to a tab control during startup (inside the constructor of my main window. MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QWidget* viewerWidget = new MyViewerWidget(new osgViewer::Viewer()); ui->tabWidget->addTab(viewerWidget, "My Osg View"); // tab entry was added but nothing to see than empty Osg Window } It works,

Creating a Sphere (using osg::Geometry) in OpenSceneGraph

ぐ巨炮叔叔 提交于 2020-01-01 02:18:06
问题 I spent quite some time to get this working, but my Sphere just won't display. Used the following code to make my function: Creating a 3D sphere in Opengl using Visual C++ And the rest is simple OSG with osg::Geometry . (Note: Not ShapeDrawable, as you can't implement custom shapes using that.) Added the vertices, normals, texcoords into VecArrays. For one, I suspect something misbehaving, as my saved object is half empty. Is there a way to convert the existing description into OSG? Reason? I

The type in a dynamic_cast must be a pointer or reference to a complete class type, or void *

我们两清 提交于 2019-12-30 18:52:07
问题 I am hoping there is someone out there who understands why the code below fails. I am trying to get an instance of PositionAttitudeTransform (Openscenegraph class) from an osg::Node* node object. But there is the compiler error below in bold. void CameraPosCallbackUpdate::operator()(osg::Node* node, osg::NodeVisitor* nv) { // other code goes here osg::PositionAttitudeTransform* pat = dynamic_cast<osg::PositionAttitudeTransform*> (node); } IntelliSense: the type in a dynamic_cast must be a

OpenSceneGraph/OpenGL Image internalFormat

最后都变了- 提交于 2019-12-24 07:19:04
问题 I need to pass a 2D texture array to a fragment shader that performs texelFetch and bitwise operations over uchar elements. For this reason, I need to create a texture with a very specific internal format, that guarantees that my texels are in unsigned byte integer, and that no scaling operations not casting to float is performed. I already have my image buffers in generic uint8_t* arrays. So I am doing this: osg::Texture2DArray texture = new osg::Texture2DArray; for (int i = 0; i < ntextures

How to build OpenSceneGraph from source and third party dependencies?

荒凉一梦 提交于 2019-12-19 04:07:43
问题 How can I build OpenSceneGraph from source? What should I do to get the third party dependencies for OSG built? 回答1: This is just an initial guide which will get basic OSG installed on your system. There are many other configuration changes and compilation with dependencies that you can do later (building third party libraries is specified after the first long dotted line). Extract the OSG source code zip file to a folder Download and install CMake from the CMake website Run CMake In CMake,