"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

OpenGL basics

Hi, i'm new to OpenGL and try to learn some basics as described on [url]http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html[/url]. But it doesn't work, so I have some questions. [LIST=1] [*] Where and how I should modify the ImageTargets example to draw a permanent visible triangle in the middle of a screen as described in this tutorial: [url]http://iphonedevelopment.blogspot.com/2009/04/opengl-es-from-ground-up-part-2-look-at.html[/url]. [*] How to move the triangle to the middle of a recognized image target? [*] How to replace the triangle with a texture like green_glow.png or blue_glow.png from dominoes example? [/LIST] Alex

The first thing to understand is that those samples use OpenGL ES 1.x, rather than 2.0. Our ImageTargets sample has code paths for either version, but defaults to 2.0.

Thank you for your answer. I use OpenGL ES 1.x. I've managed it to draw a triangle in the world space with this code: [CODE]JNIEXPORT void JNICALL Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame(JNIEnv *, jobject) { // Clear color and depth buffer glClear(GL_C

Try something like this: [CODE] GLfloat triangle[] = {0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0}; glScalef(50.0f, 50.0f, 50.0f); // Draw object: glVertexPointer(3, GL_FLOAT, 0, &triangle); glDrawArrays(GL_TRIANGLES, 0, 3); [/CODE] There were three issues: 1) Your triangle was lifted off the