![]() |
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 to show how to enable AntiAliasing. More...
#include <GLES2/gl2.h>#include <GLES2/gl2ext.h>#include <EGL/egl.h>#include <cstdio>#include <cstdlib>#include <cmath>#include <string>#include "AntiAlias.h"#include "Text.h"#include "Shader.h"#include "Matrix.h"#include "Platform.h"#include "EGLRuntime.h"#include "Timer.h"Macros | |
| #define | WINDOW_W 800 |
| #define | WINDOW_H 600 |
Functions | |
| bool | setupGraphics (int width, int height) |
| void | renderFrame (void) |
| int | main (int argc, char **argv) |
Variables | |
| string | resourceDirectory = "assets/" |
| string | vertexShaderFilename = "AntiAlias_triangle.vert" |
| string | fragmentShaderFilename = "AntiAlias_triangle.frag" |
| GLuint | programID = 0 |
| GLint | iLocPosition = -1 |
| GLint | iLocFillColor = -1 |
| GLint | iLocProjection = -1 |
| int | numberOfSamples = 0 |
| Text * | text |
A sample to show how to enable AntiAliasing.
EGL_SAMPLES is used to specifiy the level of AntiAliasing to be used. On Mali platforms, 4x AntiAliasing incurs almost no performance penalty.
| #define WINDOW_H 600 |
| #define WINDOW_W 800 |
| static void renderFrame | ( | void | ) |
| string fragmentShaderFilename = "AntiAlias_triangle.frag" |
| GLint iLocFillColor = -1 |
| GLint iLocPosition = -1 |
| GLint iLocProjection = -1 |
| int numberOfSamples = 0 |
| GLuint programID = 0 |
| string resourceDirectory = "assets/" |
| Text* text |
| string vertexShaderFilename = "AntiAlias_triangle.vert" |