I'm developing a 3D Boardgame-like app and one of my betatesters reported a problem with the shaders (black areas on all objects). For the others&me the same version works, but he is the only who uses a new iPhone 3GS.
It looks like this for him: Yfrog - photo2yf
At first I only made an OpenGL app with the SDK's standard (version 3.1.2) OpenGL ES Example APP. I then imported all those files into a bigger project with menus and everything where the EAGLView is just a part. Since then I have the following warning that I can't find on google:
Code:
warning: no rule to process file '$(PROJECT_DIR)/Shader.fsh' of type sourcecode.glsl for architecture i386
warning: no rule to process file '$(PROJECT_DIR)/Shader.vsh' of type sourcecode.glsl for architecture i386
Maybe this warning is connected.
I already made a thread at idevgames, but I got no answers..
Can you tell me what difference there is in the iPhone 3GS Graphics Code or what my Warning means?
PS: I only use OpenGL ES 1.1, not 2.0. I thought I shouldn't get problems with Device Differences by not using ES2Renderer since all the devices support the ES1.
That warning means that xcode doesn't know what to do with your file. If you give it an .m file it will compile it, if you give it an .png file it will copy it; apparently it doesn't know what to make of an .fsh/.vsh file, so it's probably *not* getting copied to your application bundle.
If you open "targets" and your target you should see the build step that copies your other files. If you drag your two wayward sheep into that step then they'll get copied to the bundle too, which may fix the bug.
The warning will probably remain, though. Does anyone else know how to actually add a rule so that this file type gets copied automatically, like most resources?
Well I just threw those files out of the project, since I used them nowhere.
(It was only used in ES2Renderer, and I don't use that too)
My big problem is the bug on the iPhone 3GS.
I know it supports OpenGl ES 2.0 with Shaders, Stencil Buffers etc.
But I was under the impression if I just restrict myself to OpenGL ES 1.1 (initializied in ES1Renderer), implementing the graphics would be the same for all machines (iPhones, iPod Touches etc). In the OpenGL ES Project-Template you get one EAGLview and two ESRenderers, where the machines first tries to initialize an ES2Renderer, fails when there are no shaders and then initializes the ES1Renderer instead. I just deleted the part where it tries to start an ES2Renderer and immediately made it use only the ES1Renderer.
To clarify my question:
Does anyone know what could cause the above graphics error?
May the reason be that the iPhone 3GS is not downward compatible to OpenGL ES1.1, i.e. could it be necessary to write 2 seperate 3D-Engines?
PS: This Problem may be 3D-Specific, since the 2D HUD that is on top of my 3D Content seems to work on iPhone 3GS. Most games are 2D, so that may be a reason nobody seemed to be able to help me this far.
did the trick. I already had this in the beginning, but didn't think it would make a difference since the normals are already normalized in the Program that imports them from blender. Sadly I forgot that "glScale" rescales them...