![]() ![]() ![]() We’ll first add two member variables to the top of our activity class: With our project created, we can now edit the default activity and configure it to initialize OpenGL. This will create a new folder called jni in the project tree. When asked for the Library Name, enter ‘game’ and hit Finish, so that the library will be called libgame.so. ![]() Once the project has been created, right-click on the project in the Package Explorer, select Android Tools from the drop-down menu, then select Add Native Support…. Leaving the rest as defaults or filling out as you prefer, save this new project in a new folder called android, inside of the airhockey folder that we created in the previous step. To create a new project, select File->New->Android Application Project, and then create a new project called ‘AirHockey’, with the application name set to ‘Air Hockey’ and the package name set to ‘’. To learn more about how to use Git, see the Git documentation. Git is a source version control system that will help you keep track of changes to the source and to roll back changes if anything goes wrong. The first thing to do is create a new Android project in Eclipse, with support for the NDK. You can follow along all of the code at the GitHub project.īefore creating the new project, create a new folder called airhockey, and then create a new Git repository in that folder. To prepare and test the code for this article, I used revision 22.0.1 of the ADT plugin and SDK tools, and revision 17 of the platform and build tools, along with revision 8e of the NDK and Eclipse Juno Service Pack 2. An emulator or a device supporting OpenGL ES 2.0.The Android SDK & NDK installed, along with a suitable IDE.For this first post in the Developing a Simple Game of Air Hockey Using C++ and OpenGL ES 2 for Android, iOS, and the Web series, we’ll create a simple Android program that initializes OpenGL, then renders simple frames from native code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |