Re: [osg-users] Fullscreen dual monitor spanning

2011-01-10 Thread Christina Werner
Okay, I got it to view my windows over 2 fullscreen monitors.
I dont know why it works only sometimes, but it works.

But How to set the point of view more left/right on one screen?

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2011-01-10 Thread David Glenn

Chriss10 wrote:
 Okay, I got it to view my windows over 2 fullscreen monitors.
 I dont know why it works only sometimes, but it works.
 
 But How to set the point of view more left/right on one screen?


are you taking about a stereo view?


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2011-01-10 Thread Jean-Sébastien Guay

Hi Christina,


But How to set the point of view more left/right on one screen?


You mean so that you see a different part of the scene on the second 
screen than on the first? For example, if you want the two screens to 
look as if they were one single screen?


To do that you add an offset to the projection matrix. Have a look at 
the osgViewer::View::setUpViewAcrossAllScreens() method in the OSG 
source code, I think it does what you want already and if you want to do 
it yourself then it will show you how to do it.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-23 Thread Christina Werner
I'm a beginner with OSG.
Can you please give me some code snippets?
Thanks

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-23 Thread David Glenn

Chriss10 wrote:
 I'm a beginner with OSG.
 Can you please give me some code snippets?
 Thanks


Well I'm sorta on my Christmas vacation right now! I would have to reproduce it 
on my home system, but mostly it is barrowed code from the slave cameras that 
are used in the hang glider simulator that is part of the examples that 
included in OSG. 

There is a part that sets up the screen called Traits where you can set up the 
what real estate on the screen you’re going to take up that I barrowed and 
added the setting overrideRedirect = true; Below that was where 4 cameras are 
defined. I needed only one to start and basically I set up the area and 
position of the camera on the screen – in this case start at 0 0 and set the 
width to the total of the two screens I had 3200 and the height 1200. Then 
attach the camera to the viewer by declaring it as a slave camera - the example 
is also there in the hang glider simulator code. And before you start your 
viwer.run() loop, you invoke the viewer function  setUpViewAcrossAllScreens() 
and your set. 

Youl find that the best way to understand OSG is to run and view the source 
code for the examples. Even in the class I took on the subject they pay 
emphases of that. If you had the chance to look at my code you would see allot 
of rip-offs of the example code in it.  

D Glenn


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-21 Thread Christina Werner
Does it work for anyone?

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-21 Thread David Glenn
Well I was using Linux Red Hat Enterprise 5.0. I have yet to test this in 
windows. 

What it boiled down to is that I had to set up my own camera handling thing 
down to the Traits (including setting overrideRedirect to true) I set the X and 
Y to 0 and the width to the combined with if the two screens and the screen 
height. Then I set up and defined my own slave camera.  

One slave camera for testing the whole screen area, and later 2 slave cameras - 
one for each screen for stereo vision.  

In each case you set up the width and height for the affected screen area in 
Traits and  the camera view for what area is going to be used for the camera or 
to assign areas that the cameras are using (if your dining with more than one 
camera). 

One last thing is before you put the viewer in the loop, you have to call 
setUpViewAcrossAllScreens function from the viewer and them you should be 
called. 

I had to use Slave Cameras in place of just assigning a normal camera to the 
viewer - I haven't figured out why the later doesn’t work! 

For an example to fallow in code, I used the hand glider simulation code to 
figure out how to set up the cameras.

--
D Glenn


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-20 Thread David Glenn

robertosfield wrote:
 This sounds like the X11 redirect to the X11 window manager that is
 deciding for you that the window is too big and knows better.  The
 Traits::overrideRedirect as I mentioned earlier in this thread is what
 should address this.
 
 Robert.
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


Greetings Robert!

Actually what was going on is that I was not using the Traits correctly. Once I 
was able to figure that out I hard coded the size to what I knew what the 
screen was and was able to take over both screens with one slave camera. 

Then I added another slave camera and set one for one screen and the other 
camera for the other screen. Then reposition the cameras at the right eye 
distance and proper rotation from each other so it can appear as a natural 
stereo vision. 

Then, all I needed to was run the correct screen to the right polarized 
projector, fine adjust the eye distance and stuff and I got the Cessna aircraft 
appearing in a real time Real3D pesentation.
 
D Glenn


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-19 Thread Robert Osfield
Hi David,

On Fri, Dec 17, 2010 at 11:53 PM, David Glenn  I took a look at
osgViewer::View::setUpViewAcrossAllScreens in View.cpp, did some
tests on an example file and with little time I had concluded that
it’s not how the width is being set in the windows traits! I have two
1600X1200 monitors and it is seeing it as one 3200X1200 monitor as it
should! And that is what it's trying to set the view as that but it's
getting bumped back to the 1600X1200 screen size for some reason.  My
gut felling is it's an OpenGL, or X11 isue!

This sounds like the X11 redirect to the X11 window manager that is
deciding for you that the window is too big and knows better.  The
Traits::overrideRedirect as I mentioned earlier in this thread is what
should address this.

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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-17 Thread Alberto Luaces
David Glenn writes:

 Chriss10 wrote:
 I added eventhandler, but it doesn't work for me!
 
 It does not matter how many times I pess 'f', my application will only be 
 shown on one screen.
 
 Can somebody help?
 Other ideas? I think it should be possible to span it over 2 fullscreens.


 Well I'll tell you what I had to resort to, but it's a hack not a fix.

 First I render the view to a window (not the whole screen). There is many 
 ways to do that - the examples show you how. 

 Then, when I start things off I resize the window frame a bit beyond the 
 scale of the two screens. This can be done in code but if all else fails, 
 after you start the program resize it with your mouse- I told you it was a 
 hack! 

 Note: Make sure that resize of the window GUI is linked to your OSG resize 
 for this to work!

 This is the best that I've been able to do in the Linux realm - might work in 
 MS Windows. 

 I use this to render a 3D projection with two Polarized projections and it 
 works, but as I said it's a hack! I'm looking into a more practical solution 
 as time permits – This 3D Projection stuff is more of a hobby scale right 
 now. 

 This is kind of one of those types of subjects  that maybe an easy answer, 
 but it's ether  just a bit beyond the box to find it in this forum, or beyond 
 the interest of others to answer, or that’s what I’m beginning to think!  

 For me, I’ve done some very weird stuff with this OSG code, much to the 
 puzzlement of some of the OSG authors here and when you do this you sometimes 
 have to stick to your guns and find the answers in other ways and forums!

I have to say that it used to work well at least with OSG 2.4.0. Then
that misbehaviour appeared, but I don't know if it is a problem with the
drivers or with OSG. I think it's more likely a configuration/driver
issue since you are the first pinging the list for that, if I recall
correctly. The osgViewer::View::setUpViewAcrossAllScreens should be a
good starting point to track the issue.

In Windows it expands across the screens from the beginning, but the OSG
windowing code is different.

Regards,

-- 
Alberto

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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-17 Thread Maxim Gammer
Hi.


I use Matrox Dual Head 2 Go for 2 fullscreens

2010/12/17 Alberto Luaces alua...@udc.es:
 David Glenn writes:

 Chriss10 wrote:
 I added eventhandler, but it doesn't work for me!

 It does not matter how many times I pess 'f', my application will only be 
 shown on one screen.

 Can somebody help?
 Other ideas? I think it should be possible to span it over 2 fullscreens.


 Well I'll tell you what I had to resort to, but it's a hack not a fix.

 First I render the view to a window (not the whole screen). There is many 
 ways to do that - the examples show you how.

 Then, when I start things off I resize the window frame a bit beyond the 
 scale of the two screens. This can be done in code but if all else fails, 
 after you start the program resize it with your mouse- I told you it was a 
 hack!

 Note: Make sure that resize of the window GUI is linked to your OSG resize 
 for this to work!

 This is the best that I've been able to do in the Linux realm - might work 
 in MS Windows.

 I use this to render a 3D projection with two Polarized projections and it 
 works, but as I said it's a hack! I'm looking into a more practical solution 
 as time permits – This 3D Projection stuff is more of a hobby scale right 
 now.

 This is kind of one of those types of subjects  that maybe an easy answer, 
 but it's ether  just a bit beyond the box to find it in this forum, or 
 beyond the interest of others to answer, or that’s what I’m beginning to 
 think!

 For me, I’ve done some very weird stuff with this OSG code, much to the 
 puzzlement of some of the OSG authors here and when you do this you 
 sometimes have to stick to your guns and find the answers in other ways and 
 forums!

 I have to say that it used to work well at least with OSG 2.4.0. Then
 that misbehaviour appeared, but I don't know if it is a problem with the
 drivers or with OSG. I think it's more likely a configuration/driver
 issue since you are the first pinging the list for that, if I recall
 correctly. The osgViewer::View::setUpViewAcrossAllScreens should be a
 good starting point to track the issue.

 In Windows it expands across the screens from the beginning, but the OSG
 windowing code is different.

 Regards,

 --
 Alberto

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




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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-17 Thread Robert Osfield
On Thu, Dec 16, 2010 at 3:50 PM, Christina Werner werner...@fh- Can
somebody help?
 Other ideas? I think it should be possible to span it over 2 fullscreens.

I don't know what OS you are working with.  Often OS's have the
drivers control how the desktop and windows open up on.

I'm only really familiar with X11, in which case the window manager
can redirect windows that an application asks to be opened up across
the whole desktop to just appear on one of the screens.  In this case
you want to tell the OSG to tell X11 to override this redirect, in
osg::GraphicsContext::Traits you'll find an overriderRedirect flag
which need to set to true.  You'll also need to set up X11/OpenGL
drivers so that it uses a single desktop rather than have separate
Displays, for NVidia this is called TwinView.

If you can't achieve a single graphics window across both displays the
OSG still allows you to open up two separate windows and have them
synchronized so that it looks and behaves like a single window.

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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-17 Thread David Glenn
Greetings All!

I checked out the OpenGL forum at Khronos and they suggested to me the save 
hack that I dreamed up! Grin! Furthermore, I found out that this is the same 
solution for X11 and MS Windows - including Windows7! 

I know that I complained to Autodesk the other day about Spanning screens with 
my Maya2011 and they told me that you cannot max-out on two windows. You have 
to just drag it out with your mouse. 

QT says you can't do it without a hack - still wating for that hack, Nokia! 

Maybe, as Robert is suggesting, that it was a function that you could have done 
and now you can’t!

I'm Sorry if it seems to look like I'm bucking ageist the system here!  But 
“Hay”, if I remember right, that what my Bosses pay me to do!   =D 

FYI: I'm still stuck using in RedHat 5.2 (thanks to Government) X11 and a (most 
likely dated) gnome Windows Manager!  

Anyways,...

*
^   
  ^^^
^
||
---
You all have some Happy Holidays!


D Glenn


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-17 Thread David Glenn
Holiday Greetings All!


Alberto Luaces wrote:
 
 I have to say that it used to work well at least with OSG 2.4.0. Then
 that misbehaviour appeared, but I don't know if it is a problem with the
 drivers or with OSG. I think it's more likely a configuration/driver
 issue since you are the first pinging the list for that, if I recall
 correctly. The osgViewer::View::setUpViewAcrossAllScreens should be a
 good starting point to track the issue.
 
 In Windows it expands across the screens from the beginning, but the OSG
 windowing code is different.
 
 Regards,
 
 -- 
 Alberto
 
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


I took a look at osgViewer::View::setUpViewAcrossAllScreens in View.cpp, did 
some tests on an example file and with little time I had concluded that it’s 
not how the width is being set in the windows traits! I have two 1600X1200 
monitors and it is seeing it as one 3200X1200 monitor as it should! And that is 
what it's trying to set the view as that but it's getting bumped back to the 
1600X1200 screen size for some reason.  My gut felling is it's an OpenGL, or 
X11 isue!

That was all I could do over my lunch break. I'm back to Mouse Manipulator 
hacking agean for now. If I can devote more time later, I will.

   * 
   ^ 
 ^0^ 
^0^0^ 
|| 
--- 
You all have some Happy Holidays! 
D Glenn


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-16 Thread Christina Werner
I added eventhandler, but it doesn't work for me!

It does not matter how many times I pess 'f', my application will only be shown 
on one screen.

Can somebody help?
Other ideas? I think it should be possible to span it over 2 fullscreens.

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-16 Thread David Glenn

Chriss10 wrote:
 I added eventhandler, but it doesn't work for me!
 
 It does not matter how many times I pess 'f', my application will only be 
 shown on one screen.
 
 Can somebody help?
 Other ideas? I think it should be possible to span it over 2 fullscreens.


Well I'll tell you what I had to resort to, but it's a hack not a fix.

First I render the view to a window (not the whole screen). There is many ways 
to do that - the examples show you how. 

Then, when I start things off I resize the window frame a bit beyond the scale 
of the two screens. This can be done in code but if all else fails, after you 
start the program resize it with your mouse- I told you it was a hack! 

Note: Make sure that resize of the window GUI is linked to your OSG resize for 
this to work!

This is the best that I've been able to do in the Linux realm - might work in 
MS Windows. 

I use this to render a 3D projection with two Polarized projections and it 
works, but as I said it's a hack! I'm looking into a more practical solution as 
time permits – This 3D Projection stuff is more of a hobby scale right now. 

This is kind of one of those types of subjects  that maybe an easy answer, but 
it's ether  just a bit beyond the box to find it in this forum, or beyond the 
interest of others to answer, or that’s what I’m beginning to think!  

For me, I’ve done some very weird stuff with this OSG code, much to the 
puzzlement of some of the OSG authors here and when you do this you sometimes 
have to stick to your guns and find the answers in other ways and forums!

D Glenn


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-15 Thread Alberto Luaces
David Glenn writes:

 Greetings Alberto!

 Just for grins, I tried this on a similar example program, and other
 than the ability to change resolutions and go to a full single screen,
 I was not able to get it to span both screens! Maybe there is
 something in the XConfig file that I have to set in X Windows manager
 (I use Genome) to get that to work, because I can’t even get my other
 windows to pan screens unless I drag them. I know that I would like to
 figure that out also!

Hi David,

Given I'm currently using nVidia cards, I have activated TwinView in
the X Server Display Configuration section of nvidia-settings. That
should modify your xorg.conf accordingly. Maybe that's the difference.

Regards,

-- 
Alberto

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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-15 Thread David Glenn

Alberto Luaces wrote:
 David Glenn writes:
 
 
  Greetings Alberto!
  
  Just for grins, I tried this on a similar example program, and other
  than the ability to change resolutions and go to a full single screen,
  I was not able to get it to span both screens! Maybe there is
  something in the XConfig file that I have to set in X Windows manager
  (I use Genome) to get that to work, because I can’t even get my other
  windows to pan screens unless I drag them. I know that I would like to
  figure that out also!
  
 
 Hi David,
 
 Given I'm currently using nVidia cards, I have activated TwinView in
 the X Server Display Configuration section of nvidia-settings. That
 should modify your xorg.conf accordingly. Maybe that's the difference.
 
 Regards,
 
 -- 
 Alberto
 
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum



Well, TwinView is active! 
I'm using an nVidia card (GeForce 8600 GT) and their drivers (195.36.24)! 
It's gota be something else! Maybe in the Windows Manager there is a setting I 
missing, I suspect!


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-14 Thread Christina Werner
Hi,

I have the following code:

Code:

#include osg/Node
#include osg/Group
#include osg/Geode
#include osg/Geometry
#include osg/Texture2D
#include osgDB/ReadFile
#include osgViewer/Viewer
#include osg/PositionAttitudeTransform
#include osgGA/TrackballManipulator
#include cstdlib

using namespace std;


int main(int argc, char** argv){
osgViewer::Viewer viewer;
osg::Group* root = new osg::Group();
osg::Geode* pyramidGeode = new osg::Geode();
osg::Geometry* pyramidGeometry = new osg::Geometry();

//Associate the pyramid geometry with the pyramid geode
//   Add the pyramid geode to the root node of the scene graph.

pyramidGeode-addDrawable(pyramidGeometry);
root-addChild(pyramidGeode);

//Declare an array of vertices. Each vertex will be represented by
//a triple -- an instances of the vec3 class. An instance of
//osg::Vec3Array can be used to store these triples. Since
//osg::Vec3Array is derived from the STL vector class, we can use 
the
//push_back method to add array elements. Push back adds elements to
//the end of the vector, thus the index of first element entered is
//zero, the second entries index is 1, etc.
//Using a right-handed coordinate system with 'z' up, array
//elements zero..four below represent the 5 points required to 
create
//a simple pyramid.

osg::Vec3Array* pyramidVertices = new osg::Vec3Array;
pyramidVertices-push_back( osg::Vec3( 0, 0, 0) ); // front left
pyramidVertices-push_back( osg::Vec3(10, 0, 0) ); // front right
pyramidVertices-push_back( osg::Vec3(10,10, 0) ); // back right
pyramidVertices-push_back( osg::Vec3( 0,10, 0) ); // back left
pyramidVertices-push_back( osg::Vec3( 5, 5,10) ); // peak

//Associate this set of vertices with the geometry associated with 
the
//geode we added to the scene.

pyramidGeometry-setVertexArray( pyramidVertices );

//Next, create a primitive set and add it to the pyramid geometry.
//Use the first four points of the pyramid to define the base using 
an
//instance of the DrawElementsUint class. Again this class is 
derived
//from the STL vector, so the push_back method will add elements in
//sequential order. To ensure proper backface cullling, vertices
//should be specified in counterclockwise order. The arguments for 
the
//constructor are the enumerated type for the primitive
//(same as the OpenGL primitive enumerated types), and the index in
//the vertex array to start from.

osg::DrawElementsUInt* pyramidBase =
new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
pyramidBase-push_back(3);
pyramidBase-push_back(2);
pyramidBase-push_back(1);
pyramidBase-push_back(0);
pyramidGeometry-addPrimitiveSet(pyramidBase);

//Repeat the same for each of the four sides. Again, vertices are
//specified in counter-clockwise order.

osg::DrawElementsUInt* pyramidFaceOne =
new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
pyramidFaceOne-push_back(0);
pyramidFaceOne-push_back(1);
pyramidFaceOne-push_back(4);
pyramidGeometry-addPrimitiveSet(pyramidFaceOne);

osg::DrawElementsUInt* pyramidFaceTwo =
new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
pyramidFaceTwo-push_back(1);
pyramidFaceTwo-push_back(2);
pyramidFaceTwo-push_back(4);
pyramidGeometry-addPrimitiveSet(pyramidFaceTwo);

osg::DrawElementsUInt* pyramidFaceThree =
new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
pyramidFaceThree-push_back(2);
pyramidFaceThree-push_back(3);
pyramidFaceThree-push_back(4);
pyramidGeometry-addPrimitiveSet(pyramidFaceThree);

osg::DrawElementsUInt* pyramidFaceFour =
new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
pyramidFaceFour-push_back(3);
pyramidFaceFour-push_back(0);
pyramidFaceFour-push_back(4);
pyramidGeometry-addPrimitiveSet(pyramidFaceFour);

//Declare and load an array of Vec4 elements to store colors.

osg::Vec4Array* colors = new osg::Vec4Array;
colors-push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 0 red
colors-push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f) ); //index 1 
green
colors-push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f) ); //index 2 
blue
colors-push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f) ); //index 3 

Re: [osg-users] Fullscreen dual monitor spanning

2010-12-14 Thread Alberto Luaces
Hmmm, I see you didn't follow my advice with the WindowSizeEventHandler:

  // Press f key several times
  viewer.addEventHandler(new osgViewer::WindowSizeHandler());

-- 
Alberto

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


Re: [osg-users] Fullscreen dual monitor spanning

2010-12-14 Thread David Glenn
Greetings Alberto!

Just for grins, I tried this on a similar example program, and other than the 
ability to change resolutions and go to a full single screen, I was not able to 
get it to span both screens! Maybe there is something in the XConfig file that 
I have to set in X Windows manager (I use Genome)  to get that to work, because 
I can’t even get my other windows to pan screens unless I drag them. I know 
that I would like to figure that out also!

... 
D Glenn


D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your 
Desk!

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-11-26 Thread Christina Werner
Can nobody help me?

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





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


Re: [osg-users] Fullscreen dual monitor spanning

2010-11-26 Thread Alberto Luaces
Sometimes when also using TwinView it happened the same for me. As a
temporal hack, I used a WindowSizeHandler, and pressed `f' two times at
the start of the program. I should dive in the code to do it
programmatically.

Take a look at osgViewer::WindowSizeHandler::handle, maybe that
toggleFullscreen at line 103 can help.

-- 
Alberto

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