diff --git a/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxModelLayer.java b/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxModelLayer.java index e29d89cb3..27e496dda 100644 --- a/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxModelLayer.java +++ b/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxModelLayer.java @@ -1,6 +1,6 @@ /* * Copyright 2014 Hannes Janetzek - * Copyright 2018 Gustl22 + * Copyright 2018-2019 Gustl22 * * This program is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -106,8 +106,10 @@ private void doneLoading() { model.nodes.removeIndex(0); model.nodes.add(node); } + node.scale.set(1, 1, -1); node.rotation.setFromAxis(1, 0, 0, 90); } + model.calculateTransforms(); poiModel.setModel(model); } diff --git a/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxRenderer3D2.java b/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxRenderer3D2.java index 0ab4a9da5..b14b05443 100644 --- a/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxRenderer3D2.java +++ b/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxRenderer3D2.java @@ -116,8 +116,9 @@ public void render(GLViewport v) { GLState.test(false, false); GLState.blend(false); - // GL.cullFace(GL20.BACK); - // GL.frontFace(GL20.CW); + //gl.cullFace(GL.BACK); + /* flip front face cause of mirror inverted y-axis */ + gl.frontFace(GL.CCW); cam.update(v); long time = System.currentTimeMillis(); @@ -160,6 +161,7 @@ public void render(GLViewport v) { // GLUtils.checkGlError("<" + TAG); + gl.frontFace(GL.CW); gl.depthMask(false); GLState.bindElementBuffer(GLState.UNBIND); GLState.bindBuffer(GL.ARRAY_BUFFER, GLState.UNBIND); diff --git a/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/Poi3DLayer.java b/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/Poi3DLayer.java index a8935f5d2..39c2fe09c 100644 --- a/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/Poi3DLayer.java +++ b/vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/Poi3DLayer.java @@ -1,6 +1,6 @@ /* * Copyright 2014 Hannes Janetzek - * Copyright 2018 Gustl22 + * Copyright 2018-2019 Gustl22 * * This program is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -307,8 +307,10 @@ private void doneLoading() { model.nodes.removeIndex(0); model.nodes.add(node); } + node.scale.set(1, 1, -1); node.rotation.setFromAxis(1, 0, 0, 90); } + model.calculateTransforms(); holder.setModel(model); } }