glBindTexture(GL_TEXTURE_2D, ModelTexture);
//Enable Attribute for "index 0"
glEnableVertexAttribArray(0);
//Enable Attribute for "index 1"
glEnableVertexAttribArray(1);
glBindBuffer(GL_ARRAY_BUFFER, texcoordbuffer);
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
//Model Vertices cordinates
glVertexAttribPointer(0, 0, GL_INT, GL_FALSE,0,0);
//Model Texture cordinates
glVertexAttribPointer(1, 0, GL_FLOAT, GL_FALSE,0,0);
GLfloat RotationMatrix[] = {
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
};
//Translation Process
GLfloat TranslationMatrix[] = {
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 1.0,
0.0, 0.0, 0.0, 1.0
};
//Send Translation Matrix up to the vertex shader
glUniformMatrix4fv(translation, 1, TRUE, TranslationMatrix);
//Send Rotation Matrix up to the vertex shader
glUniformMatrix4fv(Rotation, 1, TRUE, RotationMatrix);
glDrawElements( GL_QUADS, faces.size(), GL_UNSIGNED_INT, reinterpret_cast<GLvoid*>(&faces[0]));
}
Show differencesHistory of post edits
#ActualDarkHorseKnight
Posted 12 April 2012 - 10:15 AM
tried doing that no luck what so ever but thanks for trying 
#2DarkHorseKnight
Posted 12 April 2012 - 10:14 AM
tried doing that no luck what so ever but thanks for trying 
glBindTexture(GL_TEXTURE_2D, ModelTexture);
//Enable Attribute for "index 0"
glEnableVertexAttribArray(0);
//Enable Attribute for "index 1"
glEnableVertexAttribArray(1);
glBindBuffer(GL_ARRAY_BUFFER, texcoordbuffer);
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
//Model Vertices cordinates
glVertexAttribPointer(0, 0, GL_INT, GL_FALSE,0,0);
//Model Texture cordinates
glVertexAttribPointer(1, 0, GL_FLOAT, GL_FALSE,0,0);
//Translation Process
GLfloat RotationMatrix[] = {
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
};
//Translation Process
GLfloat TranslationMatrix[] = {
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 1.0,
0.0, 0.0, 0.0, 1.0
};
//Send Translation Matrix up to the vertex shader
glUniformMatrix4fv(translation, 1, TRUE, TranslationMatrix);
//Send Rotation Matrix up to the vertex shader
glUniformMatrix4fv(Rotation, 1, TRUE, RotationMatrix);
glDrawElements( GL_QUADS, faces.size(), GL_UNSIGNED_INT, reinterpret_cast<GLvoid*>(&faces[0]));
}
#1DarkHorseKnight
Posted 12 April 2012 - 10:10 AM
tried doing that no luck what so ever but thanks for trying