![]() |
Mali OpenGL ES SDK v2.4.4
Mali Developer Center
Use of the code snippets present within these pages are subject to these EULA terms
|
A sample which shows how to draw a simple triangle to the screen. More...
#include <GLES2/gl2.h>#include <GLES2/gl2ext.h>#include <EGL/egl.h>#include <cstdio>#include <cstdlib>#include <cmath>#include "Triangle.h"#include "Text.h"#include "Shader.h"#include "Timer.h"#include "Platform.h"#include "EGLRuntime.h"Macros | |
| #define | WINDOW_W 800 |
| #define | WINDOW_H 600 |
Functions | |
| bool | setupGraphics (int width, int height) |
| void | renderFrame (void) |
| int | main (void) |
Variables | |
| string | resourceDirectory = "assets/" |
| string | vertexShaderFilename = "Triangle_triangle.vert" |
| string | fragmentShaderFilename = "Triangle_triangle.frag" |
| GLuint | programID |
| GLint | iLocPosition = -1 |
| GLint | iLocFillColor = -1 |
| Text * | text |
A sample which shows how to draw a simple triangle to the screen.
Uses a simple shader to fill the the triangle with a gradient color.
| #define WINDOW_H 600 |
| #define WINDOW_W 800 |
| int main | ( | void | ) |
| void renderFrame | ( | void | ) |
| string fragmentShaderFilename = "Triangle_triangle.frag" |
| GLint iLocFillColor = -1 |
| GLint iLocPosition = -1 |
| GLuint programID |
| string resourceDirectory = "assets/" |
| Text* text |
| string vertexShaderFilename = "Triangle_triangle.vert" |