diff --git a/android/core/src/processing/android/core/GLModel.java b/android/core/src/processing/android/core/GLModel.java index 0fe4ca89a..75d15b942 100644 --- a/android/core/src/processing/android/core/GLModel.java +++ b/android/core/src/processing/android/core/GLModel.java @@ -11,6 +11,8 @@ import javax.microedition.khronos.opengles.*; * This class holds a 3D model composed of vertices, normals, colors (per vertex) and * texture coordinates (also per vertex). All this data is stored in Vertex Buffer Objects * (VBO) in GPU memory for very fast access. + * By Andres Colubri + * */ @SuppressWarnings("unused") public class GLModel implements GLConstants, PConstants { @@ -68,6 +70,12 @@ public class GLModel implements GLConstants, PConstants { } + // TODO: implement loading from obj and mdl files. + public GLModel(PApplet parent, String filename) { // Ignore + + } + + public GLModel(PApplet parent, int numVert, Parameters params) { this.parent = parent; a3d = (PGraphicsAndroid3D)parent.g; diff --git a/android/core/src/processing/android/core/GLTexture.java b/android/core/src/processing/android/core/GLTexture.java index 8fa640c7b..f3440ea42 100644 --- a/android/core/src/processing/android/core/GLTexture.java +++ b/android/core/src/processing/android/core/GLTexture.java @@ -12,6 +12,8 @@ import java.nio.*; /** * This class adds an opengl texture to a PImage object. + * By Andres Colubri + * */ @SuppressWarnings("unused") public class GLTexture extends PImage implements PConstants, GLConstants { diff --git a/android/core/src/processing/android/core/PApplet.java b/android/core/src/processing/android/core/PApplet.java index df0ea7e81..acd7eec15 100644 --- a/android/core/src/processing/android/core/PApplet.java +++ b/android/core/src/processing/android/core/PApplet.java @@ -3003,6 +3003,7 @@ public class PApplet extends Activity implements PConstants, Runnable { // GL-methods + public GLFont loadGLFont(String filename) { try { InputStream input = createInput(filename); @@ -3016,14 +3017,17 @@ public class PApplet extends Activity implements PConstants, Runnable { return null; } + public GLFont createGLFont(String name, float size) { return createGLFont(name, size, true, GLFont.DEFAULT_CHARSET); } + public GLFont createGLFont(String name, float size, boolean smooth) { return createGLFont(name, size, smooth, GLFont.DEFAULT_CHARSET); } + public GLFont createGLFont(String name, float size, boolean smooth, char charset[]) { String lowerName = name.toLowerCase(); @@ -3039,10 +3043,17 @@ public class PApplet extends Activity implements PConstants, Runnable { return new GLFont(this, baseFont, round(size), smooth, charset); } + public GLTexture loadGLTexture(String filename) { return new GLTexture(this, filename); } + + public GLModel loadGLModel(String filename) { + return new GLModel(this, filename); + } + + ////////////////////////////////////////////////////////////// // FILE/FOLDER SELECTION diff --git a/android/core/src/processing/android/core/PGraphicsAndroid3D.java b/android/core/src/processing/android/core/PGraphicsAndroid3D.java index 16721fb1b..b417fadd4 100644 --- a/android/core/src/processing/android/core/PGraphicsAndroid3D.java +++ b/android/core/src/processing/android/core/PGraphicsAndroid3D.java @@ -25,6 +25,11 @@ import javax.microedition.khronos.egl.EGLDisplay; // mipmaps are disabled +/* + * Android 3D renderer implemented with pure OpenGL ES 1.0/1.1 + * By Andres Colubri + * + */ public class PGraphicsAndroid3D extends PGraphics { public SurfaceHolder holder;