hi opensg users,
working with my cave application,
i noticed that the ceiling and the sides are not
matching, basically because of different aspect
ratios. The first thing that came to my mind
was to use a DisplayCalibration xml to
stretch the ceiling's viewport and make it match
the sides'.
I resumed an old piece of code of mine,
but i am not having any luck in so far.
right now i am enabling the calibration via:
std::filebuf fb;
fb.open ("cluster.xml",std::ios::in);
std::istream os(&fb);
beginEditCP(win);
win->loadCalibration(os);
endEditCP(win);
fb.close();
and the XML look like:
<?xml version="1.0"?>
<displaycalibration>
<server name="ceiling">
<colormatrix>
1 1 1 0
0 1 1 0
0 0 1 0
0 0 0 1
</colormatrix>
<gamma>
1
</gamma>
<scaledown> 1.0 </scaledown>
<gammaramp>
<color>0 1 0</color>
<color>1 1 1</color>
</gammaramp>
<grid>
<row><point>0.000000 0.000000</point><point>0.250000
0.000000</point><point>0.500000 0.000000</point><point>0.750000
0.000000</point><point>1.000000 0.000000</point></row>
<row><point>0.000000 0.187500</point><point>0.250000
0.187500</point><point>0.500000 0.187500</point><point>0.750000
0.187500</point><point>1.000000 0.187500</point></row>
<row><point>0.000000 0.375000</point><point>0.250000
0.375000</point><point>0.500000 0.375000</point><point>0.750000
0.375000</point><point>1.000000 0.375000</point></row>
<row><point>0.000000 0.562500</point><point>0.250000
0.562500</point><point>0.500000 0.562500</point><point>0.750000
0.562500</point><point>1.000000 0.562500</point></row>
<row><point>0.000000 0.750000</point><point>0.250000
0.600000</point><point>0.500000 0.600000</point><point>0.750000
0.600000</point><point>1.000000 0.750000</point></row>
</grid>
</server>
</displaycalibration>
I already made sure that the calibration has been loaded
quering it:
DisplayCalibrationPtr calib = m_pWin->getCalibration(0);
std::cout << calib->getServer().c_str() << std::endl;
and that the servers name actually match.
What am i forgetting?
thanks for any hints,
E.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users