Maya crashes after creating a GLFW window

Maya crashes after creating a GLFW window

livinamukS9FUA
Participant Participant
233 Views
1 Reply
Message 1 of 2

Maya crashes after creating a GLFW window

livinamukS9FUA
Participant
Participant

 

Hi,


I'm trying to create a plugin which renders information from Maya using OpenGL into a second window. For those familiar with GLFW I have spawned a window in the plugin constructor using

 

 

window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "WINDOW", NULL, NULL);

 

 


and doing so crashes Maya instantly, mentioning renderWindowSelectContextItem as the last tool in the crash report. 

I suspect glfwCreateWindow() is interfering with Maya's current GL context but also I don't see why it should. 

Any advice or suggestions would be greatly appreciated.

 

0 Likes
Accepted solutions (1)
234 Views
1 Reply
Reply (1)
Message 2 of 2

livinamukS9FUA
Participant
Participant
Accepted solution

Issue solved by moving the create window code to the plugin constructor.

I did think that was where I was doing it but I was mistakenly in  

FootPrintDrawOverride::FootPrintDrawOverride(const MObject& obj)
: MHWRender::MPxDrawOverride(obj, drawCallback, ALWAYS_DIRTY)

 

0 Likes