Patch to add TCustomOpenGLControl.RenderAtDesignTime property
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
The attached patch (done vs trunk components/opengl/openglcontext.pas) adds a property RenderAtDesignTime to TCustomOpenGLControl. When it's true, the TCustomOpenGLControl performs normal OpenGL initialization and rendering at design-time.
Reasoning:
Currently, the TOpenGLControl does not initialize OpenGL context during design-time, and draws a simple "X" over it's entire area at design-time. This is safe (it avoids dealing at Lazarus design-time with any instabilities you may have with your OpenGL), but it also disables making a design-time preview/editor of the stuff you would render using OpenGL.
With RenderAtDesignTime = true you can make a design-time editor of 3D stuff, like GLScene or FireMonkey3D, using TOpenGLContext. I want to use it for Castle Game Engine TCastleControl (that descends from Lazarus TOpenGLContext), initial code shows that it works quite cool :)
Mantis conversion info:
- Mantis ID: 32026
- OS: Debian GNU/Linux
- OS Build: (testing)
- Platform: x86-64
- Version: 1.9 (SVN)
- Fixed in revision: 55392 (#85a49e41)
- Monitored by: » sekelsenmat (Felipe Monteiro de Carvalho)