Exemplo n.º 1
0
Model* LoadModelPlus(char* name/*,
			GLuint program,
			char* vertexVariableName,
			char* normalVariableName,
			char* texCoordVariableName*/)
{
	Model *m;
	
	m = LoadModel(name);
	
	BuildModelVAO2(m/*, program, vertexVariableName, normalVariableName, texCoordVariableName*/);
	
	return m;
}
Exemplo n.º 2
0
Model* LoadModelPlus(char* name/*,
			GLuint program,
			char* vertexVariableName,
			char* normalVariableName,
			char* texCoordVariableName*/)
{
    Model *m;

    m = LoadModel(name);

#ifdef __linux__
    glGenVertexArrays(1, &m->vao);
#endif

    //glBindVertexArray(m->vao);
    BuildModelVAO2(m/*, program, vertexVariableName, normalVariableName, texCoordVariableName*/);

    return m;
}
Exemplo n.º 3
0
// Loader for inline data to Model (almost same as LoadModelPlus)
Model* LoadDataToModel(
    GLfloat *vertices,
    GLfloat *normals,
    GLfloat *texCoords,
    GLfloat *colors,
    GLuint *indices,
    int numVert,
    int numInd)
{
    Model* m = malloc(sizeof(Model));
    memset(m, 0, sizeof(Model));

    m->vertexArray = vertices;
    m->texCoordArray = texCoords;
    m->normalArray = normals;
    m->indexArray = indices;
    m->numVertices = numVert;
    m->numIndices = numInd;

    BuildModelVAO2(m);

    return m;
}