Comments (9)
Can you copy&paste errors you're seeing here? Also version of OSX and GCC/Clang.
from bgfx.
Mac OS X: 10.7.5
XCode: 4.6.3 (4H1503)
OS X SDK: 10.8 (Base SDK)
Compiler: Default Apple LLVM compiler 4.2
Project file build command:
./premake4 --file=premake/premake4.lua xcode4
Build errors:
/Users/Dev/bgfx/src/bgfx_p.h:98:11: 'unordered_map' file not found
/Users/Dev/bgfx/examples/common/entry/cmd.cpp:15:10: 'unordered_map' file not found
This can be fixed by adding bx/include/compat/osx stuff in bgfx.lua.
After this modification you will start to get compiling errors from renderer_gl.h:
#include< gl/glext.h > <-- this one is missing, proper one is #include <OpenGL/glext.h>
#include< OpenGL/gl.h > <-- won't contain all function declarations are importer in glimport.h
Instead you can find most of the missing stuff from these files:
#include< OpenGL/gl3.h >
#include< OpenGL/gl3ext.h >
But after these modifications you will still get some compiling errors about OpenGL, and I stopped investigating :)
from bgfx.
Do you have problems if you build from command line?
$ cd bgfx
$ make
$ make osx-release64
First make will generate makefiles, 2nd will build for OSX 64-bit release.
I don't use XCode and I'm not sure if Premake4 has full support for XCode4.
from bgfx.
As I mentioned in first post make osx-reslease64 created invalid executables, even though compiling was "fine".
With latest codebase I get following error:
../../../examples/common/entry/entry_sdl.cpp:14:10: fatal error: 'SDL2/SDL.h' file not found
#include < SDL2/SDL.h >
^
1 error generated.
Seems to be that SDL isn't flagged properly or something.
from bgfx.
Yeah SDL2 is forced on OSX, since my native OSX implementation for windowing on OSX is missing input.
You can #define ENTRY_CONFIG_USE_SDL to 0 to avoid this (you can do it via compiler option too).
https://github.com/bkaradzic/bgfx/blob/master/examples/common/entry/entry_p.h#L14
This can be fixed by adding bx/include/compat/osx stuff in bgfx.lua.
This compat/osx should be automatically added for all projects from:
https://github.com/bkaradzic/bx/blob/master/premake/toolchain.lua#L473
I don't have no clue why executable would be invalid on OSX. I've tested only on OSX 10.8.4.
example-02-metaballs is good to test, since it doesn't require any external files. Once it's built can you just type:
$ cd bgfx
$ make
$ make osx-release64
$ .build/osx64_gcc/bin/example-02-metaballs.app/Contents/MacOS/example-02-metaballsRelease
from bgfx.
Did you have any luck with this?
from bgfx.
My guess is he's trying to run them from the Finder, but the built example .app bundles are broken: they contain executables but no Info.plist files, and you need to run them with a particular working directory to pick up the resources, otherwise they just segfault mysteriously.
Ideally, they'd have Info.plist files and they'd copy required resources into the app bundle so they can find them easily at runtime.
from bgfx.
@cadabra2 I test only thru command line, so steps above should work. Proper packaging (for all platforms) is on my TODO list. :)
from bgfx.
FYI. I'm getting this problem. Double clicking the app I get: "You can't open the application because it may be damaged or incomplete."
Building from command line with:
make osx-release64
Everything appears to compile fine.
The produced *.app files will not double click launch from finder.
However, I cd into the app bundle and manually run the executable it runs fine.
I should also point out the app icons in finder show up with a circle bar sign over them suggesting they won't run.
The *.app produced only includes the executable file. There is no Info.plist which I'm thinking may be the cause here.
Some other things I've noticed after poking a bit.
If I projgen the Xcode OS X project and open it the Info tab contains incorrect information about the project for the application target properties. Such as requiring arm64 and it being an iPhone project. Eliminating those things produces a .app that works.
from bgfx.
Related Issues (20)
- 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
- A D3D11 debuglayer warning in 00-helloworld example project.
- setViewMode sequential mode seems to be broken HOT 2
- bgfx:blit on texture arrays does not handle layers past the first one consistently
- [vulkan] Synchronization issue: vkAcquireNextImage uses a semaphore which is in use. HOT 4
- [vulkan] example-07-callback does not work well with a tiling wm.
- Dxgi::shutdown() asserts on 4 GPUs host
- Example 08-update: Non 1x1 texel block size ImageFormats get copied incorrectly from buffer to image in Vulkan. HOT 2
- Metal renderer compiler error in XCode version 15.0 and 15.1 HOT 5
- Dynamic vertex buffer getting overwritten by update after being submitted HOT 3
- A few shutdown & re-init bugs HOT 2
- [Android]The same fragment code has a significant precision difference when executed on iOS and Android.
- Using OpenGL as the renderer leads to TDR(0x0000116) HOT 7
- [Android] `ALooper_pollAll` is deprecated in r27
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.