Testing model loading.
This commit is contained in:
@@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package ve.ucv.ciens.ccg.nxtar.entities;
|
package ve.ucv.ciens.ccg.nxtar.entities;
|
||||||
|
|
||||||
|
import ve.ucv.ciens.ccg.nxtar.components.ShaderComponent;
|
||||||
import ve.ucv.ciens.ccg.nxtar.components.GeometryComponent;
|
import ve.ucv.ciens.ccg.nxtar.components.GeometryComponent;
|
||||||
import ve.ucv.ciens.ccg.nxtar.components.MarkerCodeComponent;
|
import ve.ucv.ciens.ccg.nxtar.components.MarkerCodeComponent;
|
||||||
import ve.ucv.ciens.ccg.nxtar.components.MeshComponent;
|
import ve.ucv.ciens.ccg.nxtar.components.MeshComponent;
|
||||||
import ve.ucv.ciens.ccg.nxtar.components.ShaderComponent;
|
|
||||||
import ve.ucv.ciens.ccg.nxtar.exceptions.ShaderFailedToLoadException;
|
import ve.ucv.ciens.ccg.nxtar.exceptions.ShaderFailedToLoadException;
|
||||||
import ve.ucv.ciens.ccg.nxtar.graphics.shaders.CustomShaderBase;
|
import ve.ucv.ciens.ccg.nxtar.graphics.shaders.CustomShaderBase;
|
||||||
import ve.ucv.ciens.ccg.nxtar.graphics.shaders.SingleLightPhongShader;
|
import ve.ucv.ciens.ccg.nxtar.graphics.shaders.SingleLightPhongShader;
|
||||||
@@ -30,27 +30,33 @@ import com.badlogic.gdx.graphics.Mesh;
|
|||||||
import com.badlogic.gdx.graphics.VertexAttribute;
|
import com.badlogic.gdx.graphics.VertexAttribute;
|
||||||
import com.badlogic.gdx.graphics.VertexAttributes;
|
import com.badlogic.gdx.graphics.VertexAttributes;
|
||||||
import com.badlogic.gdx.graphics.VertexAttributes.Usage;
|
import com.badlogic.gdx.graphics.VertexAttributes.Usage;
|
||||||
|
import com.badlogic.gdx.graphics.g3d.Model;
|
||||||
|
import com.badlogic.gdx.graphics.g3d.loader.G3dModelLoader;
|
||||||
import com.badlogic.gdx.graphics.g3d.utils.MeshBuilder;
|
import com.badlogic.gdx.graphics.g3d.utils.MeshBuilder;
|
||||||
import com.badlogic.gdx.math.Matrix3;
|
import com.badlogic.gdx.math.Matrix3;
|
||||||
import com.badlogic.gdx.math.Vector3;
|
import com.badlogic.gdx.math.Vector3;
|
||||||
|
import com.badlogic.gdx.utils.JsonReader;
|
||||||
|
|
||||||
public class MarkerTestEntityCreator extends EntityCreatorBase {
|
public class MarkerTestEntityCreator extends EntityCreatorBase {
|
||||||
private static final String TAG = "MARKER_TEST_ENTITY_CREATOR";
|
private static final String TAG = "MARKER_TEST_ENTITY_CREATOR";
|
||||||
private static final String CLASS_NAME = MarkerTestEntityCreator.class.getSimpleName();
|
private static final String CLASS_NAME = MarkerTestEntityCreator.class.getSimpleName();
|
||||||
|
|
||||||
private Mesh patchMesh, sphereMesh, boxMesh;
|
private Mesh sphereMesh;
|
||||||
|
private Mesh boxMesh;
|
||||||
|
private Model bombModel;
|
||||||
private CustomShaderBase phongShader;
|
private CustomShaderBase phongShader;
|
||||||
|
private Mesh bombMesh;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createAllEntities() {
|
public void createAllEntities() {
|
||||||
MeshBuilder builder;
|
MeshBuilder builder;
|
||||||
Matrix3 identity = new Matrix3().idt();
|
Entity bomb, sphere, box;
|
||||||
Entity patch, sphere, box;
|
G3dModelLoader loader;
|
||||||
|
|
||||||
// Create mesh.
|
// Create mesh.
|
||||||
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): Creating the meshes.");
|
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): Creating the meshes.");
|
||||||
builder = new MeshBuilder();
|
builder = new MeshBuilder();
|
||||||
builder.begin(new VertexAttributes(new VertexAttribute(Usage.Position, 3, "a_position"), new VertexAttribute(Usage.Normal, 3, "a_normal"), new VertexAttribute(Usage.Color, 4, "a_color")), GL20.GL_TRIANGLES);{
|
/*builder.begin(new VertexAttributes(new VertexAttribute(Usage.Position, 3, "a_position"), new VertexAttribute(Usage.Normal, 3, "a_normal"), new VertexAttribute(Usage.Color, 4, "a_color")), GL20.GL_TRIANGLES);{
|
||||||
builder.setColor(1.0f, 1.0f, 1.0f, 1.0f);
|
builder.setColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
Vector3 v00 = new Vector3(-0.5f, -0.5f, 0.0f);
|
Vector3 v00 = new Vector3(-0.5f, -0.5f, 0.0f);
|
||||||
Vector3 v10 = new Vector3(-0.5f, 0.5f, 0.0f);
|
Vector3 v10 = new Vector3(-0.5f, 0.5f, 0.0f);
|
||||||
@@ -58,7 +64,7 @@ public class MarkerTestEntityCreator extends EntityCreatorBase {
|
|||||||
Vector3 v01 = new Vector3( 0.5f, -0.5f, 0.0f);
|
Vector3 v01 = new Vector3( 0.5f, -0.5f, 0.0f);
|
||||||
Vector3 n = new Vector3(0.0f, 1.0f, 0.0f);
|
Vector3 n = new Vector3(0.0f, 1.0f, 0.0f);
|
||||||
builder.patch(v00, v10, v11, v01, n, 10, 10);
|
builder.patch(v00, v10, v11, v01, n, 10, 10);
|
||||||
}patchMesh = builder.end();
|
}patchMesh = builder.end();*/
|
||||||
|
|
||||||
builder.begin(new VertexAttributes(new VertexAttribute(Usage.Position, 3, "a_position"), new VertexAttribute(Usage.Normal, 3, "a_normal"), new VertexAttribute(Usage.Color, 4, "a_color")), GL20.GL_TRIANGLES);{
|
builder.begin(new VertexAttributes(new VertexAttribute(Usage.Position, 3, "a_position"), new VertexAttribute(Usage.Normal, 3, "a_normal"), new VertexAttribute(Usage.Color, 4, "a_color")), GL20.GL_TRIANGLES);{
|
||||||
builder.setColor(1.0f, 1.0f, 1.0f, 1.0f);
|
builder.setColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
@@ -70,6 +76,12 @@ public class MarkerTestEntityCreator extends EntityCreatorBase {
|
|||||||
builder.box(0.5f, 0.5f, 6.0f);
|
builder.box(0.5f, 0.5f, 6.0f);
|
||||||
}boxMesh = builder.end();
|
}boxMesh = builder.end();
|
||||||
|
|
||||||
|
loader = new G3dModelLoader(new JsonReader());
|
||||||
|
bombModel = loader.loadModel(Gdx.files.internal("models/Bomb_test_1.g3dj"));
|
||||||
|
|
||||||
|
bombMesh = bombModel.meshes.get(0);
|
||||||
|
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): " + bombMesh.getVertexAttributes().toString());
|
||||||
|
|
||||||
// Load the phong shader.
|
// Load the phong shader.
|
||||||
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): Loading the phong shader.");
|
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): Loading the phong shader.");
|
||||||
try{
|
try{
|
||||||
@@ -81,27 +93,28 @@ public class MarkerTestEntityCreator extends EntityCreatorBase {
|
|||||||
|
|
||||||
// Create the entities.
|
// Create the entities.
|
||||||
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): Creating the enitites.");
|
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): Creating the enitites.");
|
||||||
patch = world.createEntity();
|
bomb = world.createEntity();
|
||||||
patch.addComponent(new GeometryComponent(new Vector3(0.0f, 0.0f, 0.0f), identity, new Vector3(1.0f, 1.0f, 1.0f)));
|
bomb.addComponent(new GeometryComponent(new Vector3(0.0f, 0.0f, 0.0f), new Matrix3().idt(), new Vector3(1.0f, 1.0f, 1.0f)));
|
||||||
patch.addComponent(new MeshComponent(patchMesh));
|
bomb.addComponent(new MeshComponent(bombMesh));
|
||||||
patch.addComponent(new ShaderComponent(phongShader));
|
bomb.addComponent(new ShaderComponent(phongShader));
|
||||||
patch.addComponent(new MarkerCodeComponent(213));
|
bomb.addComponent(new MarkerCodeComponent(213));
|
||||||
|
|
||||||
sphere = world.createEntity();
|
sphere = world.createEntity();
|
||||||
sphere.addComponent(new GeometryComponent(new Vector3(0.0f, 0.0f, 0.0f), identity, new Vector3(1.0f, 1.0f, 1.0f)));
|
sphere.addComponent(new GeometryComponent(new Vector3(0.0f, 0.0f, 0.0f), new Matrix3().idt(), new Vector3(1.0f, 1.0f, 1.0f)));
|
||||||
sphere.addComponent(new MeshComponent(sphereMesh));
|
sphere.addComponent(new MeshComponent(sphereMesh));
|
||||||
sphere.addComponent(new ShaderComponent(phongShader));
|
sphere.addComponent(new ShaderComponent(phongShader));
|
||||||
sphere.addComponent(new MarkerCodeComponent(10));
|
sphere.addComponent(new MarkerCodeComponent(10));
|
||||||
|
|
||||||
box = world.createEntity();
|
box = world.createEntity();
|
||||||
box.addComponent(new GeometryComponent(new Vector3(-1.0f, 0.0f, 0.0f), identity, new Vector3(1.0f, 1.0f, 1.0f)));
|
box.addComponent(new GeometryComponent(new Vector3(-1.0f, 0.0f, 0.0f), new Matrix3().idt(), new Vector3(1.0f, 1.0f, 1.0f)));
|
||||||
box.addComponent(new MeshComponent(boxMesh));
|
box.addComponent(new MeshComponent(boxMesh));
|
||||||
box.addComponent(new ShaderComponent(phongShader));
|
box.addComponent(new ShaderComponent(phongShader));
|
||||||
|
|
||||||
// Add the entities to the world.
|
// Add the entities to the world.
|
||||||
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): Adding entities to the world.");
|
Gdx.app.log(TAG, CLASS_NAME + ".createAllEntities(): Adding entities to the world.");
|
||||||
|
//sphere.addToWorld();
|
||||||
|
bomb.addToWorld();
|
||||||
sphere.addToWorld();
|
sphere.addToWorld();
|
||||||
patch.addToWorld();
|
|
||||||
box.addToWorld();
|
box.addToWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,13 +123,13 @@ public class MarkerTestEntityCreator extends EntityCreatorBase {
|
|||||||
if(phongShader != null && phongShader.getShaderProgram() != null)
|
if(phongShader != null && phongShader.getShaderProgram() != null)
|
||||||
phongShader.getShaderProgram().dispose();
|
phongShader.getShaderProgram().dispose();
|
||||||
|
|
||||||
if(patchMesh != null)
|
|
||||||
patchMesh.dispose();
|
|
||||||
|
|
||||||
if(sphereMesh != null)
|
if(sphereMesh != null)
|
||||||
sphereMesh.dispose();
|
sphereMesh.dispose();
|
||||||
|
|
||||||
if(boxMesh != null)
|
if(boxMesh != null)
|
||||||
boxMesh.dispose();
|
boxMesh.dispose();
|
||||||
|
|
||||||
|
if(bombModel != null)
|
||||||
|
bombModel.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -62,7 +62,7 @@ public class InGameState extends BaseState{
|
|||||||
private static final float FAR_PLUS_NEAR = FAR + NEAR;
|
private static final float FAR_PLUS_NEAR = FAR + NEAR;
|
||||||
private static final float FAR_LESS_NEAR = FAR - NEAR;
|
private static final float FAR_LESS_NEAR = FAR - NEAR;
|
||||||
private static final Vector3 LIGHT_POSITION = new Vector3(2.0f, 2.0f, 4.0f);
|
private static final Vector3 LIGHT_POSITION = new Vector3(2.0f, 2.0f, 4.0f);
|
||||||
private static final Color AMBIENT_COLOR = new Color(0.0f, 0.1f, 0.2f, 1.0f);
|
private static final Color AMBIENT_COLOR = new Color(0.0f, 0.1f, 0.3f, 1.0f);
|
||||||
private static final Color DIFFUSE_COLOR = new Color(1.0f, 1.0f, 1.0f, 1.0f);
|
private static final Color DIFFUSE_COLOR = new Color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
private static final Color SPECULAR_COLOR = new Color(1.0f, 0.8f, 0.0f, 1.0f);
|
private static final Color SPECULAR_COLOR = new Color(1.0f, 0.8f, 0.0f, 1.0f);
|
||||||
private static final float SHINYNESS = 50.0f;
|
private static final float SHINYNESS = 50.0f;
|
||||||
@@ -240,11 +240,6 @@ public class InGameState extends BaseState{
|
|||||||
perspectiveCamera.update();
|
perspectiveCamera.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply the undistortion method if the camera has been calibrated already.
|
|
||||||
/*if(core.cvProc.isCameraCalibrated()){
|
|
||||||
frame = core.cvProc.undistortFrame(frame);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Attempt to find the markers in the current video frame.
|
// Attempt to find the markers in the current video frame.
|
||||||
data = core.cvProc.findMarkersInFrame(frame);
|
data = core.cvProc.findMarkersInFrame(frame);
|
||||||
|
|
||||||
@@ -273,7 +268,6 @@ public class InGameState extends BaseState{
|
|||||||
// Set the 3D frame buffer for rendering.
|
// Set the 3D frame buffer for rendering.
|
||||||
frameBuffer.begin();{
|
frameBuffer.begin();{
|
||||||
// Set OpenGL state.
|
// Set OpenGL state.
|
||||||
Gdx.gl.glDisable(GL20.GL_CULL_FACE);
|
|
||||||
Gdx.gl.glEnable(GL20.GL_DEPTH_TEST);
|
Gdx.gl.glEnable(GL20.GL_DEPTH_TEST);
|
||||||
Gdx.gl.glClearColor(0, 0, 0, 0);
|
Gdx.gl.glClearColor(0, 0, 0, 0);
|
||||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
package ve.ucv.ciens.ccg.nxtar.systems;
|
package ve.ucv.ciens.ccg.nxtar.systems;
|
||||||
|
|
||||||
|
import ve.ucv.ciens.ccg.nxtar.components.ShaderComponent;
|
||||||
import ve.ucv.ciens.ccg.nxtar.components.GeometryComponent;
|
import ve.ucv.ciens.ccg.nxtar.components.GeometryComponent;
|
||||||
import ve.ucv.ciens.ccg.nxtar.components.MarkerCodeComponent;
|
import ve.ucv.ciens.ccg.nxtar.components.MarkerCodeComponent;
|
||||||
import ve.ucv.ciens.ccg.nxtar.components.MeshComponent;
|
import ve.ucv.ciens.ccg.nxtar.components.MeshComponent;
|
||||||
import ve.ucv.ciens.ccg.nxtar.components.ShaderComponent;
|
|
||||||
import ve.ucv.ciens.ccg.nxtar.graphics.RenderParameters;
|
import ve.ucv.ciens.ccg.nxtar.graphics.RenderParameters;
|
||||||
import ve.ucv.ciens.ccg.nxtar.interfaces.ImageProcessor.MarkerData;
|
import ve.ucv.ciens.ccg.nxtar.interfaces.ImageProcessor.MarkerData;
|
||||||
import ve.ucv.ciens.ccg.nxtar.utils.ProjectConstants;
|
import ve.ucv.ciens.ccg.nxtar.utils.ProjectConstants;
|
||||||
@@ -18,10 +18,10 @@ import com.badlogic.gdx.graphics.GL20;
|
|||||||
import com.badlogic.gdx.math.Matrix4;
|
import com.badlogic.gdx.math.Matrix4;
|
||||||
|
|
||||||
public class MarkerRenderingSystem extends EntityProcessingSystem {
|
public class MarkerRenderingSystem extends EntityProcessingSystem {
|
||||||
@Mapper ComponentMapper<MarkerCodeComponent> markerMapper;
|
@Mapper ComponentMapper<MarkerCodeComponent> markerMapper;
|
||||||
@Mapper ComponentMapper<GeometryComponent> geometryMapper;
|
@Mapper ComponentMapper<GeometryComponent> geometryMapper;
|
||||||
@Mapper ComponentMapper<ShaderComponent> shaderMapper;
|
@Mapper ComponentMapper<ShaderComponent> shaderMapper;
|
||||||
@Mapper ComponentMapper<MeshComponent> meshMapper;
|
@Mapper ComponentMapper<MeshComponent> meshMapper;
|
||||||
|
|
||||||
private static final String TAG = "MARKER_RENDERING_SYSTEM";
|
private static final String TAG = "MARKER_RENDERING_SYSTEM";
|
||||||
private static final String CLASS_NAME = MarkerRenderingSystem.class.getSimpleName();
|
private static final String CLASS_NAME = MarkerRenderingSystem.class.getSimpleName();
|
||||||
@@ -53,9 +53,9 @@ public class MarkerRenderingSystem extends EntityProcessingSystem {
|
|||||||
super(Aspect.getAspectForAll(MarkerCodeComponent.class, GeometryComponent.class, ShaderComponent.class, MeshComponent.class));
|
super(Aspect.getAspectForAll(MarkerCodeComponent.class, GeometryComponent.class, ShaderComponent.class, MeshComponent.class));
|
||||||
|
|
||||||
markers = null;
|
markers = null;
|
||||||
translationMatrix = new Matrix4().setToTranslation(0.0f, 0.0f, 0.0f);
|
translationMatrix = new Matrix4().setToTranslation(0.0f, 0.0f, 0.0f);
|
||||||
rotationMatrix = new Matrix4().idt();
|
rotationMatrix = new Matrix4().idt();
|
||||||
scalingMatrix = new Matrix4().setToScaling(0.0f, 0.0f, 0.0f);
|
scalingMatrix = new Matrix4().setToScaling(0.0f, 0.0f, 0.0f);
|
||||||
combinedTransformationMatrix = new Matrix4();
|
combinedTransformationMatrix = new Matrix4();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,10 +65,10 @@ public class MarkerRenderingSystem extends EntityProcessingSystem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void process(Entity e) {
|
protected void process(Entity e) {
|
||||||
MarkerCodeComponent marker;
|
MarkerCodeComponent marker;
|
||||||
GeometryComponent geometry;
|
GeometryComponent geometry;
|
||||||
ShaderComponent shaderComp;
|
ShaderComponent shaderComp;
|
||||||
MeshComponent meshComp;
|
MeshComponent meshComp;
|
||||||
|
|
||||||
if(markers == null)
|
if(markers == null)
|
||||||
return;
|
return;
|
||||||
@@ -82,29 +82,30 @@ public class MarkerRenderingSystem extends EntityProcessingSystem {
|
|||||||
Gdx.app.log(TAG, CLASS_NAME + ".process(): Processing markers.");
|
Gdx.app.log(TAG, CLASS_NAME + ".process(): Processing markers.");
|
||||||
for(int i = 0; i < ProjectConstants.MAXIMUM_NUMBER_OF_MARKERS; i++){
|
for(int i = 0; i < ProjectConstants.MAXIMUM_NUMBER_OF_MARKERS; i++){
|
||||||
if(markers.markerCodes[i] != 1){
|
if(markers.markerCodes[i] != 1){
|
||||||
Gdx.app.log(TAG, CLASS_NAME + ".process(): Checking marker code: " + Integer.toString(markers.markerCodes[i]));
|
|
||||||
Gdx.app.log(TAG, CLASS_NAME + ".process(): This entity's code is: " + Integer.toString(marker.code));
|
|
||||||
if(markers.markerCodes[i] == marker.code){
|
if(markers.markerCodes[i] == marker.code){
|
||||||
Gdx.app.log(TAG, CLASS_NAME + ".process(): Rendering marker code " + Integer.toString(markers.markerCodes[i]) + ".");
|
Gdx.app.log(TAG, CLASS_NAME + ".process(): Rendering marker code " + Integer.toString(markers.markerCodes[i]) + ".");
|
||||||
// Set the geometric transformations.
|
// Set the geometric transformations.
|
||||||
translationMatrix.setToTranslation(geometry.position);
|
translationMatrix.setToTranslation(geometry.position);
|
||||||
|
|
||||||
rotationMatrix.val[0] = geometry.rotation.val[0];
|
rotationMatrix.val[Matrix4.M00] = geometry.rotation.val[0];
|
||||||
rotationMatrix.val[1] = geometry.rotation.val[1];
|
rotationMatrix.val[Matrix4.M10] = geometry.rotation.val[1];
|
||||||
rotationMatrix.val[2] = geometry.rotation.val[2];
|
rotationMatrix.val[Matrix4.M20] = geometry.rotation.val[2];
|
||||||
rotationMatrix.val[3] = 0;
|
rotationMatrix.val[Matrix4.M30] = 0;
|
||||||
rotationMatrix.val[4] = geometry.rotation.val[3];
|
|
||||||
rotationMatrix.val[5] = geometry.rotation.val[4];
|
rotationMatrix.val[Matrix4.M01] = geometry.rotation.val[3];
|
||||||
rotationMatrix.val[6] = geometry.rotation.val[5];
|
rotationMatrix.val[Matrix4.M11] = geometry.rotation.val[4];
|
||||||
rotationMatrix.val[7] = 0;
|
rotationMatrix.val[Matrix4.M21] = geometry.rotation.val[5];
|
||||||
rotationMatrix.val[8] = geometry.rotation.val[6];
|
rotationMatrix.val[Matrix4.M31] = 0;
|
||||||
rotationMatrix.val[9] = geometry.rotation.val[7];
|
|
||||||
rotationMatrix.val[10] = geometry.rotation.val[8];
|
rotationMatrix.val[Matrix4.M02] = geometry.rotation.val[6];
|
||||||
rotationMatrix.val[11] = 0;
|
rotationMatrix.val[Matrix4.M12] = geometry.rotation.val[7];
|
||||||
rotationMatrix.val[12] = 0;
|
rotationMatrix.val[Matrix4.M22] = geometry.rotation.val[8];
|
||||||
rotationMatrix.val[13] = 0;
|
rotationMatrix.val[Matrix4.M32] = 0;
|
||||||
rotationMatrix.val[14] = 0;
|
|
||||||
rotationMatrix.val[15] = 1;
|
rotationMatrix.val[Matrix4.M03] = 0;
|
||||||
|
rotationMatrix.val[Matrix4.M13] = 0;
|
||||||
|
rotationMatrix.val[Matrix4.M23] = 0;
|
||||||
|
rotationMatrix.val[Matrix4.M33] = 1;
|
||||||
|
|
||||||
scalingMatrix.setToScaling(geometry.scaling);
|
scalingMatrix.setToScaling(geometry.scaling);
|
||||||
combinedTransformationMatrix.idt().mul(translationMatrix).mul(rotationMatrix).mul(scalingMatrix);
|
combinedTransformationMatrix.idt().mul(translationMatrix).mul(rotationMatrix).mul(scalingMatrix);
|
||||||
@@ -115,11 +116,15 @@ public class MarkerRenderingSystem extends EntityProcessingSystem {
|
|||||||
shaderComp.shader.setUniforms();
|
shaderComp.shader.setUniforms();
|
||||||
meshComp.model.render(shaderComp.shader.getShaderProgram(), GL20.GL_TRIANGLES);
|
meshComp.model.render(shaderComp.shader.getShaderProgram(), GL20.GL_TRIANGLES);
|
||||||
}shaderComp.shader.getShaderProgram().end();
|
}shaderComp.shader.getShaderProgram().end();
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
Gdx.app.log(TAG, CLASS_NAME + ".process(): Skipping marker number " + Integer.toString(i) + ".");
|
Gdx.app.log(TAG, CLASS_NAME + ".process(): Skipping marker number " + Integer.toString(i) + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
markers = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user