mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-28 17:16:29 +03:00
Changed the ABI for android.
Changed the default project compiled in android. Changed the empty window to show a couple of primitives.
This commit is contained in:
@@ -178,36 +178,12 @@ LOCAL_LDLIBS := $(EE_GLES_LINK) -ldl -llog
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
#**************** SDL 2 ***************
|
||||
|
||||
#**************** eetest ****************
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_PATH := $(MY_PATH)/test
|
||||
|
||||
LOCAL_LDLIBS := $(MY_LDLIBS)
|
||||
|
||||
LOCAL_CFLAGS := $(MY_C_FLAGS)
|
||||
|
||||
LOCAL_MODULE := eetest
|
||||
|
||||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
../$(MY_SDL_MAIN_PATH) \
|
||||
*.cpp
|
||||
|
||||
LOCAL_SRC_FILES := $(foreach F, $(CORE_SRCS), $(addprefix $(dir $(F)),$(notdir $(wildcard $(LOCAL_PATH)/$(F)))))
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := eepp
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
#**************** eetest ****************
|
||||
|
||||
#************* empty_window *************
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_PATH := $(MY_PATH)/test/empty_window
|
||||
|
||||
LOCAL_MODULE := empty_window
|
||||
LOCAL_MODULE := main
|
||||
|
||||
LOCAL_LDLIBS := $(MY_LDLIBS)
|
||||
|
||||
@@ -305,7 +281,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_PATH := $(MY_PATH)/rhythm
|
||||
|
||||
LOCAL_MODULE := main
|
||||
LOCAL_MODULE := rhythm
|
||||
|
||||
LOCAL_LDLIBS := $(MY_LDLIBS)
|
||||
|
||||
|
||||
@@ -14,3 +14,4 @@ APP_LDLIBS := -llog $(EE_GLES_LINK) -lm -lz
|
||||
APP_CFLAGS := -DDEBUG # arm-linux-androideabi-4.4.3 crashes in -O0 mode on SDL sources
|
||||
APP_PLATFORM := android-7
|
||||
APP_MODULES := main
|
||||
#APP_ABI := armeabi-v7a
|
||||
|
||||
@@ -6,12 +6,17 @@ EE_MAIN_FUNC int main (int argc, char * argv [])
|
||||
// Create a new window
|
||||
cWindow * win = cEngine::instance()->CreateWindow( WindowSettings( 800, 600, 32, WindowStyle::Default, "", "eepp - Empty Window" ), ContextSettings( ) );
|
||||
|
||||
// Set window background color
|
||||
win->BackColor( eeColor( 50, 50, 50 ) );
|
||||
|
||||
// Check if created
|
||||
if ( win->Created() )
|
||||
{
|
||||
// Get input pointer
|
||||
cInput * imp = win->GetInput();
|
||||
|
||||
eeFloat ang = 0;
|
||||
|
||||
// Application loop
|
||||
while ( win->Running() )
|
||||
{
|
||||
@@ -25,6 +30,23 @@ EE_MAIN_FUNC int main (int argc, char * argv [])
|
||||
win->Close();
|
||||
}
|
||||
|
||||
ang += cEngine::instance()->Elapsed() * 0.01;
|
||||
|
||||
// Create an instance of the primitive renderer
|
||||
cPrimitives p;
|
||||
|
||||
// Set the primitive color
|
||||
p.SetColor( eeColorA( 0, 150, 0, 150 ) );
|
||||
|
||||
// Draw a rectangle
|
||||
p.DrawRectangle( 100, 100, win->GetWidth() - 200, win->GetHeight() - 200, ang );
|
||||
|
||||
// Change the color
|
||||
p.SetColor( eeColorA( 0, 255, 0, 150 ) );
|
||||
|
||||
// Draw a circle
|
||||
p.DrawCircle( win->GetWidth() / 2, win->GetHeight() / 2, 200 );
|
||||
|
||||
// Draw frame
|
||||
win->Display();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user