Hi Forest, There isn't any OSG code in your example, so it is that you have a stumbling block before you even start trying to pass data to the osg::Image?
As for examples of setting up osg::Image have a look through the various image plugins such as src/osgPlusgins/rgb, png, tga etc. Robert. 2008/5/14 forest37 <[EMAIL PROTECTED]>: > > 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* pOldBitmap=dc.SelectObject(&bitmap); > dc.FillRect(&CRect(0,0,200,200),&CBrush(RGB(255,0,0))); > BITMAP bmp; > bitmap.GetBitmap(&bmp); > > here,the bmp.bmBits is NULL because of DDB. > > thanks for any advice > > forest > > > ________________________________ > 中 国 最 强 网 游 --- 网 易 梦 幻 西 游 ,166 万 玩 家 同 时 在 线 > _______________________________________________ > 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