From: Sven G. <sgo...@ja...> - 2001-02-20 04:55:12
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 20 February 2001 05:42, Joe & Bobbey Huwaldt wrote: > Sven, > > Is there a method by which I can draw on top of a GLCanvas using the > regular AWT methods? For example, I would like to render a 3D scene using > GL4Java, then draw some items on top of part of that scene using a regular > AWT graphics context. My first thought was that I would override paint(), > but I see that you have prevented that. Did you provide any other way to > do the same thing? Is it even possible (I haven't looked at the source > code, so I don't know how the implementation works)? > well .. you can try Graphics g = this.getGraphics() ! And awt-render _after_ swapping the buffer, if you use double-buffering. This will not work in the current GL4Java up to 2.5.0-test2 if an new native window is created (see the native debug out info's) ! In the upcoming 2.5.0-test3 this should work, if you use the new factory api, because the java window itself will have all the capabilities needed while using the JDK 1.3 class GraphicsConfiguration internaly (-> no more new native window will be created) ! > I want to do this because it is often easier to draw simple geometry and > images using the AWT methods than it is to try and do the same thing > through OpenGL. It would be really nice if I could draw AWT graphics > elements over top of an OpenGL scene. > well, this is true, e.g. for an overlayed textual info .. > Thanks for any help you can provide. > may be you have to wait for the new version ... > Ad astra, > > Joe Huwaldt bye, sven - -- mailto:sgo...@ja... www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ voice : +49-521-2399440; fax: +49-521-2399442; icq-uin: 108264795 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE6kfi1HdOA30NoFAARAtv3AJ9jhsnRAC0d8EwuMZgH4MoJgA4vEQCfUJM0 XPTK2bGRXQoVUJswna5AkTM= =4zkK -----END PGP SIGNATURE----- |