-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the gdt wiki!
gdt is a C library which, together with OpenGL ES 2.0, is meant to provide a cross-platform (mainly iOS/Android currently) API for making games for the supported platforms.
With gdt you should be able to just target the simple gdt.h C API and don't have to bother with all the platform-specific "glue" code.
There are currently no obviously best solutions to build gdt-based projects. Below are some suggestions how one might go about building gdt-based projects.
Create a new iOS project in Xcode. There is no need for interface (xib/nib) files.
I think you need these frameworks: AVFoundation, OpenGLES, QuartzCore, UIKit, Foundation, CoreGraphics.
Suggested way to add gdt source files:
- simple_example.c
- gdt/GdtAppDelegate.{m/h}
- gdt/GdtView.{m/h}
- gdt/gdt_common.c
- gdt/gdt.h
- gdt/gdt_gles2.h
- gdt/gdt_ios.h
- gdt/main.m
I use Eclipse with http://mobilepearls.com/labs/ndk-builder-in-eclipse/ for automatic NDK builds.
Make an android 2.2 project (API level 8) and add the GdtActivity.java to src/gdt/GdtActivity.java.
You need an Android.mk ndk-build makefile, maybe it could look something like this:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := native
LOCAL_CFLAGS := -DANDROID_NDK -DDISABLE_IMPORTGL
LOCAL_SRC_FILES := gdt/gdt_android.c gdt/gdt_common.c simple_example.c
LOCAL_LDLIBS := -lGLESv2 -ldl -llog
include $(BUILD_SHARED_LIBRARY)
Example jni folder structure:
- gdt/gdt_android.c
- gdt/gdt_common.c
- gdt/gdt.h
- gdt/gdt_gles2.h
- gdt/gdt_android.h
- simple_example.c
If you need proper C++ support with the ndk use something like the following Application.mk:
APP_CPPFLAGS += -frtti -fexceptions
APP_STL := gnustl_static
- Replace the current touch API with a multitouch-capable API
- Extend audioplayer with more functions
- Think through and fix screen orientation
- Implement text input on android fully
- General polish; make sure we are not leaking memory or ignoring errors etc
- More input APIs (gyroscope etc)
- Make sure APIs are as general and portable as possible. For instance, the current storage dir path/ cache dir path setup may not be portable to other platforms
- More platforms (ideas: Chrome NaCl, Windows 8 WinRT)
- Some kind of build system
- Maybe use NativeActivity on the android backend