Log in or register to post comments

have some method to change the teapot for a video?

October 18, 2010 - 1:31pm #1

I need to use a video instead of the teapot, is there any way to do this?

Re: have some method to change the teapot for a video?

October 19, 2010 - 2:26pm #5

If you wanted to put a cube there, you'd probably have to modify ImageTargets.cpp. That contains the code that draws the teapot so I imagine if you were to change that to handle, for example, the cube.h file you'd be well on your way. Textures are loaded in ImageTargets.java (at least as best as I can tell) so that's where you might have to put the picture you want to load.

All of this is just guesswork based on looking at the code, so let me know if it works!

Re: have some method to change the teapot for a video?

October 19, 2010 - 2:19pm #4

There isn't a tutorial for swapping out 3D content, but the ImageTargets project is a good place to start. You will need some understanding of OpenGL to render any 3D objects, including a cube. Study the renderFrame function in the ImageTargets.cpp file. You will need to feed your own vertex, normal, and texture coordinate arrays to the glVertexAttribPointer function calls, as a starting point.

- Kim

Re: have some method to change the teapot for a video?

October 19, 2010 - 2:01pm #3

Is there a tutorial, samples to swap the teapot. Sorry, I know very well the NDK Android. I just need to put an image in place of the teapot. I was thinking of putting a cube in the teapot place and use a texture that would be the image I wanted to use. Thank you for your attention. ;)

Re: have some method to change the teapot for a video?

October 18, 2010 - 2:07pm #2

This might be possible, but is not a feature of the SDK.

If you want to display a 2D, fullscreen video you can use the Android SDK. If, however, you want the video bound to the target in 3D space, you'll probably need to find a third party solution (or write it yourself). Look for an OpenGL video rendering library, but remember you'll have to compile it for Android and OpenGL ES.

- Kim

Log in or register to post comments