13.07.2015 Views

Mali GPU User Interface Engine Application Development Guide

Mali GPU User Interface Engine Application Development Guide

Mali GPU User Interface Engine Application Development Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tutorial on Drawing 3D ShapesExample 4-3 Setting the vertex position for hello world...GLfloat vertexData[] = {// FRONT-0.5f, -0.5f, 0.5f,0.5f, -0.5f, 0.5f,-0.5f, 0.5f, 0.5f,0.5f, 0.5f, 0.5f,// BACK-0.5f, -0.5f, -0.5f,-0.5f, 0.5f, -0.5f,0.5f, -0.5f, -0.5f,0.5f, 0.5f, -0.5f,// LEFT-0.5f, -0.5f, 0.5f,-0.5f, 0.5f, 0.5f,-0.5f, -0.5f, -0.5f,-0.5f, 0.5f, -0.5f,// RIGHT0.5f, -0.5f, -0.5f,0.5f, 0.5f, -0.5f,0.5f, -0.5f, 0.5f,0.5f, 0.5f, 0.5f,// TOP-0.5f, 0.5f, 0.5f,0.5f, 0.5f, 0.5f,-0.5f, 0.5f, -0.5f,0.5f, 0.5f, -0.5f,// BOTTOM-0.5f, -0.5f, 0.5f,-0.5f, -0.5f, -0.5f,0.5f, -0.5f, 0.5f,0.5f, -0.5f, -0.5f,};Managed vertexBuffer =context->createBuffer(GL_ARRAY_BUFFER, sizeof(vertexData), sizeof(GLfloat)*3);vertexBuffer->setData(0, sizeof(vertexData), vertexData);context->setVertexBuffer(0, vertexBuffer);VertexElement elements[1];elements[0].components = 3;elements[0].offset = 0;elements[0].semantic = POSITION;elements[0].stream = 0;elements[0].type = GL_FLOAT;...Managed vertexDeclaration =context->createVertexDeclaration(elements, 1);context->setVertexDeclaration(vertexDeclaration);5. This project uses a camera position and object position. The view and projection matricesand multiply them to get the modelview projection matrix.ARM DUI 0527A-02a Copyright © 2010 ARM. All rights reserved. 4-3ID070710Non-Confidential - Draft - Beta

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!