Ver código fonte

undefined references in GLESRenderer fixed, java files updated

mikymod 12 anos atrás
pai
commit
001fdb3bf4

+ 0 - 4
android/src/crown/android/CrownActivity.java

@@ -71,10 +71,6 @@ public class CrownActivity extends Activity
 		mAssetManager = getAssets();
 		CrownLib.initAssetManager(mAssetManager);
 
-        // Init GLSurfaceView for rendering
-        mView = new CrownView(getApplication());
-		setContentView(mView);
-
 		// Init Input
 		mTouch = new CrownTouch(this);
 		mSensor = new CrownSensor(this);

+ 2 - 2
android/src/crown/android/CrownLib.java

@@ -31,7 +31,7 @@ import android.view.Surface;
 public class CrownLib
 {
 	static 
-	{
+	{	
 		System.loadLibrary("crown");
 	}
 	
@@ -50,6 +50,6 @@ public class CrownLib
 	public static native void 		pushFloatEvent(int type, float a, float b, float c, float d);
 
 	// Window functions
-	public static native void		setWindow(Surface window);
+	public static native void		setWindow(SurfaceView window);
 	public static native void 		setDisplaySize(int width, int height);
 }

+ 12 - 0
src/renderers/gles/GLESRenderer.cpp

@@ -1036,5 +1036,17 @@ void GLESRenderer::check_gl_errors() const
 	}
 }
 
+//-----------------------------------------------------------------------------
+Renderer* Renderer::create()
+{
+	return CE_NEW(default_allocator(), GLESRenderer);
+}
+
+//-----------------------------------------------------------------------------
+void Renderer::destroy(Renderer* renderer)
+{
+	CE_DELETE(default_allocator(), renderer);
+}
+
 } // namespace crown