Page 1 of 1

How to embed Zgameeditor files into another application

Posted: Wed Aug 13, 2014 3:38 am
by rweb
Note sure if this is the right thread, or if I should have asked in the Visualizer thread.
Basically I want to do something much like the Visualizer in that I want to play Zgameeditor files in another video art application.
I want to create content with Zgameeditor and play it back through a mixer.

Can anyone recommend a starting point?

PS: I am working with a C++ SDK

Posted: Wed Aug 13, 2014 8:29 am
by VilleK
Hi,

For content that you only want playback without any code interface, you can build as screensaver and run the file with another window as parent. This is how the About-box in ZGameEditor works.

Code: Select all

  Prog := ExtractFilePath(Application.ExeName) + 'about.bin';
  ProgParam := '-p ' + IntToStr(SplashPanel.Handle);
  //Must use winexec or createproces because shellexecute cannot start
  //programs that doesn't end with '.exe'.
  //Process is closed automatically when its parent window is destroyed.
  WinExec(PAnsiChar(AnsiString(Prog + ' ' + ProgParam)), SW_SHOWNORMAL);
If you want more control and send data etc (like the visualizer) you need to write a wrapper DLL in Delphi first if you want to use it from C++. If you program in Delphi you can link the ZGameEditor source code directly (this is what the Visualizer does because it is written in Delphi). I can't share the visualizer source unfortunately because it is a commercial product owned by Image-Line.

Posted: Wed Aug 13, 2014 9:06 pm
by rweb
hmm... I have never even looked at Delphi.
Passing values in would be best.. however, the one thing I must have is access to the texture before it is drawn to screen.

So rather than drawing to screen the Zgameeditor file would do its usual work, render the content frame, then pass the texture out. The environment I am working with will deal with taking the texture.. processing additional transformations and drawing to screen.

Is it possible to redirect the pipeline in this manner?

Posted: Sat Aug 16, 2014 7:22 am
by VilleK
I could possibly help you write a Delphi wrapper DLL because that could be useful for others too. Can you please tell us a bit more about your application and what you are trying to achieve?

Posted: Sat Aug 16, 2014 6:15 pm
by rweb
I sent you a PM.

Cheers