Using Egloo is very easy even for those who do not have GLES experience at all. The example below will create a context, draw a red triangle and release.
First, configure an EGL context and window:
// Configure an EGL context and window val core = EglCore() val window = EglWindowSurface(core, outputSurface) window.makeCurrent()
Then draw our triangle:
val drawable = GlTriangle() // GlDrawable: what to draw val program = GlFlatProgram() // GlProgram: how to draw program.setColor(Color.RED) program.draw(drawable)
Then publish what we have drawn. The
outputSurface defined above will receive our frame:
Finally, release everything:
program.release() window.release() core.release()
Please keep reading the in-depth documentation for all the APIs and features we offer.