Beispiel #1
0
 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.loadNumberOfRows(texture.getNumberOfRows());
   if (texture.isHasTransparency()) {
     MasterRenderer.disableCulling();
   }
   shader.loadShineVariables(texture.getShineDamper(), texture.getReflectivity());
   GL13.glActiveTexture(GL13.GL_TEXTURE0);
   GL11.glBindTexture(GL11.GL_TEXTURE_2D, model.getTexture().getID());
   shader.loadUseSpecularMap(texture.hasSpecularMap());
   if (texture.hasSpecularMap()) {
     GL13.glActiveTexture(GL13.GL_TEXTURE1);
     GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture.getSpecularMap());
   }
 }
 public int getTextID() {
   return text.getId();
 }