X_LOADSHADER file on iPhone

Previous topic - Next topic

matchy

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!"


MrTAToad

I presume you have the filenames correct ?

Hemlos

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"
Bing ChatGpt is pretty smart :O

matchy

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.

Kitty Hello

Only the 3GS has shaders, and I did not bother to implement them in GLBasic, yet. Are you really wanting to support 3GS, only?

matchy

No need for shaders on my iPod Touch test unit as I'm just experimenting with it's limits.

bigsofty

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.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

I'll see what I can do. Shouldn't bee too hard to do.