emulator opengl: fix windows build
Change-Id: I145c7bf3a664fdb2c9e113cd977b4b2431d0668d
This commit is contained in:
committed by
Guy Zadickario
parent
118af85051
commit
efcbbc3f28
@@ -2,9 +2,8 @@ LOCAL_PATH := $(call my-dir)
|
|||||||
|
|
||||||
$(call emugl-begin-host-shared-library,libGLESv1_dec)
|
$(call emugl-begin-host-shared-library,libGLESv1_dec)
|
||||||
|
|
||||||
$(call emugl-import, libOpenglCodecCommon)
|
$(call emugl-import, libOpenglCodecCommon libOpenglOsUtils)
|
||||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
$(call emugl-export,LDLIBS,-ldl)
|
|
||||||
|
|
||||||
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/GLESv1_enc,gl)
|
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/GLESv1_enc,gl)
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "GLDecoder.h"
|
#include "GLDecoder.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <dlfcn.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
@@ -31,7 +30,7 @@ GLDecoder::GLDecoder()
|
|||||||
GLDecoder::~GLDecoder()
|
GLDecoder::~GLDecoder()
|
||||||
{
|
{
|
||||||
if (m_glesDso != NULL) {
|
if (m_glesDso != NULL) {
|
||||||
dlclose(m_glesDso);
|
delete m_glesDso;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +43,7 @@ int GLDecoder::initGL(get_proc_func_t getProcFunc, void *getProcFuncData)
|
|||||||
libname = getenv(GLES_LIBNAME_VAR);
|
libname = getenv(GLES_LIBNAME_VAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_glesDso = dlopen(libname, RTLD_NOW);
|
m_glesDso = osUtils::dynLibrary::open(libname);
|
||||||
if (m_glesDso == NULL) {
|
if (m_glesDso == NULL) {
|
||||||
fprintf(stderr, "Couldn't find %s \n", GLES_LIBNAME);
|
fprintf(stderr, "Couldn't find %s \n", GLES_LIBNAME);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -233,7 +232,7 @@ void *GLDecoder::s_getProc(const char *name, void *userData)
|
|||||||
func = (void *) eglGetProcAddress(name);
|
func = (void *) eglGetProcAddress(name);
|
||||||
#endif
|
#endif
|
||||||
if (func == NULL) {
|
if (func == NULL) {
|
||||||
func = dlsym(ctx->m_glesDso, name);
|
func = (void *)(ctx->m_glesDso->findSymbol(name));
|
||||||
}
|
}
|
||||||
return func;
|
return func;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "gl_dec.h"
|
#include "gl_dec.h"
|
||||||
#include "FixedBuffer.h"
|
#include "FixedBuffer.h"
|
||||||
#include "GLDecoderContextData.h"
|
#include "GLDecoderContextData.h"
|
||||||
|
#include <osDynLibrary.h>
|
||||||
|
|
||||||
#define GLES_LIBNAME_VAR "ANDROID_GLESv1_LIB"
|
#define GLES_LIBNAME_VAR "ANDROID_GLESv1_LIB"
|
||||||
#define GLES_LIBNAME "libGLES_CM.so"
|
#define GLES_LIBNAME "libGLES_CM.so"
|
||||||
@@ -64,7 +65,7 @@ private:
|
|||||||
static void * s_getProc(const char *name, void *userData);
|
static void * s_getProc(const char *name, void *userData);
|
||||||
|
|
||||||
GLDecoderContextData *m_contextData;
|
GLDecoderContextData *m_contextData;
|
||||||
void *m_glesDso;
|
osUtils::dynLibrary* m_glesDso;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -29,6 +29,6 @@ ifeq ($(HOST_OS),windows)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/../include $(EMUGL_PATH)/shared)
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/../include $(EMUGL_PATH)/shared)
|
||||||
$(call emugl-export,STATIC_LIBRARIES, libcutils liblog)
|
$(call emugl-export,STATIC_LIBRARIES, libcutils libutils liblog)
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ LOCAL_SRC_FILES := \
|
|||||||
|
|
||||||
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include)
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include)
|
||||||
|
|
||||||
|
# use Translator's egl/gles headers
|
||||||
|
LOCAL_C_INCLUDES += $(EMUGL_PATH)/host/libs/Translator/include
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES += libutils liblog
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|
||||||
endif # HOST_OS != darwin
|
endif # HOST_OS != darwin
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
ifneq ($(HOST_OS),windows)
|
||||||
|
|
||||||
LOCAL_PATH:=$(call my-dir)
|
LOCAL_PATH:=$(call my-dir)
|
||||||
|
|
||||||
$(call emugl-begin-host-executable,emugen)
|
$(call emugl-begin-host-executable,emugen)
|
||||||
@@ -14,3 +16,5 @@ $(call emugl-end-module)
|
|||||||
# The location of the emugen host tool that is used to generate wire
|
# The location of the emugen host tool that is used to generate wire
|
||||||
# protocol encoders/ decoders. This variable is used by other emugl modules.
|
# protocol encoders/ decoders. This variable is used by other emugl modules.
|
||||||
EMUGL_EMUGEN := $(LOCAL_BUILT_MODULE)
|
EMUGL_EMUGEN := $(LOCAL_BUILT_MODULE)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include "TimeUtils.h"
|
#include "TimeUtils.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <windows.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
|
|||||||
Reference in New Issue
Block a user