错误提示0x00F525F5 处有未经处理的异常(在 GoodDay.exe 中): 0xC0000005: 读取位置 0x000001E8 时发生访问冲突。
代码定位到
bool GLView::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor)
{
setViewName(viewName);
_frameZoomFactor = frameZoomFactor;
glfwWindowHint(GLFW_RESIZABLE,GL_FALSE);
_mainWindow = glfwCreateWindow(rect.size.width * _frameZoomFactor,
rect.size.height * _frameZoomFactor,
_viewName.c_str(),
_monitor,
nullptr);
glfwMakeContextCurrent(_mainWindow);
glfwSetMouseButtonCallback(_mainWindow, GLFWEventHandler::onGLFWMouseCallBack);
glfwSetCursorPosCallback(_mainWindow, GLFWEventHandler::onGLFWMouseMoveCallBack);
```
debug下_mainWindow是NULL的,glfwSetMouseButtonCallback会失败