mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 10:38:47 +08:00
improve bgfx build on windows
This commit is contained in:
parent
f217efe6c3
commit
50be0ad05d
@ -22,10 +22,13 @@ BgfxSources = [
|
||||
'bimg/src/image_gnf.cpp',
|
||||
'bgfx/src/amalgamated.cpp'
|
||||
]
|
||||
BgfxSources += Glob('bimg/3rdparty/astc-encoder/source/*.cpp')
|
||||
|
||||
if OS_NAME == 'Windows':
|
||||
CCFLAGS = CCFLAGS + ' /std:c++17 ';
|
||||
BgfxCppPath = BgfxCppPath + ['bx/include/compat/msvc','bgfx/3rdparty/dxsdk/include']
|
||||
CCFLAGS = CCFLAGS + ' /std:c++17 /Zc:__cplusplus ';
|
||||
BgfxCppPath = BgfxCppPath + ['bx/include/compat/msvc',
|
||||
'bgfx/3rdparty/dxsdk/include',
|
||||
'bgfx/3rdparty/directx-headers/include/directx']
|
||||
elif OS_NAME == 'Darwin':
|
||||
CCFLAGS = CCFLAGS + ' -std=c++17 '
|
||||
BgfxCppPath= BgfxCppPath + ['bx/include/compat/osx']
|
||||
|
@ -39,7 +39,7 @@ elif NANOVG_BACKEND == 'BGFX':
|
||||
if OS_NAME == 'Darwin':
|
||||
CCFLAGS = CCFLAGS + ' -std=c++17 '
|
||||
elif OS_NAME == 'Windows':
|
||||
CCFLAGS = CCFLAGS + ' /std:c++17 ';
|
||||
CCFLAGS = CCFLAGS + ' /std:c++17 /Zc:__cplusplus ';
|
||||
CPPPATH = CPPPATH + [joinPath(TK_3RD_ROOT, 'bgfx/bx/include/compat/msvc')];
|
||||
CCFLAGS += ' -DBX_CONFIG_DEBUG -DBIMG_DECODE_ENABLE=0 '
|
||||
|
||||
|
@ -67,8 +67,9 @@ else:
|
||||
BASE_SOURCES += ['vgcanvas/vgcanvas_nanovg_soft.c']
|
||||
else:
|
||||
BASE_SOURCES += ['vgcanvas/vgcanvas_nanovg_gl.c']
|
||||
BASE_SOURCES += ['vgcanvas/vgcanvas_nanovg_gl2.c']
|
||||
BASE_SOURCES += ['vgcanvas/vgcanvas_nanovg_gl3.c']
|
||||
|
||||
BASE_SOURCES += ['vgcanvas/vgcanvas_nanovg_gl2.c']
|
||||
BASE_SOURCES += ['vgcanvas/vgcanvas_nanovg_gl3.c']
|
||||
|
||||
if os.environ['INPUT_ENGINE'] == 'null':
|
||||
BASE_SOURCES += Glob('input_engines/input_engine_null.c')
|
||||
|
@ -65,9 +65,9 @@ static ret_t vgcanvas_nanovg_create_fbo(vgcanvas_t* vgcanvas, uint32_t w, uint32
|
||||
|
||||
static ret_t vgcanvas_nanovg_destroy_fbo(vgcanvas_t* vgcanvas, framebuffer_object_t* fbo) {
|
||||
struct NVGLUframebuffer* handle = (struct NVGLUframebuffer*)fbo->handle;
|
||||
|
||||
uint32_t index = getBgfxFboViewId(handle);
|
||||
nvgluDeleteFramebufferEx(handle);
|
||||
arrayViewId[getBgfxFboViewId(handle)] = false;
|
||||
arrayViewId[index] = false;
|
||||
curViewId = 0;
|
||||
(void)vgcanvas;
|
||||
return RET_OK;
|
||||
|
@ -26,5 +26,12 @@
|
||||
#define WITH_NANOVG_GL2 1
|
||||
#define VGCANVAS_CREATE_GL vgcanvas_create_gl2
|
||||
|
||||
#if !defined(WITH_GPU)
|
||||
#include "base/vgcanvas.h"
|
||||
vgcanvas_t* VGCANVAS_CREATE_GL(uint32_t w, uint32_t h, uint32_t stride, bitmap_format_t format,
|
||||
void* win) {
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
#include "vgcanvas_nanovg_gl_common.inc"
|
||||
|
||||
#endif/*WIN32*/
|
||||
|
@ -26,5 +26,13 @@
|
||||
#define WITH_NANOVG_GL3 1
|
||||
#define VGCANVAS_CREATE_GL vgcanvas_create_gl3
|
||||
|
||||
#if !defined(WITH_GPU)
|
||||
#include "base/vgcanvas.h"
|
||||
vgcanvas_t* VGCANVAS_CREATE_GL(uint32_t w, uint32_t h, uint32_t stride, bitmap_format_t format,
|
||||
void* win) {
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
#include "vgcanvas_nanovg_gl_common.inc"
|
||||
#endif/*WIN32*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user