Home > source code > MC3D - Platform Agnostic 3D Foundation
MC3D - Platform Agnostic 3D Foundation
Posted on Tuesday, February 8, 2011 by android apps market for tablests
Sorry for the lack of posts recently. Things have been, well� you know. Same old story. Super busy. Which is good, but it's murder on blog post frequency.
I've recently had to port some OpenGL ES work I did from iOS to Android. It used to be that doing so would have been insanely painful (as opposed to just painful). I would have had to convert the Objective-C code to Java, and then maintain completely distinct sets of code that do the same exact thing. Fortunately, the Android NDK (Native Development Kit) allows you to write code for Android in C/C++. The version of the NDK supported on 2.2 still requires part of the Activity (Android's counterpart to an iOS view controller) to be written in Java, but does allow you to call C/C++ code using JNI. In 2.3 and 3.0, you can do entire activities in C or C++.
This is a huge step forward for Android for those of us who do performance-critical work on multiple platforms, but it's not without some pain. Debugging across the JNI bridge is� less than easy. But, being able to share code across platforms is a huge win, and being able to get native speeds in the process is teh awseome.
During these projects, I've been taking a lot of my 3D-related code and creating a new set of platform-agnostic C functions and types. I've been cleaning up and making names consistent, and placing appropriate pre-compiler macros to make sure the code compiles correctly everywhere. On iOS, the library will take advantage of the Accelerate Framework in places, but doesn't require Accelerate to function.
I've chosen C because I don't like mixing C++ and Objective-C. The object models are too different for my tastes. But I've also made sure to include proper ifdef'd extern statements so that you can import the MC3D header files from C++ without hassle.
I've dubbed this set of functions MC3D, and I'm making it open source under a simplified version of the simplified BSD license (simplified simplified BSD license?). I've taken out the attribution requirement, so the only requirement is that if you re-distribute the source code, you have to leave the copyright and license text intact. That's it. Otherwise, you can use it for free in any project, commercial or otherwise, without paying anything, without attributing, and without asking (no really, you don't need to ask).
MC3D is still very much a work in progress, and I'm only adding code to the repository that I feel is ready for public consumption. Much of what's in MC3D has been posted here before, sometimes with different names or in slightly different form.
I have other code that I plan to add in the future, including higher-level functionality like model loading, scene management, and skeletal animation, but I won't add anything until its both solid and platform agnostic.
Currently, documentation is very sparse, and I currently can't offer any support or help with using it, so caveat emptor! I will gladly accept contributions, bug fixes, and new functionality back into the MC3D codeline.
MC3D on GitHub.
Link fixed, sorry about that
I've recently had to port some OpenGL ES work I did from iOS to Android. It used to be that doing so would have been insanely painful (as opposed to just painful). I would have had to convert the Objective-C code to Java, and then maintain completely distinct sets of code that do the same exact thing. Fortunately, the Android NDK (Native Development Kit) allows you to write code for Android in C/C++. The version of the NDK supported on 2.2 still requires part of the Activity (Android's counterpart to an iOS view controller) to be written in Java, but does allow you to call C/C++ code using JNI. In 2.3 and 3.0, you can do entire activities in C or C++.
This is a huge step forward for Android for those of us who do performance-critical work on multiple platforms, but it's not without some pain. Debugging across the JNI bridge is� less than easy. But, being able to share code across platforms is a huge win, and being able to get native speeds in the process is teh awseome.
During these projects, I've been taking a lot of my 3D-related code and creating a new set of platform-agnostic C functions and types. I've been cleaning up and making names consistent, and placing appropriate pre-compiler macros to make sure the code compiles correctly everywhere. On iOS, the library will take advantage of the Accelerate Framework in places, but doesn't require Accelerate to function.
I've chosen C because I don't like mixing C++ and Objective-C. The object models are too different for my tastes. But I've also made sure to include proper ifdef'd extern statements so that you can import the MC3D header files from C++ without hassle.
I've dubbed this set of functions MC3D, and I'm making it open source under a simplified version of the simplified BSD license (simplified simplified BSD license?). I've taken out the attribution requirement, so the only requirement is that if you re-distribute the source code, you have to leave the copyright and license text intact. That's it. Otherwise, you can use it for free in any project, commercial or otherwise, without paying anything, without attributing, and without asking (no really, you don't need to ask).
MC3D is still very much a work in progress, and I'm only adding code to the repository that I feel is ready for public consumption. Much of what's in MC3D has been posted here before, sometimes with different names or in slightly different form.
I have other code that I plan to add in the future, including higher-level functionality like model loading, scene management, and skeletal animation, but I won't add anything until its both solid and platform agnostic.
Currently, documentation is very sparse, and I currently can't offer any support or help with using it, so caveat emptor! I will gladly accept contributions, bug fixes, and new functionality back into the MC3D codeline.
MC3D on GitHub.
Link fixed, sorry about that
Category Article Open Source, OpenGL ES, source code
Powered by Blogger.
Blog Archive
-
▼
2011
(4034)
-
▼
February
(643)
- Rumor - White iPad 2nd generation
- Consumer Reports Digital Edition for iPad
- Viewing Feature Android Smartphone "Samsung I910 ...
- February Reflections
- Best Evers: Laura Kelso, Writer
- Motorola Xoom overclocked to 1.5GHz, eats Quadrant...
- FORMWARE PR 2.0 DEMOED ON THHE NOKIA N8
- Gmail accidentally resetting accounts, years of co...
- SONY ERICSSON XPERIA ARC PINK - PICTURES
- ANDROID APP : MEGAVIDEO
- WORMS HD DEMOED ON THE NOKIA N8
- Dev Team Working on iTunes Alternative for Jailbre...
- Dev Team Working on iTunes Alternative for Jailbre...
- Ultrasn0w 1.3 May Also Support iPhone 4 Baseband 0...
- Ultrasn0w 1.3 May Also Support iPhone 4 Baseband 0...
- iPad 2 may also comes in white?
- iPad 2 may also comes in white?
- Apple working on Android-like gesture-based lock s...
- Apple working on Android-like gesture-based lock s...
- Download Cheat engine 5.5 Free Update
- Cheats for The Sims 3 PC
- Cheat Engine CE 5.6.1 Terbaru Download Free
- Update Security dan Definition for Microsoft Offic...
- Info Specification " Sony Ericsson Experia Pro: Th...
- LG Optimus Me P350 To Fight with Samsung Galaxy Mi...
- Sunday Salon: Week In Review #9
- Update on iPhone 4 Unlock on Baseband 3.10.01 and ...
- Update on iPhone 4 Unlock on Baseband 3.10.01 and ...
- Nexus S 2.3.3 update adjusts screen's color temper...
- HTC Incredible S, Desire HD, Desire Z and original...
- WINDOWS PHONE CAMPAIGN OVERVIEW
- WORMS HD AVAILABLE FOR SYMBIAN^3 PHONES
- Critical Dodge 2011 Ninja Saga Februari Cheat Update
- 28 29 Februari Cheat PB Point Blank Blooderz
- 2829 Februari Ninja Saga Engine Cheat 2011
- FullForce Forces iPhone Apps into Full View no mor...
- ManualCorrect Puts iPad Auto Correct in Check
- Wunderlist HD - Cloud-sync task manager for iPad
- How To Manage Subscriptions on iPad
- Sprint HTC Arrive with Windows Phone 7, first cop...
- Visualized: the HTC keyboard slider family
- Windows Phone's new UI and Xbox games
- one-cubic-millimeter computer, want to stick it in...
- New Apple MacBook Pro Reviewed
- Small Persons With Wings (MG)
- Library Loot: Fifth Trip in February
- North and South (Revisited)
- Sprint HTC Arrive with Windows Phone 7 copy and pa...
- ANGRY BIRDS COMING SOON TO WINDOWS PHONE 7
- Windows Phone's new UI and Xbox games are most exc...
- HTC Merge first hands-on!
- GOOGLE SKY ON WINDOWS PHONE 7
- Ixonos showcasing extensive Meego and Android expe...
- 27 Februari 2011 Hack v1.2 Update Point Blank Cheat
- Avira Premium 10 License Key Download Free
- Leaked Panel Lends Credence to Larger Screen and T...
- Leaked Panel Lends Credence to Larger Screen and T...
- Full Version Crack Adobe Photoshop CS5 12.0 Download
- Play PS3 Games on iPhone, iPod Touch and iPad with...
- Play PS3 Games on iPhone, iPod Touch and iPad with...
- Adobe Photoshop CS4 11.0 Full Version Download Cr...
- DeskTop Author Software Untuk Membuat Aplikasi EBook
- Samsung Galaxy Mini S5570 bundled with simpati
- Photoshop CS3 10.0 Download Full Version Crack Keygen
- 10 PC Gaming Terbaik 2011
- Nexian Tap Taouchscreen Promo Price at Hypermart, ...
- Cheat PB Storm Injector V.2.0 Download Released Fe...
- Cheat 26 Februari gc-evolution-v-11-full-hack 2011
- Download Maphack Gaspooll v1.10 Cheat Point Blank ...
- Windows XP iPod touch 2G Test 1 [Video]
- Windows XP iPod touch 2G Test 1 [Video]
- Sources: iPad 2 lands in thinner body with spec bu...
- NOKIA N8 FIRMWARE PR2 PREVIEW
- Official Android 2.3.3 updates for Nexus One and N...
- HTC Thunderbolt delayed until March 4th, says a Be...
- WINDOWS PHONE 7 -WHAT IF?
- REVIEW : MOTOROLA XOOM ANDROID TABLET
- NoVoiceMail Nixes Your iPhone�s Voicemail Button
- NoVoiceMail Nixes Your iPhone�s Voicemail Button
- Apple Set To Present FaceTime HD, Thunder Bolt I/O?
- Apple Set To Present FaceTime HD, Thunder Bolt I/O?
- Geohot Interviewed Again Over Sony Lawsuit
- Geohot Interviewed Again Over Sony Lawsuit
- Last Minute Engineering Issues Led Apple To Pull R...
- Last Minute Engineering Issues Led Apple To Pull R...
- �Undeletable Apps� Keeps Your iPhone Apps Secure
- �Undeletable Apps� Keeps Your iPhone Apps Secure
- Download Resetter Printer Canon iPTool MPTool i320...
- You Can�t Spell Hydrate Without Rate
- Samsung Galaxy S2 16GB Opened for Pre-Order in Swi...
- Download RiNocomp v.3.8 Cara Penggunaan Cheat Poin...
- Cheat 26 Februari FTF_Interaction 3 [Wallhack + FI...
- Komunitas Point Blank Facebook
- ACDSee FotoSlate 4 Photo Print Studio 4.0.146 Full...
- Download Internet Explorer 9 RC/Beta Offline Windo...
- iPad 2 Announced March 2
- How to Add Contact to Group on iPad
- Maximum Mail Attachment Size Limit on iPad
- NOOSY iPad HDMI adapter
- iBooks Text to Speech Feature on iPad
-
▼
February
(643)