mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0032423: Coding Rules - NSOpenGLContext deprecation warnings during compilation for macOS 10.14+
The warning has been suppressed for building TKOpenGl.
This commit is contained in:
parent
9ae883970d
commit
e2d6f0e37a
@ -22,6 +22,8 @@
|
|||||||
#ifndef _Aspect_RenderingContext_HeaderFile
|
#ifndef _Aspect_RenderingContext_HeaderFile
|
||||||
#define _Aspect_RenderingContext_HeaderFile
|
#define _Aspect_RenderingContext_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
|
||||||
#if defined(__APPLE__) && !defined(HAVE_XLIB)
|
#if defined(__APPLE__) && !defined(HAVE_XLIB)
|
||||||
#import <TargetConditionals.h>
|
#import <TargetConditionals.h>
|
||||||
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
|
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
|
||||||
@ -37,7 +39,9 @@
|
|||||||
#else
|
#else
|
||||||
struct NSOpenGLContext;
|
struct NSOpenGLContext;
|
||||||
#endif
|
#endif
|
||||||
|
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||||
typedef NSOpenGLContext* Aspect_RenderingContext;
|
typedef NSOpenGLContext* Aspect_RenderingContext;
|
||||||
|
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
typedef void* Aspect_RenderingContext; // GLXContext under UNIX
|
typedef void* Aspect_RenderingContext; // GLXContext under UNIX
|
||||||
|
@ -216,7 +216,9 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
NSView* aView = (NSView* )myPlatformWindow->NativeHandle();
|
NSView* aView = (NSView* )myPlatformWindow->NativeHandle();
|
||||||
|
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||||
[aGLContext setView: aView];
|
[aGLContext setView: aView];
|
||||||
|
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||||
isCore = (aTryCore == 1);
|
isCore = (aTryCore == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +275,9 @@ void OpenGl_Window::Resize()
|
|||||||
#else
|
#else
|
||||||
// check backing store change (moving to another screen)
|
// check backing store change (moving to another screen)
|
||||||
NSOpenGLContext* aGLCtx = myGlContext->myGContext;
|
NSOpenGLContext* aGLCtx = myGlContext->myGContext;
|
||||||
|
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||||
NSView* aView = [aGLCtx view];
|
NSView* aView = [aGLCtx view];
|
||||||
|
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||||
if (![aView respondsToSelector: @selector(convertSizeToBacking:)])
|
if (![aView respondsToSelector: @selector(convertSizeToBacking:)])
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -353,7 +357,9 @@ void OpenGl_Window::Init()
|
|||||||
aDefFbo.Nullify();
|
aDefFbo.Nullify();
|
||||||
#else
|
#else
|
||||||
NSOpenGLContext* aGLCtx = myGlContext->myGContext;
|
NSOpenGLContext* aGLCtx = myGlContext->myGContext;
|
||||||
|
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||||
NSView* aView = [aGLCtx view];
|
NSView* aView = [aGLCtx view];
|
||||||
|
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||||
NSRect aBounds = [aView bounds];
|
NSRect aBounds = [aView bounds];
|
||||||
|
|
||||||
// we should call this method each time when window is resized
|
// we should call this method each time when window is resized
|
||||||
|
Loading…
x
Reference in New Issue
Block a user