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
This commit is contained in:
beuc 2013-05-19 15:05:39 +00:00
parent 8ff008e3d7
commit 57176e0bcd
6 changed files with 17 additions and 4 deletions

View File

@ -7,7 +7,7 @@
<!-- This is the platform API where NativeActivity was introduced. --> <!-- This is the platform API where NativeActivity was introduced. -->
<uses-sdk android:minSdkVersion="9" /> <uses-sdk android:minSdkVersion="9" />
<uses-feature android:glEsVersion="0x00020000"></uses-feature> <uses-feature android:glEsVersion="0x00010001"></uses-feature>
<!-- This .apk has no Java code itself, so set hasCode to false. --> <!-- This .apk has no Java code itself, so set hasCode to false. -->
<application android:label="@string/app_name" android:hasCode="true" <application android:label="@string/app_name" android:hasCode="true"

View File

@ -100,6 +100,10 @@ static void drawSolidCone(void) { glutSolidCone(orad,orad,slices,
static void drawWireCone(void) { glutWireCone(orad,orad,slices,stacks); } /* orad doubles as size input */ static void drawWireCone(void) { glutWireCone(orad,orad,slices,stacks); } /* orad doubles as size input */
static void drawSolidCylinder(void) { glutSolidCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */ static void drawSolidCylinder(void) { glutSolidCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */
static void drawWireCylinder(void) { glutWireCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */ static void drawWireCylinder(void) { glutWireCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */
static void drawSolidTeapot(void)
{ glFrontFace(GL_CW); glutSolidTeapot(orad); glFrontFace(GL_CCW); /* orad doubles as size input */}
static void drawWireTeapot(void)
{ glFrontFace(GL_CW); glutWireTeapot(orad); glFrontFace(GL_CCW); /* orad doubles as size input */}
/* /*
* This structure defines an entry in our function-table. * This structure defines an entry in our function-table.
@ -121,7 +125,7 @@ static const entry table [] =
ENTRY (RhombicDodecahedron), ENTRY (RhombicDodecahedron),
ENTRY (Icosahedron), ENTRY (Icosahedron),
ENTRY (SierpinskiSponge), ENTRY (SierpinskiSponge),
/* ENTRY (Teapot), */ ENTRY (Teapot),
ENTRY (Torus), ENTRY (Torus),
ENTRY (Sphere), ENTRY (Sphere),
ENTRY (Cone), ENTRY (Cone),

View File

@ -109,4 +109,12 @@ struct tagSFG_PlatformWindowState
char unused; char unused;
}; };
/* Menu font and color definitions */
#define FREEGLUT_MENU_FONT NULL
#define FREEGLUT_MENU_PEN_FORE_COLORS {0.0f, 0.0f, 0.0f, 1.0f}
#define FREEGLUT_MENU_PEN_BACK_COLORS {0.70f, 0.70f, 0.70f, 1.0f}
#define FREEGLUT_MENU_PEN_HFORE_COLORS {0.0f, 0.0f, 0.0f, 1.0f}
#define FREEGLUT_MENU_PEN_HBACK_COLORS {1.0f, 1.0f, 1.0f, 1.0f}
#endif /* FREEGLUT_INTERNAL_ANDROID_H */ #endif /* FREEGLUT_INTERNAL_ANDROID_H */

View File

@ -414,7 +414,7 @@ void fgPlatformProcessSingleEvent ( void )
if (window != NULL && window->Window.Handle != NULL) { if (window != NULL && window->Window.Handle != NULL) {
int32_t width = ANativeWindow_getWidth(window->Window.Handle); int32_t width = ANativeWindow_getWidth(window->Window.Handle);
int32_t height = ANativeWindow_getHeight(window->Window.Handle); int32_t height = ANativeWindow_getHeight(window->Window.Handle);
fghOnReshapeNotify(width,height); fghOnReshapeNotify(window,width,height,GL_FALSE);
} }
/* Read pending event. */ /* Read pending event. */

View File

@ -557,7 +557,7 @@ static void fghDrawNormalVisualization11()
/* Done, free memory, reset color */ /* Done, free memory, reset color */
free(verticesForNormalVisualization); free(verticesForNormalVisualization);
glColor4fv(currentColor); glColor4f(currentColor[0],currentColor[1],currentColor[2],currentColor[3]);
} }
#endif #endif

View File

@ -29,6 +29,7 @@ void glutChangeToSubMenu( int item, const char* label, int value ) {}
void glutRemoveMenuItem( int item ) {} void glutRemoveMenuItem( int item ) {}
void glutAttachMenu( int button ) {} void glutAttachMenu( int button ) {}
void glutDetachMenu( int button ) {} void glutDetachMenu( int button ) {}
void glutSetMenuFont( int menuID, void* font ) {}
void glutBitmapCharacter( void* font, int character ) {} void glutBitmapCharacter( void* font, int character ) {}
int glutBitmapWidth( void* font, int character ) { return 0; } int glutBitmapWidth( void* font, int character ) { return 0; }