OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
glutil.h File Reference
#include "matrix.h"
#include "common.h"
#include "shader.h"
#include <string>
#include <sstream>

Go to the source code of this file.

Functions

void cull (bool enabled, GLenum front=GL_CCW, GLenum mode=GL_BACK)
 
void depth_test (bool enabled, GLenum func=GL_LEQUAL)
 
void depth_write (bool enabled)
 
void blend_mode (bool enabled, GLenum src=GL_ONE, GLenum dest=GL_ONE, GLenum func=GL_FUNC_ADD)
 
void use_shader (Shader shader)
 
void attribfv (string name, GLsizei num_components, GLsizei stride, GLsizei offset)
 
void unset_attrib (string name)
 
void uniform (string name, const mat4 &v)
 
void uniform (string name, const vec4 &v)
 
void uniform (string name, const vec3 &v)
 
void uniform (string name, const vec2 &v)
 
void uniform (string name, double v)
 
void uniform (string name, float v)
 
void uniform (string name, int v)
 
void uniform (string name, unsigned int v)
 
bool read_file (const std::string &path, std::string &dest)
 
GLuint gen_buffer (GLenum target, GLsizei size, const void *data)
 
GLuint gen_buffer (GLenum target, GLenum usage, GLsizei size, const void *data)
 
void del_buffer (GLuint buffer)
 

Function Documentation

void attribfv ( string  name,
GLsizei  num_components,
GLsizei  stride,
GLsizei  offset 
)

Definition at line 87 of file glutil.cpp.

void blend_mode ( bool  enabled,
GLenum  src = GL_ONE,
GLenum  dest = GL_ONE,
GLenum  func = GL_FUNC_ADD 
)

Definition at line 67 of file glutil.cpp.

void cull ( bool  enabled,
GLenum  front = GL_CCW,
GLenum  mode = GL_BACK 
)

Definition at line 27 of file glutil.cpp.

void del_buffer ( GLuint  buffer)

Definition at line 137 of file glutil.cpp.

void depth_test ( bool  enabled,
GLenum  func = GL_LEQUAL 
)

Definition at line 41 of file glutil.cpp.

void depth_write ( bool  enabled)

Definition at line 54 of file glutil.cpp.

GLuint gen_buffer ( GLenum  target,
GLsizei  size,
const void data 
)

Definition at line 132 of file glutil.cpp.

GLuint gen_buffer ( GLenum  target,
GLenum  usage,
GLsizei  size,
const void data 
)

Definition at line 122 of file glutil.cpp.

bool read_file ( const std::string &  path,
std::string &  dest 
)

Definition at line 106 of file glutil.cpp.

void uniform ( string  name,
const mat4 v 
)

Definition at line 97 of file glutil.cpp.

void uniform ( string  name,
const vec4 v 
)

Definition at line 98 of file glutil.cpp.

void uniform ( string  name,
const vec3 v 
)

Definition at line 99 of file glutil.cpp.

void uniform ( string  name,
const vec2 v 
)

Definition at line 100 of file glutil.cpp.

void uniform ( string  name,
double  v 
)

Definition at line 101 of file glutil.cpp.

void uniform ( string  name,
float  v 
)

Definition at line 102 of file glutil.cpp.

void uniform ( string  name,
int  v 
)

Definition at line 103 of file glutil.cpp.

void uniform ( string  name,
unsigned int  v 
)

Definition at line 104 of file glutil.cpp.

void unset_attrib ( string  name)

Definition at line 92 of file glutil.cpp.

void use_shader ( Shader  shader)

Definition at line 81 of file glutil.cpp.