Depth-Of-Field / Ambient Occlussion

Everything related to 3D programming
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: Depth-Of-Field / Ambient Occlussion

Post by Bananenfreak »

I got it. It´s the old damn Parse3DScripts(). I hate it, nearly 50% of startissues are related to this.

There´s a difference between:

Code: Select all

If OpenWindow(0, 0, 0, DesktopW, DesktopH, "Bloom : PRESS W to toggle the effect.")
  If OpenWindowedScreen(WindowID(0), 0, 0, DesktopW, DesktopH, 0, 0, 0)
    
    Add3DArchive("Programs", #PB_3DArchive_FileSystem)
    Add3DArchive("Scripts", #PB_3DArchive_FileSystem)
    Add3DArchive("Textures", #PB_3DArchive_FileSystem)
    
    Parse3DScripts()
and

Code: Select all

Parse3DScripts()

If OpenWindow(0, 0, 0, DesktopW, DesktopH, "Bloom : PRESS W to toggle the effect.")
  If OpenWindowedScreen(WindowID(0), 0, 0, DesktopW, DesktopH, 0, 0, 0)
    
    Add3DArchive("Programs", #PB_3DArchive_FileSystem)
    Add3DArchive("Scripts", #PB_3DArchive_FileSystem)
    Add3DArchive("Textures", #PB_3DArchive_FileSystem)
    
    
First code runs without Problems (Full code), second one generates an Ogre-error. This should be marked in the Documentation: "Don´t call Parse3DScripts() before you opened a Screen."

EDIT:
If anyone wants to see some Compositorpictures, just download this:
https://www.dropbox.com/s/xsxivnryj4km0 ... s.zip?dl=0
Image
User avatar
AndyLy
Enthusiast
Enthusiast
Posts: 228
Joined: Tue Jan 04, 2011 11:50 am
Location: GRI

Re: Depth-Of-Field / Ambient Occlussion

Post by AndyLy »

First, you need to add a folder with scripts.
Add3DArchive("Scripts", #PB_3DArchive_FileSystem)
Only then you can parse it.
Parse3DScripts()
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: Depth-Of-Field / Ambient Occlussion

Post by Bananenfreak »

Upps, that was too fast.

How it should look like:

Code: Select all

If OpenWindow(0, 0, 0, DesktopW, DesktopH, "Bloom : PRESS W to toggle the effect.")
  If OpenWindowedScreen(WindowID(0), 0, 0, DesktopW, DesktopH, 0, 0, 0)
    
    Add3DArchive("Programs", #PB_3DArchive_FileSystem)
    Add3DArchive("Scripts", #PB_3DArchive_FileSystem)
    Add3DArchive("Textures", #PB_3DArchive_FileSystem)
    
    Parse3DScripts()
How it was in my code:

Code: Select all

    
    Add3DArchive("Programs", #PB_3DArchive_FileSystem)
    Add3DArchive("Scripts", #PB_3DArchive_FileSystem)
    Add3DArchive("Textures", #PB_3DArchive_FileSystem)
    
    Parse3DScripts()

If OpenWindow(0, 0, 0, DesktopW, DesktopH, "Bloom : PRESS W to toggle the effect.")
  If OpenWindowedScreen(WindowID(0), 0, 0, DesktopW, DesktopH, 0, 0, 0)
And this won´t work. Parse3DScripts() must put behind a Screencall. That is what I want to say with those lines.
Image
Post Reply