Re: [osg-users] SVN Access Fails

2015-04-11 Thread Jacob Moen
Here is the build instructions for when being on the Windows platform using 
Visual Studio:
http://www.openscenegraph.org/index.php/documentation/platform-specifics/windows/37-visual-studio

You need to be using CMake.

Cheers,
Jacob

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63331#63331





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] SVN Access Fails

2015-04-11 Thread Dave Sargrad
Hi,

I'm trying to build from source using visual studio 2013. Apparently I need a 
later version than the 3.0.1 source that was released back in 2011 (the latest 
on the web site). I'm trying to access the SVN repository to pick up the latest 
software since I did see a thread indicating some fixes for 2013.

However my SVN access fails:


svn: E175002: Unexpected HTTP status 405 'Method Not Allowed' on 
'/svn/osg/OpenSceneGraph/trunk'

Also can someone help me to understand why the last release was four years ago? 
I'm hoping that the project is still quite active.


Any help would be appreciated.

Thank you!

Cheers,
Dave
 


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63329#63329





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Trouble with a simple shader program.

2015-04-11 Thread Alexander Wieser
Hi,

I am currently working on my bachelor thesis using which involves the 
OpenSceneGraph. One task is to apply a distortion Shader to a rendered texture.

Unfortunately I am failing in getting any Shader to work at all.
After spending the last couple of days researching and reading books, I managed 
to get several shaders running in other libraries, be it online using WebGL or 
directly using OpenGL. I simply can't get it running using OSG.

The code initializing the program is this.


Code:

// A simple 4 vertex rectangular geometry drawable.
Plane* plane = new Plane(40);
this-addDrawable(plane);

osg::Program* program = new osg::Program();
program-setName(Debug Shader);

// This refers to a Geode.
osg::StateSet state = *this-getOrCreateStateSet();
state.setAttributeAndModes(program, osg::StateAttribute::ON);

boost::filesystem::path currentPath(boost::filesystem::current_path());

// Init vertex shader.
RTT::log(RTT::Debug)  Loading vertex shader. RTT::endlog();
osg::Shader* vertexShader = new osg::Shader(osg::Shader::VERTEX);
vertexShader-loadShaderSourceFromFile(currentPath.string() + 
/../resources/shaders/debug.vert);
program-addShader(vertexShader);

// Init fragment shader.
RTT::log(RTT::Debug)  Loading fragment shader. RTT::endlog();
osg::Shader* fragmentShader = new osg::Shader(osg::Shader::FRAGMENT);
fragmentShader-loadShaderSourceFromFile(currentPath.string() + 
/../resources/shaders/debug.frag);
program-addShader(fragmentShader);





Vertex Shader

Code:

#version 430

uniform mat4 osg_ModelViewProjectionMatrix;
in vec4 osg_Vertex;

void main() {
gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
}





Fragment Shader

Code:

#version 430

layout(location = 0) out vec4 FragColor;

void main() {
FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}




As you can see, the program is not that complicated and does compile fine.
Unfortunately I don't see anything on the screen. There is no model.
If I remove the program and simply use the built in lighting, coloring and 
texturing support it renders fine.

Any help is greatly appreciated.


Thank you!

Cheers,
Alexander

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63328#63328





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SVN Access Fails

2015-04-11 Thread Jacob Moen
Hi Dave,

I am not sure where you have been looking but OSG is very active - 
http://www.openscenegraph.org/index.php/download-section/stable-releases

Cheers,
Jacob

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63330#63330





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Master compilation error with MinGW / C++11

2015-04-11 Thread Sergey Kurdakov
Hi Philippe,

the error was recently discussed in osg-submissions mailing list
http://forum.openscenegraph.org/viewtopic.php?t=14750postdays=0postorder=ascstart=15
see posts by Wojtek
 and as far as I remember there was a fix,
so check code
if not - try to apply  fixes and also submit them again.

Regards
Sergey

On Fri, Apr 10, 2015 at 7:53 PM, philippe renon philippe_re...@yahoo.fr
wrote:

 Hi,

 I recently pulled master and I am seeing the error below.
 Seems like c++ 11 is now mandatory. Is that voluntary?

 Philippe.

 [ 89%] Building CXX object
 src/osgPlugins/osgjs/CMakeFiles/osgdb_osgjs.dir/Animation.obj
 In file included from
 d:/Projects/OpenPilotTools/qt-5.4.1/Tools/mingw491_32/i686-w64-mingw32/include/c++/cstdint:35:0,

  from
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:34,
  from
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\Animation.cpp:12:
 d:/Projects/OpenPilotTools/qt-5.4.1/Tools/mingw491_32/i686-w64-mingw32/include/c++/bits/c++0x_warning.h:32:2:
 error: #er
 ror This file requires compiler and library support for the ISO C++ 2011
 standard. This support is currently experimental, and must be enabled with
 the -std=c++11 or -std=gnu++11 compiler options.
  #error This file requires compiler and library support for the \
   ^
 In file included from
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\Animation.cpp:12:0:
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:94:67:
 error: 'uint8_t' was not declared in this sc
 ope
  void encodeArrayAsVarintBuffer(osg::Array const*,
 std::vectoruint8_t) const;
^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:94:74:
 error: template argument 1 is invalid
  void encodeArrayAsVarintBuffer(osg::Array const*,
 std::vectoruint8_t) const;

 ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:94:74:
 error: template argument 2 is invalid
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:96:39:
 error: 'uint8_t' was not declared in this sc
 ope
  void dumpVarintVector(std::vectoruint8_t, T const*, bool) const;
^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:96:46:
 error: template argument 1 is invalid
  void dumpVarintVector(std::vectoruint8_t, T const*, bool) const;
   ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:96:46:
 error: template argument 2 is invalid
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:98:38:
 error: 'uint8_t' was not declared in this sc
 ope
  void dumpVarintValue(std::vectoruint8_t, T const*, bool) const;
   ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:98:45:
 error: template argument 1 is invalid
  void dumpVarintValue(std::vectoruint8_t, T const*, bool) const;
  ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:98:45:
 error: template argument 2 is invalid
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:99:17:
 error: 'uint8_t' was not declared in this sc
 ope
  std::vectoruint8_t varintEncoding(unsigned int value) const;
  ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:99:24:
 error: template argument 1 is invalid
  std::vectoruint8_t varintEncoding(unsigned int value) const;
 ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:99:24:
 error: template argument 2 is invalid
 src\osgPlugins\osgjs\CMakeFiles\osgdb_osgjs.dir\build.make:57: recipe for
 target 'src/osgPlugins/osgjs/CMakeFiles/osgdb_
 osgjs.dir/Animation.obj' failed
 make[3]: ***
 [src/osgPlugins/osgjs/CMakeFiles/osgdb_osgjs.dir/Animation.obj] Error 1


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SVN Access Fails

2015-04-11 Thread Jacob Moen
Ouch - I guess someone from the OSG team need to update that!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63334#63334





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trouble with a simple shader program.

2015-04-11 Thread Alexander Wieser
Hi,

I managed to get one step closer, if I remove the vertex shader the color is 
properly displayed.

The obvious conclusion is that the vertex shader is bullocks ...
Is it possible that the attributes, such as osg_Vertex are no longer available ?

Thank you!

Cheers,
Alexander

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=6#6





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trouble with a simple shader program.

2015-04-11 Thread Alexander Wieser
Hi,

I am currently working on my bachelor thesis which involves the OpenSceneGraph. 
One task is to apply a distortion shader to a rendered texture.

Unfortunately I am failing in getting any shader to work at all.
After spending the last couple of days researching and reading books, I managed 
to get several shaders running in other libraries, be it online using WebGL or 
directly using OpenGL. I simply can't get it running using OSG.

The code initializing the program is this.


Code:

// A simple 4 vertex rectangular geometry drawable.
Plane* plane = new Plane(40);
this-addDrawable(plane);

osg::Program* program = new osg::Program();
program-setName(Debug Shader);

// This refers to a Geode.
osg::StateSet state = *this-getOrCreateStateSet();
state.setAttributeAndModes(program, osg::StateAttribute::ON);

boost::filesystem::path currentPath(boost::filesystem::current_path());

// Init vertex shader.
RTT::log(RTT::Debug)  Loading vertex shader. RTT::endlog();
osg::Shader* vertexShader = new osg::Shader(osg::Shader::VERTEX);
vertexShader-loadShaderSourceFromFile(currentPath.string() + 
/../resources/shaders/debug.vert);
program-addShader(vertexShader);

// Init fragment shader.
RTT::log(RTT::Debug)  Loading fragment shader. RTT::endlog();
osg::Shader* fragmentShader = new osg::Shader(osg::Shader::FRAGMENT);
fragmentShader-loadShaderSourceFromFile(currentPath.string() + 
/../resources/shaders/debug.frag);
program-addShader(fragmentShader);





Vertex Shader

Code:

#version 430

uniform mat4 osg_ModelViewProjectionMatrix;
in vec4 osg_Vertex;

void main() {
gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
}





Fragment Shader

Code:

#version 430

layout(location = 0) out vec4 FragColor;

void main() {
FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}




As you can see, the program is not that complicated and does compile fine.
Unfortunately I don't see anything on the screen. There is no model.
If I remove the program and simply use the built in lighting, coloring and 
texturing support it renders fine.

Any help is greatly appreciated.


Thank you!

Cheers,
Alexander

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63328#63328





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SVN Access Fails

2015-04-11 Thread Dave Sargrad
Hi,


Thanks very much for the fast response. Apparently I was looking in the wrong 
location. I had been looking at: trac . openscenegraph . org. Clearly the 
trac is wrong, you'll see that its download page has a  much older release. 
Not sure why my google took me to that other site.

Thank you!

Cheers,
Dave

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63332#63332





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trouble with a simple shader program.

2015-04-11 Thread Trajce Nikolov NICK
Hi Alexander,

what does it says on the console? Any shader errors, obviously it reports
if the shader is buggy

Nick

On Sun, Apr 12, 2015 at 1:23 AM, Alexander Wieser 
alexander.wie...@crystalbyte.de wrote:

 Hi,

 I managed to get one step closer, if I remove the vertex shader the color
 is properly displayed.

 The obvious conclusion is that the vertex shader is bullocks ...
 Is it possible that the attributes, such as osg_Vertex are no longer
 available ?

 Thank you!

 Cheers,
 Alexander

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=6#6





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org