GLBasic forum

Main forum => Bug Reports => Topic started by: matchy on 2009-Nov-09

Title: X_LOADSHADER file on iPhone
Post by: matchy on 2009-Nov-09
On Win32 it's fine but the iPhone can't find the shader fragment file whether it's in the app or media folder (always false).

IF X_LOADSHADER(12, "", "multitexture.frag")=FALSE THEN DEBUG "File not found"
IF X_LOADSHADER(12, "", "Media/multitexture.frag")=FALSE THEN DEBUG "File not found"
SETCURRENTDIR("Media") : IF X_LOADSHADER(12, "", "multitexture.frag")=FALSE THEN DEBUG "File not found - help!"

Title: Re: X_LOADSHADER file on iPhone
Post by: MrTAToad on 2009-Nov-09
I presume you have the filenames correct ?
Title: Re: X_LOADSHADER file on iPhone
Post by: Hemlos on 2009-Nov-10
iphone is case sensitive if im not mistaking.
Also try to use DOESFILEEXIST to ensure your path and name are correct.

And if that isnt working, then try this is your path, a dot and a slash first, then the path:

Code (glbasic) Select
"./Media/FileName.vert"
Title: Re: X_LOADSHADER file on iPhone
Post by: matchy on 2009-Nov-10
All good as I see glass gl3D objects on the iphone now.  :whistle: I've got it working now as I realised the function does load the frag file but because there is no vert file in this case, will return false even though the frag file is loaded with no error in the xcode debugger.
Title: Re: X_LOADSHADER file on iPhone
Post by: Kitty Hello on 2009-Nov-10
Only the 3GS has shaders, and I did not bother to implement them in GLBasic, yet. Are you really wanting to support 3GS, only?
Title: Re: X_LOADSHADER file on iPhone
Post by: matchy on 2009-Nov-10
No need for shaders on my iPod Touch test unit as I'm just experimenting with it's limits.
Title: Re: X_LOADSHADER file on iPhone
Post by: bigsofty on 2009-Nov-14
Quote from: Kitty Hello on 2009-Nov-10
Only the 3GS has shaders, and I did not bother to implement them in GLBasic, yet. Are you really wanting to support 3GS, only?

Would be nice if you wanted to add some extra features for 3GS support, I noticed some App Store games offer enhanced 3GS versions.
Title: Re: X_LOADSHADER file on iPhone
Post by: Kitty Hello on 2009-Nov-16
I'll see what I can do. Shouldn't bee too hard to do.