[3.2.6] - 2023-06-05
This minor release provides several fixes and brings a functionning API to capture the framebuffer and save it as a picture.
Framework integration and source code maintenance
- Fixed the missing
DisableCursoron SDL (by @PMP-P). - Fixed Linux Golang module build script.
Rendering
- Added the ability to set the pixel center offset for the projection matrix:
SetCameraCenterOffsetandGetCameraCenterOffset(by @RobEwbank1). - Resolved issue [#50] (fix CaptureTexture() for Python / Lua)":
- OLD:
uint32_t CaptureTexture(const PipelineResources &resources, const TextureRef &t, Picture &pic) - NEW:
uint32_t CaptureTexture(bgfx::ViewId &view_id, const PipelineResources &resources, const TextureRef &t, const Texture &readback, Picture &pic) - Fixed Picture Set/Get RGBA:
GetPixelRGBAandSetPixelRGBA. - How does the framebuffer capture work ?
- In order to grab the framebuffer, create an empty picture:
picture = hg.Picture(512, 512, hg.PF_RGBA32) - The texture framebuffer is created as in
draw to texture - Then, set framebuffer to
TF_ReadBack:tex_readback = hg.CreateTexture(512, 512, "readback", hg.TF_ReadBack | hg.TF_BlitDestination, hg.TF_RGBA8) - When submitting the scene, target the framebuffer:
hg.SubmitSceneToPipeline(view_id, scene, hg.IntRect(0, 0, 512, 512), true, pipeline, res, frame_buffer.handle) - The capture will be made asynchronously:
frame_count_capture, view_id = hg.CaptureTexture(view_id, res, tex_color_ref, tex_readback, picture) - Then, only when the current
framecounter is greater or equal toframe_count_capture, save the picture:hg.SavePNG(picture, "capture.png")
- In order to grab the framebuffer, create an empty picture:
Misc bug fix
- Fixed
!=color operator. - Brought back the old
minmaxtransform to fix [#49]. - Removed warning message ("Invalid node instance").
- Resolve "Tutorials issues on Linux Ubuntu" (Fixed
VertexLayoutPosFloatNormUInt8TexCoord0UInt8). - Studio related fixes
RBT_Staticwasn't saved properly in the scene file.- Fixed
GetAnimableNodePropertyFloatandSetAnimableNodePropertyFloatto handle the camera FOV.