Log in or register to post comments

[imageTargets] Placing regular 2D image and not 3d Texture

June 6, 2012 - 11:44pm #1

Hello,

I'm trying to place a regular image (let's say just a png) where the marker is found.

Im using the ImageTargets example, iv'e found the code in eaglview.mm and all the opengl2/opengl conditions and code.

but couldn't find the right way to draw some pic where the marker is found and not the teapot.

any example so i can understand it better? maybe a link to a documentation explaining it?

thanks alot
guy

Re: [imageTargets] Placing regular 2D image and not 3d Texture

June 7, 2012 - 3:15am #3
NalinS wrote:

Hi Guy

Basically you could start by simply drawing a square instead of a teapot. This would be made up of two congruent triangles.

The next step would be to bid a texture to this, which is basically your image.

The final step would be to stretch the extent of the square to the extent of the image target so it covers it entirely.

This should all be achievable within OpenGL ES, for which there are many tutorials on the Internet. You can also search these forums for recommendations about these.

HTH

N

Hey, basically I get alot of 'gl error' and not a specif error inside the renderFrameQCAR method.

iv'e tried to comment out the 3d drawing of the tea pot and draw some texture created with code i found online and understood that its loading using ui image and converting to 2d for opengl.

any idea how to debug and get errors and not just 'gl error' ?

thanks alot for your reply - really appricated.

Re: [imageTargets] Placing regular 2D image and not 3d Texture

June 7, 2012 - 2:20am #2

Hi Guy

Basically you could start by simply drawing a square instead of a teapot. This would be made up of two congruent triangles.

The next step would be to bid a texture to this, which is basically your image.

The final step would be to stretch the extent of the square to the extent of the image target so it covers it entirely.

This should all be achievable within OpenGL ES, for which there are many tutorials on the Internet. You can also search these forums for recommendations about these.

HTH

N

Log in or register to post comments