Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL_SILENCE_DEPRECATION move to define, preprocessor tidy up #8191

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 28 additions & 32 deletions libs/openFrameworks/utils/ofConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ enum ofTargetPlatform{
#define TARGET_MINGW
#endif
#elif defined( __APPLE_CC__)
#define GL_SILENCE_DEPRECATION
#define GLES_SILENCE_DEPRECATION
#define COREVIDEO_SILENCE_GL_DEPRECATION

#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#include <TargetConditionals.h>
#if (TARGET_OS_IPHONE || TARGET_OS_IOS || TARGET_OS_SIMULATOR || TARGET_IPHONE_SIMULATOR) && !TARGET_OS_TV && !TARGET_OS_WATCH && !TARGET_OS_MACCATALYST && !TARGET_OS_VISION
Expand Down Expand Up @@ -144,7 +148,7 @@ enum ofTargetPlatform{


// then the the platform specific includes:
#ifdef TARGET_WIN32
#if defined(TARGET_WIN32)
#define GLEW_STATIC
#define GLEW_NO_GLU
#define TARGET_GLFW_WINDOW
Expand Down Expand Up @@ -196,23 +200,18 @@ enum ofTargetPlatform{
// problems)
// info: http://www.geisswerks.com/ryan/FAQS/timing.html

#endif

#if defined(TARGET_OS_OSX) && !defined(TARGET_OF_IOS)
#ifndef __MACOSX_CORE__
#define __MACOSX_CORE__
#endif
#define TARGET_GLFW_WINDOW
#elif defined(TARGET_OSX)
#define TARGET_GLFW_WINDOW
#define OF_CAIRO
#define OF_RTAUDIO

#ifndef OF_NO_FMOD
#define OF_NO_FMOD
#endif


#include "GL/glew.h"
#include "OpenGL/OpenGL.h"
#include <GL/glew.h>
#include <OpenGL/OpenGL.h>

#if defined(__LITTLE_ENDIAN__)
#define TARGET_LITTLE_ENDIAN // intel cpu
Expand All @@ -221,10 +220,24 @@ enum ofTargetPlatform{
#if defined(__OBJC__) && !__has_feature(objc_arc)
#warning "Please enable ARC (Automatic Reference Counting) at the project level"
#endif
#endif

#ifdef TARGET_LINUX

#elif defined (TARGET_OF_IOS)
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <OpenGLES/ES3/gl.h>
#import <OpenGLES/ES3/glext.h>
#define TARGET_LITTLE_ENDIAN // arm cpu
#if defined(__OBJC__) && !__has_feature(objc_arc)
#warning "ARC (Automatic Reference Counting) is not enabled."
#warning "Enable ARC at the project level, or if using Objective-C/C++ with manual memory management,"
#warning "add '-fno-objc-arc' in Build Phases -> Compile Sources -> Compiler Flags."
#endif


#elif defined (TARGET_LINUX)
#ifdef TARGET_LINUX_ARM
#ifdef TARGET_RASPBERRY_PI
#include <bcm_host.h>
Expand Down Expand Up @@ -258,25 +271,8 @@ enum ofTargetPlatform{
#define B14400 14400
#define B28800 28800

#endif


#ifdef TARGET_OF_IOS
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <OpenGLES/ES3/gl.h>
#import <OpenGLES/ES3/glext.h>
#define TARGET_LITTLE_ENDIAN // arm cpu
#if defined(__OBJC__) && !__has_feature(objc_arc)
#warning "ARC (Automatic Reference Counting) is not enabled."
#warning "Enable ARC at the project level, or if using Objective-C/C++ with manual memory management,"
#warning "add '-fno-objc-arc' in Build Phases -> Compile Sources -> Compiler Flags."
#endif
#endif

#ifdef TARGET_ANDROID
#elif defined (TARGET_ANDROID)
#include <typeinfo>
#include <GLES/gl.h>
#define GL_GLEXT_PROTOTYPES
Expand All @@ -286,9 +282,9 @@ enum ofTargetPlatform{
#include <GLES2/gl2ext.h>

#define TARGET_LITTLE_ENDIAN
#endif

#ifdef TARGET_EMSCRIPTEN

#elif defined (TARGET_EMSCRIPTEN)
#define GL_GLEXT_PROTOTYPES
#include <GLES/gl.h>
#include <GLES/glext.h>
Expand Down
2 changes: 1 addition & 1 deletion libs/openFrameworksCompiled/project/macos/CoreOF.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ OF_CORE_FRAMEWORKS = -framework Accelerate -framework AGL -framework AppKit -fra

ALWAYS_SEARCH_USER_PATHS = NO
DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING = YES
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) GL_SILENCE_DEPRECATION=1 GLES_SILENCE_DEPRECATION=1 OF_NO_FMOD
GCC_PREPROCESSOR_DEFINITIONS = $(inherited)


//COMPILER SETTINGS WHICH CAN BE OVERRIDDEN BY XCODE BUILD SETTINGS
Expand Down
2 changes: 1 addition & 1 deletion libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ OF_CORE_FRAMEWORKS = -framework Accelerate -framework AGL -framework AppKit -fra

ALWAYS_SEARCH_USER_PATHS = NO
DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING = YES
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) GL_SILENCE_DEPRECATION=1 GLES_SILENCE_DEPRECATION=1 COREVIDEO_SILENCE_GL_DEPRECATION=1
GCC_PREPROCESSOR_DEFINITIONS = $(inherited)


//COMPILER SETTINGS WHICH CAN BE OVERRIDDEN BY XCODE BUILD SETTINGS
Expand Down
2 changes: 1 addition & 1 deletion scripts/apothecary
Submodule apothecary updated 271 files
Loading