Re: [osg-users] Openscenegraph Image to Windows HBITMAP

2009-04-03 Thread Jesper D. Thomsen
Thank you, I can certainly rewrite the rest of the pipeline to work with 
osg::Image, but I just needed to check if there was some easy method that I 
hadn't found yet myself.

regards,

Jesper D. Thomsen

From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly 
[jd...@ist.ucf.edu]
Sent: Thursday, April 02, 2009 8:21 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Openscenegraph Image to Windows HBITMAP


I believe an HBITMAP is more than just an array of pixels.  It's more like a 
drawing context (HDC).  I think no matter what you do, you'll have to create 
your HBITMAP from scratch and copy data to it.

Do you really need an HBITMAP for what you're doing?

--J


Glenn Waldron wrote:
Not sure, but the code in the bmp plugin might help.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791


2009/4/2 Jesper D. Thomsen j...@anybodytech.commailto:j...@anybodytech.com
Hi all, (and thank you for you help on previous occasions).

I'm writing (in Visual studio 2005sp1) the Openscenegraph (2.6.1) part of an 
application for Windows (XP/Vista). I need to be able to record and take 
screenshots of my Openscenegraph viewports and also from non-viewport cameras. 
I'm going to do this with RTT cameras, and I'm implementing this now.
However, I'm going to get my screenshots in the form of osg::Image and I need 
to convert them to HBITMAPs in order to use them further in the conversion 
chain of the application.
Is there an easier method than reading the osg::image pixel for pixel and 
writing this to the HBITMAP?

regards, and thanks in advance.


Jesper D. Thomsen



___
osg-users mailing list
osg-users@lists.openscenegraph.orgmailto: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


[osg-users] Openscenegraph Image to Windows HBITMAP

2009-04-02 Thread Jesper D. Thomsen
Hi all, (and thank you for you help on previous occasions).

I'm writing (in Visual studio 2005sp1) the Openscenegraph (2.6.1) part of an 
application for Windows (XP/Vista). I need to be able to record and take 
screenshots of my Openscenegraph viewports and also from non-viewport cameras. 
I'm going to do this with RTT cameras, and I'm implementing this now.
However, I'm going to get my screenshots in the form of osg::Image and I need 
to convert them to HBITMAPs in order to use them further in the conversion 
chain of the application.
Is there an easier method than reading the osg::image pixel for pixel and 
writing this to the HBITMAP?

regards, and thanks in advance.

Jesper D. Thomsen

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


Re: [osg-users] Openscenegraph Image to Windows HBITMAP

2009-04-02 Thread Glenn Waldron
Not sure, but the code in the bmp plugin might help.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


2009/4/2 Jesper D. Thomsen j...@anybodytech.com

  Hi all, (and thank you for you help on previous occasions).

 I'm writing (in Visual studio 2005sp1) the Openscenegraph (2.6.1) part of
 an application for Windows (XP/Vista). I need to be able to record and take
 screenshots of my Openscenegraph viewports and also from non-viewport
 cameras. I'm going to do this with RTT cameras, and I'm implementing this
 now.
 However, I'm going to get my screenshots in the form of osg::Image and I
 need to convert them to HBITMAPs in order to use them further in the
 conversion chain of the application.
 Is there an easier method than reading the osg::image pixel for pixel and
 writing this to the HBITMAP?

 regards, and thanks in advance.


 Jesper D. Thomsen

 * *

 ___
 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] Openscenegraph Image to Windows HBITMAP

2009-04-02 Thread Jason Daly


I believe an HBITMAP is more than just an array of pixels.  It's more 
like a drawing context (HDC).  I think no matter what you do, you'll 
have to create your HBITMAP from scratch and copy data to it.


Do you really need an HBITMAP for what you're doing?

--J


Glenn Waldron wrote:

Not sure, but the code in the bmp plugin might help.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 
+1.703.652.4791



2009/4/2 Jesper D. Thomsen j...@anybodytech.com 
mailto:j...@anybodytech.com


Hi all, (and thank you for you help on previous occasions).
 
I'm writing (in Visual studio 2005sp1) the Openscenegraph

(2.6.1) part of an application for Windows (XP/Vista). I need to
be able to record and take screenshots of my Openscenegraph
viewports and also from non-viewport cameras. I'm going to do this
with RTT cameras, and I'm implementing this now.
However, I'm going to get my screenshots in the form of osg::Image
and I need to convert them to HBITMAPs in order to use them
further in the conversion chain of the application.
Is there an easier method than reading the osg::image pixel for
pixel and writing this to the HBITMAP? 
 
regards, and thanks in advance.
 


Jesper D. Thomsen

*/*/*/ /*/*/*


___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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