Comments (12)
Thanks for update, I'm still on 10.8.6 here. I'll add this (or if you have changes already you can just send pull request).
I don't use Xcode at all. I use only gmake on OSX/iOS/Android/etc. Did you try to build thru command line?
$ make osx-release64
Anyhow bgfx project files are there just as an example, I assume if anyone is using bgfx that they will just switch to their build system anyway.
For example, building it with CMake:
https://github.com/LoomSDK/LoomSDK/blob/master/loom/graphics/CMakeLists.txt and stripping down library to minimum needed: https://github.com/LoomSDK/LoomSDK/tree/master/loom/graphics/internal
At some point I'll probably provide compiled libs for all targets, but currently I don't have automated way to do it.
from bgfx.
I saw you pushed the latest from Kronos - I stashed my changes and tried again. glext.h is good now :)
Gor bx, I had to delete unordered_map entirely to get it out of the search path, as well as removing the include of malloc.h.
I've shifted to a command line build strategy as you suggest, with the bx mods, the library builds fine. Trying to get the samples building now, for some reason it's hung up on not finding the SDL2 headers (which I've currently got in /Library/Frameworks.) I'm sure it'll be easy enough to resolve at my end.
Maybe the premake script could generate the unordered_map header on pre 10.9 installations?
from bgfx.
Solved SDL2 with
cd 3rdparty
ln -s /Library/Frameworks/SDL2.framework/Versions/A/Headers SDL2
mkdir lib; cd lib; mkdir osx64_gcc; cd osx64_gcc
ln -s /Library/Frameworks/SDL2.framework/Versions/A/SDL2 libSDL2.a
I think maybe you were assuming that SDL2 would be installed by people into /usr/local instead of as a framework? A few notes in the readme might be helpful.
After a command line build, the examples are working (i.e., they run properly) up to the stencil shadow sample, which doesn't build because for an obvious reason -
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1242:46: fatal error: declaration conflicts
with target of using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float fmax(float __x, float __y) _NOEXCEPT {return fmaxf(__x, __y);}
^
../../../examples/common/fpumath.h:20:14: note: target of using declaration
inline float fmax(float _a, float _b)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1239:9: note: using declaration
using ::fmax;
^
Getting close!
from bgfx.
I had to delete unordered_map entirely
Yeah I was wondering about that. Since it would include itself.
Btw, can you try deleting whole bx/include/compat/osx. Based on your changes it might work that way, and then I'll figure out how to remove include path from 10.9 in Premake script instead.
from bgfx.
I've been wanting to disable SDL2 build for OSX anyway. Someone requested SDL2 integration and I left it enabled mostly for testing reasons. Setting ENTRY_CONFIG_USE_SDL to 0 build with native entry path.
from bgfx.
What's using cmath?
from bgfx.
Btw, SDL2 path is just what SDL2 uses when building from source. I just did make && make install. How did you obtain SDL2? Is it part of Xcode/SDK now?
from bgfx.
Fixed this fmin/fmax name collision (a4df646). It seems defined everywhere except MSVC. Not sure why this never caused any issues?!
from bgfx.
- deleting compat/osx. FTW - it's good.
- unordered_map > hash_table > math
- http://www.libsdl.org/download-2.0.php has SDL2 prebuilt binaries as a .dmg file
- with a4df646, the build succeeds all the way through.
All of the demos I tried look good, except the SDF font demo is quite glitched around the edges of some letters.
from bgfx.
All of the demos I tried look good, except the SDF font demo is quite glitched around the edges of some letters.
Probably would be the best to create screenshot and open new issue specifically for it.
from bgfx.
deleting compat/osx. FTW - it's good.
Ok, I don't have solution yet how to make it work with 10.8.4 and 10.9 but good to know.
from bgfx.
LOL, okay, I'll learn how to add screenshots to issue reports.
from bgfx.
Related Issues (20)
- Vulkan fail to create swapchain on Wayland (Call to a X11 function ?) HOT 9
- Bug: DX3D12 crash in Debug mode HOT 7
- Small fix on soname defining on ldflags for Android examples. HOT 2
- Crash on linux (default backend - vulkan) with custom window handle and native display is NULL HOT 6
- Shaderc.cpp incorrectly adds PSSL preamble to compute shader HOT 1
- macOS version compatibility HOT 2
- Bad Vulkan performance due to weak index/vertex buffer management HOT 1
- Crash on resize: Nvidia RTX 4090 + Vulkan + Linux HOT 3
- Metal: example-01-helloworld corrupted render when MSAA is enabled HOT 2
- Shifted window buffer location when resizing a window HOT 1
- Vulkan Backend - incorrect mipmap generation for cubemap frame buffers. HOT 4
- Unable to build bgfx for iOS Simulator x86_64 arch HOT 4
- Vulkan on Android: the frame isn't updating (ONLY THE FIRST FRAME IS RENDERED) HOT 4
- Screenshot taken always from the main window backbuffer on MacOS/Metal
- Index buffer offset not being set with dynamic index buffer and indirect call HOT 25
- gl_NumWorkGroups doesn't compile when the target is DirectX HOT 1
- Feature request: Support FSR 3 instead of FSR 1
- Allow one executable to run with Vulkan on Wayland and X11 HOT 1
- BX and BGFX do not support the conformant MSVC preprocessor HOT 12
- Examples crash on startup on Ubuntu 22.04 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bgfx.