TclGles20

Description

TclGles20 is a layer package for APWTCL, which makes some of the OpenGL ES 2.0 commands available (callable) from Tcl.

See also ntkThemed for use of that package.

Here is the TclGles20JAVA repository

That repository also contains some work in progress in porting part of the FreeType library to java. It is the part which will produce bitmaps from .ttf files, which I will use to build textures for displaying texts with OpenGL ES 2.0.

apw 2014-06-19: I am now able to display the first letter (capital A) renderered with my java freetype library building a bitmap and use that as a texture for OpenGL ES 2.0 on my android smartphone. Still a lot of work to do before the library is usable.

apw 2014-11-02: In the meantime I am able to render and display most of the Ascii characters with my java freetype library correctly. For some characters the layouts is not yet really good, but at least there is some progress.

A Vertex has the Tcl form ([list position color]):

  [list [list x y z] [list r g b a]]

Position and color values are float values (colors between 0.0 .. 1.0).

Here is a list of the planned commands (all live in namespace ::gles20):

donecommandparam1param2param3param4param5param6param7param8
xclearbufferredgreenbluealpha
compileshaders
xdrawlinestart_vertexend_vertex
xdrawrectanglevertex1vertex2vertex3vertex4
drawtexturerectanglevertex1vertex2vertex3vertex4
drawtexturetrianglevertex1vertex2vertex3
xdrawtrianglevertex1vertex2vertex3
xfillrectanglevertex1vertex2vertex3vertex4
filltexturerectanglevertex1vertex2vertex3vertex4
filltexturetrianglevertex1vertex2vertex3
xfilltrianglevertex1vertex2vertex3
getfontinfotextfont_namefont_sizebackgroundforegroundmaxwidthmaxheightmeasureonly
maketexttexture
rotate
setupframebuffer
setuprenderbuffer
swapheaders