Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-31-2010, 06:10 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 4
Default OpenGL ES Shader Bug only on iPhone 3GS

Hi there,

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

For the others it looks like in my video:
YouTube - Tactica - Iphone App inspired by EVE Walking in Stations Minigame[Better Quality]

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.
Bersaelor is offline   Reply With Quote
Old 01-31-2010, 06:35 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 2,570
Default

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?
__________________
smasher is offline   Reply With Quote
Old 02-01-2010, 08:32 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 4
Default

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.
Bersaelor is offline   Reply With Quote
Old 02-02-2010, 12:20 PM   #4 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 4
Default

Bah, sorry for the inconvience.
Quote:
glEnable(GL_NORMALIZE);
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...

Last edited by Bersaelor; 02-02-2010 at 02:59 PM.
Bersaelor is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone app, opengl es, shader

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,238
Threads: 39,016
Posts: 171,113
Top Poster: smasher (2,570)
Welcome to our newest member, Erythema
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:55 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0