Page 2 of 2

Re: Material & Shaders editor

Posted: Mon Sep 24, 2012 4:12 pm
by Polo
Kelebrindae wrote:Probably not, sorry.

There's an API call in the "setLinePosInEditor" procedure, but it's not a critical feature, so you could just comment it. Also, the default setting for the subsystem is "DirectX", but it's possible to switch to OpenGL in the menu.
=> with these slight fixes, it should be possible to compile the sources for OSX.
I haven't got time to try it out right now, but as this project looks nice you really should consider removing all API and making it compatible with all OSes.
I'm also asking something without even trying, but if your project is bundled with some nice shader examples that would help a lot using them in our PB apps and make some good looking scenes :)

Re: Material & Shaders editor

Posted: Mon Sep 24, 2012 5:38 pm
by Polo
Had a look at your code, it's easy to get it compiled (just need to remove the SendMessage and BalloonTooltips) - though I didn't get the material preview working. There's probably a way to make it works but you should just get rid of that workaround, is that really necessary to launch a second executable?

Re: Material & Shaders editor

Posted: Tue Sep 25, 2012 9:20 am
by Kelebrindae
That was absolutly necessary with PB 4.60, as material scripts were only parsed once (on the "Parse3DScript" command).
With PB 5.00 thought, there's "ReloadMaterial(MaterialName$, ScriptFilename$, ParseScript)" which re-parses a specific script after you've edited it; so, yes, you could ditch "materialPreview.exe" and manage the preview window in the editor's exe.

BUT the current Windows version of the editor can switch from DirectX to OpenGL and vice-versa on the fly. To achieve that, the editor's exe includes two versions of the preview's exe: one compiled with DirectX and the other compiled with OpenGL. 'Can't do that with a single exe.

Re: Material & Shaders editor

Posted: Tue Sep 25, 2012 2:08 pm
by Polo
Cross platform is more important than switching from OpenGL to DX I think ;)