use of com.chrisali.javaflightsim.lwjgl.models.RawModel in project j6dof-flight-sim by chris-ali.
the class TerrainRenderer method prepareTerrain.
private void prepareTerrain(Terrain terrain) {
RawModel rawModel = terrain.getModel();
GL30.glBindVertexArray(rawModel.getVaoID());
GL20.glEnableVertexAttribArray(0);
GL20.glEnableVertexAttribArray(1);
GL20.glEnableVertexAttribArray(2);
bindTextures(terrain);
// TODO
terrainShader.loadShineVariables(1, 0);
}
use of com.chrisali.javaflightsim.lwjgl.models.RawModel in project j6dof-flight-sim by chris-ali.
the class EntityRenderer method prepareTexturedModel.
private void prepareTexturedModel(TexturedModel model) {
RawModel rawModel = model.getRawModel();
GL30.glBindVertexArray(rawModel.getVaoID());
GL20.glEnableVertexAttribArray(0);
GL20.glEnableVertexAttribArray(1);
GL20.glEnableVertexAttribArray(2);
ModelTexture texture = model.getTexture();
shader.loadFakeLightingVariable(texture.isUseFakeLighting());
shader.loadShineVariables(texture.getShineDamper(), texture.getReflectivity());
shader.loadNumberOfRows(texture.getNumberOfAtlasRows());
if (texture.isHasTransparency())
MasterRenderer.disableCulling();
GL13.glActiveTexture(GL13.GL_TEXTURE0);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, model.getTexture().getTextureID());
}
Aggregations