[ Part I ] - AndroidGL Tutorial - What is OpenGL ES

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

[ Part I ] - AndroidGL Tutorial - What is OpenGL ES

Postby plusminus » Fri Dec 07, 2007 7:34 pm

[align=right]next :rarrow:[/align]

What is OpenGL ES?
Khronos Group wrote:"OpenGL ES is a royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems - including handheld devices, appliances and vehicles. It is a well-defined subset of desktop OpenGL, creating a flexible and powerful low-level interface between software and graphics acceleration. OpenGL ES includes Common and Common-Lite profiles for floating-point and fixed-point systems and the EGL specification for portably binding to native windowing systems. OpenGL ES 1.1 emphasizes hardware acceleration of the API, while OpenGL ES 1.0 focuses on enabling software-only implementations. OpenGL ES 1.1 is fully backwards compatible with 1.0 - enabling easy porting of applications between the two versions of the API." - Khronos Group


The OpenGL ES specification was developed by the Khronos group and can be viewed here.

What format will the tutorials follow?
Originally the source code produced for the tutorials were made for PocketPC 2003, but were transformed by brendan to the Android Platform. This does not mean that you will not be able to use these tutorials if you are not using PocketPC/Android.


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Re: [ Part I ] - AndroidGL Tutorial - What is OpenGL ES

Postby keerthi » Thu Aug 12, 2010 7:16 am

Hi everyone ,im new to this forum ;)
hey buddies i am facing diffculty in solving some issues related to cube transformations :cry:

Im trying to rotate a 3D cube on touch. the distance moved to left or right is taken as the angle of rotation with respect to Y axis and the distance moved to up or down is taken as the angle of rotation with respect to X axis .

So these are the rotations im making

glrotate(angleXdistance, 0, 1, 0); // with respect to Y axis
glrotate(angleYdistance, 1, 0, 0); // with respect to X axis


so every time i add the angles with previous angles lik angleXdiatance + = angleXdiatance; in touch event

so the problem im facing is :

1.) when i rotate to right or left for 90 degree it rotates corectly ,and after when i rotate to up or down it rotates with respect to Z axis instead of Y axis

2.)when i rotate to right or left for 180 degree it rotates corectly ,and after when i rotate to up it rotates
down , to say in it rotates in opposite direction .

i could analyse that after 90/180 degree roataions the default axes changes , so it will roatate with respect to current axes , so i tried to chk the condition if it crosses 90 thn instead of rotating with respect to X rotate with respect to Z , and after 180 , reverse the rotation angle sign .. it works :D but nt always :evil: .. sm prblm occurs in sm other condition,,,

so i found out all posibilities , at certain angle of rotation , these are the current axes and thn passes those axes but still din work coz two rotations are happening so tht the number of possiblities increaes which is nt possible to find all conditions..

so if anyone has idea how to solve this issue plz help ... my cube and my head rotating unexpectedly :shock: plz help to rotate them correctly :roll:
i could see many examples or applications with such problem there also ...
keerthi
Junior Developer
Junior Developer
 
Posts: 16
Joined: Thu Aug 12, 2010 6:40 am
Location: India

Re: [ Part I ] - AndroidGL Tutorial - What is OpenGL ES

Postby MichaelEGR » Thu Aug 12, 2010 8:11 am

Indeed welcome to 3D... :)

This is iPhone related, but OpenGL ES is OpenGL ES, so all the concepts are the same (check mid way down for the info you seek):
http://www.sunsetlakesoftware.com/2008/ ... -opengl-es

Basically the problem you are facing (heh) is that you have to manage the touch input / rotation from the currentViewing perspective and the model coordinate system. It's quite possible to attempt this as described in the link above.

Now I haven't verified the following info recently at all or on various devices, but glGetFloatV didn't work right on the G1 early Android OS versions. I've been using something akin to the MatrixGrabber approach to keep a local matrix stack CPU side. This has worked fine for creating a camera / frustum for frustum culling, but is a pain to extend to unlimited usage. Ideally like I mentioned I have to verify glGetFloatV usage on the N1, Droid, and more modern devices myself and only fall back to the software method for devices that don't support glGetFloatV. It's been on my list for a while to figure out a reliable way to do this across all devices w/ Android 1.5+ support. Prob get to it soon.

So review the link above and verify that glGetFloatV is working on your device and try it out. Best of luck and report back if you can because I'm interested in your results.
Founder & Principal Architect; EGR Software LLC
http://www.typhonrt.org
http://www.egrsoftware.com
User avatar
MichaelEGR
Senior Developer
Senior Developer
 
Posts: 147
Joined: Thu Jan 21, 2010 5:30 am
Location: San Francisco, CA

Re: [ Part I ] - AndroidGL Tutorial - What is OpenGL ES

Postby MichaelEGR » Thu Aug 12, 2010 8:13 am

awww.. I didn't see that this was a necroed thread/topic. Can you repost your question in a new thread with an appropriate title; something like: Rotating a 3-D model from the user's point of view
Founder & Principal Architect; EGR Software LLC
http://www.typhonrt.org
http://www.egrsoftware.com
User avatar
MichaelEGR
Senior Developer
Senior Developer
 
Posts: 147
Joined: Thu Jan 21, 2010 5:30 am
Location: San Francisco, CA

Re: [ Part I ] - AndroidGL Tutorial - What is OpenGL ES

Postby keerthi » Tue Sep 07, 2010 2:20 pm

Hi everyone ;)
im working on sm graphics application, have done may things already,have understood glsurface view, renederer interface and all (i hope so :P ) .. but nw suddenly i got a doubt .. :?:

I can see two packages related to open gl in android
1.)android.opengl
2.)javax.microedition.khronos.opengles

basically what is the difference between these two packages :? , and which one we will be using , i guess im not aware of some basic funda ...
Or isit the android opengl using the khronos interfaces ??
can anyone explain the basic concepts which i am not aware ..

for quick comparision :
in javax.microedition.khronos.opengles
Interfaces
GL
GL10
GL10Ext
GL11
GL11Ext
GL11ExtensionPack
all these are interfaces


In android.opengl
GLES10
GLES10Ext
GLES11
GLES11Ext
GLES20
all these are classes .....
keerthi
Junior Developer
Junior Developer
 
Posts: 16
Joined: Thu Aug 12, 2010 6:40 am
Location: India

Re: [ Part I ] - AndroidGL Tutorial - What is OpenGL ES

Postby keerthi » Wed Sep 08, 2010 7:40 am

Hey i got the solution for that rotation problem ;) i multiplied the modelview matrix with previous model view matrix so that the transformations will be with respect to default axes ;)
keerthi
Junior Developer
Junior Developer
 
Posts: 16
Joined: Thu Aug 12, 2010 6:40 am
Location: India

Top

Re: [ Part I ] - AndroidGL Tutorial - What is OpenGL ES

Postby bmoshe » Fri Jul 19, 2013 11:35 pm

thanks 4all great work & tutos thanks
bmoshe
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Jul 19, 2013 11:08 pm

Re: [ Part I ] - AndroidGL Tutorial - What is OpenGL ES

Postby Johnyallen » Thu Sep 26, 2013 1:01 pm

Hi a lot of thanks for share a useful information.
Johnyallen
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Jul 05, 2013 6:20 am

Top

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

Who is online

Users browsing this forum: No registered users and 6 guests