v0.3.6
Another chonky update, v0.3.6 weighs in at over 200 commits! The primary focus for this update was adding asynchronous asset loading. This applies only to textures for now, but this helps significantly when trying to decode large and expensive .png or .jpeg files! A staged loading process will display temporary textures, and smartly load textures in order of importance. All of this is automatic in the background, with no breaking API changes. But that's definitely not all that we've been up to, check out the Feature Highlights below for a list of notable items!
A big thanks to all the contributors that have features is this release, as well as the Discord community's valuable feedback and testing! StereoKit is much better thanks to all of your contributions :)
Quick plugs
Just to highlight some related items here, there will be 3 StereoKit presentations at Mixed Reality Dev Days on June 8th! These won't be streamed, but will be made available online sometime after the event. If you'll be present at the event, do stop by and say hello! There will probably still be a few StereoKit stickers left :)
Also, Microsoft is hosting another MR hackathon that includes StereoKit! Plenty of prize money there too, so be sure to check it out if you have the time. We're very excited to see what you'll make!
Feature Highlights
- Texture loading is now asynchronous! This drastically improves the load experience for most GLTF assets.
- All asset loading/creation is now thread safe.
- New UI elements
UI.ButtonImg
,UI.ProgressBar
, andUI.PanelBegin/End
. - New UI API for inspecting the state of the most recent ID'ed UI element,
UI.LastElementFocused
,UI.LastElementActive
, andUI.LastElementHandUsed
. - Extended access to low-level
Backend
features for OpenXR, Android, and D3D11! - Facebook's Quest pass-through extension implemented using
Backend
as an optional IStepper. - Duplicating the desktop screen as a texture on Windows, and using it for development! Check out the experimental dev template with passthrough + a persistent desktop view.
- Linux ARM64 binaries now ship in the NuGet package.
- Added support for the
XR_OCULUS_audio_device_guid
extension. - A TON of fixes!
- ...and much more.
Additions
- Added new
Assets
class for managing asset loading.Assets.CurrentTask
Assets.TotalTasks
Assets.CurrentTaskPriority
Assets.BlockForPriority
Assets.ModelFormats
andAssets.TextureFormats
for easy lists of supported asset types.
- Added
Tex.AssetState
to peek at the loading stage. - Added
Tex.OnLoaded
event for load messages. This is tex_on_load & tex_on_load_remove in C. - Added
Tex.FallbackOverride
for overriding the default fallback before load is complete. - Added
Tex.SetLoadingFallback
andTex.SetErrorFallback
to give control over the default fallback textures. - Added
Tex.DevTex
andTex.Error
, nice looking placeholder textures that help give a better sense of perspective on objects. Tex.From*
now also take aloadPriority
value as a parameter.- Added
Tex.SetNativeSurface
to the public API. #86 - Added
UI.ButtonImg
andUI.ButtonImgAt
for text + image buttons! #340 - Added
UI.LastElementFocused
,UI.LastElementActive
, andUI.LastElementHandUsed
. #272 - Added
UI.ProgressBar
andUI.ProgressBarAt
. #326. - Added
UI.PanelBegin
UI.PanelEnd
andUI.PanelAt
, a tool for visual grouping. - Added
UI.Get/SetThemeColor
for granular manipulation of UI colors. - Added
Separator
,SliderLine
,SliderPush
, andSliderPinch
toUIVisual
forUI.SetElementVisual
. - Added
Backend.Graphics
, andBackend.Platform
for info about the current platform and graphics code backing the current session. - Added a
Backend.D3D11
class withBackend.D3D11.D3DDevice
, andBackend.D3D11.D3DContext
for mucking about directly with Direct3D. - Added a
Backend.Android
class, for access to a number of low level Android interop variables. - Added
Backend.OpenXR.EyesSampleTime
, #356, #358. Thanks @sandrist! - Added
Backend.OpenXR.AddCompositionLayer
to work with the FB passthrough extension. - Added
ModelNode.Visible
for hiding nodes on a Model. - Added
Mesh.VertCount
andMesh.IndCount
. - Added
Mesh.Intersect
overload that returns the index of the intersected tri. Thanks @Faolan-Rad! #293 - Added
Mesh.GetTriangle
for fast retrieval of just a tri. Thanks @Faolan-Rad! #293 - Added
Bounds.Scaled
andBounds.Scale
, #351. Thanks @Strepto! - Added
Color.Hex
andColor32.Hex
for using hexadecimal color values. - Added
Renderer.Projection
,SetOrthoClip
, andSetOrthoSize
, thanks @slitcch! - Added
Text.Add
overload that takes a color tint as a parameter. - Added
SK.AppFocus
to tell the current focus state of the session/window. - Breaking change to C API only for
mesh_get_vert/inds
, added a parameter to describe memory ownership.
Misc. Improvements
- Updated OpenXR Loader to v1.0.22.
- Updated ReactPhysics3D to v0.9.
- Added support for Unicode in window titles, Win32 and Linux, #346, #347. Thanks @slitcch!
UI.HSlider
pinch has better hit volumes now, should mean less window grabs. #335- Disabled UI elements now dim.
- Improved UI shader finger ring visuals.
- Increased vert count on default UI meshes for smoother corners.
- System initialization log now happens before initialization, so crashes obviously show what system was initializing.
- ISteppers can now be added before SK.Initialize, their Initialize call is deferred until after SK's initialization.
- A number of docs updates from @paulmelis, @Zee2, @TopperDEL, and @Strepto!
Fixes
Tex.Rough
is now (1,0,1,1) instead of (0,0,1,1).- Fixed
Material.Copy
crashing when provided null. - Fixed a bug in converting C# filenames to UTF-8.
- Fixed the MR fallback
FilePicker
failing to parse Unicode text. #374 - Fixed an issue where
FilePicker
would add a trailing\0
to C# strings. - Fixed a bug where the
FilePicker
would crash on cancel. - Fix for NRE when GLTF texture failed to load.
- GLTF loader now supports interlaced data. #320
- Fixed incorrect sprite alignment mixing up left and right.
- Added a warning for when
SK.Initialize
andSK.Run
happen on separate threads, or execution is transferred to a blocking asset. #361 - Fixed an issue with UVs on non-unit sized rounded cubes.
- Fixed incorrect alpha values getting written to the screen buffer, causing compositing artifacts.
- Fixed an issue with
Tex.GetColors
returning black on separate threads. - Fixed a bug in Sound stream's ring buffer.
- Fixed a bug in
ui_quadrant_size_mesh
. - Fix for fallback keyboard not accounting for Renderer.CameraRoot.
- Fixed SK using unavailable stage bounds. Thanks @slitcch! #331
- Fix for stage (
World.BoundsPose
) not locating when stage bounds weren't available. - Fix for crash when loading unavailable OpenXR functions via
Backend.OpenXR.GetFunction
. - Fix for a bug with
UI.Push/PopPreserveKeyboard
not working with elements downstream a UI.Input element. - Fix for simulated hand's palm pose being in the incorrect location.
- Fix for
ModelNode.Mesh
improperly returning empty Mesh objects. #302, Thanks @Strepto ! - Fix for
Mesh
references not releasing properly. #303, Thanks @Strepto! - Fix for
UI.HSeparator
sometimes adding an extra empty layout line. - Fix for empty layout line adding unwanted padding at the end of UI Windows.
- File picker handles different filter formats better (*.x, .x, or just x). #309
- SK handles audio playback failure more gracefully now.
- Fix for non-msvc compilers complaining about SK_CONST's weird attributes, now it's just
static const
for those compilers. - Fix for improper capitalization in Linux shader compiler paths, thanks @slitcch!
- Fix a number of issues related to loading libdl on .NET/Linux.
- Fixed a GLX issue in the Linux graphics binding. #359, Thanks @ChristophHaag!
- No longer request Monado's EGL extension when using GLX.
- Fix for a surface resize failure on UWP flatscreen, #298.
- Fixed an issue with loading StereoKitC.dll in C# when starting in a working directory different from the exe.
- Fix for Win32 Windows not correctly restoring the mouse cursor sprite.
- Fixed SK crashing when the flatscreen app starts with a window too large for the screen's resolution.
SDK and Sample Updates
- Related StereoKit GitHub repositories were moved to the StereoKit organization!
- Added a Windows desktop mirroring demo to C++.
- Added a Windows window mirroring demo to C++.
- Added environment map demo to C++.
- Added point cloud rendering demo to C#.
- Updated skshaderc to provide better errors to VS, generate files in folders that don't exist yet, and no longer treat warnings as errors. May fix #329
- Added a "Dream Dev Template" C# project that includes Windows desktop duplication and Facebook's Passthrough extension.
- Moved the Cmake and XPlat templates to their own repositories with some light revisions.
- Updated StereoKit to VS 2022.
- Cleaned up directory structure, less items in the root.
- Added cmake option for removing physics, #354. Thanks @technobaboo and @slitcch!
- Improved StereoKit's Visual Studio dependency build process.
- Added StereoKit logo in .glb format.
- Added StereoKit logo with background for GitHub dark mode.
- Documenter support for operator overloads, #349.
- Contributor's guide.
- Updated samples for V and Zig.
- Added oculus-openxr option to xmake for using non-oculus OpenXR loader.
- Documented StereoKit's Row-Major matrix status, #352. Thanks @paulmelis!
Install or Update
Installation is via Visual Studio templates and NuGet, please refer here for instructions!
https://stereokit.net/Pages/Guides/Getting-Started.html
If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.