openscenegraph

VS2012 MSVCR120D.dll is missing

只谈情不闲聊 提交于 2019-12-18 12:22:05
问题 I am trying to set up my project in VS2012 to successfully compile and run an OSG code for debugging. I am also using OSG debug libraries. Compilation and linking end successfully but after I run the binary I get an error saying that MSVCR120D.dll is missing. I was looking for a solution to this error the whole day and it doesn't make sense to me, because I am using VS2012 that should use MSVCR110D.dll . I also don't have this dll in C:\Windows\System32 , there's only MSVCR120.dll and its

Conversion to non-scalar type with std c++11 smart pointer

↘锁芯ラ 提交于 2019-12-12 13:28:18
问题 I am currently playing around with openscenegraph and it uses its own smart pointer. But I want to use the std c++11 smart pointer. now this is the working example code osg::ref_ptr<osg::Uniform> SineUniform = new osg::Uniform( "Sine", 0.0f ); but when I do something like this std::unique_ptr<osg::Uniform> SineUniform = new osg::Uniform( "Sine", 0.0f ); Then I get the following error message error: conversion from 'osg::Uniform*' to non-scalar type 'std::unique_ptr' requested Any idea what is

Trying to load an OSG model with textures allocated in textureUnit1

半世苍凉 提交于 2019-12-12 03:34:33
问题 I want to render an Openscenegraph model with textures under two constraints: 1) Using shaders (opengles20) 2) Uploading the textures to the textureUnit1 on the GPU (NO the default textureUnit0) I thought I was doing right but still I am getting non textured models (only the mesh). Here are the shaders (notice that I use gl_MultiTexCoord1): static const char gVertexShader1[] = { "varying vec2 texCoords;\n" "void main()\n" "{\n" " texCoords = gl_MultiTexCoord1.st;\n" " gl_Position = ftransform

Import FBX to ARToolKit

老子叫甜甜 提交于 2019-12-11 14:32:20
问题 I have problem about importing the FBX model. I have done it with Unity so I know the model exported well but I should do with the native code as well. I am getting error: 2015-06-02 15:20:21.721 ARAppNFTOSG[746:481003] Error: unsupported model file type (fbx). Ignoring. I am trying it on the AR example named ARAppNFTOSG. I changed the model.dat as: 1 OSG/Geralt/watcher.FBX 0.0 0.0 0.0 0.0 1.0 0.0 0.0 10.0 10.0 10.0 MARKER 1 I looked at the OSG forums and found that I should install FBX SDK

Problems compiling shader source within osg application

岁酱吖の 提交于 2019-12-11 10:55:09
问题 I have an OSG application that I want to texture map a full screen quad in the finalDrawCallback because I need everything in my scene to be rendered before the texturing is done. This is why I have to use the openGL calls instead of the osg calls for the program and shaders to execute. Specifically I seem to have an issue with compiling both the vert and frag shaders. When I call glGetShaderiv(shader, GL_COMPILE_STATUS, &param ), my param value doesn't change or is undefined. Which,

Image is disappearing with rotation in OSG

a 夏天 提交于 2019-12-08 18:47:29
I have a simple OSG program which makes an x, y axis and randomises points inside of this axis. The intention is that this will lead on to making a 3d viewer for laser scan data. (I know its been done before but we need it to be super light weight). Here is the code: #include <osg/Node> #include <osg/Group> #include <osg/Geode> #include <osg/Geometry> #include <osg/Texture2D> #include <osgDB/ReadFile> #include <osgViewer/Viewer> #include <osg/PositionAttitudeTransform> #include <osgGA/TrackballManipulator> #include <time.h> #include <cstdlib> void addAxis(osg::ref_ptr<osg::Group> root) { //ADD

Getting Xcode to recognise C++ header files without the '.h' extension (OpenSceneGraph)

こ雲淡風輕ζ 提交于 2019-12-08 17:08:00
问题 OpenSceneGraph uses header files without the '.h' extension. Is there a way of getting Xcode to recognise the syntax as C++ and therefore allow me to have highlighting and jumping to definitions etc? Eg: No highlighting: 回答1: Yes. Toggle the right panel (the rightmost icon of the "View" section of the toolbar, arrow 1 in the screenshot) with your file selected. Select the document tab in the panel (arrow 2), then find "File Type" under "Identity and Type" (arrow 3). Choose "C++ header" in the

Image is disappearing with rotation in OSG

杀马特。学长 韩版系。学妹 提交于 2019-12-08 07:04:39
问题 I have a simple OSG program which makes an x, y axis and randomises points inside of this axis. The intention is that this will lead on to making a 3d viewer for laser scan data. (I know its been done before but we need it to be super light weight). Here is the code: #include <osg/Node> #include <osg/Group> #include <osg/Geode> #include <osg/Geometry> #include <osg/Texture2D> #include <osgDB/ReadFile> #include <osgViewer/Viewer> #include <osg/PositionAttitudeTransform> #include <osgGA

OpenGL blending function to elminate primitive overlap but maintain overall opacity

有些话、适合烂在心里 提交于 2019-12-08 04:52:53
问题 I have some geometry which has a single primitive set that's a tri-strip. Some of the triangles in the primitive overlap, so when I add a material to the geometry with an alpha value I see the overlap (as expected). I want to get rid of this effect without changing the geometry though -- I tried playing around with different blending modes (glBlendFunc()) but I couldn't get this to work. I got some interesting results, but nothing that would eliminate opacity effects within the primitives of

Generic picking solution for 3D scenes with vertex-shader-based geometry deformation applied

谁说我不能喝 提交于 2019-12-07 08:42:54
问题 I'm trying to implement a navigation technique for 3D scenes (in OpenSceneGraph with OpenGL). Among other things the user should be able to click on an scene object on the screen to move towards it. The navigation technique should be integrated into another project which uses a vertex shader to apply a global deformation to the scene geometry. And here is the problem: Since the geometry is deformed using a vertex shader, it is not straight forward to un-project the mouse cursor position to