Updates will be applied tomorrow - Jan 26th, at 12pm EST (UTC-0500). GitLlab could be a little slow between 12 - 12:30pm EST.

Commit 363b3726 authored by Seun Odutola's avatar Seun Odutola

Removing unnecessary code that seems to be the root of macOS 10.15 crash

Updating context-crash-macOS 10.5

Tidying up initialize function, Clean initialize() and remove the guard on set view during creation.

Brought back deleted code in initialize() needed for non-layer hosting apps

Clean initialize() and remove the guard on set view during creation

reverted comment from earlier commit to match previous one
parent 70949f08
......@@ -53,11 +53,6 @@ public:
vtkTypeMacro(vtkCocoaRenderWindow, vtkOpenGLRenderWindow);
void PrintSelf(ostream& os, vtkIndent indent) override;
/**
* Begin the rendering process.
*/
void Start() override;
/**
* Finish the rendering process.
*/
......
......@@ -882,7 +882,6 @@ void vtkCocoaRenderWindow::CreateAWindow()
// hardware offscreen rendering
NSOpenGLContext* context = (NSOpenGLContext*)this->GetContextId();
[context setView:(NSView*)this->GetWindowId()];
[context update];
this->MakeCurrent();
......@@ -1013,32 +1012,6 @@ void vtkCocoaRenderWindow::CreateGLContext()
#endif
}
//----------------------------------------------------------------------------
// Initialize the rendering process.
void vtkCocoaRenderWindow::Start()
{
this->Superclass::Start();
// make sure the hardware is up to date otherwise
// the backing sotre may not match the current window
// no clue what is really going on here but the old code
// called Initialize every render to do this
if (this->OnScreenInitialized && this->Mapped)
{
// the error "invalid drawable" in the console from this call can appear
// but only early in the app's lifetime (ie sometime during launch)
// IMPORTANT: this is necessary to update the context here in case of
// onscreen rendering
NSOpenGLContext* context = (NSOpenGLContext*)this->GetContextId();
[context setView:(NSView*)this->GetWindowId()];
[context update];
}
// set the current window
this->MakeCurrent();
}
//----------------------------------------------------------------------------
// Initialize the rendering window.
void vtkCocoaRenderWindow::Initialize()
......@@ -1048,18 +1021,6 @@ void vtkCocoaRenderWindow::Initialize()
this->OnScreenInitialized = 1;
this->CreateAWindow();
}
if (this->OnScreenInitialized && this->Mapped)
{
// the error "invalid drawable" in the console from this call can appear
// but only early in the app's lifetime (ie sometime during launch)
// IMPORTANT: this is necessary to update the context here in case of
// onscreen rendering
NSOpenGLContext* context = (NSOpenGLContext*)this->GetContextId();
[context setView:(NSView*)this->GetWindowId()];
[context update];
}
}
//----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment