I wanted to change from mountain.v3d to just 2d image.
but I couldn't because it makes an anomal texture.
in renderARWorld() method i changed mMountain.render() ->
Matrix.translateM(targetPose, 0, 0.0f, 0.0f,
0.0f); Matrix.scaleM(targetPose, 0, AR_OBJECT_SCALE_FLOAT_X, AR_OBJECT_SCALE_FLOAT_Y, 0.0f);
Matrix.multiplyMM(modelViewProjection, 0, projectionMatrix, 0, targetPose, 0);
GLES20.glUseProgram(shaderProgramID);
GLES20.glActiveTexture(GLES20.GL_TEXTURE3); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextures.get(0).mTextureID[0]);
GLES20.glVertexAttribPointer(vertexHandle, 3, GLES20.GL_FLOAT, false, 0, mPlane.getVertices()); GLES20.glVertexAttribPointer(normalHandle, 3, GLES20.GL_FLOAT, false, 0, mPlane.getNormals()); GLES20.glVertexAttribPointer(textureCoordHandle, 2, GLES20.GL_FLOAT, false, 0, mPlane.getTexCoords()); GLES20.glEnableVertexAttribArray(vertexHandle); GLES20.glEnableVertexAttribArray(normalHandle); GLES20.glEnableVertexAttribArray(textureCoordHandle);
// pass the model view matrix to the shader GLES20.glUniformMatrix4fv(mvpMatrixHandle, 1, false, modelViewProjection, 0);
//GLES20.glDrawElements(GLES20.GL_TRIANGLES, mPlane.getNumObjectIndex(), GLES20.GL_UNSIGNED_SHORT, mPlane.getIndices()); GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, mPlane.getNumObjectIndex());
// disable the enabled arrays GLES20.glDisableVertexAttribArray(vertexHandle); GLES20.glDisableVertexAttribArray(normalHandle); GLES20.glDisableVertexAttribArray(textureCoordHandle);
but it shows anomal texture.
I attached it.