Bug 202328 - investigate OpenGL support on Solaris
Summary: investigate OpenGL support on Solaris
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: PC Solaris
: P3 enhancement with 2 votes (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
Depends on:
Blocks:
 
Reported: 2007-09-05 15:59 EDT by Grant Gayed CLA
Modified: 2007-11-05 12:32 EST (History)
4 users (show)

See Also:


Attachments
Patch to org.eclipse.swt.gtk.solaris.sparc/build.xml file (510 bytes, patch)
2007-10-19 10:28 EDT, Tobias Gerdin CLA
no flags Details | Diff
Patch to org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak (107 bytes, patch)
2007-10-19 10:29 EDT, Tobias Gerdin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2007-09-05 15:59:02 EDT
 
Comment 1 Tobias Gerdin CLA 2007-10-19 10:28:54 EDT
Created attachment 80769 [details]
Patch to org.eclipse.swt.gtk.solaris.sparc/build.xml file

Can also be applied to org.eclipse.swt.gtk.solaris.x86/build.xml.
Comment 2 Tobias Gerdin CLA 2007-10-19 10:29:42 EDT
Created attachment 80770 [details]
Patch to org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak
Comment 3 Tobias Gerdin CLA 2007-10-19 10:53:12 EDT
For the GTK case, changing and adding a few lines to the build scripts addresses this problem. Patches to the relevant files against SWT R3_3_1, namely the make_solaris.mak makefile in org.eclipse.swt/Eclipse SWT PI/gtk/library and the build.xml file in org.eclipse.swt.gtk.solaris.sparc/ have been attached.

The solution was inferred by gleaning on the Linux GTK SWT package and copying the relevant lines. In fact, the only thing the patches do is to add the make_glx target to the all: target in make_solaris.mak and to add a few OpenGL-related paths to the build.xml file.

The patches have also been tested on Solaris 10 x86 so the build.xml-patch should be applied to org.eclipse.swt.gtk.solaris.x86/build.xml as well. However, in the x86 case the X11 headers were not found during build so the "/usr/X11R6/include"-path was added manually to the GLXFLAGS variable in the make_solaris.mak makefile (this change is not included in the diff). A DTACTION_WARNING_DISABLED define was also needed to disable an #error directive preventing cde.c from compiling on Solaris 10.

The GTK GLX library built after applying the patch has been tested successfully using the org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet209.java example as well as an inhouse-developed Eclipse plugin incorporating 2D- and 3D visualization features built using JOGL and SWT GLCanvas. The tests were carried out on Solaris 9 Sparc (JDK 1.4) and Solaris 10 x86 (JDK 1.5) and Sparc (JDK 1.4, 1.5 and 1.6). For JDK 1.5 on Solaris 10 Sparc, the awt.toolkit-property needed to be set to "sun.awt.X11.XToolkit" in order to prevent a "libXt loaded before libXm" error.
Comment 4 Grant Gayed CLA 2007-11-02 16:11:31 EDT
fixed > 1102 on solaris-gtk and -motif

Thanks for investigating this and providing a patch!
Comment 5 Erik Staflin CLA 2007-11-05 05:46:26 EST
It would be really great if we wouldn't have to wait until 3.4 to get this fixed. Any chance of getting this in 3.3.2?
Comment 6 Grant Gayed CLA 2007-11-05 12:32:44 EST
I don't think this can be considered for 3.3.2 because maintenance releases by their nature should not introduce new features or functionality.  I've copied SN here in case he doesn't think this counts as one of these.

In the meantime, the only thing that should be needed to enable this support in your app is for you to provide the swt glx library (renamed to match the version number of the other swt libraries in your eclipse version).  You can add this library to swt's runtime library lookup path by setting java property swt.library.path to point at its directory.