View Full Version : OpenGL screensaver preview

11-05-2015, 11:18 AM
Hi all,

I'm totaly new with OpenGL and not an extremly good programmer, but I'm trying to learn... I'm working in Delphi (yes, I know it's not a gorgeous program, but I always worked in Pascal / Delphi).
I wrote an OpenGL screensaver (in fact that's not true, as I found the basic code on the internet and downloaded it), which seems to be almost ready, but I can't find out how to create that small preview, which is visible in the screensaver window. When the screensaver is run "normaly" (full window), everithing is ok, but when it should run in preview mode, the window stays blank, nothing appears. In the project source I have a fMain.ParentWindow := StrToInt(ParamStr(2)); command, which seems to cause the troubles: if I remove it, the small window is created correctly, but it's not in the screensaver preview, but as a distinct window.
Previously I've created not OpenGL screensaver, which works well, including the preview, so I know what to do "normaly" to have a properly working preview. I think I have problems with the OpenGL.
If somebody knows how the preview must be created, please tell me. If it's needed I can upload the whole program package, just let me know if somebody think can help.

Thank you in advance.