Skip to content

Commit

Permalink
Use correct iPhone SDK availability flag, remove iOS OpenGL warnings (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
bejado authored May 23, 2019
1 parent 0f69dbb commit af559a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion filament/backend/src/metal/MetalDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// Filament fences are implemented with MTLSharedEvent, which are only available on
// OSX 10.14+ and iOS 12.0+
#if defined(IOS)
#define METAL_FENCES_SUPPORTED (IPHONE_OS_VERSION_MAX_ALLOWED > 120000)
#define METAL_FENCES_SUPPORTED (__IPHONE_OS_VERSION_MAX_ALLOWED > 120000)
#else
#define METAL_FENCES_SUPPORTED (MAC_OS_X_VERSION_MAX_ALLOWED > 101400)
#endif
Expand Down
4 changes: 2 additions & 2 deletions filament/backend/src/metal/MetalEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ constexpr inline MTLVertexFormat getMetalFormat(ElementType type, bool normalize
if (normalized) {
switch (type) {
// Single Component Types
#if MAC_OS_X_VERSION_MAX_ALLOWED > 101300 || IPHONE_OS_VERSION_MAX_ALLOWED > 110000
#if MAC_OS_X_VERSION_MAX_ALLOWED > 101300 || __IPHONE_OS_VERSION_MAX_ALLOWED > 110000
case ElementType::BYTE: return MTLVertexFormatCharNormalized;
case ElementType::UBYTE: return MTLVertexFormatUCharNormalized;
case ElementType::SHORT: return MTLVertexFormatShortNormalized;
Expand Down Expand Up @@ -91,7 +91,7 @@ constexpr inline MTLVertexFormat getMetalFormat(ElementType type, bool normalize
}
switch (type) {
// Single Component Types
#if MAC_OS_X_VERSION_MAX_ALLOWED > 101300 || IPHONE_OS_VERSION_MAX_ALLOWED > 110000
#if MAC_OS_X_VERSION_MAX_ALLOWED > 101300 || __IPHONE_OS_VERSION_MAX_ALLOWED > 110000
case ElementType::BYTE: return MTLVertexFormatChar;
case ElementType::UBYTE: return MTLVertexFormatUChar;
case ElementType::SHORT: return MTLVertexFormatShort;
Expand Down
2 changes: 2 additions & 0 deletions filament/backend/src/opengl/gl_headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

#elif defined(IOS)

#define GLES_SILENCE_DEPRECATION

#include <OpenGLES/ES3/gl.h>
#include <OpenGLES/ES3/glext.h>

Expand Down

0 comments on commit af559a1

Please sign in to comment.