OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
geometry.h File Reference
#include <stdio.h>
#include "matrix.h"
#include <GLES3/gl31.h>

Go to the source code of this file.

Classes

struct  Volume
 
struct  App
 

Macros

#define get_attrib_location(prog, name)
 
#define get_uniform_location(prog, name)
 
#define attribfv(prog, name, n, offset)
 
#define attribiv(prog, name, n, offset)
 
#define uniform1f(prog, name, value)   glUniform1f(app->u_##prog##_##name, value);
 
#define uniform2f(prog, name, x, y)   glUniform2f(app->u_##prog##_##name, x, y);
 
#define uniform3fv(prog, name, value)   glUniform3fv(app->u_##prog##_##name, 1, &value[0]);
 
#define uniform1i(prog, name, value)   glUniform1i(app->u_##prog##_##name, value);
 
#define uniformm4(prog, name, value)   glUniformMatrix4fv(app->u_##prog##_##name, 1, GL_FALSE, value.value_ptr());
 

Functions

void gl_check (const char *msg)
 
void app_initialize (App *app)
 
void app_update_and_render (App *app)
 

Macro Definition Documentation

#define attribfv (   prog,
  name,
  n,
  offset 
)
Value:
glEnableVertexAttribArray(app->a_##prog##_##name); \
glVertexAttribPointer(app->a_##prog##_##name, n, GL_FLOAT, GL_FALSE, \
n * sizeof(float), (void*)offset);
GLenum GLuint GLintptr offset
Definition: gl2ext.h:629
ClipmapApplication * app
Definition: main.cpp:47
GLuint name
Definition: gl2ext.h:139
GLfloat n
Definition: gl2ext.h:2707

Definition at line 118 of file geometry.h.

#define attribiv (   prog,
  name,
  n,
  offset 
)
Value:
glEnableVertexAttribArray(app->a_##prog##_##name); \
glVertexAttribPointer(app->a_##prog##_##name, n, GL_INT, GL_FALSE, \
n * sizeof(GLint), (void*)offset);
GLenum GLuint GLintptr offset
Definition: gl2ext.h:629
ClipmapApplication * app
Definition: main.cpp:47
GLuint name
Definition: gl2ext.h:139
GLfloat n
Definition: gl2ext.h:2707

Definition at line 123 of file geometry.h.

#define get_attrib_location (   prog,
  name 
)
Value:
app->a_##prog##_##name = glGetAttribLocation(app->program_##prog, #name); \
if (app->a_##prog##_##name < 0) { \
LOGE("Invalid or unused attribute %s\n", #name); \
}
ClipmapApplication * app
Definition: main.cpp:47
GLuint name
Definition: gl2ext.h:139
#define LOGE(...)
Definition: AstcTextures.h:30

Definition at line 106 of file geometry.h.

#define get_uniform_location (   prog,
  name 
)
Value:
app->u_##prog##_##name = glGetUniformLocation(app->program_##prog, #name); \
if (app->u_##prog##_##name < 0) { \
LOGE("Invalid or unused uniform %s\n", #name); \
}
ClipmapApplication * app
Definition: main.cpp:47
GLuint name
Definition: gl2ext.h:139
#define LOGE(...)
Definition: AstcTextures.h:30

Definition at line 112 of file geometry.h.

#define uniform1f (   prog,
  name,
  value 
)    glUniform1f(app->u_##prog##_##name, value);

Definition at line 128 of file geometry.h.

#define uniform1i (   prog,
  name,
  value 
)    glUniform1i(app->u_##prog##_##name, value);

Definition at line 131 of file geometry.h.

#define uniform2f (   prog,
  name,
  x,
  y 
)    glUniform2f(app->u_##prog##_##name, x, y);

Definition at line 129 of file geometry.h.

#define uniform3fv (   prog,
  name,
  value 
)    glUniform3fv(app->u_##prog##_##name, 1, &value[0]);

Definition at line 130 of file geometry.h.

#define uniformm4 (   prog,
  name,
  value 
)    glUniformMatrix4fv(app->u_##prog##_##name, 1, GL_FALSE, value.value_ptr());

Definition at line 132 of file geometry.h.

Function Documentation

void app_initialize ( App app)

Definition at line 248 of file geometry.cpp.

void app_update_and_render ( App app)

Definition at line 297 of file geometry.cpp.

void gl_check ( const char *  msg)