[osg-users] 3D texture

2010-02-10 Thread George Forest
Hi, I have a 3DS model. How can I add tihs model as done in 2D images with Geode and Geometry. This code adds 2D objects. What modifications should I make on it? ref_ptrGeode geode(new Geode()); ref_ptrGeometry geometry(new Geometry());

[osg-users] readPixels return blank image

2010-01-11 Thread forest
hi all, I want to capture the screen ,what I have done is to add a eventhandler in which I add code like this osg::ref_ptrosg::Image image = new osg::Image; image-readPixels(0,0,m_iWidth,m_iHeight, GL_RGB,GL_UNSIGNED_BYTE); osgDB::writeImageFile(*image,D:\\abc.bmp); what I

[osg-users] Keyboard Events

2010-01-09 Thread George Forest
Hi, I am executing a frame loop such as while (!viewer.done()) { //get pressed key viewer.frame(); } Within this code I want to get pressed arrow keys but I could not find any comprehensible example or source. Thank you! Cheers, George -- Read this topic online here:

[osg-users] how to zoom TrackBall to a given range

2010-01-03 Thread forest
hi all I know that we can use mouse right button to zoom trackball, but what I want is to draw a rectangle on the screen, then zoom the view to the rectangle, what should I do? Thanks in advance. best regards forest___ osg-users mailing

[osg-users] how to suspend rendering context thread

2009-11-25 Thread forest
hi all, When I use osgMFCViewer, I create multiple rendering context,that's to say there are many HWND, each HWND is related to one Render thread ,so much CPU resource is taken up. This is what I want to do: When one viewport is maximazed, the others will be hidden ,so these hidden

[osg-users] what is the thread difference between MFC and console?

2009-07-10 Thread forest
hi all, I have a problem with OSG in MFC program:When I run my program in console, I get 60 frames per second .However,When I move my program into MFC, I get slow frames.I do this as the example osgviewerMFC does, creating a new thread for OSG drawing. One thing I have to mention is that

[osg-users] how to draw 3d pipe

2009-06-26 Thread forest
hi all, I know this problem is not so related to OSG, but there is no better place I can find. What I want to draw is to draw a three-dimensional pipe from a 3d curve with a given radius.The pipe I mean is alike a cylinder,but it is bent. any ideas? thanks in advance.

[osg-users] how to get a city's image data?

2009-05-11 Thread forest
hi all I want to use vpb to build a terrain and I have got the digital elevation data from ftp://ftp.glcf.umiacs.umd.edu/glcf/SRTM/Degree_Tiles/ Now I want to find some corresponding texture image data for free, where can I get them? Thanks in advance. best regards