Unit CastleGLContainer
Description
Container for 2D controls able to render using OpenGL (TGLContainer).
Uses
Overview
Classes, Interfaces, Objects and Records
Class TGLContainer |
Container for controls providing an OpenGL rendering. |
Functions and Procedures
Description
Functions and Procedures
function RenderControlToImage(const Container: TGLContainer; const Control: TUIControl; const ViewportRect: TRectangle; const BackgroundColor: TCastleColor): TRGBAlphaImage; |
Render control contents to an RGBA image, using off-screen rendering. The background behind the control is filled with BackgroundColor (which may be transparent, e.g. with alpha = 0).
The rendering is done using off-screen FBO. Which means that you can request any size, you are not limited to your current window / control size.
Make sure that the control is nicely positioned to fill the ViewportRect. Usually you want to adjust control size and position, and disable UI scaling (set TUIControl.EnableUIScaling = False if you use TUIContainer.UIScaling).
|
Generated by PasDoc 0.15.0.
|