Re: [osg-users] RegisterRenderBinProxy with OSG 3

2013-04-25 Thread Bob Smith
Hi,

Thanks for the hint, but I tried that already, it gives me a 
C2761: 'void osgUtil::RenderBin::addRenderBinPrototype(const std::string 
,osgUtil::RenderBin *)' : member function redeclaration not allowed

The code which I want to replace is outside a class, like this:


Code:
#include ...
#include ...
#include ...

using namespace osgHaptics;

osgUtil::RenderBin::addRenderBinPrototype(HapticRenderBin,new 
HapticRenderBin);

HapticRenderBin::HapticRenderBin(SortMode mode) : RenderBin(mode), 
m_last_frame(-1)
{

}

...



Is the new addRenderBinPrototype only usable inside a function? 


Thank you!

Cheers,
Bob

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





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


Re: [osg-users] RegisterRenderBinProxy with OSG 3

2013-04-25 Thread Robert Osfield
Hi Bob,

osgUtil::RenderBin::addRenderBinPrototype() is static member function call,
so you just call it with the body of your initialization code.  You could
do this within a proxy object if you wished to keep the implementation
similar to what you've used before.

Robert.


On 25 April 2013 09:05, Bob Smith robert.ha...@gmail.com wrote:

 Hi,

 Thanks for the hint, but I tried that already, it gives me a
 C2761: 'void osgUtil::RenderBin::addRenderBinPrototype(const std::string
 ,osgUtil::RenderBin *)' : member function redeclaration not allowed

 The code which I want to replace is outside a class, like this:


 Code:
 #include ...
 #include ...
 #include ...

 using namespace osgHaptics;

 osgUtil::RenderBin::addRenderBinPrototype(HapticRenderBin,new
 HapticRenderBin);

 HapticRenderBin::HapticRenderBin(SortMode mode) : RenderBin(mode),
 m_last_frame(-1)
 {

 }

 ...



 Is the new addRenderBinPrototype only usable inside a function?


 Thank you!

 Cheers,
 Bob

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





 ___
 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] RegisterRenderBinProxy with OSG 3

2013-04-25 Thread Bob Smith
Hi Robert

You mean calling it from outside the new renderbin class, for example from the 
main function, where the root node gets created and the renderbin is assigned?

Sorry, I haven't done anything yet with custom renderbins, hence the questions..



Bob

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





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


Re: [osg-users] RegisterRenderBinProxy with OSG 3

2013-04-25 Thread Robert Osfield
Hi Bob,

On 25 April 2013 10:08, Bob Smith robert.ha...@gmail.com wrote:

 You mean calling it from outside the new renderbin class, for example from
 the main function, where the root node gets created and the renderbin is
 assigned?


You'll want to register your RenderBin prototype prior to running the first
cull traversal as this will be the first type that the RenderBin will be
looked up and cloned.  Typically you'd just want to initialize in your main
or with a proxy object so it all happens on start up.

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


[osg-users] (no subject)

2013-04-25 Thread Daniel Krikun
Hello Nick,

How can I check what version of the txp is the format of the terrain?

Mess ag e: 2 Date: Mon, 22 Ap r 20 13 09 :4 4: 5 5 +0 20 0 From : Tr ajc e
Nik olov NIC K  traj ce .n iko lov. ni ck @g m ail .c om  To : Ope nS c
eneG rap h Us ers  osg - use rs@ lis ts . open sc ene gr aph .or g  Su bj
ect : Re: [osg - use rs] txp lod prob lem : sw itc hi ng in cyc l es Mess
ag e - ID:  CA O - +zi kU 6a UW pV C g uT 8M S 0qb y3 - + NkU D_ C 60 zKg
sK tDZ0 G3 iS w @m ai l. gm ai l. c om  Con tent - Ty pe: text/ p lai n;
ch ars et= is o - 88 59 - 1

Hi Dani el,

I am run nin g larg e terr ain (txp ) on my lapt op wi th no prob lem s wi
th the lates t cod e fr om the trun k (alt houg h I don' t thin k the txp
load er was touc hed latel y). Wha t is the vers ion of your arc hi ve ? It
seam that the cod e in the repo sit ory wor ks the bes t wi th 2. 1 arc hi
ves. Al so, goo d prac ti ce is to use s3 textu re com pr es sio n (dx t3
and dxt5 ) wh en bui ldi ng the arc hi ve in Te rra Vi sta . If you can bui
ld a bloc k and post it I can take a look wh at is happ eni ng

Let me know Nic k

On Mon, Ap r 22 , 20 13 at 9: 02 AM , Dani el Krik un  kri ku n. dani
el@g mai l. c om  wr ote:

 Hel lo,   I have a he avy appl ic ati on wh ic h use s osg view er
and a TX P terr ain .  Af te r som e tim e the appl ic ati on is run nin g
, LOD level of the terr ain  star ts bein g sw itc he d hig h er and low
er all the tim e in cyc l es, so one  sec ond I have trees and bui ldi ng
bein g dis pla yed and one sec ond later - they dis appe ar.  Inter est
ing , if I run jus t 2 ins tanc es of osg vie we r. exe wi th a larg e TX P
 terr ain , af ter som e tim e, I ach ieve the sam e ef f ec t.   I sus
pec t, TX P load er detec ts low me mor y avail abl e and sw itc he s LOD
dow n,  then wh en som e me mor y is fr eed due to this LOD sw itc hi ng ,
the load er  sw itc he s the LOD up, the me mor y ge ts low and it con tin
ues in cyc l es.   An y idea s ?   I'm run nin g Win dow s XP, 32 -
bit, GT X 67 0. Both osg - 2. 9. 8 and 3. 0. 1 exh ibi t  this beha viou
r.   Th ank s,   - - Dani el Krik un   __ __ _ __ _ __ __ _ __ _ __
_ __ __ _ __ _ __ _ __ __ _ __ _ __ __ _ __ _ _  osg - use rs mai li ng
lis t  osg - use rs@ lis ts . open sc ene gr aph .or g  http: / / li sts
.op ens ce neg r aph. org / li sti nf o. cg i /
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] (no subject)

2013-04-25 Thread Trajce Nikolov NICK
Hi Daniel,

somewhere in the header of the txp archive should be something like
GetVersion or such. Look in the trpage_* headers

Nick


On Thu, Apr 25, 2013 at 1:10 PM, Daniel Krikun krikun.dan...@gmail.comwrote:

 Hello Nick,

 How can I check what version of the txp is the format of the terrain?

 Mess ag e: 2 Date: Mon, 22 Ap r 20 13 09 :4 4: 5 5 +0 20 0 From : Tr ajc e
 Nik olov NIC K  traj ce .n iko lov. ni ck @g m ail .c om  To : Ope nS c
 eneG rap h Us ers  osg - use rs@ lis ts . open sc ene gr aph .or g  Su
 bj ect : Re: [osg - use rs] txp lod prob lem : sw itc hi ng in cyc l es
 Mess ag e - ID:  CA O - +zi kU 6a UW pV C g uT 8M S 0qb y3 - + NkU D_ C 60
 zKg sK tDZ0 G3 iS w @m ai l. gm ai l. c om  Con tent - Ty pe: text/ p lai
 n; ch ars et= is o - 88 59 - 1

 Hi Dani el,

 I am run nin g larg e terr ain (txp ) on my lapt op wi th no prob lem s wi
 th the lates t cod e fr om the trun k (alt houg h I don' t thin k the txp
 load er was touc hed latel y). Wha t is the vers ion of your arc hi ve ? It
 seam that the cod e in the repo sit ory wor ks the bes t wi th 2. 1 arc hi
 ves. Al so, goo d prac ti ce is to use s3 textu re com pr es sio n (dx t3
 and dxt5 ) wh en bui ldi ng the arc hi ve in Te rra Vi sta . If you can bui
 ld a bloc k and post it I can take a look wh at is happ eni ng

 Let me know Nic k

 On Mon, Ap r 22 , 20 13 at 9: 02 AM , Dani el Krik un  kri ku n. dani el@g 
 mai l. c om  wr ote:

  Hel lo,   I have a he avy appl ic ati on wh ic h use s osg view er
 and a TX P terr ain .  Af te r som e tim e the appl ic ati on is run nin g
 , LOD level of the terr ain  star ts bein g sw itc he d hig h er and low
 er all the tim e in cyc l es, so one  sec ond I have trees and bui ldi ng
 bein g dis pla yed and one sec ond later - they dis appe ar.  Inter est
 ing , if I run jus t 2 ins tanc es of osg vie we r. exe wi th a larg e TX P
  terr ain , af ter som e tim e, I ach ieve the sam e ef f ec t.   I sus
 pec t, TX P load er detec ts low me mor y avail abl e and sw itc he s LOD
 dow n,  then wh en som e me mor y is fr eed due to this LOD sw itc hi ng ,
 the load er  sw itc he s the LOD up, the me mor y ge ts low and it con tin
 ues in cyc l es.   An y idea s ?   I'm run nin g Win dow s XP, 32 -
 bit, GT X 67 0. Both osg - 2. 9. 8 and 3. 0. 1 exh ibi t  this beha viou
 r.   Th ank s,   - - Dani el Krik un   __ __ _ __ _ __ __ _ __ _ __
 _ __ __ _ __ _ __ _ __ __ _ __ _ __ __ _ __ _ _  osg - use rs mai li ng
 lis t  osg - use rs@ lis ts . open sc ene gr aph .or g  http: / / li
 sts .op ens ce neg r aph. org / li sti nf o. cg i /

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




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


Re: [osg-users] RegisterRenderBinProxy with OSG 3

2013-04-25 Thread Bob Smith
Hi,

I think I got it. It didn't work in the main program, but found a place in the 
library itself where it should be called first.

Thank you!

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





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


Re: [osg-users] Order Independent Transparancy with Per-Pixel-Linked-Lists

2013-04-25 Thread Chris Hanson
Marcel, just to clarify, the example isn't mine. I only fixed it to work
again. The original author moved on and works at NVidia.now.

I would love to see an OSG version of this code.


On Wed, Apr 24, 2013 at 11:08 PM, Mathias Fröhlich 
mathias.froehl...@gmx.net wrote:


 Hi,

 On Tuesday, April 23, 2013 22:17:42 Marcel Pursche wrote:
  I recently checked out the newest development release of OSG (version
  3.1.5). After playing around with the osgatomiccounter and
 osgcomputeshader
  examples I tried to implement order independent transparency with per
 pixel
  linked lists as mentioned in this presentation: click!
  (
 https://graphics.stanford.edu/wikis/cs448s-10/FrontPage?action=AttachFile;
  do=gettarget=CS448s-10-11-oit.pdf).
 Ok, now that I see more public references to this:
 There must be a publication from the university of stuttgart guys in the
 mcsimvis project about this technique implemented in OpenGL 4.x.
 May be this helps also.

 Greetings

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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] indexing model - loss of data

2013-04-25 Thread Sergey Polischuk
Hi all

once i've wrote small utility to optimize models with rig geometry, which, 
among other things, apply INDEX_MESH, VERTEX_PRETRANSFORM, VERTEX_POSTTRANSFORM 
optimizations and remaps vertex influences of rig geometry to new vertex 
indices. Now it suddenly dont work any more.

Problem is that after indexing geometry, there are not enough matches between 
old vertex attributes and new vertex attributes (some old vertex attribute 
values cant be found in new vertex attribute arrays after indexing, which means 
some data is lost).

here is some simplified code to show problem:

//

template typename T bool compare(T* r, unsigned ri, T* l, unsigned li) 
//compares two array elements
{
if ((*r)[ri]  (*l)[li])
return false;
if ((*l)[li]  (*r)[ri])
return false;

return true;
}

bool cmp (osg::Geometry::ArrayList rhs, unsigned rhsi, 
osg::Geometry::ArrayList lhs, unsigned lhsi) //compares all [rhsi] elements 
from rhs array list with all [lhsi] elements in lhs array list
{
if (rhs.size() != lhs.size())
throw std::logic_error(different vertex attrib arrays count 
before and after optimizations, cant do anything);
bool result = true;
for (unsigned i = 0; i rhs.size(); i++)
{
bool compared = false;
if (!result)
return result;
{
osg::Vec3Array* r = 
dynamic_castosg::Vec3Array*(rhs[i]);
osg::Vec3Array* l = 
dynamic_castosg::Vec3Array*(lhs[i]);
if (r  l)
{
result = result  compare(r, rhsi, l, lhsi);
compared = true;
}
}
{
osg::Vec2Array* r = 
dynamic_castosg::Vec2Array*(rhs[i]);
osg::Vec2Array* l = 
dynamic_castosg::Vec2Array*(lhs[i]);
if (r  l)
{
result = result  compare(r, rhsi, l, lhsi);
compared = true;
}
}
if (!compared)
return false;
}
return result;
}

void acceptMesh(osgAnimation::RigGeometry* rg)
{
osg::Geometry* g = rg-getSourceGeometry();

osg::ref_ptrosg::Geometry origG = new osg::Geometry(*g, 
osg::CopyOp::DEEP_COPY_ALL);

osg::Geometry::ArrayList alold;
origG-getArrayList(alold);
osg::ref_ptrosg::Vec3Array origVerts = 
dynamic_castosg::Vec3Array*(origG-getVertexArray());

osgUtil::IndexMeshVisitor imv;
imv.makeMesh(*g);

osg::Geometry::ArrayList alnew;
g-getArrayList(alnew);

std::mapint, int vertsMap;//store matches between old and new 
vertexattrib arrays in pairs [old_index, new_index]
osg::ref_ptrosg::Vec3Array newVerts = 
dynamic_castosg::Vec3Array*(g-getVertexArray());

unsigned id = 0;
for (osg::Vec3Array::iterator itr = origVerts-begin(); itr != 
origVerts-end(); itr++)
{
unsigned nid = 0;
for (osg::Vec3Array::iterator itr2 = newVerts-begin(); 
itr2 != newVerts-end(); itr2++)
{
if (cmp(alold, id, alnew, nid))//found match
{
vertsMap[id] = nid;
break;
}
nid++;
}
id++;
}
std::cerrorigVerts size:origVerts-size()std::endl;
std::cerrverts map size:vertsMap.size()std::endl;
}

/

here size of vertsMap map should be same as original vertex count, and it isnt, 
which means some data is lost when indexing geometry (and comparing floating 
point values with thresholds does not change anything, i've tested it).

Any ideas about what could go wrong? May be there was some changes to the way 
IndexMeshVisitor works? I'm testing on osg svn version updated last week or so.

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


Re: [osg-users] Order Independent Transparancy with Per-Pixel-Linked-Lists

2013-04-25 Thread Paul Martz
Perhaps developing an OSG version of this example would be a good candidate
project for funding through catincan.com? What would be appropriate --
$1000USD? $2k? More?


On Thu, Apr 25, 2013 at 7:58 AM, Chris Hanson xe...@alphapixel.com wrote:

 Marcel, just to clarify, the example isn't mine. I only fixed it to work
 again. The original author moved on and works at NVidia.now.

 I would love to see an OSG version of this code.


 On Wed, Apr 24, 2013 at 11:08 PM, Mathias Fröhlich 
 mathias.froehl...@gmx.net wrote:


 Hi,

 On Tuesday, April 23, 2013 22:17:42 Marcel Pursche wrote:
  I recently checked out the newest development release of OSG (version
  3.1.5). After playing around with the osgatomiccounter and
 osgcomputeshader
  examples I tried to implement order independent transparency with per
 pixel
  linked lists as mentioned in this presentation: click!
  (
 https://graphics.stanford.edu/wikis/cs448s-10/FrontPage?action=AttachFile;
  do=gettarget=CS448s-10-11-oit.pdf).
 Ok, now that I see more public references to this:
 There must be a publication from the university of stuttgart guys in the
 mcsimvis project about this technique implemented in OpenGL 4.x.
 May be this helps also.

 Greetings

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




 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
 Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
 iPhone/iPad/iOS • Android
 @alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
 623-PIXL [7495]

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




-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with RTT, stereo and setViewport

2013-04-25 Thread Arun Yoganandan
Hi Robert,

Ah. I missed that. Unfortunately, my project is going to be stuck with OSG 2.8 
for a while. I guess I will have to try the separate camera approach. Thanks so 
much for looking into this though. 

Thank you!

Cheers,
Arun

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





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


Re: [osg-users] indexing model - loss of data

2013-04-25 Thread Glenn Waldron
Sergey,
I believe the IndexMeshVisitor attempts to detect and remove duplicate
vertices. Could that be the reason?


Glenn Waldron / @glennwaldron


On Thu, Apr 25, 2013 at 11:16 AM, Sergey Polischuk pol...@yandex.ru wrote:

 Hi all

 once i've wrote small utility to optimize models with rig geometry, which,
 among other things, apply INDEX_MESH, VERTEX_PRETRANSFORM,
 VERTEX_POSTTRANSFORM optimizations and remaps vertex influences of rig
 geometry to new vertex indices. Now it suddenly dont work any more.

 Problem is that after indexing geometry, there are not enough matches
 between old vertex attributes and new vertex attributes (some old vertex
 attribute values cant be found in new vertex attribute arrays after
 indexing, which means some data is lost).

 here is some simplified code to show problem:

 //

 template typename T bool compare(T* r, unsigned ri, T* l, unsigned li)
 //compares two array elements
 {
 if ((*r)[ri]  (*l)[li])
 return false;
 if ((*l)[li]  (*r)[ri])
 return false;

 return true;
 }

 bool cmp (osg::Geometry::ArrayList rhs, unsigned rhsi,
 osg::Geometry::ArrayList lhs, unsigned lhsi) //compares all [rhsi]
 elements from rhs array list with all [lhsi] elements in lhs array list
 {
 if (rhs.size() != lhs.size())
 throw std::logic_error(different vertex attrib arrays
 count before and after optimizations, cant do anything);
 bool result = true;
 for (unsigned i = 0; i rhs.size(); i++)
 {
 bool compared = false;
 if (!result)
 return result;
 {
 osg::Vec3Array* r =
 dynamic_castosg::Vec3Array*(rhs[i]);
 osg::Vec3Array* l =
 dynamic_castosg::Vec3Array*(lhs[i]);
 if (r  l)
 {
 result = result  compare(r, rhsi, l,
 lhsi);
 compared = true;
 }
 }
 {
 osg::Vec2Array* r =
 dynamic_castosg::Vec2Array*(rhs[i]);
 osg::Vec2Array* l =
 dynamic_castosg::Vec2Array*(lhs[i]);
 if (r  l)
 {
 result = result  compare(r, rhsi, l,
 lhsi);
 compared = true;
 }
 }
 if (!compared)
 return false;
 }
 return result;
 }

 void acceptMesh(osgAnimation::RigGeometry* rg)
 {
 osg::Geometry* g = rg-getSourceGeometry();

 osg::ref_ptrosg::Geometry origG = new osg::Geometry(*g,
 osg::CopyOp::DEEP_COPY_ALL);

 osg::Geometry::ArrayList alold;
 origG-getArrayList(alold);
 osg::ref_ptrosg::Vec3Array origVerts =
 dynamic_castosg::Vec3Array*(origG-getVertexArray());

 osgUtil::IndexMeshVisitor imv;
 imv.makeMesh(*g);

 osg::Geometry::ArrayList alnew;
 g-getArrayList(alnew);

 std::mapint, int vertsMap;//store matches between old
 and new vertexattrib arrays in pairs [old_index, new_index]
 osg::ref_ptrosg::Vec3Array newVerts =
 dynamic_castosg::Vec3Array*(g-getVertexArray());

 unsigned id = 0;
 for (osg::Vec3Array::iterator itr = origVerts-begin();
 itr != origVerts-end(); itr++)
 {
 unsigned nid = 0;
 for (osg::Vec3Array::iterator itr2 =
 newVerts-begin(); itr2 != newVerts-end(); itr2++)
 {
 if (cmp(alold, id, alnew, nid))//found
 match
 {
 vertsMap[id] = nid;
 break;
 }
 nid++;
 }
 id++;
 }
 std::cerrorigVerts size:origVerts-size()std::endl;
 std::cerrverts map size:vertsMap.size()std::endl;
 }

 /

 here size of vertsMap map should be same as original vertex count, and it
 isnt, which means some data is lost when indexing geometry (and comparing
 floating point values with thresholds does not change anything, i've tested
 it).

 Any ideas about what could go wrong? May be there was some changes to the
 way IndexMeshVisitor works? I'm testing on osg svn version updated last
 week or so.

 Cheers,
 Sergey.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 

[osg-users] Matrox M9188 OpenGL

2013-04-25 Thread Sergey Kurdakov
Hi Chris,

won't AMD Eyefinity 6 monitors on one card ( and I think 12 monitors on two
cards - because they could work together, though I did not try, but if I
understand correctly this will work
http://hardforum.com/showthread.php?t=1645343
http://hardforum.com/showthread.php?t=1645343see also
http://www.pcworld.com/article/251521/when_two_monitors_arent_enough.html )
suite your needs?

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


Re: [osg-users] Matrox M9188 OpenGL

2013-04-25 Thread Chris Hanson
It is my understanding that AMD cards won't frame-lock without the S400
card (
http://www.amd.com/us/PRODUCTS/WORKSTATION/GRAPHICS/S400/Pages/s400.aspx ) ,
and it is listed as only supporting certain FirePro cards, which drive the
price up quite a bit. Do you know of a way to frame-lock without going to
the FirePro cards?

I don't know if the Matrox cards frame-lock OpenGL or not, I have an
inquiry in to Matrox about it.


On Thu, Apr 25, 2013 at 11:22 AM, Sergey Kurdakov sergey.fo...@gmail.comwrote:

 Hi Chris,

 won't AMD Eyefinity 6 monitors on one card ( and I think 12 monitors on
 two cards - because they could work together, though I did not try, but if
 I understand correctly this will work 
 http://hardforum.com/showthread.php?t=1645343
 http://hardforum.com/showthread.php?t=1645343see also
 http://www.pcworld.com/article/251521/when_two_monitors_arent_enough.html) 
 suite your needs?

 Regards
 Sergey



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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Matrox M9188 OpenGL

2013-04-25 Thread Sergey Kurdakov
Hi Chris,

It is my understanding that AMD cards won't frame-lock without the S400
card

you might be correct, but

you mentioned, that rendering in not very demanding, thus setting VSync
might be enough to soft-frame-lock on powerful card ( which should be oders
of magnitude more powerful than old Matrox cards )

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


Re: [osg-users] indexing model - loss of data

2013-04-25 Thread Sergey Polischuk
Hi yes, it's doing just that, but it written in a way to keep duplicate vertices with same position if other vertex attributes for this vertex is different. I checked it's sources and all looks fine to me. Also, same code was working fine like half a year ago. Cheers. 25.04.2013, 21:06, "Glenn Waldron" gwald...@gmail.com:Sergey,I believe the IndexMeshVisitor attempts to detect and remove duplicate vertices. Could that be the reason? Glenn Waldron / @glennwaldronOn Thu, Apr 25, 2013 at 11:16 AM, Sergey Polischuk pol...@yandex.ru wrote:Hi all  once i've wrote small utility to optimize models with rig geometry, which, among other things, apply INDEX_MESH, VERTEX_PRETRANSFORM, VERTEX_POSTTRANSFORM optimizations and remaps vertex influences of rig geometry to new vertex indices. Now it suddenly dont work any more.  Problem is that after indexing geometry, there are not enough matches between old vertex attributes and new vertex attributes (some old vertex attribute values cant be found in new vertex attribute arrays after indexing, which means some data is lost).  here is some simplified code to show problem:  //  template typename T bool compare(T* r, unsigned ri, T* l, unsigned li) //compares two array elements {         if ((*r)[ri]  (*l)[li])                 return false;         if ((*l)[li]  (*r)[ri])                 return false;          return true; }  bool cmp (osg::Geometry::ArrayList rhs, unsigned rhsi, osg::Geometry::ArrayList lhs, unsigned lhsi) //compares all [rhsi] elements from rhs array list with all [lhsi] elements in lhs array list {         if (rhs.size() != lhs.size())                 throw std::logic_error("different vertex attrib arrays count before and after optimizations, cant do anything");         bool result = true;         for (unsigned i = 0; i rhs.size(); i++)         {                 bool compared = false;                 if (!result)                         return result;                 {                         osg::Vec3Array* r = dynamic_castosg::Vec3Array*(rhs[i]);                         osg::Vec3Array* l = dynamic_castosg::Vec3Array*(lhs[i]);                         if (r  l)                         {                                 result = result  compare(r, rhsi, l, lhsi);                                 compared = true;                         }                 }                 {                         osg::Vec2Array* r = dynamic_castosg::Vec2Array*(rhs[i]);                         osg::Vec2Array* l = dynamic_castosg::Vec2Array*(lhs[i]);                         if (r  l)                         {                                 result = result  compare(r, rhsi, l, lhsi);                                 compared = true;                         }                 }                 if (!compared)                         return false;         }         return result; }          void acceptMesh(osgAnimation::RigGeometry* rg)         {                 osg::Geometry* g = rg-getSourceGeometry();                  osg::ref_ptrosg::Geometry origG = new osg::Geometry(*g, osg::CopyOp::DEEP_COPY_ALL);                  osg::Geometry::ArrayList alold;                 origG-getArrayList(alold);                 osg::ref_ptrosg::Vec3Array origVerts = dynamic_castosg::Vec3Array*(origG-getVertexArray());                  osgUtil::IndexMeshVisitor imv;                 imv.makeMesh(*g);                  osg::Geometry::ArrayList alnew;                 g-getArrayList(alnew);                  std::mapint, int vertsMap;//store matches between old and new vertexattrib arrays in pairs [old_index, new_index]                 osg::ref_ptrosg::Vec3Array newVerts = dynamic_castosg::Vec3Array*(g-getVertexArray());                  unsigned id = 0;                 for (osg::Vec3Array::iterator itr = origVerts-begin(); itr != origVerts-end(); itr++)                 {                         unsigned nid = 0;                         for (osg::Vec3Array::iterator itr2 = newVerts-begin(); itr2 != newVerts-end(); itr2++)                         {                                 if (cmp(alold, id, alnew, nid))//found match                                 {                                         vertsMap[id] = nid;                                         break;                                 }                                 nid++;                         }                         id++;                 }                 std::cerr"origVerts size:"origVerts-size()std::endl;                 std::cerr"verts map size:"vertsMap.size()std::endl;         }  /  here size of vertsMap map should be same as original vertex count, and it isnt, which means some data is lost when indexing geometry (and comparing floating point values with thresholds does not change anything, i've tested it).  Any ideas about what could go wrong? May be there was some changes to the way IndexMeshVisitor works? I'm 

Re: [osg-users] Order Independent Transparancy with Per-Pixel-Linked-Lists

2013-04-25 Thread Marcel Pursche
Hi,

after reading some of the commit messages it looks like not all necessary api 
methods are integrated in OpenSceneGraph right now. glMemoryBarrier for example 
is not called anywhere but necessary to make sure all data is written to the 
image before starting the next rendering stage.
So my next step will be to first implement the technique with pure OpenGL and 
then see how I can integrate it in OpenSceneGraph.

Thank you!

Cheers,
Marcel

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





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