From 57176e0bcdccfe1b0b54cef6f725be0fcf633aee Mon Sep 17 00:00:00 2001 From: beuc Date: Sun, 19 May 2013 15:05:39 +0000 Subject: [PATCH] Make Android work again - adapt to recent changes and fix use of GL-nonES function git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1623 7f0cb862-5218-0410-a997-914c9d46530a --- .../freeglut/progs/test-shapes-gles1/AndroidManifest.xml | 2 +- .../freeglut/progs/test-shapes-gles1/test-shapes-gles1.c | 6 +++++- freeglut/freeglut/src/android/fg_internal_android.h | 8 ++++++++ freeglut/freeglut/src/android/fg_main_android.c | 2 +- freeglut/freeglut/src/fg_geometry.c | 2 +- freeglut/freeglut/src/gles_stubs.c | 1 + 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/freeglut/freeglut/progs/test-shapes-gles1/AndroidManifest.xml b/freeglut/freeglut/progs/test-shapes-gles1/AndroidManifest.xml index 3050ecb..7839f74 100644 --- a/freeglut/freeglut/progs/test-shapes-gles1/AndroidManifest.xml +++ b/freeglut/freeglut/progs/test-shapes-gles1/AndroidManifest.xml @@ -7,7 +7,7 @@ - + Window.Handle != NULL) { int32_t width = ANativeWindow_getWidth(window->Window.Handle); int32_t height = ANativeWindow_getHeight(window->Window.Handle); - fghOnReshapeNotify(width,height); + fghOnReshapeNotify(window,width,height,GL_FALSE); } /* Read pending event. */ diff --git a/freeglut/freeglut/src/fg_geometry.c b/freeglut/freeglut/src/fg_geometry.c index 96f171e..587501c 100644 --- a/freeglut/freeglut/src/fg_geometry.c +++ b/freeglut/freeglut/src/fg_geometry.c @@ -557,7 +557,7 @@ static void fghDrawNormalVisualization11() /* Done, free memory, reset color */ free(verticesForNormalVisualization); - glColor4fv(currentColor); + glColor4f(currentColor[0],currentColor[1],currentColor[2],currentColor[3]); } #endif diff --git a/freeglut/freeglut/src/gles_stubs.c b/freeglut/freeglut/src/gles_stubs.c index 63693cc..669f44a 100644 --- a/freeglut/freeglut/src/gles_stubs.c +++ b/freeglut/freeglut/src/gles_stubs.c @@ -29,6 +29,7 @@ void glutChangeToSubMenu( int item, const char* label, int value ) {} void glutRemoveMenuItem( int item ) {} void glutAttachMenu( int button ) {} void glutDetachMenu( int button ) {} +void glutSetMenuFont( int menuID, void* font ) {} void glutBitmapCharacter( void* font, int character ) {} int glutBitmapWidth( void* font, int character ) { return 0; }