Add JNI header files generated from jaggl and jagmisc

A long-term goal is to write clean room implementations of these
libraries, for several reasons:

 * The original libraries are missing, so we currently have to do a fair
   amount of awkward bytecode patching in the loader to use JOGL
   instead.
 * The original libraries were not compiled for 64-bit Linux. We might
   also want to compile for new architectures (e.g. ARM or RISC-V) or
   additional operating systems (e.g. the BSDs).
 * I'm worried that over time the libraries will bit rot and might
   eventually stop working with modern JREs - it's already been about 10
   years since they were originally compiled!

I'm not too concerned about putting this in the main open-source
repository: I think it's generally believed that interfaces are not
copyrightable, and we're only copying the interface for
interoperability purposes. The native code will be original.

Furthermore, most of the jaggl interface is just a copy of the OpenGL
interface, so it's unlikely that Jagex could claim they hold the
copyright on it anyway.
pull/48/head
Graham 5 years ago
parent cc1a1adde7
commit d77de89ea1
  1. 15
      gl-dri-natives/pom.xml
  2. 29
      gl-dri-natives/src/main/c/jaggl_X11_dri.h
  3. 15
      gl-natives/pom.xml
  4. 93
      gl-natives/src/main/c/jaggl_context.h
  5. 1157
      gl-natives/src/main/c/jaggl_opengl.h
  6. 15
      misc-natives/pom.xml
  7. 37
      misc-natives/src/main/c/jagex3_jagmisc_jagmisc.h
  8. 3
      pom.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>dev.openrs2</groupId>
<artifactId>openrs2</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>openrs2-gl-dri-natives</artifactId>
<packaging>jar</packaging>
<name>OpenRS2 GL DRI Natives</name>
</project>

@ -0,0 +1,29 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class jaggl_X11_dri */
#ifndef _Included_jaggl_X11_dri
#define _Included_jaggl_X11_dri
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: jaggl_X11_dri
* Method: open
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL Java_jaggl_X11_dri_open
(JNIEnv *, jclass, jstring);
/*
* Class: jaggl_X11_dri
* Method: close
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_jaggl_X11_dri_close
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif
#endif

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>dev.openrs2</groupId>
<artifactId>openrs2</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>openrs2-gl-natives</artifactId>
<packaging>jar</packaging>
<name>OpenRS2 GL Natives</name>
</project>

@ -0,0 +1,93 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class jaggl_context */
#ifndef _Included_jaggl_context
#define _Included_jaggl_context
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: jaggl_context
* Method: createContext
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_jaggl_context_createContext
(JNIEnv *, jclass);
/*
* Class: jaggl_context
* Method: releaseContext
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_jaggl_context_releaseContext
(JNIEnv *, jclass);
/*
* Class: jaggl_context
* Method: destroy
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_jaggl_context_destroy
(JNIEnv *, jclass);
/*
* Class: jaggl_context
* Method: swapBuffers
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_jaggl_context_swapBuffers
(JNIEnv *, jclass);
/*
* Class: jaggl_context
* Method: getLastError
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_jaggl_context_getLastError
(JNIEnv *, jclass);
/*
* Class: jaggl_context
* Method: setSwapInterval
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_jaggl_context_setSwapInterval
(JNIEnv *, jclass, jint);
/*
* Class: jaggl_context
* Method: getExtensionsString
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jaggl_context_getExtensionsString
(JNIEnv *, jclass);
/*
* Class: jaggl_context
* Method: getAlphaBits
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_jaggl_context_getAlphaBits
(JNIEnv *, jclass);
/*
* Class: jaggl_context
* Method: choosePixelFormat1
* Signature: (Ljava/awt/Component;II)Z
*/
JNIEXPORT jboolean JNICALL Java_jaggl_context_choosePixelFormat1
(JNIEnv *, jclass, jobject, jint, jint);
/*
* Class: jaggl_context
* Method: makeCurrent1
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_jaggl_context_makeCurrent1
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>dev.openrs2</groupId>
<artifactId>openrs2</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>openrs2-misc-natives</artifactId>
<packaging>jar</packaging>
<name>OpenRS2 Misc Natives</name>
</project>

@ -0,0 +1,37 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class jagex3_jagmisc_jagmisc */
#ifndef _Included_jagex3_jagmisc_jagmisc
#define _Included_jagex3_jagmisc_jagmisc
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: jagex3_jagmisc_jagmisc
* Method: nanoTime
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_jagex3_jagmisc_jagmisc_nanoTime
(JNIEnv *, jclass);
/*
* Class: jagex3_jagmisc_jagmisc
* Method: Quit0
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_jagex3_jagmisc_jagmisc_Quit0
(JNIEnv *, jclass);
/*
* Class: jagex3_jagmisc_jagmisc
* Method: init
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_jagex3_jagmisc_jagmisc_init
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif
#endif

@ -16,6 +16,9 @@
<module>deob-annotations</module>
<module>fernflower</module>
<module>game</module>
<module>gl-dri-natives</module>
<module>gl-natives</module>
<module>misc-natives</module>
<module>util</module>
</modules>

Loading…
Cancel
Save