Replace SharedModel with ModelInstance

This commit is contained in:
Gustl22
2018-08-30 10:21:35 +02:00
parent 3beb830baf
commit 74a7150cff
6 changed files with 34 additions and 584 deletions

View File

@@ -3,6 +3,7 @@ package org.oscim.test.gdx.poi3d;
import com.badlogic.gdx.graphics.g3d.Environment;
import com.badlogic.gdx.graphics.g3d.Model;
import com.badlogic.gdx.graphics.g3d.ModelBatch;
import com.badlogic.gdx.graphics.g3d.ModelInstance;
import com.badlogic.gdx.graphics.g3d.Renderable;
import com.badlogic.gdx.graphics.g3d.Shader;
import com.badlogic.gdx.graphics.g3d.attributes.ColorAttribute;
@@ -36,7 +37,7 @@ public class GdxModelRenderer extends LayerRenderer {
public Environment lights;
public Array<SharedModel> instances = new Array<SharedModel>();
public Array<ModelInstance> instances = new Array<>();
public Shader shader;
public RenderContext renderContext;
@@ -151,7 +152,7 @@ public class GdxModelRenderer extends LayerRenderer {
mBatch.begin(cam);
//shader.begin(cam, renderContext);
for (SharedModel instance : instances) {
for (ModelInstance instance : instances) {
instance.transform.getTranslation(tempVector);
//instance.getRenderables(renderables, pool);
// if (tempVector.x * tempVector.x + tempVector.y * tempVector.y > sqRadius)