libgpac
Documentation of the core library of GPAC
Mesh Interface Reference

import"evg.idl";

Public Member Functions

 Mesh ()
 
 Mesh (Path path)
 
void update_gl ()
 
void draw (unsigned long vertex_attrib_location)
 
void draw (unsigned long vertex_attrib_location, unsigned long texture_attrib_location)
 
void draw (unsigned long vertex_attrib_location, unsigned long normal_attrib_location, unsigned long texture_attrib_location)
 
void draw (unsigned long vertex_attrib_location, unsigned long normal_attrib_location, unsigned long color_attrib_location, unsigned long texture_attrib_location)
 

Detailed Description

Mesh object to describe 3D graphics.

Warning
This is a work in progress, API will likely change soon

Constructor & Destructor Documentation

◆ Mesh() [1/2]

Mesh::Mesh ( )

Constructs an empty mesh

◆ Mesh() [2/2]

Mesh::Mesh ( Path  path)

Constructs a mesh from a path

Parameters
path2D path to use as source

Member Function Documentation

◆ update_gl()

void Mesh::update_gl ( )

Updates underlying openGL vertex buffer objects

◆ draw() [1/4]

void Mesh::draw ( unsigned long  vertex_attrib_location)

Draw mesh using current program

Parameters
vertex_attrib_locationuniform location of vertex buffer attribute in program

◆ draw() [2/4]

void Mesh::draw ( unsigned long  vertex_attrib_location,
unsigned long  texture_attrib_location 
)

Draw mesh using current program

Parameters
vertex_attrib_locationuniform location of vertex buffer attribute in program
texture_attrib_locationuniform location of texture coordinate buffer attribute in program

◆ draw() [3/4]

void Mesh::draw ( unsigned long  vertex_attrib_location,
unsigned long  normal_attrib_location,
unsigned long  texture_attrib_location 
)

Draw mesh using current program

Parameters
vertex_attrib_locationuniform location of vertex buffer attribute in program
normal_attrib_locationuniform location of normal buffer attribute in program
texture_attrib_locationuniform location of texture coordinate buffer attribute in program

◆ draw() [4/4]

void Mesh::draw ( unsigned long  vertex_attrib_location,
unsigned long  normal_attrib_location,
unsigned long  color_attrib_location,
unsigned long  texture_attrib_location 
)

Draw mesh using current program

Parameters
vertex_attrib_locationuniform location of vertex buffer attribute in program
normal_attrib_locationuniform location of normal buffer attribute in program
color_attrib_locationuniform location of color buffer attribute in program
texture_attrib_locationuniform location of texture coordinate buffer attribute in program