[osg-users] problem with setNumMultiSamples()

2009-02-06 Thread forest37
hi all, when I use setNumMultiSamples(16),It is ok on my computer.But when the program is executed on some other computers.If the computer doesn't support mulsampling with 16,The display window will expanded to full screen(This is not I want). If I want the best antialiasing effect

[osg-users] how to get video card's maximum sampling rate?

2009-02-04 Thread forest37
hi all, I have a problem with antialiasing. when I set the sampling rate with 16 ,the window in which I draw the three-dimension scene will expand to full screen if the video cards don't support the sampling rate. So I have to get every machine's maximum sampling rate,how can I achieve this?

Re: [osg-users] problem with GPU draw time

2008-12-01 Thread forest37
hi Robert , Thanks for your help. I didn't describe my problem clearly.I want wo konw something about OSG thread model.Take the single thread model for enstance,the time of one frame is the sum of event,update,cull and draw .Does it include the GPU draw time?(I am not sure,but I think it

[osg-users] problem with GPU draw time

2008-11-30 Thread forest37
hi all, I am confused about the GPU draw time,I mean if the GPU draw time is longer than the UPDATE+CULL+DRAW(dispatch) time,what will happen?Is there any code control this? best regards forest ___ osg-users mailing list

[osg-users] antialiasing with mfc

2008-11-30 Thread forest37
hi all, I use codes like this to antialiase : osg::DisplaySettings* ds = osg::DisplaySettings::instance(); ds-setNumMultiSamples(16); mViewer-setDisplaySettings(ds); It works well in console program(full screen).when I add the codes to the osgviewrMFC program,it doesn't work well.why?

[osg-users] crash at delete mViewer

2008-10-30 Thread forest37
hi all, There is a class cOSG in example osgviewerMFC,i find that a sentence Sleep(1000); is added to the function cOSG::~cOSG().Maybe it's used to avoid crash at delete mViewer.But Sometimes I still get a crash at delete mViewer.Is it because of the thread is not stoped? How can i

Re: [osg-users] updateCalculatedNearFar problem

2008-10-28 Thread forest37
hi robert, Thanks for your advice. I know people are busy,so i concentrate the code.Sometimes problems are hard to describe in native language much less a foreign language.I will try to describle problems in english instead of codes. Thank you again. Best regards forest

[osg-users] updateCalculatedNearFar problem

2008-10-27 Thread forest37
hi all, It seems that there is a problem with CullVisitor::updateCalculatedNearFar,I have the code like this: osgViewer::Viewer viewer; class MCallBack : public osg::NodeCallback { public: virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) {

Re: [osg-users] what can we do with osgPPU?

2008-10-21 Thread forest37
hi Paul and art Thanks for your reply. I have googled it,but I couldn't understand that well,so I asked here. with art's help ,Now I know what I can do with osgPPU. Anyway ,thank you all. best regards forest ___ osg-users

[osg-users] how to know a node whether in the viewport?

2008-10-13 Thread forest37
hi all, I set a animationpath to a node,how can i know whether the node is moved outside of the viewport? what i want to do is this:when the node is moved outside of the viewport ,I will change the camera's position to make sure the node is seen all the time.So,what should i do?

[osg-users] mouse move problem

2008-09-24 Thread forest37
hi all, I added a pickhandler to vivewer,when something is picked ,I showed a dialog.The problem is when the dialog is closed,the osg scene moved with mouse move.I must click left mouse button to stop it.You know,normally when we move our mouse ,the osg scene will not move.So,how to fix

[osg-users] how to get model scale?

2008-09-18 Thread forest37
hi all, When the secne is zoomed in or out ,I want to get the zoom scale.I do it like this: osg::Camera* camera= viewer.getCamera(); osg::Matrix vm=camera-getViewMatrix(); osg::Vec3 scale=vm.getScale(); the result is that scale always equals to (1,1,1).What does this mean

[osg-users] how to make a node fixed in screen position

2008-09-11 Thread forest37
hi all, I want to draw axes in screen position,the axes can't be scaled or transformed ,but which can be rotated with other scene.I do it like this,but the billboard (texts: 'X','Y','Z') doesn't work,what should I do to make the billboard work well?“axes.osg” is downloaded from the osg

[osg-users] how to draw an axis like 3dsmax's ?

2008-09-07 Thread forest37
hi all, Now I want to draw axes like 3dsmax's. I load the node axes.osg. I use setReferenceFrame(osg::Transform::ABSOLUTE_RF) ,which make the axes could not be rotated, transformed or scaled.But I want the axes only can be rotated ,can not be transformed or scaled. what should I

[osg-users] how to use CoordinateSystemNode?

2008-09-04 Thread forest37
hi all, Now I have two files, earth.osga and city.ive . The first file use GEOGCS WGS 84 CoordinateSystem and the second file use PROJCS UTM Zone CoordinateSystem ,I add them both into the scene.But i only can see the scene of the first file,that is the earth.No matter how i

[osg-users] how to draw line use pixel

2008-09-02 Thread forest37
hi all, Is there an easy way to draw line use pixel just like osgText::setCharacterSizeMode(SCREEN_COORDS)? thanks for any hint best regards forest ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] freetype problem

2008-08-11 Thread forest37
hi all I build osg-2.6.0 and the latest 3rdparty ,when i run the example osgtext,the program could not find plugin to read objects from file. When i debugged the program,i found that the function LoadLibrary() failed to load freetype.dll. but i can find the dll file follow the file

[osg-users] osg pick problem

2008-07-25 Thread forest37
hi,all when i use the function computeIntersections to pick a drawable in the scene,it's Ok when i use osg::ShapeDrawable to build the scene。but the computeIntersections doesn't work when i use self drawing, I derive a class from osg::Drawable,and overwrite the function computeBound()

[osg-users] how to use StateSetManipulator in mfc?

2008-07-07 Thread forest37
hi all, when i use StateSetManipulator in mfc like this: mViewer-addEventHandler( new osgGA::StateSetManipulator(mViewer-getCamera()-getOrCreateStateSet()) ); It's ok when the program runs,but when the program is closed ,it encounters an error at void __CLR_OR_THIS_CALL

[osg-users] Is programmable pipeline faster than fixed function pipeline ?

2008-07-06 Thread forest37
hi all, I know programmable pipeline is flexible,but is it faster than fixed function pipeline ? thanks for any hint! forest ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] how to convert DDB bitmap to osg::Image?

2008-05-14 Thread forest37
hello everyone, I want to draw something in memory dc ,then convert the drawing to osg::Image. I tried it like this: CDC dc; dc.CreateCompatibleDC(NULL); CBitmap bitmap; bitmap.CreateCompatibleBitmap (dc, 100, 100); CBitmap*

[osg-users] how it the text drawn?

2008-05-10 Thread forest37
hi everyone, I am puzzled by the method of drawing text. Three is three main sentences in the function Text::drawForegroundText(...) { state.setVertexPointer( 3, GL_FLOAT, 0, (transformedCoords.front())); state.setTexCoordPointer( 0, 2, GL_FLOAT, 0,

[osg-users] glCallList doesn't work well in drawImplementation

2008-04-25 Thread forest37
forest37 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] CMakeLists FIND_PACKAGE(OpenGL)

2008-04-12 Thread forest37
hi all, I am a beginner of cmake ,I find that there is a sentence FIND_PACKAGE(OpenGL) int the CMakeLists.txt. But I can't find the corresponding .cmake file in CMakeModules. For example ,I find the FindOpenThreads.cmake file. regards

[osg-users] how to speed drawing texts?

2008-04-11 Thread forest37
hi all, when I use osg to draw texts,I find that the founction osgText::setText() requires 2ms . if I want to draw 5000 texts,I have to wait for 2S at least. what should I do to speed drawing texts? regards forest___ osg-users

[osg-users] class information with no extension .h file

2008-04-11 Thread forest37
hi all, When I use VC++6.0 build the project of OSG,I find that there is no class information within head files in the ClassView panel,I just get class information when the class is declared in cpp files.The reason is that there is no extention .h for the head files. So,what

[osg-users] VBO

2008-01-07 Thread forest37
What does fastPath mean? Is it related to VBO? There is a sentence if (_vertexData.indices.valid()) _fastPath = false; in the function Geometry::computeFastPathsUsed() It seems that i can't use fastPath when i use setVertexIndices(); I just want to use Vertex_Buffer_Object,what should i