NullWS Entry Point#
/*!**************************************************************************
\File OpenGLESHelloAPI_NullWS.cpp
\Title OpenGL ES 2.0 HelloAPI Tutorial
\Author PowerVR by Imagination, Developer Technology Team
\Copyright Copyright (c) Imagination Technologies Limited.
\brief Basic Tutorial that shows step-by-step how to initialise OpenGL ES 2.0, use it for drawing a triangle and terminate it.
Entry Point: main
*****************************************************************************/
#include "OpenGLESHelloAPI.h"
#include <stdio.h>
/*!***************************************************************************
\param[in] argc Number of arguments passed to the application, ignored.
\param[in] argv Command line strings passed to the application, ignored.
\return Result code to send to the Operating System
\brief Main function of the program, executes other functions.
*****************************************************************************/
int main(int /*argc*/, char** /*argv*/)
{
OpenGLESAPI helloAPI;
Setup OpenGL ES state and objects.
helloAPI.initializeEGL();
helloAPI.initializeGLES();
Renders a triangle for 800 frames using the state setup in the previous function.
for (int i = 0; i < 800; ++i)
{
if (!helloAPI.drawFrame() || !helloAPI.swapEGLBuffers())
{
break;
}
}
Release any resources created in the Initialize functions.
helloAPI.releaseGLState();
helloAPI.releaseEGLState();
Destroy the eglWindow.
return 0;
}