[osg-users] DLL versioned MSVC and NMAKE problem, relative paths are wrong
Dear OSG-Users, I am using commandline build system nmake on windows, since the OSG_MSVC_VERSIONED_DLL hack this does not work anymore, because there are hard-coded paths to move the dll's, but nmake has different locations for the files. There are two solutions, 1: change IF(MSVC) on line 142, 158, 299 and 301 of CMakeList.txt (r7885) to IF(MSVC_IDE) This fixes the problem, but the dll's are now not versioned and in the /lib dir 2: change the macro's in OsgMacroUtils.cmake for the IF(NOT MSVC_IDE) situation. Not sure what needs to be changed, but that way we can keep the versioning and /bin placements I was wondering if this change should be in the repository, if so please instruct me to summit the changes, (i'am still experimenting with the solution 2 suggestions are welcome). I am also trying to build on other platforms (linux, sun, aix, hp) not without problems, where can I sent an overview of my feedback? Have a nice day, René Molenaar _ De mooiste afbeeldingen van Angelina Jolie vind je met Live Search http://search.live.com/images/results.aspx?q=angelina%20jolieFORM=MIINTM ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] shadow occlusion culling
Hi all, I was walking through osg::CullSetting code and there i find SHADOW_OCCLUSION_CULLING as one of the Culling mode. Can some body tell me where it is used. best regards RJ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to modify the array of vertex from a Geometry object
Hi, At this point, I would recommend to use a debugger and enter into the OSG code with it. It may not be a bug in the OSG code, but maybe by looking at what OSG is doing you can find how to fix your own code. As a hint on where to look. The dirty() call should be forcing a new compileBuffer() call in the next draw stage, and this should mean a glBufferSubData call uploading the new vertex data to the GPU. If this is OK, then I would look at the geometry draw() call, to see if it is using the VBO path or another one. Maybe Robert can help you a bit more with this when he is back next week. Regards. Rubén El vie, 08-02-2008 a las 11:17 +0100, lucas Grijander escribió: Hi! I add the vbo-dirty() but it doesn't change anything. I had a look to the vbo data and it's fine, it changes, but the render is not updated any idea?? regards, Crisalix. __ From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Date: Thu, 7 Feb 2008 23:38:00 +0100 Subject: Re: [osg-users] How to modify the array of vertex from a Geometry object Hi, I think that the only thing missing is a vbo-dirty() Regards El jue, 07-02-2008 a las 19:31 +0100, lucas Grijander escribió: Thanks Rubén, I'm trying to use VBO, but I think something is missing... I added this to the creation of my geometry: myGeom-setSupportsDisplayList(false); myGeom-setUseDisplayList(false); myVertexBuffer = myGeom-getOrCreateVertexBufferObject(); myVertexBuffer-setArray(0,v); myVertexBuffer-setUsage(GL_STREAM_DRAW_ARB); myGeom-setUseVertexBufferObjects(true); and then inside the callback I'm try to modify the vertex data: osg::Vec3Array *test = dynamic_castosg::Vec3Array *(testNx-myVertexBuffer-getArray(0)); for(int i = 0; i numVertex; i++) { NxMat34 pose = listShapes.at(i)-shape-getGlobalPose(); osg::Vec3f trans = osg::Vec3(pose.t.x,pose.t.y,pose.t.z); test-at(i) = trans; } but nothing changes in the render the object does not move. Does anybody know what is missing?? thanks in advance Crisalix. __ From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Date: Wed, 6 Feb 2008 21:33:51 +0100 Subject: Re: [osg-users] How to modify the array of vertex from a Geometry object Hi, Some hints: 1. Be sure that test-size() is equal to numVertex 2. I don't know what the at method is, I couldn't find it either on the TemplateArray class or the std::vector class. Try with the vector [] operator, ie: (*test)[i] = trans 3. If you are updating the vertex data once per frame, don't use display lists, it is the worst thing that you can ever do! It is cheaper even to use direct mode. Use vertex buffer objects and configure the VBO (getOrCreateVertexBufferObject) in streaming mode (GL_STREAM_DRAW). Hope this helps. Regards. Rubén El mié, 06-02-2008 a las 14:08 +0100, lucas Grijander escribió: Dear all, I have to create a 3D surface, and then such surface will be modified during the application with several deformations. I've tried to create a Geometry object, then I set the VertexArray, and finally inside the render callback I update such vertex with the new ones. I got some errors during the rendering: Warning: detected OpenGL error value not valid after RenderBin::draw(,) Does anyone has an idea of such error? In addition, I'm sure the way I am accessing the vertex is not the right one, anybody knows the best way? here is the code: //Create the 3D geometry - osg::Vec3Array(m*n)); osg::Vec2Array t = *(new osg::Vec2Array(m*n)); osg::Vec4Array col = *(new osg::Vec4Array(1)); col[0][0] = col[0][1] = col[0][2] = col[0][3] = 1.0f; int index = 0; for( i = 0; i m; i++ ) { for(j = 0; j n; j++) { v[index][0] = i; v[index][1] = 0; v[index][2] = j; t[index][0] = (float)i/(m-1); t[index][1] = (float)j/(n-1); index++; } } myGeom = new osg::Geometry; myGeom-setVertexArray( v ); myGeom-setTexCoordArray( 0, t ); myGeom-setColorArray( col ); myGeom-setColorBinding( osg::Geometry::BIND_OVERALL ); for( i = 0; i m-1; i++ ) { osg::DrawElementsUShort* elements = new osg::DrawElementsUShort(osg::PrimitiveSet::TRIANGLE_STRIP); elements-reserve(m*2); for( j = 0; j n; j++ ) { elements-push_back((i+0)*n+j); elements-push_back((i+1)*n+j); } myGeom-addPrimitiveSet(elements);
Re: [osg-users] osg python binding
Hi Cedric, I am the developer of osgSWIG. You can find scripts in src/Languages/Python 1) run wrap.sh 2) run compile.sh I know this is very much suboptimal and might not even work on your distribution. I am working on a CMake based build system which probably solves quite a lot of problems. There is also one big issue I am facing with one of the headers in core OSG. You might stumble upon the same thing, there are three const variables in osg::Vec3f which use the C++ style of declaration and are not supported by SWIG 1.3.30 /H Cedric Pinson wrote: I have found http://code.google.com/p/osgswig/ to bind osg to python, i did not try yet. I would like to know if someone use it on linux. I would like feedback Cedric -- Hartmut Seichter PhD (HKU), Dipl.-Ing. (BUW) www.technotecture.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg python binding
I tried it but i have a problem i can't create vec3array or i dont know how to do that. I imagine it's not so easy because of template ... let me know if it's possible. I hope osgSWIG will grow up, often it's easier to use script language instead of c++ thanks Hartmut Seichter wrote: Hi Cedric, I am the developer of osgSWIG. You can find scripts in src/Languages/Python 1) run wrap.sh 2) run compile.sh I know this is very much suboptimal and might not even work on your distribution. I am working on a CMake based build system which probably solves quite a lot of problems. There is also one big issue I am facing with one of the headers in core OSG. You might stumble upon the same thing, there are three const variables in osg::Vec3f which use the C++ style of declaration and are not supported by SWIG 1.3.30 /H Cedric Pinson wrote: I have found http://code.google.com/p/osgswig/ to bind osg to python, i did not try yet. I would like to know if someone use it on linux. I would like feedback Cedric -- Hartmut Seichter PhD (HKU), Dipl.-Ing. (BUW) www.technotecture.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg python binding
I' m also interested in scripting: tried introspection based osgLua and osgPython with not much success. Also tried binary version of osgSwig (version 2.1.11 I presume), was able to run viewer.py but not much more. I did not found many python examples, neither in any of the project above, Is it because the wrapping is not yet stable or like the example are left as an exercise to the reader Any available example scripts would be really appreciated by a novice python user as I am. Iwould also be very intersted in CMake building, and willing to help expecially under Windows platform. Thanks Luigi Hartmut Seichter wrote: Hi Cedric, I am the developer of osgSWIG. You can find scripts in src/Languages/Python 1) run wrap.sh 2) run compile.sh I know this is very much suboptimal and might not even work on your distribution. I am working on a CMake based build system which probably solves quite a lot of problems. There is also one big issue I am facing with one of the headers in core OSG. You might stumble upon the same thing, there are three const variables in osg::Vec3f which use the C++ style of declaration and are not supported by SWIG 1.3.30 /H Cedric Pinson wrote: I have found http://code.google.com/p/osgswig/ to bind osg to python, i did not try yet. I would like to know if someone use it on linux. I would like feedback Cedric -- Hartmut Seichter PhD (HKU), Dipl.-Ing. (BUW) www.technotecture.com ___ 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] osg python binding
I have worked with the swigged version of osgPython for some time. It works pretty well, I updated the online version (to osg22) and added python style vectors, cmake system and some other extra's It is part of a bigger library, maybe I can seperate it, and share it. It uses the swig system of cmake and works on both windows and linux. As far as I know the swig osgPython is the best solution at this moment for osgPython. René Molenaar _ Bekijk Yes-R's real life soap op MSN Video! http://video.msn.com/video.aspx?mkt=nl-nltab=m1192527562294vid=8aff5b76-b78d-4b55-8b64-ef7e1d73aab2playlist=videoByUuids:uuids:50b732c2-c105-41e9-adf0-36bd627d4eaa,0813da8c-031b-423f-a79d-35d925aee805,5cce447e-948d-43af-9862-45bb6bb9d6d8,6a39138c-f562-4254-be70-9d93343650f8,f9b8d78f-05a4-4c74-8e4b-28d20a4037abfrom=NLNL_Yes-R ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg python binding
This looks simple enough :) Can I incorporate this into the trunk? I would probably use osg/io_utils for the __str__ wrappers. If you tried the newest trunk and SWIG you certainly stumbled across the osg::Vec3f stuff ... do you have a solution for that? /H megamiller zoid wrote: Dear osgPython users, About the problem with vectors, There is a file in our library, called osgPyExtend, which creates python access to vectors and mat. I have attached it. add %include osgPyExtend.i to osg.i I have more additions, but this one should be an easy to add. _ Jouw nieuws en entertainment, vind je op MSN.nl! http://nl.msn.com/ ___ 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] osg python binding
Dear osgPython users, About the problem with vectors, There is a file in our library, called osgPyExtend, which creates python access to vectors and mat. I have attached it. add %include osgPyExtend.i to osg.i I have more additions, but this one should be an easy to add. _ Jouw nieuws en entertainment, vind je op MSN.nl! http://nl.msn.com/ %{ #include sstream %} %define VECHELPER(name) value_type __getitem__(int i) { return (*self)[i]; } void __setitem__(int i, value_type v) { (*self)[i] = v; } %enddef %define VEC2HELPER(name) %extend osg::## name { std::string __str__() { std::ostringstream os; os '[' self-x() , self-y() ']'; return os.str(); } VECHELPER(name) }; %enddef %define VEC3HELPER(name) %extend osg::## name { std::string __str__() { std::ostringstream os; os '[' self-x() , self-y() , self-z() ']'; return os.str(); } VECHELPER(name) }; %enddef %define VEC4HELPER(name) %extend osg::## name { std::string __str__() { std::ostringstream os; os '[' self-r() , self-g() , self-b() , self-a() ']'; return os.str(); } VECHELPER(name) }; %enddef %define MATHELPER(name) %extend osg::## name { std::string __str__() { std::ostringstream os; os '[' self-operator()(0,0) , self-operator()(0,1) , self-operator()(0,2) , self-operator()(0,3) ']'; os '[' self-operator()(1,0) , self-operator()(1,1) , self-operator()(1,2) , self-operator()(1,3) ']'; os '[' self-operator()(2,0) , self-operator()(2,1) , self-operator()(2,2) , self-operator()(2,3) ']'; os '[' self-operator()(3,0) , self-operator()(3,1) , self-operator()(3,2) , self-operator()(3,3) ']'; return os.str(); } }; %enddef VEC2HELPER(Vec2b) VEC2HELPER(Vec2s) VEC2HELPER(Vec2d) VEC2HELPER(Vec2f) VEC3HELPER(Vec3b) VEC3HELPER(Vec3s) VEC3HELPER(Vec3d) VEC3HELPER(Vec3f) VEC4HELPER(Vec4ub) VEC4HELPER(Vec4b) VEC4HELPER(Vec4s) VEC4HELPER(Vec4d) VEC4HELPER(Vec4f) MATHELPER(Matrixd) MATHELPER(Matrixf) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Multi-Node?
Hi, I need to be able to run OpenSceneGraph on Multiple Nodes and was wondering if OSG 2.X is able to handle a multi-channel (Gen locked) setup? - or does a whole lot of synchronization software have to be written for it? Regards IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org