Veldrid 4.2.0
I'm pleased to announce that Veldrid 4.2.0 has been marked stable and is now available on NuGet.org. This is an exciting release and includes several widely-requested features, including OpenGL ES support. It also includes a large number of performance optimizations, quality-of-life improvements, and bug fixes.
OpenGL ES Support
A fully-featured OpenGL ES backend has been added. This backend can be used on both Android and iOS, as well as on certain desktop platforms. It is very similar to the existing OpenGL backend, and a variety of changes and improvements have been made to the OpenGL backend as a result of this new support.
Veldrid requires at least OpenGL ES version 3.0. Some optional features, like compute shaders, require higher versions of OpenGL ES.
Android Support
Veldrid now supports Android through the Vulkan and OpenGL ES backends. Vulkan remains a fairly advanced feature for current Android devices, but it will become more common in the future. OpenGL ES is supported by the majority of current Android devices.
See the Android page for detailed information about how to set up and use Veldrid in an Android application.
GraphicsDevice Capabilities
Although Veldrid aims to be as portable as possible, there are a number of places where differences between systems and graphics API's cannot be cleanly hidden. Additionally, all graphics API's enforce specific limitations on how the API can be used -- for example, the max dimensions of a Texture. Without knowledge of these limitations at runtime, it's difficult to write code that is guaranteed to work portably. This version of Veldrid introduces several GraphicsDevice members informing you about the limitations of the current system.
- GraphicsDeviceFeatures -- Enumerates the optional features supported by a GraphicsDevice.
- bool GetPixelFormatSupport() -- Queries whether the current GraphicsDevice supports the given PixelFormat.
- PixelFormatProperties -- Describes the limits of a Texture's dimensions and other properties if created with the given PixelFormat, TextureType, and TextureUsage flags.
Change List (Cumulative since 4.1.4)
New Features
Add support for OpenGL ES [c9103d3] [78eff33] [e41591d] [77588d4] [2edc075] [aaf1cd2]
- New GraphicsBackend member: GraphicsBackend.OpenGLES
- New GraphicsDevice creation method: public static GraphicsDevice CreateOpenGLES(GraphicsDeviceOptions options, SwapchainDescription swapchainDescription)
Add GraphicsDeviceFeatures, a class for querying specific device features. [2889a11] [49d4b92] [71166c0] [cb6a328]
Add a query function for PixelFormat support. [c5301e3]
Add ResourceBindingModel.Improved, with better handling of Metal buffer resources. (@tgjones) [b1e35c2] [e52bd08] [dd8adb5] [452cf45] [db293b1]
Add support for ETC2 formats. [c288fe5]
- New PixelFormat members:
ETC2_R8_G8_B8_UNorm
,ETC2_R8_G8_B8_A1_UNorm
,ETC2_R8_G8_B8_A8_UNorm
- New PixelFormat members:
Make VeldridStartup.GetPlatformDefaultBackend public @tgjones [f81a1b9]
Allow Framebuffer attachments to target a non-zero mip level. [9edc571]
Add ability to set mouse position in Sdl2Window. [6394869]
Misc Changes
- Fix the equality and hash code implementations of several Description structs. [fe20ccf]
- [D3D11] Fix a synchronization issue related to the access of shared resources. [dab068e]
- Update SDL2 binaries to 2.0.8. [c03e69b] [d512245]
- [OpenGL] Improve multisample texture extension handling. [f0b94a3]
- [Veldrid.ImageSharp] Update to ImageSharp beta0003. [7128134]
- Add [UnmanagedFunctionPointer] to all OpenGL function definitions. This fixes an issue when using mono AOT. [d41c9af]
- [Vulkan] Fix several validation warnings and errors. [31ac583]
- [Vulkan] Handle cases where VkSurfaceCapabilitiesKHR.maxImageCount is 0. [3c0f9a6]
- [Vulkan] Detect when a Swapchain has become invalid and throw a VeldridException. [66b9326]
- [Vulkan] Change VkMemoryBlock into a struct. [4b908fa]
- Add missing depth buffer formats to the OpenGL backend (@feliwir) [e525d94].
- [Metal] Use a different "drawPrimitives" overload when instanceStart == 0. [cb2c4a1]
- Fix OpenGL context initialization with SDL2. [c011b50]
- [OpenGL] Fix sampler maximum LOD parameter. [25db1e0]
- [Vulkan] Fix a Veldrid validation issue when a shared Vulkan staging Texture is re-used as a different format. [b1cbac3]
- [Vulkan] Improve how shared VkCommandPools are recycled. [a1ce176]
- [OpenGL] Fix format mapping for some PixelFormat values when using subset TextureView's. [[ad7fc41]]
- [Metal] Improve the performance slightly of Texture copying. [6786ed6]
- [OpenGL] Better extension handling for draw_elements_base_vertex. [f23e6c5]
- Improve OpenGL uniform buffer size error message @tgjones [56cdf39] [83d7619]
- Add extra validation for binding ResourceSets. [2ed4218] [768a605]