OpenGL-ES EGL

1. What is EGL?

EGL is one interface between OPenGL ES and the native window system (I believe this is something to do with the hardware manufactures).

An OpenGL ES application should query the displays and initialise them using EGL before doing any sort of rendering. Then it should ask EGL to create a rendering surfaces.

2. What is a rendering context?

It stores the OpenGL ES state through out the application.

3. Explain how to Initialise a OpenGL-ES Application?

First the ES is initialised and ES code framework is booted. [esInitialize]

Then a window is created passing that context, size and other rendering requirements (for example RGB frame buffer). [esCreateWindow]

Then the context is initialised. That means – the shaders are compiled. – A Program object is created and those shaders are attached to it. Attribute locations binding in program object is done. Program object is linked and stored into the context’s “userdata”. (I have no idea what this Program Object is all about.)

Then context is registered with a Draw function which is called to render the frame. [esRegisterDrawFunc] The Draw method will initialise the view port. Then it clears the Buffers. Ask ES to use the program object we created earlier. Load the vertex data of the object. Ask the ES to Draw with a primitive method.  Swap the buffers when the back buffer is ready.

Then the context enters the main message processing loop until the window is closed [esMainLoop]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s