It looks like you're new here. If you want to get involved, click one of these buttons!
smasher wrote: »
If you enabled textures, they'll stay enabled until you turn them off again. If you want to draw your triangle with no texture, call glDisable(GL_TEXTURE_2D) before you draw it.
KMcNamara wrote: »
Thanks for posting the touch tutorial...I'm having some problems at the beginning though where I'm trying to set the app to open in landscape mode. When I click the + sign to add a new key to my Info.plist, the option "Initial Interface Orientation" is not there. Any idea why?
< key >UIInterfaceOrientation < /key >
< string >UIInterfaceOrientationLandscapeRight < /string >
< key >UIStatusBarHidden< /key > < true />
[app setStatusBarHidden:YES animated:NO];
Steffan wrote: »
Thanks for writing these tutorials! They've been my first ever introduction to Open GL ES.
In the last tutorial, how are these equations used for drawing a circle? I understand that sin = O/A and cos = A/H.
newX = eyeX + radius * cos(TURN_SPEED)*deltaX -
newZ = eyeZ + radius * sin(TURN_SPEED)* deltaX +
gravity wrote: »
Maurice, - Thanks a lot for the excellent tutorials! If I ever make it big with an app, I'll be sure to donate for your dedication!
For tutorial 8 (labeled 7), I noticed what I think is an error. You say the normal vector is perpendicular to the plane which the vertices make up:
Shouldn't the normal vector point in the opposite direction here? The vertices are going in a clockwise direction, 0 -> 1 -> 2 and by the right-hand rule, the normal should be opposite.
mauriceatron wrote: »
Perhaps, don't really remember what I was trying to achieve there as that diagram is a bit pointless except that it shows that the normal is perpendicular to a primitive's face. Also, that's a surface normal.
Nah, that section isn't my best work (not that I have any particularly good work). I'll re-write that bit.
Oh, and to answer your question, the normal is the dot product of two of the polygon's edges. That's what gives you the direction, not the right hand rule.
kingbombs wrote: »
The tutorials are awesome!
I don't know if you are able to explain a few things or help me with my coding problems to do with 2D textures
I have 2 threads ( both quite similar, although top one is more understandable i think)
jim wrote: »
Please let me know if there is a better way to do the rotations. It looks like it's working, but I know things are not always as they seem.
CGContextRef textureContext = CGBitmapContextCreate(textureData, texWidth, texHeight, 8, texWidth * 4, CGImageGetColorSpace(textureImage),
// This is code added
CGContextClearRect(textureContext, CGRectMake(0, 0, (float)texWidth, (float)texHeight));
CGContextDrawImage(textureContext, CGRectMake(0.0, 0.0, (float)texWidth, (float)texHeight), textureImage);