Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gef3d-dev] Rendering SWT as OpenGL Texture

Hi Jens,

First of all thanks for sharing your thoughts.

I have a question regarding to one of your bug reports (combine SWT overlays with camera tracks[1]):
You write that SWT overlays are already working.
I'm curious what are SWT overlays in this case. I tried to 'overlay' my GLCanvas with other SWT composites, but failed, since the drawn GL always ends on top of everything else - and so my composites are not drawn. At the moment i have to move my GLCanvas away before i can show another composite.

So how did you implement those overlays? Maybe you can point me to an implementation example in the gef3d source code?

Thanks and greetings,
Christoph

 [1]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=300332

On 28/04/11 11:06, Jens v.P. wrote:
>  Hi,
> 
> On 27.04.11 15:45, Christoph Caks wrote:
>> This is somewhat off topic, but I think you may have already evaluated the possibilities of drawing SWT stuff in OpenGL for gef3d and hope you would share your experiences with me.
>>
>> Has anybody ever spend some thoughts about this?
> 
> While this is an interesting idea, I never did this. We have three open bugs in GEF3D describing possible new features for how to improve text editing and embedding SWT widgets into GEF3D. However, two of them will reuse the original 2D SWT widgets and use popups (http://bugs.eclipse.org/300333) or camera tracks (http://bugs.eclipse.org/300332) to "integrate" these 2D stuff into the 3D scene.  http://bugs.eclipse.org/300334 describes 3D direct edit. But none of these features is implemented yet. Personally I like the idea with camera tracks best, and this may be s solution in your case as well?
> 
>> I am currently trying to render a swt formular in opengl and then redirect the interactions back to the swt components.
>>
>> My current approach is to spawn a shell, position it somewhere offscreen and capture its contents via Control.print(GC). This works fine, however I still need to figure out how to route SWT Events from the GLCanvas back to the appropriate Control.
> This sounds pretty much like a hack ;-) Well, GEF3D is a kind of hack itself... In GEF3D, or better to say in Draw3D, all events are encapsulated in Draw2D events. So, you won't see any SWT events in Draw2D/3D or GEF/GEF3D. Also, I have no experiences with how to handle SWT events.
> 
> BTW: We do not use any textures anymore (or at least: almost no textures). We did this in earlier versions to render all 2D content. However, we replaced this with real 3D rendering for 2D content as well, improving the render quality, getting rid of some restrictions, and---at the same time-- improving performance! This part was mainly implemented by Kristian, so if you have questions about that, you may ask him (he described the new mechanism in http://gef3d.blogspot.com/2010/02/improving-visual-rendering-quality.html). Maybe this would be a solution in case of SWT3D as well, as you will no longer have to "render" the SWT widgets off-screen. Maybe -- depending on your project -- it would be possible not to use SWT, but instead use GEF's Figures and provide some extensions for editing in 3D etc.?
> 
> Cheers,
> 
> Jens
> _______________________________________________
> gef3d-dev mailing list
> gef3d-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/gef3d-dev


-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
Caks Christoph            Software Engineer
------------------------------------------------------------------------
Eduard-Bodem-Gasse 5/1    A-6020 Innsbruck      Phone    ++43 512 935834


Back to the top