Difficulty Running Ogre3D on Mac Topic is solved

Problems building or running the engine, queries about how to use features etc.
User avatar
Cyberix3D
Kobold
Posts: 29
Joined: Tue Jan 17, 2023 10:25 pm
x 5

Difficulty Running Ogre3D on Mac

Post by Cyberix3D »

Ogre Version: :14.2:
Operating System: :MacOs Sonoma 14.3.1:
Render System: :OpenGL:

Hello,

I'm encountering difficulties running the Ogre3D sample browser on my MacOs Sonoma 14.3.1.
I've successfully compiled Ogre3D and the Sample Browser without any issues, but upon running the Sample Browser, I'm encountering the following error message:

Code: Select all

RenderSystem::_createRenderWindow "OGRE Sample Browser", 640x480 windowed  miscParams: FSAA=0 colourDepth=32 contentScalingFactor=1 displayFrequency=N/A gamma=No vsync=Yes vsyncInterval=1 
Creating a Cocoa Compatible Render System
An exception has occurred: UnimplementedException: Builtin Window creation broken. Use an external Window (e.g SDL2) or fix this in createNewWindow at /Users/cyberix3d/trunk/ogre/RenderSystems/GLSupport/src/OSX/OgreOSXCocoaWindow.mm (line 650)

Here is the full log:

Code: Select all

cyberix3d@Cyberix3Ds-MBP MacOS % /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/MacOS/SampleBrowser
Creating resource group General
Creating resource group OgreInternal
Creating resource group OgreAutodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for type 'FileSystem' registered
ArchiveFactory for type 'Zip' registered
ArchiveFactory for type 'EmbeddedZip' registered
DDS codec registering
ETC codec registering
ASTC codec registering
Registering ResourceManager for type GpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
MovableObjectFactory for type 'StaticGeometry' registered.
MovableObjectFactory for type 'Rectangle2D' registered.
Loading library /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/Frameworks/RenderSystem_GL.dylib
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
Loading library /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/Frameworks/Plugin_ParticleFX.dylib
Installing plugin: ParticleFX
Particle Emitter Type 'Point' registered
Particle Emitter Type 'Box' registered
Particle Emitter Type 'Ellipsoid' registered
Particle Emitter Type 'Cylinder' registered
Particle Emitter Type 'Ring' registered
Particle Emitter Type 'HollowEllipsoid' registered
Particle Affector Type 'LinearForce' registered
Particle Affector Type 'ColourFader' registered
Particle Affector Type 'ColourFader2' registered
Particle Affector Type 'ColourImage' registered
Particle Affector Type 'ColourInterpolator' registered
Particle Affector Type 'Scaler' registered
Particle Affector Type 'Rotator' registered
Particle Affector Type 'DirectionRandomiser' registered
Particle Affector Type 'DeflectorPlane' registered
Particle Affector Type 'TextureAnimator' registered
Plugin successfully installed
Loading library /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/Frameworks/Plugin_BSPSceneManager.dylib
Installing plugin: BSP Scene Manager
Plugin successfully installed
Loading library /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/Frameworks/Codec_STBI.dylib
stb_image - v2.28 - public domain image loader
Supported formats: jpeg,jpg,png,bmp,psd,tga,gif,pic,ppm,pgm,hdr
Loading library /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/Frameworks/Plugin_PCZSceneManager.dylib
Installing plugin: Portal Connected Zone Scene Manager
PCZone Factory Type 'ZoneType_Default' registered
Plugin successfully installed
Loading library /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/Frameworks/Plugin_OctreeZone.dylib
Installing plugin: Octree Zone Factory
Plugin successfully installed
Loading library /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/Frameworks/Plugin_OctreeSceneManager.dylib
Installing plugin: Octree Scene Manager
Plugin successfully installed
Loading library /Users/cyberix3d/trunk/ogre/build/bin/SampleBrowser.app/Contents/Frameworks/Plugin_DotScene.dylib
Installing plugin: DotScene Loader
Plugin successfully installed
*-*-* OGRE Initialising
*-*-* Version 14.2.1 (Tsathoggua)
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
CPU Identifier & Features
-------------------------
 *   CPU ID: 
 *          VFP: no
 *         NEON: yes
-------------------------
********************************************
***  Starting Mac OS X OpenGL Subsystem  ***
********************************************
Registering ResourceManager for type Texture
RenderSystem::_createRenderWindow "OGRE Sample Browser", 640x480 windowed  miscParams: FSAA=0 colourDepth=32 contentScalingFactor=1 displayFrequency=N/A gamma=No vsync=Yes vsyncInterval=1 
Creating a Cocoa Compatible Render System
An exception has occurred: UnimplementedException: Builtin Window creation broken. Use an external Window (e.g SDL2) or fix this in createNewWindow at /Users/cyberix3d/trunk/ogre/RenderSystems/GLSupport/src/OSX/OgreOSXCocoaWindow.mm (line 650)

Could anyone assist with this issue?

Thanks!

paroj
OGRE Team Member
OGRE Team Member
Posts: 2141
Joined: Sun Mar 30, 2014 2:51 pm
x 1151

Re: Difficulty Running Ogre3D on Mac

Post by paroj »

you must build OgreBites with SDL2 enabled. The easiest way is to install SDL2 with brew.

niceprogrammer
Gnoblar
Posts: 21
Joined: Sat Nov 02, 2024 12:38 pm
x 2

Re: Difficulty Running Ogre3D on Mac

Post by niceprogrammer »

I am interested in this as well.

Did you manage to solve it?

I installed SDL2 but I still get the same error.

Can you provide detailed steps?

User avatar
Cyberix3D
Kobold
Posts: 29
Joined: Tue Jan 17, 2023 10:25 pm
x 5

Re: Difficulty Running Ogre3D on Mac

Post by Cyberix3D »

After installing SDL2, it worked fine for me.
I am using Visual Studio Code with the CMake Tools extension to build the project, and it builds out of the box without issues.

You could try deleting the entire build folder, regenerating the build files, and then rebuilding the project from scratch.
Also, make sure that CMake is detecting SDL2 correctly. You can check this in the configuration output.

If CMake is not finding SDL2, you can explicitly set the path by adding -DSDL2_DIR=<path_to_sdl2> in the VS Code settings.
You can do this by going to File > Preferences > Settings, searching for CMake: Configure Args, and adding the argument there.

Here’s an example of my CMake Tools configuration in VS Code for reference:
Image

Let me know if that helps!

niceprogrammer
Gnoblar
Posts: 21
Joined: Sat Nov 02, 2024 12:38 pm
x 2

Re: Difficulty Running Ogre3D on Mac

Post by niceprogrammer »

Thanks for the guide.

I am only using the CLI and it seemed to work. Several of the samples in SampleBrowser have errors though.

Code: Select all

cmake .. -DSDL2_DIR=/opt/homebrew/Cellar/sdl2/2.30.12
make install

Image