hello, changed 3D image the imagentarget with another image and I have an error with texture no coupled with the image
Here is the modified code
Change code ImageTargetRenderer VuforiaSamples
declared
private Mammut mMammuth;
private float kBuildingScale = 200.0f;
in initRendering()
mMammuth = new Mammut(mActivity.getResources().getAssets());
in renderFrame() change mTeapot
GLES20.glDisable(GLES20.GL_CULL_FACE);
GLES20.glVertexAttribPointer(vertexHandle, 3, GLES20.GL_FLOAT, false, 0, mMammuth.getVertices());
GLES20.glVertexAttribPointer(textureCoordHandle, 2, GLES20.GL_FLOAT, false, 0, mMammuth.getTexCoords());
GLES20.glEnableVertexAttribArray(vertexHandle);
GLES20.glEnableVertexAttribArray(textureCoordHandle);
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextures.get(0).mTextureID[0]);
GLES20.glUniformMatrix4fv(mvpMatrixHandle, 1, false, modelViewProjection, 0);
GLES20.glUniform1i(texSampler2DHandle, 0);
GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, mMammuth.getNumObjectVertex());
excuse my writing, I do not know English
Attachment | Size |
---|---|
![]() | 1.89 MB |
![]() | 461.07 KB |
![]() | 526.84 KB |