You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I close #2174 with a better idea: Expose a cross-platform API that can push an image to a window without having a working hardware-accelerated context.
#2174 explicitly suggested cross-platform support for creating a cairo context that could be used as a fallback to display an error message. For the single-purpose of error handling, it is probably not ideal to add a dependency to cairo. If you want ot use cairo for rendering of 2d graphics you can as mentioned in #2174, render to a memory surface, and then display the image. However, in my case, there is no way to display it.
The suggestion is to add the following API:
/**This function displays `image` on `window`, with its upper-left corner located at (`origin_x`, `origin_y`).The image data is organized similarly to `glfwCreateCursor`, but the alpha channel is ignored.Any existing content of window is overwritten, without any blending. To clear the window, this functioncan be called with image pointing to data that should be used as background.This function can only be called if there is no rendering context associated with the window*/voidglfwDisplayImage(GLFWwindow*window, intorigin_x, intorigin_y, structGLFWimageconst*image);
The issue of initial error handling has been brought up on the discourse:
The idea was to wrap a MessageBox-style API. However, I think it is more flexible to let the user render the message (obviously using a software renderer, since there is no hardware render at this point), and display the result.
The text was updated successfully, but these errors were encountered:
I close #2174 with a better idea: Expose a cross-platform API that can push an image to a window without having a working hardware-accelerated context.
#2174 explicitly suggested cross-platform support for creating a cairo context that could be used as a fallback to display an error message. For the single-purpose of error handling, it is probably not ideal to add a dependency to cairo. If you want ot use cairo for rendering of 2d graphics you can as mentioned in #2174, render to a memory surface, and then display the image. However, in my case, there is no way to display it.
The suggestion is to add the following API:
The issue of initial error handling has been brought up on the discourse:
https://discourse.glfw.org/t/adding-platform-independant-error-boxes/386
The idea was to wrap a MessageBox-style API. However, I think it is more flexible to let the user render the message (obviously using a software renderer, since there is no hardware render at this point), and display the result.
The text was updated successfully, but these errors were encountered: