OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MorphedGeoMipMapMesh Class Reference

#include <mesh.hpp>

Inheritance diagram for MorphedGeoMipMapMesh:
Mesh

Classes

struct  LOD
 
struct  LODMesh
 
struct  Patch
 
struct  PatchData
 
struct  Vertex
 

Public Member Functions

 MorphedGeoMipMapMesh ()
 
 ~MorphedGeoMipMapMesh ()
 
 MorphedGeoMipMapMesh (MorphedGeoMipMapMesh &&)=delete
 
MorphedGeoMipMapMeshoperator= (MorphedGeoMipMapMesh &&)=delete
 
void render (const RenderInfo &info) override
 
- Public Member Functions inherited from Mesh
void dispose ()
 
void bind ()
 
virtual ~Mesh ()
 
void dispose ()
 
void bind ()
 

Private Member Functions

void build_lod (unsigned lod)
 
void build_patches ()
 
void init_lod_tex ()
 
void init ()
 
void calculate_lods (const RenderInfo &info)
 

Private Attributes

std::vector< LODlod_meshes
 
std::vector< Patchpatches
 
GLuint ubo
 
GLuint pbo
 
GLuint lod_tex
 
std::vector< floatlod_buffer
 
std::vector< Vertexvertices
 
std::vector< GLushort > indices
 

Static Private Attributes

static constexpr unsigned patch_size = 64
 
static constexpr unsigned lods = 6
 
static constexpr float lod0_distance = 50.0f
 
static constexpr unsigned blocks_x = 32
 
static constexpr unsigned blocks_z = 32
 
static constexpr unsigned max_instances = (16 * 1024) / sizeof(PatchData)
 

Additional Inherited Members

- Public Attributes inherited from Mesh
GLuint vertex_buffer
 
GLuint index_buffer
 
int num_indices
 
int num_vertices
 
std::vector< Vertexvbo
 
std::vector< uint16_t > ibo
 
AABB aabb
 
- Protected Member Functions inherited from Mesh
 Mesh (const char *vs_shader, const char *fs_shader)
 
 Mesh (const char *vs_shader, const char *tc_shader, const char *te_shader, const char *geom_shader, const char *fs_shader)
 
void bind_textures (const RenderInfo &info)
 
- Protected Attributes inherited from Mesh
GLuint prog = 0
 
GLuint vao = 0
 
GLuint vbo = 0
 
GLuint ibo = 0
 

Detailed Description

Definition at line 85 of file mesh.hpp.

Constructor & Destructor Documentation

MorphedGeoMipMapMesh::MorphedGeoMipMapMesh ( )

Definition at line 146 of file mesh.cpp.

MorphedGeoMipMapMesh::~MorphedGeoMipMapMesh ( )

Definition at line 384 of file mesh.cpp.

MorphedGeoMipMapMesh::MorphedGeoMipMapMesh ( MorphedGeoMipMapMesh &&  )
delete

Member Function Documentation

void MorphedGeoMipMapMesh::build_lod ( unsigned  lod)
private

Definition at line 317 of file mesh.cpp.

void MorphedGeoMipMapMesh::build_patches ( )
private

Definition at line 363 of file mesh.cpp.

void MorphedGeoMipMapMesh::calculate_lods ( const RenderInfo info)
private

Definition at line 158 of file mesh.cpp.

void MorphedGeoMipMapMesh::init ( )
private

Definition at line 391 of file mesh.cpp.

void MorphedGeoMipMapMesh::init_lod_tex ( )
private

Definition at line 370 of file mesh.cpp.

MorphedGeoMipMapMesh& MorphedGeoMipMapMesh::operator= ( MorphedGeoMipMapMesh &&  )
delete
void MorphedGeoMipMapMesh::render ( const RenderInfo info)
overridevirtual

Implements Mesh.

Definition at line 283 of file mesh.cpp.

Member Data Documentation

constexpr unsigned MorphedGeoMipMapMesh::blocks_x = 32
staticprivate

Definition at line 155 of file mesh.hpp.

constexpr unsigned MorphedGeoMipMapMesh::blocks_z = 32
staticprivate

Definition at line 156 of file mesh.hpp.

std::vector<GLushort> MorphedGeoMipMapMesh::indices
private

Definition at line 176 of file mesh.hpp.

constexpr float MorphedGeoMipMapMesh::lod0_distance = 50.0f
staticprivate

Definition at line 154 of file mesh.hpp.

std::vector<float> MorphedGeoMipMapMesh::lod_buffer
private

Definition at line 162 of file mesh.hpp.

std::vector<LOD> MorphedGeoMipMapMesh::lod_meshes
private

Definition at line 146 of file mesh.hpp.

GLuint MorphedGeoMipMapMesh::lod_tex
private

Definition at line 161 of file mesh.hpp.

constexpr unsigned MorphedGeoMipMapMesh::lods = 6
staticprivate

Definition at line 153 of file mesh.hpp.

constexpr unsigned MorphedGeoMipMapMesh::max_instances = (16 * 1024) / sizeof(PatchData)
staticprivate

Definition at line 159 of file mesh.hpp.

constexpr unsigned MorphedGeoMipMapMesh::patch_size = 64
staticprivate

Definition at line 151 of file mesh.hpp.

std::vector<Patch> MorphedGeoMipMapMesh::patches
private

Definition at line 147 of file mesh.hpp.

GLuint MorphedGeoMipMapMesh::pbo
private

Definition at line 149 of file mesh.hpp.

GLuint MorphedGeoMipMapMesh::ubo
private

Definition at line 148 of file mesh.hpp.

std::vector<Vertex> MorphedGeoMipMapMesh::vertices
private

Definition at line 175 of file mesh.hpp.


The documentation for this class was generated from the following files: