![]() Plugins that don’t require 3D drawing capability should instead use the flight loop callbacks to do all of their bookkeeping. #X PLANE 11 ADDONS FREE#3D drawing phases are meant exclusively for 3D drawing, and dispatching them isn’t free in terms of CPU overhead on X-Plane’s end. We strongly recommend authors avoid doing this in general, even on OpenGL. This will no longer work under either Vulkan or Metal with 11.50 due to these drawing phases no longer being dispatched, although it is still possible under OpenGL. However, we have found that a lot of third party plugins rely on the 3D drawing phases to read datarefs or do internal bookkeeping, without actually doing any real drawing. This should not be a problem for most plugins, although a few might require changing to the XPLM instancing API. Alternatives to 3D drawingĪs mentioned above, the X-Plane 11.41 3D drawing phases have been deprecated in X-Plane 11.50 and are no longer called on Vulkan and Metal. OpenGL provides an easy to use API for plugin needs without any of the complications that come with Vulkan or Metal. We expect this OpenGL plugin bridge to exist for the foreseeable future as something that plugins can be authored against. X-Plane provides all synchronization and resource sharing across the rendering APIs as part of its internal plugin bridge system. Plugins that use Vulkan/Metal compatible drawing operations don’t need to do any special processing or precautions. Plugins that try to sniff resources from the OpenGL context, whether running under Vulkan, Metal or OpenGL, are considered misbehaved and no compatibility guarantees are made. No guarantee is made with regards to availability of resources in the OpenGL context across versions or even runs of X-Plane. Plugins should not assume the existence of any resources in an OpenGL context and should instead use public APIs to retrieve resources. X-Plane will create minimal resources in this OpenGL context to enable support for APIs like XPLMGetTexture() and to facilitate sharing of framebuffers across Vulkan/Metal and OpenGL. To provide compatibility with plugins X-Plane will create a OpenGL context that is exclusively for use by plugins. When a user runs X-Plane with either Vulkan or Metal, X-Plane itself will exclusively run with the selected backend and no rendering is done using OpenGL. #X PLANE 11 ADDONS CODE#You can read the documentation for the instancing API here and check out our example code here. While not a direct, drop in replacement, it offers much more flexibility for plugin authors and X-Plane than the previous system did. X-Plane has offered an alternative to the XPLMDrawObjects() and XPLMDrawAircraft() APIs since X-Plane 11.10 in the form of the instancing API, which we highly encourage developers to adopt. 3D drawing callbacks, XPLMDrawObjects(), and XPLMDrawAircraft() will continue to work under OpenGL in 11.50 like they did in 11.41. Additionally, the XPLMDrawObjects() and XPLMDrawAircraft() APIs have been deprecated and also no longer works with either Vulkan or Metal. All 3D drawing phases have been deprecated as of X-Plane 11.50 and will no longer be called under either the Vulkan or Metal renderer. 3D drawing using the XPLM instancing API.īreaking changes have been made to the 3D drawing callbacks.This includes 2D panels as well as 3D panels drawn inside the aircraft. This includes UI elements drawn using the XPWidgets library as well as custom OpenGL drawing. Window drawing using the XPLM 3 SDK windows.Plugins that don’t interact with the rendering system and instead provide additional functionality without the need to draw in the world.All renderers support the existing scenery features and texture formats and will look the same on all platforms. Whether a user selects OpenGL, Vulkan or Metal, the following kinds of operations don’t require any changes to existing add-ons: Assuming the plugins behaved nicely and played by the rules of the SDK, compatibility between 11.50 OpenGL and 11.41 is provided. Compatibility with existing pluginsĪs a general note, existing plugins running under the OpenGL renderer in X-Plane 11.50 should behave exactly the same as in X-Plane 11.41. The main goal with Vulkan and Metal is to deliver a more consistent and higher framerate, while also maintaining compatibility with the existing add on ecosystem as much as possible. This has potential implications for third party code that interacts with X-Plane’s rendering. They now have the option to choose between OpenGL (all platforms), Vulkan (Windows and Linux) and Metal (macOS). Starting with X-Plane 11.50, users have the ability to change the graphics API that is used by X-Plane. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |