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 repositoryThat 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):
done | command | param1 | param2 | param3 | param4 | param5 | param6 | param7 | param8 |
---|
x | clearbuffer | red | green | blue | alpha | | | | |
| compileshaders | | | | | | | | |
x | drawline | start_vertex | end_vertex | | | | | | |
x | drawrectangle | vertex1 | vertex2 | vertex3 | vertex4 | | | | |
| drawtexturerectangle | vertex1 | vertex2 | vertex3 | vertex4 | | | | |
| drawtexturetriangle | vertex1 | vertex2 | vertex3 | | | | | |
x | drawtriangle | vertex1 | vertex2 | vertex3 | | | | | |
x | fillrectangle | vertex1 | vertex2 | vertex3 | vertex4 | | | | |
| filltexturerectangle | vertex1 | vertex2 | vertex3 | vertex4 | | | | |
| filltexturetriangle | vertex1 | vertex2 | vertex3 | | | | | |
x | filltriangle | vertex1 | vertex2 | vertex3 | | | | | |
| getfontinfo | text | font_name | font_size | background | foreground | maxwidth | maxheight | measureonly |
| maketexttexture | | | | | | | | |
| rotate | | | | | | | | |
| setupframebuffer | | | | | | | | |
| setuprenderbuffer | | | | | | | | |
| swapheaders | | | | | | | | |