GLFW.Window
— MethodFunction to create a pure GLFW OpenGL window
GLFW.CreateWindowSurface
— FunctionCreateWindowSurface(instance, window, allocator=C_NULL)
Create a Vulkan surface for the specified window.
GLFW.GetInstanceProcAddress
— MethodGetInstanceProcAddress(instance, procname) -> funcptr
Return the address of the specified Vulkan core or extension function for the specified instance. funcptr
can be used directly as the first argument of ccall
: ccall(funcptr, ...).
GLFW.GetPhysicalDevicePresentationSupport
— MethodGetPhysicalDevicePresentationSupport(instance, device, queuefamily)
Return whether the specified queue family of the specified physical device supports presentation to the platform GLFW was built for.
GLFW.GetRequiredInstanceExtensions
— MethodGetRequiredInstanceExtensions(count::Ref) -> Ptr{Cstring}
Return a Cstring pointer that can be directly passed to VkInstanceCreateInfo
.
GLFW.GetRequiredInstanceExtensions
— MethodGetRequiredInstanceExtensions() -> Vector{String}
Return a vector of names of Vulkan instance extensions.
GLFW.SetWindowIcon
— FunctionGLFW.SetWindowIcon(window::Window, image::Matrix{NTuple{4, UInt8}})
GLFW.SetWindowIcon(window::Window, images::Vector{<:AbstractMatrix{NTuple{4,UInt8}}})
Set the window icon, where a single image may be passed or a vector of images with different icon sizes. The images must be of RGBA format. Before calling this function it might be necessary to reinterpret the image as a matrix of element type NTuple{4, UInt8} if the icons are loaded with type RGBA{N0f8}
This is implemented as a no-op on MacOS and Wayland.
Examples
using FileIO
icons = load.(["icon-16.png", "icon-32.png", "icon-128.png"])
buffs = reinterpret.(NTuple{4, UInt8}, icons)
GLFW.SetWindowIcon(win, buffs)
GLFW.PollEvents() # needs a poll events to become active
GLFW.VulkanSupported
— MethodVulkanSupported()
Return whether the Vulkan loader has been found.
GLFW.primarymonitorresolution
— MethodReturns the monitor resolution of the primary monitor.
GLFW.set_visibility!
— MethodSets visibility of OpenGL window. Will still render if not visible. Only applies to the root screen holding the opengl context.
GLFW.standard_context_hints
— MethodTries to create sensible context hints! Taken from lessons learned at: GLFW
GLFW.standard_screen_resolution
— MethodTakes half the resolution of the primary monitor. This should make for sensible defaults!
GLFW.standard_window_hints
— MethodStandard window hints for creating a plain context without any multisampling or extra buffers beside the color buffer