Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
MarcusMaximus04@gmail.com
Old
(Last edited by MarcusMaximus04@gmail.com; 22nd January 2010 at 05:50 AM.)
#1  
Senior Member - OP
Thanks Meter 3
Posts: 1,069
Join Date: Jun 2007
Default Droid OpenGL ES 2.0

I have a Nexus One and have successfully gotten OpenGL ES 2.0 up and running. I wanted to see if I could find someone with a rooted Droid who'd be willing to give me some info so I can find out if/how the same thing will work on it.

So far I have what I need. For those of you who have a Droid and want to start working with OpenGL ES 2.0 on it: You can do so through the Android NDK with a little hackery.

-You'll need to pull /system/lib/egl from your phone and put that in the ndk directory at: (ndklocation)/build/platforms/android-4/arch-arm/usr/lib/.
-Then download the opengl es 2.0 headers(you can find that at http://www.khronos.org/registry/gles/) and put gl2.h, gl2ext.2, and gl2platform.h in (ndklocation)/build/platforms/android-4/arch-arm/include/GLES2. Put khrplatform.h in "/"/"/"/"/"/KHR.
-Then setup your application to link to libGLESv2_POWERVR_SGX530_121.so by adding it to LOCAL_LDLIBS in your Android.mk file.
-Then just include gl2.h and you can start using 2.0!

If you want to build for the Nexus One, you'll have to get our libGLESv2_adreno200.so, which I'll make available here when I get hope today. Basically, you'll have to link against that instead.

If you want your app to work on both, you'll have to do some trickery with having two separate libraries so that if it's running on the Nexus One then it'll use it's library. I might work on making an open source library that'll load the right library so everyone can just load that before loading their own, but it'll be time consuming and I do have my own large project I'm working on, so I wouldn't count on that.

Well, us Nexus One folks shouldn't get all the fun, right? You'll now find a .zip containing an apk for an OpenGL ES 2.0 app which should(assuming what everyone here told me before was true) work on the Droid. It's pretty basic, just displays a triangle with some custom fragment shader graphics applied, but it does prove the ES 2.0 is running. Let me know if there's any problems(post it here, I'd rather not get 100000000 PMs/emails). Aside from that, enjoy!

Oh and I threw in the Nexus One ES 2.0 shared object file just in case anyone wants it.
Attached Files
File Type: zip DemoActivity.zip - [Click for QR Code] (925.2 KB, 737 views)
Device: Nexus One
 
Ace42
Old
#2  
Ace42's Avatar
Senior Member
Thanks Meter 465
Posts: 7,185
Join Date: Jul 2009
Location: New York
The Droid's 2.1 Rom will go OTA soon with Open GL 2.0 support so roms will probably have this too.
Current: LG Nexus 4(16GB) : SaberMod + Air Kernel #10
Past: G1(Backup)-> Mytouch3GS(Sold) -> SideKick4G(Traded) -> MyTouch4G(Sold) -> Sensation 4G(Sold) -> Galaxy Player 5"(Sold)
 
MarcusMaximus04@gmail.com
Old
#3  
Senior Member - OP
Thanks Meter 3
Posts: 1,069
Join Date: Jun 2007
Quote:
Originally Posted by Ace42 View Post
The Droid's 2.1 Rom will go OTA soon with Open GL 2.0 support so roms will probably have this too.
The Nexus One doesn't really have ES2.0 support(despite having android 2.1; I had to hack the crap out of it to get it to work) so I doubt it would have support in the Droid(the SDK still doesn't have support). That aside, that really wasn't what I was asking. I want to know if these libraries already exist in the droid. As far as I can see, nobody has bothered looking yet and I suspect they're already in there.
Device: Nexus One
 
Ace42
Old
#4  
Ace42's Avatar
Senior Member
Thanks Meter 465
Posts: 7,185
Join Date: Jul 2009
Location: New York
Quote:
Originally Posted by MarcusMaximus04@gmail.com View Post
The Nexus One doesn't really have ES2.0 support(despite having android 2.1; I had to hack the crap out of it to get it to work) so I doubt it would have support in the Droid(the SDK still doesn't have support). That aside, that really wasn't what I was asking. I want to know if these libraries already exist in the droid. As far as I can see, nobody has bothered looking yet and I suspect they're already in there.
I thought you meant it was native in nexus sorry.Droid has similar GPu to Iphone so Open Gl 2 should be capable on the droid.
Current: LG Nexus 4(16GB) : SaberMod + Air Kernel #10
Past: G1(Backup)-> Mytouch3GS(Sold) -> SideKick4G(Traded) -> MyTouch4G(Sold) -> Sensation 4G(Sold) -> Galaxy Player 5"(Sold)
 
MarcusMaximus04@gmail.com
Old
#5  
Senior Member - OP
Thanks Meter 3
Posts: 1,069
Join Date: Jun 2007
Quote:
Originally Posted by Ace42 View Post
I thought you meant it was native in nexus sorry.Droid has similar GPu to Iphone so Open Gl 2 should be capable on the droid.
No problem. Ya, I'm fairly sure it is opengl ES 2.0 capable. Just want to know where the libraries are located to see if it's the same as on the N1. On a side note, I know there are plenty of talented devs on the Droid side, so if anyone can find a way to get an app made with the ndk to link with the /system/lib/egl folder, that'd be awesome as well.
Device: Nexus One
 
pr0cl1v1ty
Old
#6  
pr0cl1v1ty's Avatar
Senior Member
Thanks Meter 2
Posts: 249
Join Date: Jan 2008
Location: Houston
Quote:
Originally Posted by MarcusMaximus04@gmail.com View Post
I have a Nexus One and have successfully gotten OpenGL ES 2.0 up and running(it currently requires root privileges and a bit of setup). I wanted to see if I could find someone with a rooted Droid who'd be willing to give me some info so I can find out if/how the same thing will work on it.

If you have root privileges on your Droid please run the following in a terminal emulator and post the results(or you can PM/email me if necessary, but this won't have any personal information in it):

Code:
su
cd /system/lib
ls
cd egl
ls
That should let me know what libraries the Droid has, so I can try to match them up with the ones on the Nexus One and see what we're working with. I'm hoping it'll have the identical structure to the N1, which would make development and testing of ES 2.0 apps much easier.


Damn beat me here LOL.
 
eldis
Old
#7  
Member
Thanks Meter 8
Posts: 41
Join Date: May 2006
Location: Helsinki
I'm on Motorola Milestone, Android 2.0.

/system/lib/egl includes:
egl.cfg
libEGL_POWERVR_SGX530_121.so
libGLESv1_CM_POWERVR_SGX530_121.so
libGLESv2_POWERVR_SGX530_121.so
libGLES_android.so
 
MarcusMaximus04@gmail.com
Old
#8  
Senior Member - OP
Thanks Meter 3
Posts: 1,069
Join Date: Jun 2007
Quote:
Originally Posted by eldis View Post
I'm on Motorola Milestone, Android 2.0.

/system/lib/egl includes:
egl.cfg
libEGL_POWERVR_SGX530_121.so
libGLESv1_CM_POWERVR_SGX530_121.so
libGLESv2_POWERVR_SGX530_121.so
libGLES_android.so
Alright, any chance you can post that libGLESv2_POWERVR_SGX530_121.so(or PM/email it to me if you want to do it that way)? We may need it in order to make 2.0 apps for the Droid.

Also, any chance I could recruit you for some eventual testing?
Device: Nexus One
 
kniffo80
Old
#9  
Senior Member
Thanks Meter 0
Posts: 155
Join Date: Dec 2008
Location: Hamburg
do you rally want to know what is in /system/lib? there are so many files ...

same here, in /system/lib/egl:

egl.cfg
libEGL_POWERVR_SGX530_121.so
libGLESv1_CM_POWERVR_SGX530_121.so
libGLESv2_POWERVR_SGX530_121.so
libGLES_android.so

owner of Milestone 2.0 rooted
RIP: Touch HD (Blackstone) Owner. Using Miri WM 6.5.3 Build 23011 - Manila 2.5

Current: Motorola Milestone. Running 800MHz @56vsel, using GOT's 2.36 and DroidX Theme
 
jjcd51590
Old
#10  
Senior Member
Thanks Meter 2
Posts: 176
Join Date: Aug 2008
Location: KATY
Default Here

I dont know if he already posted it but here you go. i just renamed it for times sake.

Droid Running 2.0.1
Attached Files
File Type: zip lib.zip - [Click for QR Code] (166.1 KB, 217 views)

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more

Flash Custom ROM and Recovery to Samsung Galaxy S 4

After reading about Dan Rosenberg’s bootloader exploit for the Samsung Galaxy S 4,I … more

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more