Log in or register to post comments

Textured problem

October 17, 2015 - 1:37pm #1
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
AttachmentSize
Image icon mastodont.png1.89 MB
Image icon Screenshot_2015-10-16-16-37-10.png461.07 KB
Package icon Mammut.zip526.84 KB
Log in or register to post comments