WTK for APWTCL Paper Chapter 5

  • Different Approach for GUI Elements

Very soon the implementation reached a point (at least on the iPhone side) where it was obvious, that there is a lot of functionality missing, when looking for Tk like widgets. That might be partially because Apple wants to look all their GUI stuff look like they want it to be displayed.

At that time some experiments with OpenGL ES started. OpenGL ES is a cut down version of OpenGL running on iOS and on Android and as part of WebGL in javascript for browsers too.

The experiments were based on the idea to use screen buffer implementation of OpenGL ES as a base for displaying pixels on the screen and to use some primitive functions of OpenGL ES like drawing a line or a rectangle or a polygon and filling some area with colors. For displaying text the idea is to use a freetype font implementation, also available for the iPhone .

Using that approach, it would be possible to use 3-D elements to be shown and also rotation of text would be very easy using OpenGL ES functionality.

As OpenGL ES is also used as a base for some games on iOS the guess was, that it should be fast enough for the implementation of a Tk GUI.

Having some small knowledge of OpenGL from the implementation of ntkwidget the decision was made to give OpenGL ES a try, to see, what can be done using that.