Wavefront to OpenGL texture problem

Problems with Canvas, OpenGL, etc...

Wavefront to OpenGL texture problem

Postby jonasl75 » Sat Jul 23, 2011 8:26 pm

Hi I have problem using texture coordinates from a Wavefront obj to work with Android Open GL.

I have tried this code:

for (int i=0;i<vtPointer.size();) {

textures.add(vt.get(vtPointer.get(i)*2+0));
textures.add(vt.get(vtPointer.get(i)*2+1));
i++;

}


ByteBuffer byteBuf = ByteBuffer.allocateDirect(textures.size() * 4);
byteBuf.order(ByteOrder.nativeOrder());
FloatBuffer textureBuffer = byteBuf.asFloatBuffer();
textureBuffer.put(toPrimitiveArrayF(textures));
textureBuffer.position(0);


Please can anyone help me and explain how to do it right?
jonasl75
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Jul 23, 2011 3:43 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 3 guests