How to do texture modification - iphone

I am working on iphone opengl es. I am a newbie to this. Can any one guide me how to proceed..

First, start with: Apple - Drawing with OpenGL ES. Then GLSprite and The Red Book.
After that, these are very handy: Lessens from Molecules, Apple Technical notes and Khronos - OpenGL ES Reference.

I would suggest you start with Apple's example code. The GLSprite example might be a good place to start.
For general Open GL programming, the red book is a great learning guide as well.

Related

OpenGL ES - Where is EAGLView.h? xcode 4

Hello I'm very new to OpenGlES and i have started to try to learn it with online tutorials... but in each tutorial they ask me to create a OpenGL ES Xcode project, and then edit EAGLView.h. But I can't find it. Is it just me or has Xcode 4 changed its location etc. Also, when I run the application it gives me two cubes... 1 red and 1 blue... spinning around. In some tutorials, there is simply a multicoloured box, not in 3 dimensions. Is it possible to go back to that?
Thanks
The sample application has changed significantly since the tutorials you are reading was written.
EAGLView, in its many incarnations, provided a UIView subclass that connected OpenGL to UIKit. As of iOS 5 there's no need for a custom class because of the introduction of GLKit. The modern OpenGL sample simply uses a GLKView, which is a built-in UIView subclass connecting OpenGL to UIKit.
What the sample actually shows has also changed to highlight the vector manipulation parts of GLKit that provide everything GL ES 1.1 supplied but which was cut from ES 2.0, and more.
If you want to work up from a tutorial, you're probably going to have to find a newer one. Searching for GLKit tutorials directly is probably the best idea — this one (amongst many others) looked like it covers mostly the modern stuff, for the sake of saying something rather than nothing.
Instead of EAGLView.h and m, they have moved all of the code into files named viewController.h and m.
If you have truly generated an "OpenGL Game" project as they are calling it in the newer versions of XCode!
In terms of the OpenGL code implemented to show the red and blue boxes etc... They have changed there sample code, you can from the m file put whatever you want there!!!
You can download sample code from here and work from that:
http://developer.apple.com/library/ios/#samplecode/GLES2Sample/Introduction/Intro.html

Getting better at drawing in code for Cocoa?

What are some suggested "paths" for getting better at drawing in code in Cocoa? I think at this point, that's my biggest weakness. Is drawing in code something general, or Cocoa-specific?
Thanks!
- Jason
The best way is probably practice. Try drawing some simple things at first: a calendar (basically a grid), a custom button, or a digital clock.
Its also worth noting that a lot of 'custom' controls are made from images, so not that much of the drawing is done in code -- the only thing the code does is stitch those images together.
You might want to look at Opacity, a drawing app for OS X (I'm not affiliated with these folks, just discovered the app a few days ago). What sets Opacity apart from other drawing apps is that it can create Quartz code directly from your drawings. Naturally, the generated code is not perfect but in the few days I've been trying this app I've found it to be quite helpful in understanding how to use Quartz more effectively.
Drawing in code is need for creating custom controls no matter what UI toolkit you pick. Drawing in code certainly has its advantage, for example the application/framework that you are building is really lightweight come production time, cause there will be lot let resources(images/fonts/etc) to worry about.
Also if a problem arises changing drawing in code is a lot easier than to redo code and images together.
If you are doing Cocoa drawing start by looking at source code of BGHudAppKit and reading Cocoa Drawing Guide by Apple.
I'm in the same boat as you; I'd like to learn more about drawing code.
It's a big document, but the Quartz 2D programming guide on the developer website seems like a good place to start from. They introduce Graphics Contexts and Paths and include plenty of images.
There's also a book referenced in that document, Programming With Quartz: 2D and PDF Graphics in Mac OS X which looks good. The APIs for iPhone and OSX are almost identical, so there's no problem using a Mac OSX book.
So I'd suggest start with the Apple documentation (you don't need to read past the section on CGLayer drawing), try some sample code and figure out how it's working. Then move on to either that book or find more sample code on the web. Good luck!

UIView "suck" animation

I'd like to use the UIView "sucking" transition (view is "sucked" into a point) referenced here:
http://iphonedevwiki.net/index.php/UIViewAnimationState#Using_suckEffect
The method above, however, uses private APIs, which makes it next to useless for an App Store app. How can I recreate a similar effect without relying on private APIs? I'm guessing the answer has to do with OpenGL, although I have zero experience there.
As long as Apple doesn't publicly document the effect, and you want to avoid the risk of being rejected for using private API's you'll have to roll your own.
A suggestion to start working on this would be using OpenGL ES shaders.
The following blog post includes a demo Quartz Composer patch to create the Genie effect as seen in OS X and iOS:
http://www.aderstedtsoftware.com/users/erik/weblog/c7cb9/
A good start for your OpenGL ES shader would be to use the code in the Genie Filter in this QuartzComposer file. The code can almost be copied to a shader for OpenGL as is. The most work would probably be integrating OpenGL in your application: rendering the right view to a OpenGL texture and overlaying OpenGL over your application to perform the animation based on your shader.
Please have a look at my project at git://github.com/rmd6502/Genie.git - it's very slow right now, but improvements are forthcoming.
have you checkked out the cocos2d framework. it's an objective c wrapper for openGL and it's done really well. you can check out their demo video which shows all the transition types that the library supports.

New to animation in Iphone

I am fairly new to transition and animation methods in Iphone. Can somebody pl. guide me the basics of transition and Animation in Iphone. This is needed frequently in my Apps. Can anybody tell me any link where i can Understand ABC of animation ?
When it comes to Core Animation and UIView animations, you might want to look at Marcus Zarra and Matt Long's new book Core Animation: Simplified Animation Techniques for Mac and iPhone Development. It provides a very thorough walkthrough of Core Animation, from the high level UIView animations to more complex animations involving CALayers and CAAnimations. Bill Dudney also has an excellent Core Animation book.
As far as official documentation, the Core Animation Programming Guide is also well-written.
There are many questions here on Core Animation, tagged with core-animation.
Matt Gallagher has an interesting series of articles entitled "An Asteroids-style game in Core Animation".
Finally, I teach a course on iPhone development, in which I devoted a class to Core Animation and the neat things you can do in it. The course notes are available for download (VoodooPad format), and have quite a bit of detail in them, in addition to links to other resources and sample applications.

Iphone cocoa-touch animation suggestions

I need a documents or blogs and so on.. I'm realy interesting the animating views, user interface elements on the cocoa-touch king of crash course and how to design them in the photoshop or like that.
I found a few books about describing this subject. As i described the subject i realy need to crash information about these. I know i know, i think and heard somebodies says "you should read a lot of books for achieving this".
Does anyone have any suggestions ?
Bill Dudney's Core Animation for Mac OS X and the iPhone has a lot of good info.
For a crashcourse in animating views on the iPhone/iPod you basically need to read one chapter within apples developer documentation:
UIView Class Reference -> Animating Views
If you care to jump in even quicker, have a look at code examples like MoveMe.app.
I'd recommend reading through Apple's Core Animation Programming Guide. In addition to Bill Dudney's book, it's the best overall resource out there for learning Core Animation. The UIView class documentation describes how to do UIView animations.
There are a number of good code examples around here dealing with animations under the core-animation tag. Additionally, you can search for iPhone animation to find many iPhone-specific animation questions and answers here. I've learned quite a bit from many of the answers.