compilation for windows done corectly with glew ==> need to be tested on a real windows to test it
This commit is contained in:
parent
6d488cb802
commit
936e10adac
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -31,3 +31,6 @@
|
||||
[submodule "Sources/libz/zlib"]
|
||||
path = Sources/libz/zlib
|
||||
url = https://github.com/madler/zlib.git
|
||||
[submodule "Sources/libglew/glew"]
|
||||
path = Sources/libglew/glew
|
||||
url = https://github.com/HeeroYui/glew.git
|
||||
|
2
Build
2
Build
@ -1 +1 @@
|
||||
Subproject commit 69605919a97aa8ccf82eef24b15f960f9c8ba7af
|
||||
Subproject commit be3793f0e962b61ecc9e98bdd461b413e652772e
|
@ -17,16 +17,19 @@ LOCAL_C_INCLUDES :=
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||
|
||||
LOCAL_EXPORT_LDLIBS := -lGLESv2 -ldl -llog
|
||||
#LOCAL_EXPORT_LDLIBS := -lGLESv1_CM -ldl -llog
|
||||
|
||||
LOCAL_CFLAGS := -Wno-write-strings \
|
||||
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\"" \
|
||||
-DDATA_IN_APK
|
||||
|
||||
ifeq ("$(SHADER)","1")
|
||||
LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
|
||||
LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
|
||||
LOCAL_EXPORT_LDLIBS := -lGLESv2
|
||||
else
|
||||
LOCAL_EXPORT_LDLIBS := -lGLESv1_CM
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
|
||||
LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
|
||||
LOCAL_EXPORT_LDLIBS += -ldl -llog
|
||||
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
@ -27,10 +27,10 @@ LOCAL_CFLAGS := -Wno-write-strings \
|
||||
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\"" \
|
||||
-Wall
|
||||
|
||||
|
||||
LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
|
||||
LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
|
||||
|
||||
ifeq ("$(SHADER)","1")
|
||||
LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
|
||||
LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
|
||||
endif
|
||||
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
@ -11,21 +11,17 @@ LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=
|
||||
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
|
||||
|
||||
# name of the dependency
|
||||
LOCAL_LIBRARIES := etk freetype tinyxml libzip libpng parsersvg lua zlib
|
||||
LOCAL_LIBRARIES := etk freetype tinyxml libzip libpng parsersvg lua zlib glew
|
||||
|
||||
LOCAL_C_INCLUDES :=
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||
LOCAL_EXPORT_LDLIBS := -lopengl32 -lgdi32
|
||||
LOCAL_EXPORT_LDLIBS :=
|
||||
|
||||
LOCAL_CFLAGS := -Wno-write-strings \
|
||||
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\"" \
|
||||
-Wall
|
||||
|
||||
|
||||
#LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
|
||||
#LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
|
||||
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
||||
|
@ -60,11 +60,14 @@ extern "C" {
|
||||
#elif defined(__TARGET_OS__Windows)
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
// TO ENABLE THE SHADER api ...
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
//#define GL_GLEXT_PROTOTYPES
|
||||
#define GLEW_STATIC
|
||||
#include <GL/glew.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glext.h>
|
||||
#endif
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glext.h>
|
||||
#elif defined(__TARGET_OS__MacOs)
|
||||
|
||||
#elif defined(__TARGET_OS__IOs)
|
||||
|
@ -211,6 +211,14 @@ int Windows_Run(void);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
glewInit();
|
||||
if (!glewIsSupported("GL_VERSION_2_0")) {
|
||||
fprintf(stderr, "OpenGL 2.0 not available\n");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
ewol::CmdLine::Clean();
|
||||
for( int32_t i=1 ; i<argc; i++) {
|
||||
EWOL_INFO("CmdLine : \"" << argv[i] << "\"" );
|
||||
|
18
Sources/libglew/Windows.mk
Normal file
18
Sources/libglew/Windows.mk
Normal file
@ -0,0 +1,18 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := glew
|
||||
|
||||
#http://glew.sourceforge.net/index.html
|
||||
|
||||
ifeq ("$(SHADER)","1")
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/glew/include/
|
||||
LOCAL_EXPORT_LDLIBS := $(LOCAL_PATH)/glew/lib/glew32s.lib -lopengl32 -lgdi32
|
||||
# to enable open gl 2 mode
|
||||
LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
|
||||
LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
|
||||
endif
|
||||
|
||||
include $(BUILD_PREBUILT)
|
||||
|
1
Sources/libglew/glew
Submodule
1
Sources/libglew/glew
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 76748293c2611769297c2c97ed96dde8368bbbf0
|
Loading…
x
Reference in New Issue
Block a user