Here is a first stab at implementing an OpenGL library. The implementation is a subset of the full Android API but the actual functionality is pretty complete (I think!) as the omitted functions are mainly those that used scaled integer working, I have only implemented the equivalents that use floats.
However it is almost totally untested. I have got it to the point where it can draw a triangle on the screen but my total ignorance of OpenGL makes further progress challenging and I'm not really interested in doing graphics. As it can now draw on-screen most of the further functionality should be OK as it is a very thin wrapper of the OpenGL API. The hard part of integrating the GLSurfaceView with Basic4android and drawing on it is done.
The reason for posting it therefore is to see if there is any interest in it before I waste more time on it, and to see if there is an OpenGL expert out there who would collaborate on testing and debugging it - assuming anyone wants to use it at all!
As an aside I believe that the GLSurfaceView, being based on a standard View, can also be drawn on using the same methods as other Views as well as by the OpenGL renderer but I haven't tried that.
Note that the "demo" needs my Threading library.
EDIT :- Version 1.1 posted. See post #5 for details.
EDIT :- Version 1.2 posted. See post #10 for details.
EDIT :- Version 1.3 posted. See post #16 for details.
EDIT :- Version 1.4 posted. See post #21 for details.
EDIT :- Version 1.5 posted. See post #25 for details.
EDIT :- Version 1.6 posted. See post #35 for details.
EDIT :- Version 1.6 reposted with correct version number. See post #38 for details.
EDIT :- Version 1.7 posted. See post #39 for details.
However it is almost totally untested. I have got it to the point where it can draw a triangle on the screen but my total ignorance of OpenGL makes further progress challenging and I'm not really interested in doing graphics. As it can now draw on-screen most of the further functionality should be OK as it is a very thin wrapper of the OpenGL API. The hard part of integrating the GLSurfaceView with Basic4android and drawing on it is done.
The reason for posting it therefore is to see if there is any interest in it before I waste more time on it, and to see if there is an OpenGL expert out there who would collaborate on testing and debugging it - assuming anyone wants to use it at all!
As an aside I believe that the GLSurfaceView, being based on a standard View, can also be drawn on using the same methods as other Views as well as by the OpenGL renderer but I haven't tried that.
Note that the "demo" needs my Threading library.
EDIT :- Version 1.1 posted. See post #5 for details.
EDIT :- Version 1.2 posted. See post #10 for details.
EDIT :- Version 1.3 posted. See post #16 for details.
EDIT :- Version 1.4 posted. See post #21 for details.
EDIT :- Version 1.5 posted. See post #25 for details.
EDIT :- Version 1.6 posted. See post #35 for details.
EDIT :- Version 1.6 reposted with correct version number. See post #38 for details.
EDIT :- Version 1.7 posted. See post #39 for details.
Attachments
Last edited: