v0.4.2b: added sources for FroyoGLES20Fix
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := FroyoGLES20Fix
|
||||
LOCAL_SRC_FILES := FroyoGLES20Fix.c
|
||||
LOCAL_LDLIBS := -lGLESv2
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2016 Evan Debenham
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
#include <jni.h>
|
||||
#include <GLES2/gl2.h>
|
||||
|
||||
void Java_com_watabou_glwrap_FroyoGLES20Fix_glVertexAttribPointer
|
||||
(JNIEnv *env, jclass c, jint index, jint size, jint type, jboolean normalized, jint stride, jint offset)
|
||||
{
|
||||
glVertexAttribPointer(index, size, type, normalized, stride, (const void*)offset);
|
||||
}
|
||||
|
||||
void Java_com_watabou_glwrap_FroyoGLES20Fix_glDrawElements
|
||||
(JNIEnv *env, jclass c, jint mode, jint count, jint type, jint offset)
|
||||
{
|
||||
glDrawElements(mode, count, type, (const void*)offset);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
These sources are provided for FOSS completeness, but compiling them is optional.
|
||||
|
||||
The folder jniLibs already contains compiled versions of FroyoGLES20Fix.c, and makes compiling
|
||||
The sources here an optional step in building Shattered Pixel Dungeon. This is done so that
|
||||
The Android NDK is not required for project compilation, but those who want to ensure they are 100%
|
||||
building from source can still do so.
|
||||
|
||||
There is no functional difference between using the provided .so files, and compiling your own.
|
||||
|
||||
In order to compile these files you will need the Android NDK.
|
||||
|
||||
TODO: provide build instructions, or a build script, or make a gradle task.
|
||||
Reference in New Issue
Block a user