Fixed RecastDemo crash in macOS 10.11+
* Set hints to always use OpenGL render driver (instead of Metal driver) * Compile error fix in Xcode 13
This commit is contained in:
parent
c5cbd53024
commit
5a870d427e
@ -22,7 +22,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <RecastAssert.h>
|
||||
#include "RecastAssert.h"
|
||||
|
||||
/// Provides hint values to the memory allocator on how long the
|
||||
/// memory is expected to be used.
|
||||
|
@ -78,6 +78,9 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Use OpenGL render driver.
|
||||
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl");
|
||||
|
||||
// Enable depth buffer.
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
||||
|
Loading…
x
Reference in New Issue
Block a user