New Object on Android GL

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

New Object on Android GL

Postby whreckz » Wed May 28, 2008 2:37 am

Hi! Does anyone has an Idea how to put an object on Android GL screen?

I mean I have a x,y,z coordinate and I want to put an object or maybe an image on that coordinate.

Please Help.

PS.
How can I get the coordinate of my GL screen from touch event

THanks,
Rex
whreckz
Freshman
Freshman
 
Posts: 9
Joined: Wed May 07, 2008 3:59 am
Location: Manila, Philippines

Top

Postby shredder » Thu May 29, 2008 11:46 am

I wonder if you have read the GL Tutorial posted, but what you're asking is really basic. :? . You might not have base knowledge on 3D maths and programing, I wonder.

However,

The very basic idea is triangles. Good GPU pumps triangles onto screen nice and fast.

The idea is vertices and indices. You pump those buffers into OpenGL buffer, call draw method and it will draw stuffs on the surface.

To draw image at an XYZ, the idea is billboarding. Billboards are just 3D rectangles ( quads ).

Ray intersection is the idea of how to get coordinate from touch event. From touch event, you only get a 2D coordinate, from which you'll get a ray. With ray you can test intersection with 3D objects.

It might take you a long time to understand and make it yourself those stuffs, or you can wait an Android 3D engine.
shredder
Junior Developer
Junior Developer
 
Posts: 12
Joined: Mon Mar 03, 2008 2:34 pm

Postby whreckz » Fri May 30, 2008 2:45 am

Hi shredder,

I think my posted inquiry is quite misleading :shock: . sorry for that :? .what i'm trying to do is display multiple objects on diferrent x,y and z coordinates. I already found the functions that i need...
glPushMatrix
glTranslatef
glPopMatrix

anyway, thanks for the reply.

PS.
what's an Android 3D Engine? will this be included in the android sdk in the future?
whreckz
Freshman
Freshman
 
Posts: 9
Joined: Wed May 07, 2008 3:59 am
Location: Manila, Philippines

Top

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

Who is online

Users browsing this forum: No registered users and 3 guests