|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package jme3tools.autogen; |
|
|
|
|
|
|
|
|
|
import java.io.BufferedReader; |
|
|
|
|
import java.io.File; |
|
|
|
|
import java.io.FileReader; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.lang.reflect.Field; |
|
|
|
@ -246,9 +247,9 @@ public class GLAutoGen { |
|
|
|
|
String valueStr = null; |
|
|
|
|
|
|
|
|
|
if (info.constantType == int.class) { |
|
|
|
|
valueStr = "0x" + Integer.toHexString((Integer)info.constantValue).toUpperCase(); |
|
|
|
|
valueStr = "0x" + Integer.toHexString((Integer) info.constantValue).toUpperCase(); |
|
|
|
|
} else if (info.constantType == long.class) { |
|
|
|
|
valueStr = "0x" + Long.toHexString((Long)info.constantValue).toUpperCase(); |
|
|
|
|
valueStr = "0x" + Long.toHexString((Long) info.constantValue).toUpperCase(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
System.out.println("\tpublic static final " + typeStr + " " + info.constantName + " = " + valueStr + ";"); |
|
|
|
@ -282,9 +283,8 @@ public class GLAutoGen { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws IOException { |
|
|
|
|
String lwjgl = "D:\\engine\\jme3-lwjgl\\src\\main\\java\\com\\jme3\\renderer\\lwjgl\\LwjglRenderer.java"; |
|
|
|
|
String jogl = "D:\\engine\\jme3-jogl\\src\\main\\java\\com\\jme3\\renderer\\jogl\\JoglRenderer.java"; |
|
|
|
|
String ogles = "D:\\engine\\jme3-android\\src\\main\\java\\com\\jme3\\renderer\\android\\OGLESShaderRenderer.java"; |
|
|
|
|
String path = "../jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglRenderer.java"; |
|
|
|
|
File lwjglRendererSrc = new File(path).getAbsoluteFile(); |
|
|
|
|
|
|
|
|
|
scanType(GL11.class); |
|
|
|
|
scanType(GL14.class); |
|
|
|
@ -306,7 +306,7 @@ public class GLAutoGen { |
|
|
|
|
scanType(ARBDrawInstanced.class); |
|
|
|
|
scanType(ARBInstancedArrays.class); |
|
|
|
|
|
|
|
|
|
scanFile(lwjgl); |
|
|
|
|
scanFile(lwjglRendererSrc.toString()); |
|
|
|
|
|
|
|
|
|
exportInterface(); |
|
|
|
|
} |
|
|
|
|