Re: [osg-users] Choosing a game engine for an open Roblox/Kodu/Lego Worlds/LittleBigPlanet-like app

2017-04-27 Thread Alistair Baxter
"So my question is, can OSG easily support the bullet points above?"

No, I'm afraid it can't.

OpenScenegraph isn't a game engine, it's just a set of tools for representing 
and rendering 3D scenes, that could be used by one, plus some import and export 
tools. Although it does contain  a simple UI toolkit, and quite a few plugins 
for interoperability with other software.

If you require doing a lot of UI for your programming language bit, and 
cross-platform compatibility, I'd have a look at Qt. It can be combined with 
OpenScenegraph, and made to run on Windows, Mac, Linux, iOS and Android (UWP is 
apparently in development for OSG and already available for Qt). Alternatively 
they have a scenegraph of their own.

However, either of these plans will still require you to write the engine parts 
of the game engine underneath them, or find extra bits of middleware like 
Bullet physics, which has an existing integration with OSG.


Incidentally, unless you're planning on porting to some *incredibly* obscure or 
ancient systems, C++, in fact the C++ 11 standard seems to be perfectly well 
supported across all today's popular platforms.



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


Re: [osg-users] [3rdparty] OSG + Qt on Android

2017-04-03 Thread Alistair Baxter
When I had to make an app integrate osg and Qt on Android (and other portable 
platforms) , I based it off the osg / Qt Quick example here:

https://forum.qt.io/topic/30707/demo-integrating-openscenegraph-with-qt-quick

Since then, other osg / Qt quick examples have been put forward, if you search 
the mailing list archives.

Qt widgets isn't really intended to work well with mobile platforms, and that's 
what the old osgQt library is based on.


-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Coach Treazy
Sent: 31 March 2017 23:45
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [3rdparty] OSG + Qt on Android

All,

I'm trying to run an open scene graph+qt example on my Samsung Galaxy S2 
tablet. I'm using Qt 5.8, OpenSceneGraph 3.5.6, Android NDK-r13b and Android 
6.0 (API Level 23). FYI - I compiled open scene graph on Android and did not 
download binaries.

I cannot even get the open scene graph examples to work. Code compiles fine but 
when I deploy it on my tablet all I see is a blue screen. I have seen this 
question posted on the forums before but I do not think it has been solved. 
This is my first post and therefore I cannot post URL links to the previous 
answers but you can search for the title "OSG with Qt on Android fails to 
render anything" on the forums

I have posted my example code below and any help will be appreciated.


Code:
#include "QTimer"
#include "QApplication"
#include "QGridLayout"

#include "osgViewer/CompositeViewer"
#include "osgViewer/ViewerEventHandlers"
#include "osg/PositionAttitudeTransform"
#include "osgGA/MultiTouchTrackballManipulator"
#include "osg/ShapeDrawable"
#include "osgDB/ReadFile"
#include "osgQt/GraphicsWindowQt"

#include "iostream"

class ViewerWidget : public QWidget, public osgViewer::CompositeViewer {
public:
ViewerWidget(QWidget* parent = 0, Qt::WindowFlags f = 0, 
osgViewer::ViewerBase::ThreadingModel 
threadingModel=osgViewer::CompositeViewer::SingleThreaded) : QWidget(parent, f) 
{ setThreadingModel(threadingModel);

// disable the default setting of viewer.done() by pressing Escape.
setKeyEventSetsDone(0);

const double r_earth = 6378.137;
const double r_sun = 695990.0;
const double AU = 149697900.0;

// Create the Earth, in blue
osg::ShapeDrawable *earth_sd = new osg::ShapeDrawable;
osg::Sphere* earth_sphere = new osg::Sphere; 
earth_sphere-"setName("EarthSphere");
earth_sphere-"setRadius(r_earth);
earth_sd-"setShape(earth_sphere);
earth_sd-"setColor(osg::Vec4(0, 0, 1.0, 1.0));

osg::Geode* earth_geode = new osg::Geode; earth_geode-"setName("EarthGeode");
earth_geode-"addDrawable(earth_sd);

// Create the Sun, in yellow
osg::ShapeDrawable *sun_sd = new osg::ShapeDrawable;
osg::Sphere* sun_sphere = new osg::Sphere; sun_sphere-"setName("SunSphere"); 
sun_sphere-"setRadius(r_sun); sun_sd-"setShape(sun_sphere); 
sun_sd-"setColor(osg::Vec4(1.0, 0.0, 0.0, 1.0));

osg::Geode* sun_geode = new osg::Geode;
sun_geode-"setName("SunGeode");
sun_geode-"addDrawable(sun_sd);

// Move the sun behind the earth
osg::PositionAttitudeTransform *pat = new osg::PositionAttitudeTransform; 
pat-"setPosition(osg::Vec3d(0.0, AU, 0.0)); pat-"addChild(sun_geode);

osg::Geometry * unitCircle = new osg::Geometry(); {
osg::Vec4Array * colours = new osg::Vec4Array(1);
(*colours)[0] = osg::Vec4d(1.0,1.0,1.0,1.0);
unitCircle-"setColorArray(colours, osg::Array::BIND_OVERALL);
const unsigned int n_points = 1024;
osg::Vec3Array * coords = new osg::Vec3Array(n_points);
const double dx = 2.0*osg::PI/n_points;
double s,c;
for (unsigned int j=0; j"n_points; ++j) {
s = sin(dx*j);
c = cos(dx*j);
(*coords)[j].set(osg::Vec3d(c,s,0.0));
}
unitCircle-"setVertexArray(coords);

unitCircle-"getOrCreateStateSet()-"setMode(GL_LIGHTING,osg::StateAttribute::OFF);
unitCircle-"addPrimitiveSet(new 
osg::DrawArrays(osg::PrimitiveSet::LINE_LOOP,0,n_points));
}

osg::Geometry *axes = new osg::Geometry; {
osg::Vec4Array *colours = new osg::Vec4Array(1);
(*colours)[0] = osg::Vec4d(1.0,0.0,0.0,1.0);
axes-"setColorArray(colours, osg::Array::BIND_OVERALL);
osg::Vec3Array *coords = new osg::Vec3Array(6);
(*coords)[0].set(osg::Vec3d(0.0, 0.0, 0.0));
(*coords)[1].set(osg::Vec3d(0.5, 0.0, 0.0));
(*coords)[2].set(osg::Vec3d(0.0, 0.0, 0.0));
(*coords)[3].set(osg::Vec3d(0.0, 0.5, 0.0));
(*coords)[4].set(osg::Vec3d(0.0, 0.0, 0.0));
(*coords)[5].set(osg::Vec3d(0.0, 0.0, 0.5));
axes-"setVertexArray(coords);

axes-"getOrCreateStateSet()-"setMode(GL_LIGHTING,osg::StateAttribute::OFF);
axes-"addPrimitiveSet(new 
osg::DrawArrays(osg::PrimitiveSet::LINES,0,6));
}

// Earth orbit
osg::Geode * earthOrbitGeode = new osg::Geode; 
earthOrbitGeode-"addDrawable(unitCircle);
earthOrbitGeode-"addDrawable(axes);

Re: [osg-users] OSG on Universal Windows Platform

2017-02-17 Thread Alistair Baxter
ANGLE can definitely be made to work with OSG, we have shipped a Qt-based 
desktop Windows application that uses it. 

Good luck with the UWP effort!

-Original Message-
From: Lorenzo Valente

Yes, I am aware of the problem with OpenGL, thank you for pointing it out. I'm 
indeed using Angle and I still don't know if the GL part is going to work... 
I've to solve these compilation errors first

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


Re: [osg-users] [build] OSG with OpenGL ES 2.0 and Angle

2017-02-03 Thread Alistair Baxter
I'm afraid I never got as far as building for WinRT or UWP, though that's what 
I had intended when I set out on the ANGLE path with Qt.

I chickened out, when faced with the prospect of having to eliminate disallowed 
API usage from the likes of GDAL and osgEarth, as well as OSG. And the 
announcement of the desktop app bridge for the Windows store meant that I 
didn't even need to bother for the Windows port of our tablet app.

There has been no seriously concerted effort that I'm aware of to make a UWP 
build of osg, but I'd love to see one. I'd have liked to try and fix even just 
ANGLE support for desktop Windows, and get that submitted to the project, but I 
didn't have the time and I'm not working on our tablet project at the moment.

A brief bit of searching suggests that Microsoft have a special version of 
CMAKE for UWP projects, although it's not clear how much if any of that's been 
reintegrated into  the parent project. I'm not sure if that might help.


-Original Message-

Thank you for the answer!
So I tried to compile it osg with Angle, I edited the CMakeList so that I can 
add the OPENGL_INCLUDE_DIR and OPENGL_LIBRARY, because they where enabled only 
on Android builds. So I did the compiation done. After that, I switched the 
project type to Universal windows platform by adding the CMAKE variables 
CMAKE_SYSTEM_NAME=WindowsStore CMAKE_SYSTEM_VERSION=10.0.
The big prolem is that I need to compile for Universal Windows App, and this 
type of project has lot of APIs disabled by the UWP behaviour. A lot of 
function that osg use are forbidden... I don't understand if I'm doing 
something wrong or if osg is just incompatible. 

for Alistair Baxter: when you compiled with angle have you compiled for UWP? 

Did anyone has compiled for Universal Windows App?
I need to port an existing osg application to Hololens.

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


Re: [osg-users] Strange limitation to 60fps

2017-01-30 Thread Alistair Baxter
It sounds like you have "vertical sync" enabled, that prevents your GPU 
updating faster than the refresh rate of your display device.

This can be toggled off in Qt by calling setSwapInterval in the QSurfaceFormat 
or QGLFormat you can pass to Qt to specify OpenGL settings. Please be aware 
though, that like many of the properties of these format objects, the system 
may or may not choose to give you what you ask for. Some systems may not allow 
you to turn vsync off.

If you're only interested in display of graphics, though, rather than 
benchmarking, at 60fps you are getting as fast an update as your screen is 
capable of showing.

-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Valerian Merkling
Sent: 30 January 2017 10:32
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Strange limitation to 60fps

Hi,

I'm working on a GIS app with QT 5.5 and OSG 3.4.0. My test platform is windows 
7 pro 64bits, but i'm building my app in 32bits.
I'm currently trying to improve performance a bit and I'm facing a problem that 
I can't understand.

I'm using OsgQT to make a OSG Widget and draw my scene inside. This widget has 
a CompositeViewer, and I call its frame() function when needed (I'm not using 
the compositeViewer.run() function). "When needed" include the widget repaint 
function and a Qt Timer.

The StatsHandler shows me that I can never get more than 60.00 fps.

I'm mostly running at 59.96 or somethings like this, event with a small 
windows, basic textured quad and a NVidia quadro K4000. 

I made lot's of test and tweaks, and I cannot got more than 60.00fps. 
Even with a loop around the frame() call, my statshandler graph looks like OSG 
is waiting between each frame to keep at 60.00fps.

It's not that I really want to get more than 60fps, but I really want to 
understand what is happening here. 

So is there anythings in OSG that artificially limit it's framerate inside the 
compositeViewer.frame() function ? 

After a deep look at the code I wasn't able to find any clue, as the 
setRunFrameScheme and setRunMaxFrameRate seems to only be used in the run() 
function.

Thank you!

Cheers,
Valerian

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



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


Re: [osg-users] [build] OSG with OpenGL ES 2.0 and Angle

2017-01-24 Thread Alistair Baxter
There are one or two things that need tweaked manually when building for ANGLE 
on Windows, generally just commenting of ifdefing stuff out. I needed to set 
the names of the angle gles libraries linked to by hand in Visual Studio, 
because I couldn't work out how to do that in the cmake configuration.

There are some assumptions in the codebase (unless they've been fixed in recent 
times, it's a while since I tried it) that Windows implies use of wgl. As I 
said in my previous post on the subject ( 
http://forum.openscenegraph.org/viewtopic.php?t=14043= ), you can't 
use the Windows graphicsWindow class, you need to create your OpenGL contexts 
by hand (or, as I did, via Qt) and use GraphicsWindowEmbedded.



From: osg-users [osg-users-boun...@lists.openscenegraph.org] on behalf of 
Andrea Pennarelli [andrea.pere...@edu.unito.it]
Sent: 23 January 2017 16:36
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [build] OSG with OpenGL ES 2.0 and Angle

Hi,

I'm trying to build openscenegraph with OpenGL ES 2.0 and Angle on windows, 
using CMake GUI and Visual Studio 2015. I've setted the CMake variables like 
the page trac.openscenegraph dot org /projects/osg/wiki/Community/OpenGL-ES 
says. I've added the OPENGL_INCLUDE_DIR as explained in the page. I've not 
found the OPENGL_LIBRARY so I added it too. I've setted them to point to the 
Angle's include folder and Angle's libGLESv2.lib and libEGL.lib, but when I 
generate the project Cmake returns an error, and Visual Studio don't compile.
I receive this errors:
'glDepthRangef': identifier not found
'GL_NUM_SHADER_BINARY_FORMATS': undeclared identifier
'GL_SHADER_BINARY_FORMATS': undeclared identifier
'glShaderBinary': identifier not found
'glClearDepthf': identifier not found

I've tried to search other guides to compile in OGL ES 2.0, but I wasn't so 
lucky so I decided to ask in the forum.

The final goal is to compile OSG with Angle to run it on Microsoft's HoloLens.

Thank you!

Cheers,
Andrea

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





___
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] mixing Direct3D and OSG...

2017-01-04 Thread Alistair Baxter
The only way you're going to be able to achieve this is if you build OSG using 
ANGLE in place of desktop OpenGL.

You have to configure your Windows osg project to use OpenGL-ES and to look in 
the specific place you have put the ANGLE headers and libraries. I posted a 
year or two ago about how I got it all going using the built version of ANGLE 
that ships with Qt. There are separate gitHub projects from Google and 
Microsoft with their own working versions of the project. Microsoft's one is 
focused on a version for Windows 10 store apps, and they have a few more bits 
of information about DirectX interoperability here:

https://github.com/Microsoft/angle/wiki/Interop-with-other-DirectX-code


-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Shayne Tueller
Sent: 28 December 2016 21:54
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] mixing Direct3D and OSG...

Hello,

I have a Direct3D app in where I need to render a background image using OSG. 
The approach I was thinking of using is to use off-screen memory or context to 
render the OSG imagery and then try to load the results into a Direct3D surface 
somehow. Perhaps a render-to-texture sort of approach?

Is something like this feasible? Is there a better approach to doing this?

In case someone asks, porting in either direction is not possible at this 
time...

Thank you!

Shayne

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





___
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] Detecting when a texture is to big for graphics memory

2016-12-01 Thread Alistair Baxter
It sounded like that proxy texture mechanism was exactly what I needed, but 
using it as described in the OpenGL red book just returned results that said it 
was OK, when it wasn't, which is most frustrating.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Detecting when a texture is to big for graphics memory

2016-11-30 Thread Alistair Baxter
In the particular test case I'm looking at, it's about 5 gigs of texture and 2 
gigs of video RAM. We have a manual mechanism for downsampling, but then we can 
end up in situations where a processed file that looks fine on a machine with 6 
or 8 gigs of video ram won't load on one with far less.

Obviously, this is an absurdly profligate use of video memory, but if you've 
got the data, you might as well use it.

What do you mean by "have a graphics operation/callback that forces a texture 
compile" ? Is that sort of thing covered in the osg examples?

-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Robert Osfield
Sent: 30 November 2016 15:12
To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
Subject: Re: [osg-users] Detecting when a texture is to big for graphics memory

Hi Alistair,

There isn't a mechanism built into the OSG to automatically provide a way of 
checking and then handling texture objects not being allocated due to out of 
memory issues, thankfully this isn't a common issue so doesn't trip up most 
users.  The best way to catch this case would probably be to have a graphics 
operation/callback that forces a texture compile for the textures in question 
and then immediately check the GL errors.

What size texture were you seeing issues with?  What is the GPU memory 
available?

Robert.

On 30 November 2016 at 14:42, Alistair Baxter <alist...@mve.com> wrote:
> Our application is using osgVolume to render 3D texture data that is 
> provided by users. This means the data can be very large, and can 
> exceed the amount of available graphics memory on some machines.
>
>
>
> I was looking for a way to detect whether a texture has failed to load 
> in this way, so that we can alert the user, or react to the problem in 
> some other way. But I’m having trouble finding anything in code that will 
> help.
>
> OpenSceneGraph responds with   “Warning: detected OpenGL error 'out of
> memory' at after RenderBin::draw(..)”   but I’m not seeing anything in the
> scene graph data that can indicate that the texture in question is at fault.
> The TextureObject representing the 3D texture, for example declares 
> that it is allocated, and reports the correct size and a positive id.
>
>
>
> Is there any way to tell whether a texture is too big for graphics 
> memory, other than by just knowing how much there is in total  (a 
> feature that only seems to work for me on NVidia hardware anyway) and 
> checking whether the known size of your texture will fit?
>
>
>
>
>
>
> ___
> 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
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Detecting when a texture is to big for graphics memory

2016-11-30 Thread Alistair Baxter
Our application is using osgVolume to render 3D texture data that is provided 
by users. This means the data can be very large, and can exceed the amount of 
available graphics memory on some machines.

I was looking for a way to detect whether a texture has failed to load in this 
way, so that we can alert the user, or react to the problem in some other way. 
But I'm having trouble finding anything in code that will help.
OpenSceneGraph responds with   "Warning: detected OpenGL error 'out of memory' 
at after RenderBin::draw(..)"   but I'm not seeing anything in the scene graph 
data that can indicate that the texture in question is at fault. The 
TextureObject representing the 3D texture, for example declares that it is 
allocated, and reports the correct size and a positive id.

Is there any way to tell whether a texture is too big for graphics memory, 
other than by just knowing how much there is in total  (a feature that only 
seems to work for me on NVidia hardware anyway) and checking whether the known 
size of your texture will fit?


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


[osg-users] OpenGL Support in Windows Remote Desktop Protocol

2016-09-28 Thread Alistair Baxter
I've just discovered that my Windows 10 (Version 1511, last year's November 
Update) desktop machine now supports OpenGL 4.5 over RDP!

Apparently this has been in the pipeline for some time, but the only official 
word about it has been this post on an MS sysadmin blog with regard to a 
preview version of Windows Server:

https://blogs.technet.microsoft.com/enterprisemobility/2016/01/11/remote-desktop-protocol-rdp-10-avch-264-improvements-in-windows-10-and-windows-server-2016-technical-preview/


But it's certainly working for me, using both the built-in Windows desktop RDP 
client, and the UWP store app. Anything that supports RemoteFX should work, I 
expect.

Perhaps somebody else ought to confirm that this isn't just me.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why isn't OpenSceneGraph used in games?

2016-04-22 Thread Alistair Baxter
I found the article I was referring to. It has disappeared from its original 
source, but thankfully the Internet Archive has preserved a copy.



It made considerable waves in game engine programming back in 2006:



Tom Forsyth's "Scene Graphs Just Say No"

https://web.archive.org/web/20060821003215/http://home.comcast.net/~tom_forsyth/blog.wiki.html





Which led to a significant discussion here:

http://www.gamedev.net/topic/464464-anti-scenegraphism-a-tale-of-tom-forsyths-scene-graphs-just-say-no/








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


Re: [osg-users] Why isn't OpenSceneGraph used in games?

2016-04-22 Thread Alistair Baxter
There’s a couple of major reasons OSG isn’t used in games much.



Probably the most important one is that it isn’t a complete game engine. 
Unreal, Cryengine, Unity (and also the likes of Gamemaker and Marmalade) all 
have favourable licensing conditions, and they can be used to start knocking 
out gameplay straight out of the gate. Potentially a lot of extra work would be 
needed to add the level of functionality needed for a 3D world action game 
which is available out of the box from the major engine manufacturers.



Secondly, it doesn’t come with game-specific tools, like an editor framework. 
And perhaps more importantly, core osg focuses on runtime importers rather than 
an offline asset conditioning pipeline from content creation packages, which is 
the favoured method of game asset production.



Thirdly, there has been some debate about the notion of using general-purpose 
scene graphs in game engines at all. Games tend to have controlled numbers of 
set types of object to render. You would need to set up a graph to reflect 
that, but if you’ve got the structure, why not apply your logic and render from 
that directly? Also, games will tend to use separate physics representations of 
geometry within a physics simulation that is used for raycasting and collition 
testing, rather than doing it with the graphics data, as osg provides. There 
was a high-profile article I read once entreating game developers to forsake 
unnecessary scene graphs, but I can’t seem to find it now for a citation.



And lastly, it is OpenGL-specific, and pluggable low-level rendering is common 
in major game engines. But in these days of OpenGL-ES ubiquity on mobile and 
tablets (and in Sony’s console ecosystem?), and Microsoft actively helping the 
ANGLE project and encouraging UWP developers to use it 
(https://github.com/MSOpenTech/angle/wiki ), that’s far less of a problem than 
it was 5 or 10 years ago.



But OSG is free, open source, portable and performant if you take the time to 
organise your graph efficiently.


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


Re: [osg-users] Mac OSX code signing and osgPlugins dir

2016-04-07 Thread Alistair Baxter
Initial experiments suggest renaming the original plugin dir and creating a 
symlink with the name with periods in may work.

From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Alistair Baxter
Sent: 07 April 2016 16:46
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Mac OSX code signing and osgPlugins dir

When building our application for mac, and trying to run the code signing tool, 
it is currently choking on the name of the plugin directory within the app 
bundle.

It would seem that it objects to the period characters (i.e. full stops)  in 
Contents/Plugins/osgPlugins-3.4.0 . If I change it to osgPlugins-340, it signs 
happily. I'm not sure why it's complaining now, since it was OK before. I think 
it may be because we have moved to OSX 10.9 as a minimum build environment, 
since signing appears to have changed a bit with that release, according to the 
Mac developer website.

Looking through the code, it seems like this directory name is hard-wired into 
quite a few places, so it would be a pain to unpick. Does anybody have 
experience of this issue or a suggestion of how to get past it?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Mac OSX code signing and osgPlugins dir

2016-04-07 Thread Alistair Baxter
When building our application for mac, and trying to run the code signing tool, 
it is currently choking on the name of the plugin directory within the app 
bundle.

It would seem that it objects to the period characters (i.e. full stops)  in 
Contents/Plugins/osgPlugins-3.4.0 . If I change it to osgPlugins-340, it signs 
happily. I'm not sure why it's complaining now, since it was OK before. I think 
it may be because we have moved to OSX 10.9 as a minimum build environment, 
since signing appears to have changed a bit with that release, according to the 
Mac developer website.

Looking through the code, it seems like this directory name is hard-wired into 
quite a few places, so it would be a pain to unpick. Does anybody have 
experience of this issue or a suggestion of how to get past it?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] working with transparent objects

2016-04-06 Thread Alistair Baxter
I think this is what you’re after:

https://github.com/XenonofArcticus/OSG-Transparency-Tool

I made a note of it at the time, but haven’t got round to investigating it yet.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to integrate osg with QT5.6 on VS2015

2016-04-05 Thread Alistair Baxter
Actually, you ought to be able to achieve the same effect (forcing desktop 
OpenGL) by calling the static method

QApplication::setAttribute(Qt::AA_UseDesktopOpenGL, true);

Before you create your QApplication instance.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG 3.4.0 Mac library problem

2015-09-22 Thread Alistair Baxter
I am having some trouble after rebuilding various thirdparty dependencies for 
our Mac product, including OpenSceneGraph. We are using Clang 6.1 and targeting 
OSX 10.9, although my Mac is running 10.10.

The application builds, but when it runs, I get a popup dialog with this 
message:

Dyld Error Message:
  Library not loaded: libosgUI.130.dylib
  Referenced from: 
/Users/Shared/MVE/Move2016_CLANG6.1_10.9/Release/lib/libosgPresentation.130.dylib
  Reason: image not found


I am not sure what it going wrong, because OpenSceneGraph appears to build and 
install to the directory in which libosgPresentation.130.dylib is located 
perfectly well. I notice that there is no path given for libosgUI.130.dylib , 
so that's a concern, especially since if I temporarily delete 
libosgPresentation.130.dylib, it does give me a full path for the missing file.

What also bothers me, is that our application is not even using osgPresentation 
or osgUI. I can find no reference to them in our entire project source. On 
Windows, we can simply delete those DLLs and it runs fine. I suppose this is 
something to do with CMAKE?

In any case, I am stumped as for how to proceed, so if anyone has any advice, 
that would be greatly appreciated.


Alistair Baxter
Software Engineer

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


Re: [osg-users] Qt5 integration

2015-08-17 Thread Alistair Baxter
As you are no doubt aware, James, we've been looking into this sort of 
integration ourselves. QQuick 2 integration is part of our goal, although we 
hadn't been planning direct interaction between QML and out osg scenes, since 
we have a separate data model. Although if such a thing existed, and were 
sufficiently convenient to use, then we might be interested in integrating it 
in a similar way to how we use the existing 3D osg manipulators. We've never 
really been interested in QWidgetImage, we only ever used it to try and get 
round a window composition issue on OSX.

Our main concern at the moment is that we need a multi-window viewer. Due to 
the way Qt 5 has a separate opengl render thread per Window, this has meant 
reimplementing a significant chunk of OSGCompositeViewer in order to get it to 
work at all, and we are discovering a variety of thread-synchronisation issues.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgviewerQt integration required

2015-06-12 Thread Alistair Baxter
Actually the default version Qt 5.4 dynamically selects what it thinks is the 
most appropriate version of OpenGL to use.

You can force it to use desktop OpenGL by calling 
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL) on your app instance 
before you call exec on it.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] Qt Form integration

2015-04-16 Thread Alistair Baxter
The bundled osgViewerQt example adds viewer widgets to a grid layout. All you 
need do is to change it to set up an equivalent to class ViewerWidget which 
loads a layout from a ui file, as per the examples here: 
http://doc.qt.io/qt-5/designer-using-a-ui-file.html

-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Christian Kunz
Sent: 15 April 2015 09:42
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [3rdparty] Qt Form integration

Hi Alistair,

thanks for your reply. Your solution seems way easier. Do you have an example 
how to do that?


... 


Thank you!

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


Re: [osg-users] Remote Deskstop Display issue

2015-03-04 Thread Alistair Baxter
Your remote display problem is a limitation of Windows Remote Desktop's OpenGL 
support. There are three potential solutions:

1) Only use OpenGL 1.1 features if you're using remote desktop - not very 
practical possibly not even possible with OpenSceneGraph.

2) Use ANGLE and OpenGL ES - Angle is a wrapper for Direct3D that exposes the 
OpenGL ES 2.0 and 3.0 API. Direct3D works across RDP, but only from windows 7 
SP1, or the equivalent server version via a technology called RemoteFX. This 
also will require rebuilding OpenSceneGraph, and writing your own replacement 
for GraphicsWindowWin32 using GraphicsWindoEmbedded and EGL (or QT 5). Also 
you'll be restricted to OpenGL Es's feature-set.

3) Use Mesa. If you can get builds of OPENGL32.DLL and GLU32.DLL for Mesa, you 
can just drop them into your executable directory, and your app will support 
desktop OpenGL 2.1 using software rendering. You'll need to remove those two 
dlls to return to using proper desktop OpenGL. Obviously that's awkward, and 
Mesa is slow and restricted in features compared to full, modern desktop OpenGL 
(although conveniently it's a similar feature set to compatibility mode on OSX).

Internally, we use option 2 and option 3 on different products.


Your only other alternative is to use a different remote desktop protocol 
product, like VNC or something commercial.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Remote Deskstop Display issue

2015-03-04 Thread Alistair Baxter
If you mean,  why does it work if the program is started before connecting, 
then it's to do with the way Windows controls access to its graphics hardware. 
Microsoft could probably have fixed it, but they have chosen not to, and so we 
have to live with working around it.

-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of clement@csiro.au
Sent: 04 March 2015 12:54
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Remote Deskstop Display issue

Hi Alistair,

   I forgot to ask a question.  Remote desktop works on the machine which has 
Nivida Quadro display card installed.  Do you know why it works probably?
   

Regards,
Clement





From: osg-users [osg-users-boun...@lists.openscenegraph.org] on behalf of 
Alistair Baxter [alist...@mve.com]
Sent: Wednesday, 4 March 2015 21:50
To: OpenSceneGraph Users
Subject: Re: [osg-users] Remote Deskstop Display issue

Your remote display problem is a limitation of Windows Remote Desktop's OpenGL 
support. There are three potential solutions:

1) Only use OpenGL 1.1 features if you're using remote desktop - not very 
practical possibly not even possible with OpenSceneGraph.

2) Use ANGLE and OpenGL ES - Angle is a wrapper for Direct3D that exposes the 
OpenGL ES 2.0 and 3.0 API. Direct3D works across RDP, but only from windows 7 
SP1, or the equivalent server version via a technology called RemoteFX. This 
also will require rebuilding OpenSceneGraph, and writing your own replacement 
for GraphicsWindowWin32 using GraphicsWindoEmbedded and EGL (or QT 5). Also 
you'll be restricted to OpenGL Es's feature-set.

3) Use Mesa. If you can get builds of OPENGL32.DLL and GLU32.DLL for Mesa, you 
can just drop them into your executable directory, and your app will support 
desktop OpenGL 2.1 using software rendering. You'll need to remove those two 
dlls to return to using proper desktop OpenGL. Obviously that's awkward, and 
Mesa is slow and restricted in features compared to full, modern desktop OpenGL 
(although conveniently it's a similar feature set to compatibility mode on OSX).

Internally, we use option 2 and option 3 on different products.


Your only other alternative is to use a different remote desktop protocol 
product, like VNC or something commercial.
___
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
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] Building OSG with OpenGL ES 2

2014-09-30 Thread Alistair Baxter
Did you do the following?

*   Edit the osg::getGLExtensionFuncPtr function to load libgles2d.dll for 
debug builds

I had that problem with Debug builds using gles2 on Windows, all of the opengl 
extension function pointers were set up wrongly because it was trying to read 
the release opengl dll. That was for ANGLE, it's possible that your DLL is 
named differently.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MSAA in GraphicsWindowEmbedded

2014-09-26 Thread Alistair Baxter
If you're using GraphicsWindowEmbedded,  you have to set up MSAA when creating 
the OpenGL Context that you are creating outside OSG.

-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Sandro Weber
Sent: 26 September 2014 16:48
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] MSAA in GraphicsWindowEmbedded

Hi everyone,

I am using OSG in combination with Equalizer. So I'm setting up my Viewers via 
Viewer::setUpViewerAsEmbeddedInWindow(). Now I want to use MSAA. Setting 
DisplaySettings for the Viewer doesn't do anything for me. So I looked at the 
GraphicsContext::Traits for the embedded window but these are only accessible 
as const. Is there a way to do this?

Thanks for your help.

Cheers,
Sandro

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





___
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] [build] Building OSG with OpenGL ES 2

2014-09-11 Thread Alistair Baxter
Are you using the PowerVR Insider SDK framework on your embedded Linux platform?

If so, then you can probably use the same code on both platforms to integrate a 
GraphicsWindowEmbedded with direct calls to update osg via the frame() function 
in the drawing callback their framework provides.  You might need to do a bit 
of manual render state resetting before and after to ensure that both systems 
work together properly.

If osg's existing Linux support, or some template you got from elsewhere is 
what you're using on Linux, then you might as well just use Desktop OpenGL on 
Windows, and either just try to avoid the Fixed-function pipeline and other 
stuff unavailable in OpenGL ES, or specifically  to strip them out using osg's 
CMAKE build options. 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] Building OSG with OpenGL ES 2

2014-09-10 Thread Alistair Baxter

From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Chris Hanson
Sent: 10 September 2014 06:22
To: OpenSceneGraph Users
Subject: Re: [osg-users] [build] Building OSG with OpenGL ES 2

You might consider not compiling the GraphicsWindowWin32 code and just using 
GraphicsWindowEmbedded and using EGL functions in your app's code to create a 
context, and then pass it to OSG.
​
I would concur with that. The relevant lines from my previous post about using 
ANGLE on Windows are probably:


· Remove GraphicsWindowWin32 and PixelBufferWin32 cpp files from the 
osgViewer project

· Edit the osg::getGLExtensionFuncPtr function to load libgles2d.dll 
for debug builds

But like Chris says, that will leave you without a native GraphicsWindow 
implementation, unless you’re planning to use GraphicsWindowEmbedded with an 
OpenGL context that you set up yourself.


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


Re: [osg-users] Texture modes in OpenGL ES 2.0 in OSG

2014-09-09 Thread Alistair Baxter
I found the solution in that case was to just use setTextureAttribute rather 
than setTextureAttributeAndModes in OpenGL ES 2 builds.



However, since glEnable(GL_TEXTURE_2D) is a mistake in GLES2, it would be 
better if osg didn’t ever try to do that for GLES2 contexts.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL NG: thoughts?

2014-08-13 Thread Alistair Baxter
I think a key issue with OpenGL 3 was that it implemented Cool New Stuff, but 
froze out people from integrating that with the code they'd already written. 
OpenGL NG seems to be about just more efficient access to and control of the 
same old stuff.

If there is any new stuff, then for a while, I expect they will continue to 
include it in minor revisions of OpenGL 4. Mirroring this policy in 
OpenSceneGraph and a new successor seems to be the sensible approach.


As regards the existing device/OS-specific APIs, I'd expect AMD to sideline 
their API in favour of both DirectX 12 and OpenGL NG, and Apple to take up NS 
as a standard alternative to Metal, too. Microsoft? I'm sure they'll keep on 
with DirectX, but they caved on WebGL in IE the end, so they might be persuaded 
to let OpenGL ES or NG on to their mobile/console/store platforms, especially 
if more people are going to just use ANGLE anyway.


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


Re: [osg-users] OpenSceneGraph using ANGLE on Windows

2014-07-14 Thread Alistair Baxter
 The perhaps the next step would be a GraphicsWindowANGLE implementation.

I'd suggest a GraphicsWindowEGL that might see reuse in Android native activity 
applications, as well as potentially other platforms like QNX would be useful. 
But that would still need an extra platform-specific layer to create likes of  
the native window to pass to eglCreateWindowSurface.


Alistair Baxter
Software Engineer

Have you upgraded  FieldMove Clino to  FieldMove Clino Pro? In-app purchase 
from these app stores:

[cid:image001.png@01CF9F71.ABFE6310]https://itunes.apple.com/us/app/fieldmove-clino/id647463813?mt=8
   [cid:image002.png@01CF9F71.ABFE6310] 
https://play.google.com/store/apps/details?id=com.mve.fieldmove.clino

Midland Valley Exploration Ltd.
2 West Regent Street
Glasgow G2 1RW
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenSceneGraph using ANGLE on Windows

2014-07-10 Thread Alistair Baxter
We have been developing a cross-platform tablet app using Qt Quick integrated 
with OpenSceneGraph in a similar way to that described here: 
http://qt-project.org/forums/viewthread/31277

Qt 5 is available set up to use both desktop OpenGL and Google's ANGLE wrapper 
for Direct3D ( https://code.google.com/p/angleproject/ ), so I was interested 
to see if I could make OSG, and osgEarth, work in this environment, since I had 
seen ANGLE mentioned several times on this mailing list, but no evidence of any 
development with it. Qt official advice recommends ANGLE for the following 
situations:

* You need OpenGL ES features, but not full OpenGL
* You have a heterogeneous user base with different Windows versions  
graphics cards
* You do not want your user to have to install a recent graphics card 
driver
* Your application needs to run over Windows Remote Desktop Protocol

And in addition, it forms a step towards getting OSG going on Windows RT 8.1 
and Windows Phone 8.1.


I am pleased to report that I have both packages working with ANGLE now to my 
satisfaction, and have had it running for a few weeks now, with shaders and 
other rendering code identical between desktop Windows, iOS and Android. I 
outline here the steps I had to take so that others may follow my example, or 
that the build system issues I faced might be sorted out.

I started my most recent build with the following:


* OSG developer release 3.3.2

* osgEarth trunk (08/07/2014)

* Visual Studio 2013 Pro update 2

* OSG prebuilt dependencies for VS2013

* Qt Enterprise 5.3.1 for VS2013 32-bit, without Desktop OpenGL (I see 
no reason why this shouldn't work as well with Qt Open Source)

* Sqlite and geos, built from source with VS2013 for osgEarth

The process I followed was as follows


* Using CMake Gui, Configure osg for OpenGL ES 2.0 (as per here 
http://trac.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES )

* Set the opengl library to be libgles2 (release) and libgles2d (debug)

* Set use Qt to OFF

* Create visual studio project

Then in Visual Studio


* Remove GraphicsWindowWin32 and PixelBufferWin32 cpp files from the 
osgViewer project

* Add to the Include Directories in the VC++ Directories section of all 
the project properties qtdir\ include\QtANGLE

* Add to the Libraries Directories qtdir\lib (group-selecting all the 
projects in Solution Explorer makes that easier)

* Edit the osg::getGLExtensionFuncPtr function to load libgles2d.dll 
for debug builds

* Build the solution

OsgEarth requires similar changes - set the name of the opengl es library 
appropriately in CMake, and add the include and library paths in Visual Studio.

It was then possible to integrate osg with QT Quick's ANGLE-based OpenGL ES 2.0 
contexts by overriding the background-drawing code of QQuickView using 
osgViewer::GraphicsWindowEmbedded.


The principal remaining issue is that neither the osgviewer executable nor any 
of the examples will run, since there is no code to set up windows for them - 
that would require integration of ANGLE's version of EGL in place of the 
deleted GraphicsWindowWin32 etc. Also, this build process is not compatible 
with osgQt, but it should be able to be made compatible, since the old 
QGLWidget code should still work via ANGLE if it is made to use OpenGL ES 2.0 
calls. I did not need any of that though, so I have not investigated further.

Hopefully this information will be useful for anyone else who wants to use 
ANGLE on Windows with OpenSceneGraph, and it would be great if somebody who is 
sufficiently expert with CMake could fix the setup issues so that there was 
less hacking of the generated Visual Studio projects required.


Alistair Baxter
Software Engineer

Have you upgraded  FieldMove Clino to  FieldMove Clino Pro? In-app purchase 
from these app stores:

[cid:image001.png@01CF9C3D.20554130]https://itunes.apple.com/us/app/fieldmove-clino/id647463813?mt=8
   [cid:image002.png@01CF9C3D.20554130] 
https://play.google.com/store/apps/details?id=com.mve.fieldmove.clino
Midland Valley Exploration Ltd.
2 West Regent Street
Glasgow G2 1RW
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts

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


Re: [osg-users] How to use gDEBugger for OSG performance analysis

2014-05-14 Thread Alistair Baxter
I can use GDEBugger with OpenSceneGraph perfectly well, despite using several 
dlls in my application.

The key thing seems to be that it needs access to debug symbols (i.e pdb files) 
for all of the code, or at least any of the code that is using OpenGL directly, 
which in our cases includes osg itself.

Alistair Baxter
Software Engineer

View our 2014 Public Training schedule online at http://www.mve.com/calendar

Midland Valley Exploration Ltd.
2 West Regent Street
Glasgow G2 1RW
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgviewerQt example - 3D disappears if Viewer height is zero

2014-04-15 Thread Alistair Baxter
Yeah, we had to override the Qt resizeEvent function for our osgQt::GLWidget 
subclass to ensure that neither width nor height were being set to zero before 
calling the parent's version.

Alistair Baxter
Software Engineer

Join us for the 2014 Houston Roadshow on 4th April
More details on our Calendar: http://www.mve.com/calendar

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] Bigger bounding box to make picking (intersection) easier?

2014-03-31 Thread Alistair Baxter
osg::Box is the thing you are after. Create a ShapeDrawable for one, and add it 
to a group that is part of, or that contains your cow model.

Then set node flags or a cull callback to make the ShapeDrawable invisible, and 
if you like, you could also set flags on the intersection visitor to only 
attempt to make intersections with your new collision boxes.





Alistair Baxter
Software Engineer

Join us for the 2014 Houston Roadshow on 4th April
More details on our Calendar: http://www.mve.com/calendar

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] No intersection on some osg models

2014-03-26 Thread Alistair Baxter
There are some collision issues with LineSegmentIntersector in OSG 3.2.0 and 
before. The trunk version of LineSegmentIntersector.cpp contains the fix, and 
3.2.1, 3.3.0 and 3.3.1 releases ought to have the fix in.

Alistair Baxter
Software Engineer

We'll be exhibiting at PDAC 2014 from booth #1607, 2nd - 5th March 2014.
For further information please visit http://www.mve.com/calendar

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Petr Svoboda
Sent: 25 March 2014 20:26
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] No intersection on some osg models

Hi,

I have a very weird problem.
I downloaded some models from Sketchup warehouse, exported as OBJ format and 
then converted using osgconv to OSG format.

Now, when I use osgUtil::LineSegmentIntersector then on some models there is 
an intersection detected on others there is not. Why is that?
Is there a need of creating some bounding boxes or something like that? Or some 
osgconv bug? Model bug?

Thank you!

Cheers,
Petr

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





___
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] OpenGL 3.x and OSG

2014-03-20 Thread Alistair Baxter
If you're only running on Windows, you'd be just as well not trying to build an 
OpenGL 3 core profile version of OSG, since by default it will use the most 
up-to-date version of OpenGL your card supports (probably 4.something), with 
the compatibility profile.

That way you can get all of the new functionality, and all of the old 
functionality too.

OpenGL's deprecation is only really enforced on OSX, so unless you are doing a 
mac port, it's probably easier to ignore it.

Alistair Baxter
Software Engineer

We'll be exhibiting at PDAC 2014 from booth #1607, 2nd - 5th March 2014.
For further information please visit http://www.mve.com/calendar

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] vertex attribute divisor support

2014-03-12 Thread Alistair Baxter
Hi James,

As far as I have seen, GL_ARB_texture_float is about as well-supported as 
GL_ARB_draw_instanced. The only exception I've been able to find on test 
hardware has been software Mesa, which supports neither.

We make use of multiple floating point textures for encoding per-instance data. 
One problem is that those textures require normalised values, so you have to 
supply your own ranges as uniforms for multiplying them back out in the shaders.

To be honest, it's far more of a faff than examples I've seen (ahem) using 
glVertexAttribDivisor, and I'd far rather use that mechanism if it were 
supported conveniently inside OpenSceneGraph.



Alistair Baxter
Software Engineer

We'll be exhibiting at PDAC 2014 from booth #1607, 2nd - 5th March 2014.
For further information please visit http://www.mve.com/calendar

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Help migrating away from BIND_PER_PRIMITIVE

2014-01-13 Thread Alistair Baxter
-Original Message-
From: Ethan Fahy
Sent: 13 January 2014 14:13

The only solution I can think of is to split the single building geometry up so 
that each primitive in the building is its own geometry so that there are no 
shared vertices within the geometries and I can color each vertex by the color 
of the primitive.



The better solution is to traverse all of the faces in your previous data and 
generate new a new array of vertices, adding each vertex as it occurs in each 
face. This will mean that each shared vertex is duplicated. Then (or at the 
same time in your loop) you need to create a colour array with one copy of the 
appropriate face colour for each of your vertices.

This is better because it is more efficient to render primitives in larger 
batches.



Alistair Baxter
Software Engineer

Have you downloaded your FREE copy of FieldMove Clino? 
Find out more about our app for iPhone and Android smartphones:  
http://news.mve.com/fieldmoveclino
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] rendering millions of spheres

2013-12-02 Thread Alistair Baxter
In order to render a large amount of identical primitives, you probably want to 
use either instancing or geometry shaders. If your target hardware supports 
OpenGl 3.x features, then the latter is better. You can use arrays of 
per-vertex data to specify the differences between your spheres (radius, colour 
etc), create your osg::geometry as a list of points and have your geometry 
shader expand that into spheres.

For the spheres themselves, it's far quicker to create them as camera-facing 
impostors, and have your fragment shader just draw spheres for each of them 
(various examples are available on the web), which can be lit as needs be. The 
trouble is that they will be flat, which might not be ideal if many of your 
spheres intersect. You could at least save some triangles by generating 
camera-facing hemispheres. I'm not sure what the effect would be if you changed 
the z-values in the fragment shader, but I am advised that's not a good idea, 
because it means z-buffer-testing can't be done before your fragment shader is 
run.

If you're stuck with older or mobile hardware, then (extensions permitting) you 
can use shader instancing to do the same thing. Create a single sphere (or 
hemisphere or quad, for an impostor) , put your per-instance data into a 
texture, and sample that texture in your vertex shader (ensure you set your 
texture filtering modes appropriately).  There is an example osgdrawinstanced 
supplied with the OpenSceneGraph distribution that shows you basically how that 
is done.

If you don't have the instancing extension available (MESA software rendering, 
some older mobile OpenGLES 2 chipsets, VERY old desktop hardware) you need to 
just make sure you render them in large batches of vertices, which means making 
1, or only a few Geometries containing multiple spheres (or quads if you can 
still use a vertex shader to orient them).

Quite a lot of ideas there for things to try, I think, apologies if any of that 
is a bit confusing.


Alistair Baxter
Software Engineer

Have you downloaded your FREE copy of FieldMove Clino?
Find out more about our app for iPhone and Android smartphones:  
http://news.mve.com/fieldmoveclino
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Trajce Nikolov 
NICK
Sent: 02 December 2013 13:50
To: OpenSceneGraph Users
Subject: [osg-users] rendering millions of spheres

Hi Community,

I remember someone has faced this problem and I think with some solution. 
Anyone knowing some pointers willing to share some hints, techniques?

Thanks a bunch

Nick

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


Re: [osg-users] Optimizing memory usage by Texture of size 4096x2048

2013-11-19 Thread Alistair Baxter
PVRTC is exclusive to Imagination technology's PowerVR chipsets. All iDevices 
use those chipsets, so it's in common use on iOS, but only certain Android 
devices with the right type of GPU support it.

I don't believe there are any desktop or laptop graphics cards that support it 
directly, but there's a library available to decompress them.

Alistair Baxter
Software Engineer

Have you downloaded your FREE copy of FieldMove Clino?
Find out more about our app for iPhone and Android smartphones:  
http://news.mve.com/fieldmoveclino
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron
Sent: 19 November 2013 15:32
To: OpenSceneGraph Users
Subject: Re: [osg-users] Optimizing memory usage by Texture of size 4096x2048

It stays compressed in memory (CPU and GPU), so you get 4:1 compression in the 
app, not just on disk.

No experience with PVR; is it Apple only?


Glenn Waldron / @glennwaldron

On Tue, Nov 19, 2013 at 10:25 AM, John Moore 
kahar...@gmail.commailto:kahar...@gmail.com wrote:
I am not very concerned about disk usage. I am more concerned about RAM. Will 
be there any advantages using this kind of compression? If yes how can I 
compress and then load the data in a osg::Image?

I am asking because I tried to do the compression with PVR (using 
PVRTexToolGUI) but I was not able to load it in a osg::Image.

Thank you.

John


gwaldron wrote:
 Your only further recourse would be to take Luc's advice and DXT-compress the 
 data on disk (using NVTT e.g.); that will give you 4:1 savings.

 Ref:
 http://en.wikipedia.org/wiki/S3_Texture_Compression#S3TC_Format_Comparison 
 (http://en.wikipedia.org/wiki/S3_Texture_Compression#S3TC_Format_Comparison)



 Glenn Waldron / @glennwaldron


 On Tue, Nov 19, 2013 at 9:51 AM, John Moore  () wrote:

   Memory usage is for the entire app.
  However memory usage of the same scene if I don't load the texture is 20 
  MB. So I can safely assume the rest is consumed by the fact the textures 
  are applied to the sphere.
 
 
  gwaldron wrote:
 
   110MB -- CPU or GPU memory? For the entire app or just your textures?
  
   Quick math:
   2 * 4096 * 2048 * 4 * 1.3 = 87MB.
   (4 = RGBA, 1.3 = mipmaps)
  
  
  
  
  
   Glenn Waldron / @glennwaldron
  
  
  
 
 
   On Tue, Nov 19, 2013 at 9:18 AM, John Moore  () wrote:
  
  
 Thank you Gwaldron,
that line of code saved me 40MB. Better than nothing. Now the memory 
usage is around 110 MB.
   
The format of the image is JPG.
I tried to use PVR but I can't load the image.
   
This is the complete function (updated with your suggestion) that I use 
to create a sphere with 2 textures.
Then I use a shader to cross fade between the two textures that's 
why I need to have both of them in memory.
   
   
Code:
   
- (osg::ref_ptrosg::Geode)createSphereWithTodayImage:(NSString 
*)todayTextName pastImage:(NSString *)pastTextName andRay:(CGFloat)ray
{
osg::ref_ptrosg::Geode sphere = new osg::Geode();
sphere-addDrawable(new osg::ShapeDrawable(new 
osg::Sphere(osg::Vec3(), ray)));
sphere-setName(BubbleNode);
   
// load image for texture
osg::ref_ptrosg::Image todayImage = 
osgDB::readImageFile(todayTextName.UTF8String);
osg::ref_ptrosg::Image pastImage = 
osgDB::readImageFile(pastTextName.UTF8String);
   
if (!todayImage || !pastImage)
{
std::cout  Couldn't load texture.  std::endl;
}
else
{
   
  
 
 
  
osg::ref_ptrosg::Texture2D texture = new osg::Texture2D;
texture-setDataVariance(osg::Object::STATIC);
   
   
  
 
 
  
texture-setFilter(osg::Texture::MIN_FILTER, 
osg::Texture::LINEAR);
texture-setFilter(osg::Texture::MAG_FILTER, 
osg::Texture::LINEAR);
texture-setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP);
texture-setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP);
   
   
  
 
 
  
texture-setImage(todayImage.release());
texture-setUnRefImageDataAfterApply(true);

sphere-getOrCreateStateSet()-setTextureAttributeAndModes(0,texture.get());
   
osg::ref_ptrosg::Texture2D texture2 = new osg::Texture2D;
texture2-setDataVariance(osg::Object::STATIC);
   
   
  
 
 
  
texture2-setFilter(osg::Texture::MIN_FILTER, 
osg::Texture::LINEAR);
texture2-setFilter(osg::Texture::MAG_FILTER, 
osg::Texture::LINEAR);
texture2-setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP);
texture2-setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP);
   
   
  
 
 
  
texture2-setImage(pastImage.release

Re: [osg-users] Optimizing memory usage by Texture of size 4096x2048

2013-11-19 Thread Alistair Baxter
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of John Moore

 I think I found the osg plugin to decompress PVR but I don't know how to use 
 it.

 Do you have any idea?

OK, a brief look at the definitions of the PVRTC OpenGL extension and the osg 
code suggests that osg::Texture knows about the following compressed texture 
formats:

GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG


You ought to be able to specify those as the Internalformat for your texture 
objects somehow. Actually by calling osg::Texture:: 
setInternalFormatMode(osg::Texture::USE_PVRTC_2BPP_COMPRESSION) or 
USE_PVRTC_4BPP_COMPRESSION.

I'm not sure if osg or the drivers will do the compression for you (S3TC 
compression works like that on Windows, Linux and OSX), or whether you have to 
pass in the data you compressed with the tool.

This Apple sample code:
https://developer.apple.com/LIBRARY/IOS/samplecode/PVRTextureLoader/Introduction/Intro.html

should show you the raw OpenGL way of dealing with compressed textures. 
Alternatively the PowerVR Insider SDK should have more samples, covering other 
platforms if need be:

http://www.imgtec.com/powervr/insider/sdkdownloads/index.asp





Alistair Baxter
Software Engineer

Have you downloaded your FREE copy of FieldMove Clino? 
Find out more about our app for iPhone and Android smartphones:  
http://news.mve.com/fieldmoveclino
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] When is the DatabasePager created and destroyed?

2013-09-13 Thread Alistair Baxter
I've only just got round to reading this, but for the sake of clarification, I 
think I know what your problem was.

OSG will run perfectly happily at the start with a CompositeViewer but no 
views. But after some are created, as soon as they are all destroyed, the 
CompositeViewer decides that it's finished with and enters a kind of 'living 
death' state, where it won't try to render anything anymore - in code terms 
ViewerBase::_done is set.

The only thing you can do at this point is destroy the CompositeViewer and make 
a new one when you want a new scene. Our application has multiple types of view 
windows, not all using OpenSceneGraph, so that is a problem we have had to face.

I'd really rather not have to do this, so it would be nice if CompositeViewer 
was changed, even optionally, to be allowed to exist with no views in it.  
Perhaps is a view is added to a compositeViewer that is _done, the value 
could be set back to false?



Alistair Baxter
Software Engineer

Our September newsletter is now available to view online:  
http://www.mve.com/news
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG errors when running on a virtual machine

2013-09-06 Thread Alistair Baxter
Mesa works for us on Windows, just by dropping the GLU32.dll and OPENGL32.DLL 
into the directory with your executable. We use it to support OpenSceneGraph 
rendering via Remote Desktop Protocol.

It's quite good in that it supports OpenGL version 2.1 and GLSL 1.2, but it's 
not very fast, it's effectively just for last-resort compatibility rather than 
any sort of decent performance unless your scenes are very simple.

The biggest problem with Mesa for Windows is getting it. The build instructions 
are a bit complex, we got prebuilt DLLs from someone on this list, but looking 
back through the mail archive the dropbox download links are no longer working.

Alistair Baxter
Software Engineer

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of AJ Kruze
Sent: 06 September 2013 08:28
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG errors when running on a virtual machine

Thanks to everyone for the input.  So this seems like a dead end for now!
But two things I can try: MESA as Aurelien suggests, and some other VM which 
may support the necessary OpenGL functionality.
I'm posting here once more my system setup, just in case.

-
Host: Ubuntu 12.04.2
Guest: Windows 8

OSG 3.0.1
osgSWIG cloned from the repository

VirtualBox 4.2.16, Guest Additions installed
VirtualBox settings:
3D and 2D acceleration enabled
256MB video memory (the maximum allowed)
-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB broken with OSG 3.2

2013-08-21 Thread Alistair Baxter
We've been having some issues with the latest GDAL, version 1.10. If you've 
updated that as well, it might be the cause of the problem.

Alistair Baxter
Software Engineer


Our next public training event is in Houston, USA on 20th - 22nd August 2013

For further information please visit www.mve.com/calendar
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: 20 August 2013 19:17
To: OpenSceneGraph Users
Subject: Re: [osg-users] VPB broken with OSG 3.2

Hi Massimo,

I can't think of any changes between 3.1.7 and 3.2.0 that are likely to cause a 
problem.  Could you post the a.tif file so I can test against it.

Thanks,
Robert.

On 20 August 2013 16:23, Massimo Tarantini 
subbi...@yahoo.itmailto:subbi...@yahoo.it wrote:
Hello,
it seems vpb is broken with OSG 3.2
(it work with OSG 3.1.7)

This is the simple command:

Code:
osgdem -t a.tif  -l 3 -o furlo.osgt



the image a.tif is
[Image: http://img16.imageshack.us/img16/6614/nbon.jpg ]

The result in osgviewer is
[Image: http://img96.imageshack.us/img96/7932/5dl7.jpg ]


Massimo

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





___
osg-users mailing list
osg-users@lists.openscenegraph.orgmailto: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] Make object totally transparent, but not hide :D

2013-08-20 Thread Alistair Baxter
I've been doing that by adding a cull callback to the node I want invisible 
like so:

Struct AlwaysCullDrawable : public osg::Drawable::CullCallback
{
/** do customized cull code.*/
virtual bool cull(osg::NodeVisitor*, osg::Drawable* drawable, 
osg::State* /*state*/) const
{
return true;
}
};


collisionGeode-setCullCallback(new AlwaysCullDrawable());



Alistair Baxter
Software Engineer


Our next public training event is in Houston, USA on 20th - 22nd August 2013 

For further information please visit www.mve.com/calendar
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Dario Minieri
Sent: 20 August 2013 14:36
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Make object totally transparent, but not hide :D

Hi,

Sorry for noob question, but I need to make an object totally transparent (as 
invisible) but I have to maintain your presence in the world (the object 
can't be masked). This means that the object isn't visible but all collisions 
and others interactions in the world have to work.

I can make the transparency using code like this, but the object isn't never 
really invisible:


Code:

osg::Material* l_material = 
(osg::Material*)p_Object-getStateSet()getAttribute(osg::StateAttribute::MATERIAL);
l_material-setTransparency(p_face_mode, 1-p_transparency); 
p_Object-getOrCreateStateSet()-setMode(GL_BLEND, osg::StateAttribute::ON); 
p_Object-getOrCreateStateSet()-setAttributeAndModes(l_material, 
osg::StateAttribute::OVERRIDE);




Where p_face_mode is FRONT_AND_BACK for example.

Thank you!

Cheers,
Dario
Code:




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





___
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] LineSegmentIntersector numerical imprecisions

2013-08-19 Thread Alistair Baxter
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of PCJohn
Sent: 19 August 2013 07:38
To: OpenSceneGraph Users
Subject: [osg-users] LineSegmentIntersector numerical imprecisions

 The correct solution in my opinion would be to make epsilon depend on size of 
 bounding box of the intersected object:

I'd support that strategy. The recent change doesn't really fix the problem 
that we had to locally alter the source to fix.



Alistair Baxter
Software Engineer


Our next public training event is in Houston, USA on 20th - 22nd August 2013 

For further information please visit www.mve.com/calendar
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] Error occus when set up 3D Quad stereo

2013-08-01 Thread Alistair Baxter
 We currently have:
 Graphic card type: NVIDIA GeForce 9300GE Monitor/TV(Panasonic TC-P50UT50): 
 Screen refresh rate 60Hz, colors: 32bit, resolution: 1920*1080 (3D TV)
 Glasses: Panasonic 3D FULL HD (TY-ER3D4MU)  wireless

Have you got NVIDIA 3DTV Play installed? I think you need to buy that off 
NVidia if you want to use quad-buffer stereo with a standard 3DTV.

http://www.nvidia.com/object/3dtv-play-overview.html

Either that or Tridef 3D:

http://www.tridef.com/



Alistair Baxter
Software Engineer


Midland Valley's next public training events are:
13th - 15th August 2013 in Glasgow, UK
20th - 22nd August 2013 in Houston, USA

For further information please visit www.mve.com
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] [osgPlugins] osgQt 2 Widget, 2 Viewer - freeze

2013-08-01 Thread Alistair Baxter
 I have a problem with osg and Qt
 I have 1 main window with 1 viewer that run normally And I have 1 button that 
 open another 
 Widget with another osgViewer but there I have to wait 30 or 40 s before move 
 camera

We found that we had difficulties using multiple viewer instances in our Qt 
application, I'm not sure whether that is even supposed to be supported by osg.

In any case, we now use one compositeviewer with multiple views in different 
QGLWidgets, as per the osgViewerQt example.


Alistair Baxter
Software Engineer


Midland Valley's next public training events are:
13th - 15th August 2013 in Glasgow, UK
20th - 22nd August 2013 in Houston, USA

For further information please visit www.mve.com
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] OpenGL 4 support

2013-08-01 Thread Alistair Baxter
 Am i missing something here or is it a real pain to get GL3+ working with 
 OSG? 
 How does OSG support OpenGL 4.2 (as mentioned on the website) if it 
 isn't in sync with the glcorearb.h file and is still looking for gl3.h?


In order to build osg for Windows with OpenGL 3.x features, I needed to make 
the following change on Windows

In include/osg/GL

I replaced

#include GL3/gl3.h

with

#define GL_GLEXT_PROTOTYPES 1
#include GL/glcorearb.h
#include GL/glext.h
#define __gl_h_


And, obviously, I also needed to put the khronos.org headers where the osg 
build process could find them.


I should probably see about making those changes made to the trunk, since you 
can no longer get gl3.h from the official website.


Alistair Baxter
Software Engineer


Midland Valley's next public training events are:
13th - 15th August 2013 in Glasgow, UK
20th - 22nd August 2013 in Houston, USA

For further information please visit www.mve.com
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] How to build OpenSceneGraph for Android in Windows

2013-04-04 Thread Alistair Baxter
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Shayne Tueller
Sent: 03 April 2013 16:30
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] How to build OpenSceneGraph for Android in Windows

 I guess if one presents information or a tutorial for building OSG on Android 
 for Windows, 
 it should be complete, accurate, and thorough. It appears that vital 
 information or detail is
 missing in the tutorial regarding the role of the Android NDK or getting it 
 set up in building 
 the OSG in this context.

The original post on this thread was an info-dump of some of our own internal 
documentation which was constructed because we couldn't set up and build osg on 
Android for Windows by ourselves given the information available in the various 
wiki pages and forum threads without recourse to information from elsewhere. 
More information about successful methods people have used for anything in IT 
is always useful, even if your mileage may vary. Midland Valley is an 
independent software company, and we do not take responsibility for the (woeful 
lack of) official documentation on OSG, we were merely trying to help.

In any case, the piece of information I gave you was covered by Nathan's 
disclaimer

This guide assumes you have Eclipse, the Android SDK and NDK installed and set 
up already.

At the beginning of the tutorial. Being able to build the existing NDK examples 
via your chosen build method is a sensible prerequisite before you try to work 
with an incompletely ported thirdparty library like OSG.

Alistair Baxter
Software Engineer

Visit our team on booth 1710 at the AAPG ACE, Pittsburgh, 19th - 22nd May 2013. 

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 


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


Re: [osg-users] How to build OpenSceneGraph for Android in Windows

2013-04-03 Thread Alistair Baxter
You do not need Cygwin installed or active to build NDK code for Android any 
more - it was a prerequisite for old NDKs, and it is still needed if you want 
to use Google's Eclipse plug in for C/C++ code debugging, though.

From our internal documentation page where Nathan assembled the instructions 
(he's on holiday right now), the extra bit that you need is probably this:

Install Android NDK
Available here:
http://developer.android.com/tools/sdk/ndk/index.html

Extract it to a location with no spaces in the path, such as 
C:\Local\android-ndk-[ver]

Add to your system environment variables:
ANDROID_HOME[Android-NDK-Install-Dir]
ANDROID_NDK_ROOT[Android-NDK-Install-Dir]

Add to your existing PATH: 

[Android-SDK-Install-Dir]\tools;[Android-SDK-Install-Dir]\platform-tools;[Android-NDK-Install-Dir].


Alistair Baxter
Software Engineer

Visit our team on booth 1710 at the AAPG ACE, Pittsburgh, 19th - 22nd May 2013. 

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Shayne Tueller
Sent: 02 April 2013 14:47
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] How to build OpenSceneGraph for Android in Windows

Hi,

I went through this tutorial and got stuck when invoking the make command to 
build OSG. It errors out with the message 

ANDROID_NDK-NOTFOUND\ndk-build ...

I'm supposing that there was a step omitted in the tutorial that tells the 
cmake configure utility on where to find the android ndk (i.e. defining the 
path to find ndk-build).

Is this correct or am I missing something? I would like to try and get this to 
work.

Thanks for any help in advance...

Shayne

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





___
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


[osg-users] GL_RENDERER string

2013-01-15 Thread Alistair Baxter
I'm wanting to get the GL_RENDERER string out of my OpenSceneGraph / Qt 
application for debug purposes, and potentially for showing to users for 
technical support purposes.

I can get the likes of GL and GLSL version from the osg::GL2Extensions object, 
and I can see the renderer string being queries in the source code, but I'm 
having difficulty figuring out how to get it out.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GL_RENDERER string

2013-01-15 Thread Alistair Baxter
My solution thus far has been to call glGetString in the same function after my 
call to osg::GL2Extensions::Get, since the OpenGL context appears to be valid 
at that time - indeed the glGetString call is made internally by the 
GLExtensions stuff at that time.

It just seems like the renderer string should be exposed by the extensions 
object and it's not.

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Gianluca Natale
Sent: 15 January 2013 10:54
To: OpenSceneGraph Users
Subject: [osg-users] R: GL_RENDERER string

Out of OSG/Qt, I think you should:

1)  Create a very simple rendering context (associated to the window 
created by your application);

2)  Make that rendering context as the current one;

3)  Call glGetString(GL_RENDERER, ...);

Steps 1 and 2 are required, since all gl calls need a current rendering context 
to work with.
About steps 1 and 2, you should look at how OSG create the rendering context.

Da: 
osg-users-boun...@lists.openscenegraph.orgmailto:osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] Per conto di Alistair 
Baxter
Inviato: martedì 15 gennaio 2013 10:47
A: osg-users@lists.openscenegraph.orgmailto:osg-users@lists.openscenegraph.org
Oggetto: [osg-users] GL_RENDERER string

I'm wanting to get the GL_RENDERER string out of my OpenSceneGraph / Qt 
application for debug purposes, and potentially for showing to users for 
technical support purposes.

I can get the likes of GL and GLSL version from the osg::GL2Extensions object, 
and I can see the renderer string being queries in the source code, but I'm 
having difficulty figuring out how to get it out.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to turn on the quad buffered feature.

2012-11-05 Thread Alistair Baxter
You need to ensure your OpenGL context is created with Quad-buffers enabled - 
the DisplaySettings call just turns on their use if they're there, it doesn't 
create them.  You'll need to set the quadBufferStereo flag in the 
GraphicsContext traits before you create it, or if you're using Qt as I am, 
call setStereo(true) on the QGLFormat object passed to the GLWidget constructor.
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of wh_xiexing
Sent: 05 November 2012 06:50
To: osg-users
Subject: [osg-users] how to turn on the quad buffered feature.

i want to use the stereo feature of osg.

osg::DisplaySettings::instance()-setStereoMode(mode);
osg::DisplaySettings::instance()-setEyeSeparation(0.01*value);

where mode is osg::DisplaySettings::QUAD_BUFFER .  but it doesn't work.

my graphic card is the most recent  quadro k4000M.  do i need to set something 
in the nvidia panel ?

thank you very much

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


Re: [osg-users] OSG + QT and QTabWidget: Disappearing scene graph

2012-09-07 Thread Alistair Baxter
-Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Lucas SART
 Sent: 07 September 2012 11:08
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] OSG + QT and QTabWidget: Disappearing scene graph

Hi, 

 I had looking for why it doesn't work. It seems that the first tab camera 
 projection 
 matrix and view matrix are not valid (components = -1.#IND) and I 
 don't know why. I tryed to look into OSG code but I don't found what is 
 wrong... 
 If someone have an idea it would be great !

Oddly, I think I just encountered this problem yesterday.

If the QT widget ever gets resized to zero (as can happen sometimes during 
setup and intermediate layout stages), and osgQt::GLWidget::resizeEvent is 
called with width and height equal to zero, the camera projection matrix gets 
screwed up due to divide-by-zeroes, and never recovers because resizing always 
takes into account the existing camera matrix.

I solved the problem by preventing osgQt::GLWidget::resizeEvent being called by 
my GLWidget subclass if either dimension was zero. But I suppose it would 
probably be better if a fix was made inside the osgQt library.

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


Re: [osg-users] Trying to make Qt HUD inside OSG scene

2012-08-24 Thread Alistair Baxter
I had a certain amount of bother messing about with this code last week. In the 
end, I found out that the OpenSceneGraph Cookbook example set up its 
InteractiveImageHandler for a 2D overlaid widget with just

new osgViewer::InteractiveImageHandler(widgetImage.get());

rather than

new osgViewer::InteractiveImageHandler(widgetImage.get(), texture, camera);

as the bundled OSG example does. The latter was automatically resizing stuff 
and causing all manner of trouble.

-Original Message-
From: Robert Osfield
Hi Max,

Just place the OSG/Qt widget subgraph below an orthographic Camera to create 
the HUD effect you are after.  See the osghud example.

Robert.

On 16 August 2012 09:26, Max Sergeev sergeev.m...@gmail.com wrote:
 Hello!

 I'm kind of newbie in both OSG and Qt, still I'm trying to make Qt HUD upon 
 my OSG window, what I want is Qt interface elements fixed inside OSG scene, 
 not spinning with the model. The thing is, I need Qt elements INSIDE osg 
 scene, not OSG scene inside Qt window (like in OSGviewerQt example).

 What I've got yet is OSGQtWidgets example with --useWidgetImage --fullscreen 
 arguments, which shows fixed Qt controls ontop of OSG Model. The thing is, it 
 creates new (FIXED) camera for qt element ontop of OSG model -- because of 
 that, user cannot spin and move OSG model because camera is not transparent.

 So the question is: is there a way to make transparent camera with useable Qt 
 elements in it? Or is there some other way to achieve my goals?

 Thank you in advance!

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