I've just been looking at shaders in general and noticed that, in this example, there are two TGLScene controls, but only one TGLSceneManager. Just curious as to the reason behind this - I've been doing some shader writing which is quite close to the way this example works, but I find that if I create, say a TGLSphere at runtime and add it to my TGLScene, I get an error unless the controls Visible property is set to False. I then added a second TGLScene control and added the TGLSphere to that, but it doesn't appear in the TGLSceneviewer for some reason.
Is it possible to "mix and match"shader rendering with dynamic TGLControls?
Eric
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've just been looking at shaders in general and noticed that, in this example, there are two TGLScene controls, but only one TGLSceneManager. Just curious as to the reason behind this - I've been doing some shader writing which is quite close to the way this example works, but I find that if I create, say a TGLSphere at runtime and add it to my TGLScene, I get an error unless the controls Visible property is set to False. I then added a second TGLScene control and added the TGLSphere to that, but it doesn't appear in the TGLSceneviewer for some reason.
Is it possible to "mix and match"shader rendering with dynamic TGLControls?
Here's a sample project to illustrate. In the Button2Click event, i have:
X := TGLSphere(GLDummyCube1.AddNewChild(TGLSphere));
x.Visible := false;
If you comment out the X.Visible := False line, it'll fail.
Eric,
Try to use isosurfaces instead.
Pavel