Menu

The OceanD GLSL Shader example

Help
2022-07-18
2022-08-14
  • Eric Walmsley

    Eric Walmsley - 2022-07-18

    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?

    • Eric
     
  • Eric Walmsley

    Eric Walmsley - 2022-07-18

    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.

     
  • Pavel Vassiliev

    Pavel Vassiliev - 2022-08-14

    Eric,
    Try to use isosurfaces instead.
    Pavel

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.