glfwSetWindowOpacity function

void glfwSetWindowOpacity(
  1. Pointer<GLFWwindow> window,
  2. double opacity
)

! @brief Sets the opacity of the whole window.

This function sets the opacity of the window, including any decorations.

The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque.

The initial opacity value for newly created windows is one.

A window created with framebuffer transparency may not use whole window transparency. The results of doing this are undefined.

@paramin window The window to set the opacity for. @paramin opacity The desired opacity of the specified window.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

@thread_safety This function must only be called from the main thread.

@sa @ref window_transparency @sa @ref glfwGetWindowOpacity

@since Added in version 3.3.

@ingroup window

GLFWAPI void glfwSetWindowOpacity(GLFWwindow* window, float opacity)

Implementation

void glfwSetWindowOpacity(Pointer<GLFWwindow> window, double opacity) {
  final glfwSetWindowOpacityLookupFunction = libglfw.lookupFunction<
      Void Function(Pointer<GLFWwindow> window, Float opacity),
      void Function(
          Pointer<GLFWwindow> window, double opacity)>('glfwSetWindowOpacity');
  return glfwSetWindowOpacityLookupFunction(window, opacity);
}