Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Implementation of Graphics2D based on OpenGL

Randy,

I understand your concern about trying to implement the full Java2D API.
Crafting your own graphics class is simpler and more consistent with SWT components and resources. However, I wouldn't underestimate the time and work required to craft a good graphics model and document it. Added with the time required to build interesting visual components, I wouldn't be surprised if it takes more than "just" implementing Java2D over SWT.

That said, I realize there are difficult problems to solve. In particular, the semantics of resources in SWT is different than in Java2D.


--
Jean-Daniel Fekete      Jean-Daniel.Fekete@xxxxxxxx
INRIA Futurs, LRI               tel: +33 1 69156623
Bat 490, Université Paris-Sud   fax: +33 1 69156586
F91405 ORSAY Cedex, France
Message: 2
Return-Path: <hudsonr@xxxxxxxxxx>
Delivered-To: platform-swt-dev@xxxxxxxxxxx
In-Reply-To: <3EE20E26.7070608@xxxxxxxx>
To: platform-swt-dev@xxxxxxxxxxx
MIME-Version: 1.0
Subject: Re: [platform-swt-dev] Implementation of Graphics2D based on OpenGL
Message-ID: <OF506A7C48.7E1FF581-ON85256D3E.007D01D3-85256D3E.007F4072@xxxxxxxxxx>
From: Randy Hudson <hudsonr@xxxxxxxxxx>
Date: Sat, 7 Jun 2003 17:09:55 -0600
Content-Type: multipart/alternative; boundary="=_alternative 007F406D85256D3E_="
Sender: platform-swt-dev-admin@xxxxxxxxxxx
Precedence: bulk
Reply-To: platform-swt-dev@xxxxxxxxxxx
List-Unsubscribe: <http://dev.eclipse.org/mailman/listinfo/platform-swt-dev>,
	<mailto:platform-swt-dev-request@xxxxxxxxxxx?subject=unsubscribe>
List-Id: Eclipse Platform SWT component developers list. <platform-swt-dev.eclipse.org>
List-Post: <mailto:platform-swt-dev@xxxxxxxxxxx>
List-Help: <mailto:platform-swt-dev-request@xxxxxxxxxxx?subject=help>
List-Subscribe: <http://dev.eclipse.org/mailman/listinfo/platform-swt-dev>,
	<mailto:platform-swt-dev-request@xxxxxxxxxxx?subject=subscribe>
List-Archive: <http://dev.eclipse.org/pipermail/platform-swt-dev/>

This is a multipart message in MIME format.
--=_alternative 007F406D85256D3E_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

What about just improving the 2D support in SWT? The current level of=20
support is minimal at best.  Steve recently suggested OpenGL as a means to =

improve 2D graphics:
https://bugs.eclipse.org/bugs/show=5Fbug.cgi?id=3D7075

Instead of trying to support the full AWT Graphics2D api, why not define=20
one that can be satisfied by OpenGL without any extra effort.  Then, make=20
this available to SWT clients.  Do you know what is the best way to=20
proceed with this approach?  An OpenGL wrapper is nice, but it isn't the=20
API you want to draw a UML diagram. Wrapping OpenGL in a friendly=20
interface similar to Graphics2D is a good idea.  Preferably an interface=20
that takes SWT Colors, Fonts, and Images.  Does anyone know how easy this=20
would be?

Writing a "clean room" version of AWT is an interesting problem, but not=20
one that helps the Eclipse Project.  Just my 2 cents.

-Randy





Jean-Daniel Fekete <Jean-Daniel.Fekete@xxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
06/07/2003 12:09 PM
Please respond to platform-swt-dev
=20
        To:     platform-swt-dev@xxxxxxxxxxx
        cc:=20
        Subject:        [platform-swt-dev] Implementation of Graphics2D=20
based on OpenGL


Dear SWT developers,

I read with interest the threads on SWT port for Swing and believe that
sooner or later, some applications will need to mix components from both
worlds.

On the other side of mixing SWT and Swing, I would like to point out the
partial implementation of the Java2D interface in OpenGL called Agile2D.
  Creating an AWT compatible component under AWT requires implementing
the Graphics2D functions and managing events the AWT way so Agile2D is
just a small part of the big work required.

The original Agile2D site is=20
http://www.cs.umd.edu/hcil/agile2d/index.shtml
I also keep a more up-to-date site with experimental extensions at:
http://www.lri.fr/~fekete/agile2d/

This implementation currently relies on some existing Graphics2D
internal implementations for managing images and fonts, but most of the
Graphics2D rendering functions are implemented on top of OpenGL.

I started to look at the current implementation of the OpenGL binding
for SWT and found it interesting but missing lots of important features,
such as querying for a specific configuration when creating OpenGL
buffers (# of stencil bits, depth buffer, etc.)

I cannot invest the time required to implement the full support of AWT
under SWT but if someone feels like following the AWT compatibility
path, I would be happy to help as much as possible.

--=20
  Jean-Daniel Fekete      Jean-Daniel.Fekete@xxxxxxxx
  INRIA Futurs, LRI               tel: +33 1 69156623
  Bat 490, Universit=E9 Paris-Sud   fax: +33 1 69156586
  F91405 ORSAY Cedex, France

=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


--=_alternative 007F406D85256D3E_=
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif">What about just improving the 2D sup=
port
in SWT? The current level of support is minimal at best. &nbsp;Steve recent=
ly
suggested OpenGL as a means to improve 2D graphics:</font>
<br><font size=3D2 face=3D"sans-serif">https://bugs.eclipse.org/bugs/show=
=5Fbug.cgi?id=3D7075</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Instead of trying to support the full
AWT Graphics2D api, why not define one that can be satisfied by OpenGL
without any extra effort. &nbsp;Then, make this available to SWT clients.
&nbsp;Do you know what is the best way to proceed with this approach? &nbsp=
;An
OpenGL wrapper is nice, but it isn't the API you want to draw a UML diagram.
Wrapping OpenGL in a friendly interface similar to Graphics2D is a good
idea. &nbsp;Preferably an interface that takes SWT Colors, Fonts, and Image=
s.
&nbsp;Does anyone know how easy this would be?</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Writing a &quot;clean room&quot; ver=
sion
of AWT is an interesting problem, but not one that helps the Eclipse Projec=
t.
&nbsp;Just my 2 cents.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">-Randy</font>
<br>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td>
<td><font size=3D1 face=3D"sans-serif"><b>Jean-Daniel Fekete &lt;Jean-Danie=
l.Fekete@xxxxxxxx&gt;</b></font>
<br><font size=3D1 face=3D"sans-serif">Sent by: platform-swt-dev-admin@ecli=
pse.org</font>
<p><font size=3D1 face=3D"sans-serif">06/07/2003 12:09 PM</font>
<br><font size=3D1 face=3D"sans-serif">Please respond to platform-swt-dev</=
font>
<td><font size=3D1 face=3D"Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To:
&nbsp; &nbsp; &nbsp; &nbsp;platform-swt-dev@xxxxxxxxxxx</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc:
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:
&nbsp; &nbsp; &nbsp; &nbsp;[platform-swt-dev] Implementation of
Graphics2D based on OpenGL</font></table>
<br>
<br>
<br><font size=3D2><tt>Dear SWT developers,<br>
<br>
I read with interest the threads on SWT port for Swing and believe that<br>
sooner or later, some applications will need to mix components from both<br>
worlds.<br>
<br>
On the other side of mixing SWT and Swing, I would like to point out the<br>
partial implementation of the Java2D interface in OpenGL called Agile2D.<br>
 &nbsp;Creating an AWT compatible component under AWT requires implementing=
<br>
the Graphics2D functions and managing events the AWT way so Agile2D is<br>
just a small part of the big work required.<br>
<br>
The original Agile2D site is http://www.cs.umd.edu/hcil/agile2d/index.shtml=
<br>
I also keep a more up-to-date site with experimental extensions at:<br>
http://www.lri.fr/~fekete/agile2d/<br>
<br>
This implementation currently relies on some existing Graphics2D<br>
internal implementations for managing images and fonts, but most of the<br>
Graphics2D rendering functions are implemented on top of OpenGL.<br>
<br>
I started to look at the current implementation of the OpenGL binding<br>
for SWT and found it interesting but missing lots of important features,<br>
such as querying for a specific configuration when creating OpenGL<br>
buffers (# of stencil bits, depth buffer, etc.)<br>
<br>
I cannot invest the time required to implement the full support of AWT<br>
under SWT but if someone feels like following the AWT compatibility<br>
path, I would be happy to help as much as possible.<br>
<br>
-- <br>
 &nbsp;Jean-Daniel Fekete &nbsp; &nbsp; &nbsp;Jean-Daniel.Fekete@xxxxxxxx<b=
r>
 &nbsp;INRIA Futurs, LRI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
tel: +33 1 69156623<br>
 &nbsp;Bat 490, Universit=E9 Paris-Sud &nbsp; fax: +33 1 69156586<br>
 &nbsp;F91405 ORSAY Cedex, France<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
platform-swt-dev mailing list<br>
platform-swt-dev@xxxxxxxxxxx<br>
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev<br>
</tt></font>
<br>
--=_alternative 007F406D85256D3E_=--



Back to the top