Compare commits

...

19 Commits

Author SHA1 Message Date
Sandy Carter
6ecce2449d emscripten: Set examples as htmls 2022-08-22 08:57:15 -04:00
Sandy Carter
c717984be0 emscripten: specify webgl2
Fix `undefined symbol emscripten_webgl2_get_proc_address` linker error
2022-08-22 08:57:15 -04:00
Sandy
955d692550 Dependabot unblock (#144)
* build(deps): bump bx from `aa5090b` to `13ae212`

Bumps [bx](https://github.com/bkaradzic/bx) from `aa5090b` to `13ae212`.
- [Release notes](https://github.com/bkaradzic/bx/releases)
- [Commits](aa5090bbd8...13ae21207d)

---
updated-dependencies:
- dependency-name: bx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump bgfx from `db44d56` to `8461f34`

Bumps [bgfx](https://github.com/bkaradzic/bgfx) from `db44d56` to `8461f34`.
- [Release notes](https://github.com/bkaradzic/bgfx/releases)
- [Commits](db44d5675f...8461f3406e)

---
updated-dependencies:
- dependency-name: bgfx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-19 08:56:45 -07:00
Sandy Carter
12b75cc0ad config: Add option to turn on debug output on release 2022-08-07 08:33:26 -04:00
loanselot
65dde3874d Merge pull request #137 from pr0g/master
update bx to require c++14 and add compiler flag for bx when using MSVC
2022-07-19 00:42:56 +03:00
Tom Hulton-Harrop
f6a9fb1687 update from upstream - update bgfx submodule 2022-07-17 22:39:38 +01:00
Tom Hulton-Harrop
f1eed47138 Merge remote-tracking branch 'upstream/master' 2022-07-17 22:38:36 +01:00
loanselot
9ac6e08121 Merge pull request #138 from bkaradzic/dependabot/submodules/bx-aa5090b
build(deps): bump bx from `6332fb0` to `aa5090b`
2022-07-17 18:16:53 +03:00
loanselot
6c75503da4 Merge pull request #139 from bkaradzic/dependabot/submodules/bgfx-b38389f
build(deps): bump bgfx from `9204a53` to `b38389f`
2022-07-17 18:16:45 +03:00
dependabot[bot]
3dcf049202 build(deps): bump bgfx from 9204a53 to b38389f
Bumps [bgfx](https://github.com/bkaradzic/bgfx) from `9204a53` to `b38389f`.
- [Release notes](https://github.com/bkaradzic/bgfx/releases)
- [Commits](9204a536dd...b38389f04e)

---
updated-dependencies:
- dependency-name: bgfx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 16:03:21 +00:00
dependabot[bot]
3ec2a51aef build(deps): bump bx from 6332fb0 to aa5090b
Bumps [bx](https://github.com/bkaradzic/bx) from `6332fb0` to `aa5090b`.
- [Release notes](https://github.com/bkaradzic/bx/releases)
- [Commits](6332fb0305...aa5090bbd8)

---
updated-dependencies:
- dependency-name: bx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 16:03:20 +00:00
e-erdal
26a0f1e54d update bx to require c++14 and add compiler flag for bx when using MSVC 2022-06-26 17:22:23 +01:00
e-erdal
896ab5478c Add __cplusplus for MSVC 2022-06-24 11:42:25 +03:00
loanselot
23a1dc204a Merge pull request #135 from bkaradzic/dependabot/submodules/bx-6332fb0
build(deps): bump bx from `8832707` to `6332fb0`
2022-06-24 11:36:57 +03:00
loanselot
5fa58aad11 Merge pull request #136 from bkaradzic/dependabot/submodules/bgfx-9204a53
build(deps): bump bgfx from `379fc70` to `9204a53`
2022-06-24 11:36:49 +03:00
dependabot[bot]
8dafd0d9e4 build(deps): bump bgfx from 379fc70 to 9204a53
Bumps [bgfx](https://github.com/bkaradzic/bgfx) from `379fc70` to `9204a53`.
- [Release notes](https://github.com/bkaradzic/bgfx/releases)
- [Commits](379fc707ff...9204a536dd)

---
updated-dependencies:
- dependency-name: bgfx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 16:03:24 +00:00
dependabot[bot]
3bac602264 build(deps): bump bx from 8832707 to 6332fb0
Bumps [bx](https://github.com/bkaradzic/bx) from `8832707` to `6332fb0`.
- [Release notes](https://github.com/bkaradzic/bx/releases)
- [Commits](88327070b9...6332fb0305)

---
updated-dependencies:
- dependency-name: bx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 16:03:20 +00:00
loanselot
1b2b921bde Merge pull request #134 from bkaradzic/dependabot/submodules/bgfx-379fc70
build(deps): bump bgfx from `5ae2271` to `379fc70`
2022-05-04 12:26:41 +03:00
dependabot[bot]
95af1cc54d build(deps): bump bgfx from 5ae2271 to 379fc70
Bumps [bgfx](https://github.com/bkaradzic/bgfx) from `5ae2271` to `379fc70`.
- [Release notes](https://github.com/bkaradzic/bgfx/releases)
- [Commits](5ae2271667...379fc707ff)

---
updated-dependencies:
- dependency-name: bgfx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 16:01:28 +00:00
6 changed files with 23 additions and 8 deletions

View File

@@ -21,6 +21,10 @@ if( APPLE AND NOT XCODE )
set( CMAKE_CXX_FLAGS "-ObjC++" )
endif()
if (MSVC AND (MSVC_VERSION GREATER_EQUAL 1914))
add_compile_options("/Zc:__cplusplus")
endif()
option( BGFX_BUILD_TOOLS "Build bgfx tools." ON )
option( BGFX_BUILD_EXAMPLES "Build bgfx examples." ON )
option( BGFX_INSTALL "Create installation target." ON )
@@ -30,6 +34,7 @@ option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compi
option( BX_AMALGAMATED "Amalgamated bx build for faster compilation" OFF )
option( BGFX_CONFIG_MULTITHREADED "Build bgfx with multithreaded configuration" ON )
option( BGFX_CONFIG_RENDERER_WEBGPU "Enables the webgpu renderer" OFF )
option( BX_CONFIG_DEBUG "Log debug messages (default: on in debug)" OFF )
set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum opengl version" )
set( BGFX_OPENGLES_VERSION "" CACHE STRING "Specify minimum OpenGL ES version" )

2
bgfx

Submodule bgfx updated: 5ae2271667...8461f3406e

2
bx

Submodule bx updated: 88327070b9...13ae21207d

View File

@@ -56,6 +56,10 @@ if(BGFX_CONFIG_RENDERER_WEBGPU)
endif()
endif()
if(EMSCRIPTEN)
target_link_options(bgfx PUBLIC "-sMAX_WEBGL_VERSION=2")
endif()
if( NOT ${BGFX_OPENGL_VERSION} STREQUAL "" )
target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=${BGFX_OPENGL_VERSION} )
endif()
@@ -72,7 +76,7 @@ endif()
# Add debug config required in bx headers since bx is private
target_compile_definitions(bgfx
PUBLIC
"BX_CONFIG_DEBUG=$<CONFIG:Debug>"
"BX_CONFIG_DEBUG=$<IF:$<CONFIG:Debug>,1,$<BOOL:${BX_CONFIG_DEBUG}>>"
"BGFX_CONFIG_MULTITHREADED=$<BOOL:${BGFX_CONFIG_MULTITHREADED}>"
)

View File

@@ -30,6 +30,10 @@ endif()
# Create the bx target
add_library( bx STATIC ${BX_SOURCES} )
target_compile_features( bx PUBLIC cxx_std_14 )
# (note: see bx\scripts\toolchain.lua for equivalent compiler flag)
target_compile_options( bx PUBLIC $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus> )
# Link against psapi on Windows
if( WIN32 )
target_link_libraries( bx PUBLIC psapi )
@@ -67,7 +71,7 @@ target_compile_definitions( bx PUBLIC "__STDC_LIMIT_MACROS" )
target_compile_definitions( bx PUBLIC "__STDC_FORMAT_MACROS" )
target_compile_definitions( bx PUBLIC "__STDC_CONSTANT_MACROS" )
target_compile_definitions(bx PUBLIC "BX_CONFIG_DEBUG=$<CONFIG:Debug>")
target_compile_definitions(bx PUBLIC "BX_CONFIG_DEBUG=$<IF:$<CONFIG:Debug>,1,$<BOOL:${BX_CONFIG_DEBUG}>>")
# Additional dependencies on Unix
if (ANDROID)

View File

@@ -179,10 +179,12 @@ function( add_example ARG_NAME )
endif()
if (NOT ARG_COMMON AND EMSCRIPTEN)
target_link_libraries(example-${ARG_NAME}
"-s PRECISE_F32=1"
"-s TOTAL_MEMORY=268435456"
"--memory-init-file 1")
set_target_properties(example-${ARG_NAME}
PROPERTIES
LINK_FLAGS
"-s PRECISE_F32=1 -s TOTAL_MEMORY=268435456 -s ENVIRONMENT=web --memory-init-file 1 --emrun"
SUFFIX ".html"
)
endif()
# Directory name