匿名用户

在GLFW后端的情况下,下面的窗口提示用荧光颜色可以帮助

glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);

渲染循环:

{
    ...
    glfwGetFramebufferSize(window, &app_width, &app_height);
    glViewport(0, 0, app_width, app_height);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    
    //render
    ...
}