Search Engine

Wednesday, May 26, 2010

Introduction to OpenGL ES - In practice

  1. Start Carbie C/C++
  2. Create new Symbian OS project
  3. Click on the button "Next", type the project name "openGLEStest" and then press button "Finish"
  4. Initiate the OpenGL ES (See part 1 for more detail)
  5. Implement the initial code
  6. Draw the scene
  7. Clean up resource
  8. Run the project

Open file openglestestAppView.h, add a function to initiate the OpenGL ES. And add some variables necessary for initiation.

Open file openglestestAppView.cpp, add a function void CopenglestestAppView::initGL().

Open file openglestestAppView.h, add a draw function and a callback function to draw the scene.

Then open the file openglestestAppView.cpp to implement the function drawScence() and DrawCallBack( TAny* aInstance ).

Open the function void CopenglestestAppView::SizeChanged() and void CopenglestestAppView::Draw(const TRect& /*aRect*/) const, comment out the draw code.

Open the function ConstructL(const TRect& aRect) and add some initial code (set the window to full screen, ...)

Open the destructor function ~CopenglestestAppView() and add some code to free the resource has been used.


Post a Comment