views:

117

answers:

1

Hey Everyone,

I am trying to do a highlighting action on the iPhone. I can draw lines an such with the finger but now I want to be able to highlight over that. Any algorithms out there you can point me to that does that? Using OpenGL ES off course.

Thanks

A: 

This should produce a pink highlight around your geometry:

render_model();
glDisable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glColor3f(1.0f, 0.0f, 1.0f);
glLineWidth(2);
glCullFace(GL_FRONT);
render_model_using_GL_LINES();
glCullFace(GL_BACK);
glEnable(GL_TEXTURE_2D);
genpfault
Thanks, i tried it with two changes:1) changed glColor3f to glColor4f(1.0f,0.0f,1.0f,1.0f) because I am using OpenGL ES.2) can't find render_model() and render_model_using_GL_LINES() equivalent on iPhone so I commented them out. However, now I just can draw a pink stroke over everything, it does not highlight.Any suggestions?
Erika
are u sure render_model() and render_model_using_GL_LINES() are valid function calls? can't find them on the web
Erika
@Erika: render_model() and render_model_using_GL_LINES() are just shorthand for whatever code you have to render the geometry you want highlighted.
genpfault