Skip to content

Latest commit

 

History

History
38 lines (19 loc) · 2.74 KB

CHANGES.md

File metadata and controls

38 lines (19 loc) · 2.74 KB

Changes

The changes below have been completed on the Mac and Windows platforms.

Event processing

The ProcessEvent, PostQuit, and HasQuit calls have been moved from the Window and Canvas surfaces to a new Application name space since there's only one event queue per application and it may need to process events not related to any surface. This also makes it clearer that the event processing calls in LLGL are optional; LLGL should work correctly with application toolkits that provide their own event loops.

NativeHandle updates on the Mac

Previously the NativeHandle on the Mac was an NSWindow. It's now a structure containing an NSView and a CALayer. This allows a backend renderer to operate at the view or layer level e.g. you can now create a RenderContext for any NSView in your view hierarchy.

Metal renderer on Mac

The Metal renderer can now operate on a generic NSView, an MTKView, or a CAMetalLayer supplied by the surface. If the surface provides a CAMetalLayer the renderer will use it directly and manage the necessary textures. If the surface provides a generic NSView the renderer will construct a CAMetalLayer and install it as the primary layer. If the surface provides an MTKView the renderer will use the drawables provided by that view.

OpenGL renderer on Mac

The OpenGL renderer on the Mac can now operate on any NSView. There are no plans to support use of a CAOpenGLLayer.

Swap chain size is now independent of surface size

Most renderers now allow the swap chain to be sized independently of the surface. On Windows this allows the swap chain to be sized at a lower resolution than the surface to increase performance e.g. on a high-resolution display you can run the swap chain at half the width and height so you're drawing one quarter of the pixels.

On the Mac this change was necessary to support Retina displays since the units used to size surfaces are not pixels to begin with and the swap chain has to be sized at a higher resolution for crisp drawing.

Currently this works for Metal and OpenGL on the Mac and the Direct3D backends on Windows.

Example programs

The Cpp example programs have been updated to reflect the above changes.

For samples which allow you to choose a renderer you can now specify "All" on the command line and the code will produce one window for each render system installed.

On Win32 it has always been possible to create an LLGL Window parented inside another Window. The Mac has been updated to match. To demonstrate these changes there's now an internal compile option in the Example framework which will run all render contexts as children of a single top-level window.

If you use CMake to generate Xcode or Visual Studio projects the debug working directory for each example will be set up correctly.