diff src/video/android/SDL_androidgl.c @ 4707:8b109f0dcd2f

Removed old video subsystem, along with (now-unncessary) egl files.
author Paul Hunkin <paul@bieh.net>
date Fri, 18 Jun 2010 00:03:09 +1200
parents c93b44ddc63e
children 6dc26b9d8368
line wrap: on
line diff
--- a/src/video/android/SDL_androidgl.c	Fri Jun 18 00:02:13 2010 +1200
+++ b/src/video/android/SDL_androidgl.c	Fri Jun 18 00:03:09 2010 +1200
@@ -34,125 +34,62 @@
 #include "SDL_androidevents.h"
 #include "SDL_androidrender.h"
 
-/* Android header */
-#include "egl.h"
+#include <android/log.h>
 
 
-//EGL globals
-static EGLDisplay iEglDisplay; 	
-static EGLConfig  iEglConfig;   	
-static EGLContext iEglContext; 	
-static EGLSurface iEglSurface;	
-
-EGLint attribList [] = 
-{ 
-	EGL_BUFFER_SIZE, 16, //16 bit color
-	EGL_DEPTH_SIZE, 15,
-	EGL_NONE 
-};	
-
-
+/*
+These things are in the JNI android support
+*/
+ 
 
 
 /* GL functions */
 int Android_GL_LoadLibrary(_THIS, const char *path){
-	printf("[STUB] GL_LoadLibrary\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n");
 	return 0;
 }
 
 void *Android_GL_GetProcAddress(_THIS, const char *proc){
-	printf("[STUB] GL_GetProcAddress\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n");
 	return 0;
 }
 
 void Android_GL_UnloadLibrary(_THIS){
-	printf("[STUB] GL_UnloadLibrary\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n");
 }
 
 /*
 int *Android_GL_GetVisual(_THIS, Display * display, int screen){
-	printf("[STUB] GL_GetVisual\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL","[STUB] GL_GetVisual\n");
 	return 0;
 }
 */
 
 SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){
-	printf("[STUB] GL_CreateContext\n");
-
-	//Start up the display
-	iEglDisplay = eglGetDisplay (EGL_DEFAULT_DISPLAY);
-	if(iEglDisplay == EGL_NO_DISPLAY){
-		printf("Unable to find a  suitable EGLDisplay\n");
-		return NULL;
-	}
-
-	printf("1\n");
-		
-	if(!eglInitialize(iEglDisplay, 0, 0)){
-		printf("Couldn't init display\n");
-		return NULL;
-	}
-
-	printf("2\n");
-	
-	EGLint numConfigs;
-	
-	if(!eglChooseConfig(iEglDisplay, attribList, &iEglConfig, 1, &numConfigs)){
-		printf("Couldn't choose config\n");
-		return NULL;
-	}
-
-	printf("3\n");
-	 
-	iEglContext = eglCreateContext(iEglDisplay, iEglConfig, EGL_NO_CONTEXT, 0);
-		
-	if(iEglContext == 0){
-		printf("Couldn't create context\n");
-		return NULL;
-	}
-
-	printf("4\n");
-		
-	NativeWindowType iWindow = 1; //android_createDisplaySurface();
-	
-	iEglSurface = eglCreateWindowSurface(iEglDisplay, iEglConfig, iWindow, 0);	
-
-	printf("5\n");
-	
-	if(iEglSurface == NULL){
-		printf("Couldn't create surface\n");
-		return NULL;
-	}
-
-	printf("6\n");
-	
-	eglMakeCurrent(iEglDisplay, iEglSurface, iEglSurface, iEglContext);
-
-	printf("fininshed making context\n");
-	
-	return iEglSurface;
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_CreateContext\n");
+	return NULL; 
 }
 
 int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
                               SDL_GLContext context){
-	printf("[STUB] GL_MakeCurrent\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_MakeCurrent\n");
 	return 0;
 }
 
 int Android_GL_SetSwapInterval(_THIS, int interval){
-	printf("[STUB] GL_SetSwapInterval\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n");
 	return 0;
 }
 
 int Android_GL_GetSwapInterval(_THIS){
-	printf("[STUB] GL_GetSwapInterval\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n");
 	return 0;
 }
 
 void Android_GL_SwapWindow(_THIS, SDL_Window * window){
-	printf("[STUB] GL_SwapWindow\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SwapWindow\n");
 }
 
 void Android_GL_DeleteContext(_THIS, SDL_GLContext context){
-	printf("[STUB] GL_DeleteContext\n");
+	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n");
 }