I'm trying to draw a prism and animate it with CoreAnimation. But I can't find a good solution to draw the fan of rainbow colors.
There a a couple of ways to do that, each of them has disadvantages:
I could simply use an image. But I allow the user to zoom into the scene and I'd like to avoid any artefacts.
Using a CAGradientLayer ...
How can I rotate my base view and still make sure that its subviews are still in their correct locations?
--------
|X | After 90 degree rotate and stretch
| | this should remain the same
| |
| Y|
--------
I presume I need to rotate 90 degrees and stretch according to window ratio and p...
Hello,
Can anyone help me with a simple problem? I’ve put a square built it from many triangles like 20*20 triangles, I’ve added to this square a texture, also I’ve set the normal to this square and since its positioned is in zero Z coordinate plane the normal is very easy to find (0,0,1). The problem is that I can’t see my textured squ...
I have this obsession with doing realtime character animations based on inverse kinematics and morph targets.
I got a fair way with Animata, an open source (FLTK-based, sadly) IK-chain-style animation program. I even ported their rendering code to a variety of platforms (Java / Processing and iPhone) video of Animata renderers
Howeve...
I'm trying to get the location of the touch event on the screen from
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event.
What code can I use to read the touch coordinates? I've gotten this far so far:
NSLog(@"Touch data: %@", [NSString stringWithFormat:@"NSSet: %@",[touches description]]);
I'm trying to make a game u...
I'm using an OpenGL Texture2D class and initWithString method to display strings to the user. When running with iOS 3.0 and XCode 3.1.3 all the text would appear black in the simulator and white on the phone. After updating to iOS 4.0, XCode 3.2.3, and iPhone SDK 4.0 the text appears black on the phone! Not so good since my app is alm...
I am almost done creating a game for android using a port of irrlicht 3d engine to android.
All code except a minimal frame work to make the native calls and play sounds is written in C++.
Even the opengles display is created in c++ code using eglGetDisplay and eglCreateWindowSurface
The problem I need to solve is that when home is pres...
Hello!
In my iPhone game I use separate thread to load resources. I use multiple EAGLContext's. Sometimes I need to render to texture in this background thread. But all I get is the black 1024*1024 texture. How do I render to texture in one thread while other thread is performing screen rendering?
...
I'm not sure I'm using glDrawTex_OES correctly. In fact, I'm sure I'm not because I'm getting a black rectangle on the screen rather than the intended texture.
To get the silly points out of the way: Yes, the GL Extension string contains the OES_draw_texture token. Yes, the texture is loaded into memory/etc. correctly: it displays ju...
I want to have a sprite scale up and down once every second to make it seem like it is bulging and pulsating. How can I do this?
...
Hi, I'm developing painting app. I've tried to do it with CoreGraphics/Quartz 2D and drawing curves algorithm is pretty slow. So we've decided to switch to the OpenGL ES.
I've never had any OpenGL experience, so I found glPaint example from apple and started play with it.
I've changed erase method do make white background.
How I stuck...
Hey guys,
How would I rotate a view in degrees? I've got the following code setting up my view...
public class GLLayer extends GLSurfaceView implements SurfaceHolder.Callback,
Camera.PreviewCallback, Renderer {
int onDrawFrameCounter=1;
int[] cameraTexture;
byte[] glCameraFrame=new byte[256*256]; //size of a tex...
The D3DXMatrixRotationYawPitchRoll() function builds a matrix with a specified yaw, pitch, and roll. Is there an equivalent function for iphone developers??
I found a beautiful little sample project for drawing a winding road or rollercoaster here.
It's not a lot of code, and the comments seem mostly understandable, but the code is re...
I read an article somewhere explaining that apple uses OpenGL ES to implement the page turning effect in the iBooks app. Since you can perform 3D animations on 2D Layers using only Core Animation, what might be some reasons you'd have to use OpenGL ES to create that page transition animation?
Thanks in advance for your thoughts!
...
Hey,
looking at the iPhone app Doodle Jump I am not quite sure what kind of technologie Lima Sky used to draw the graphics. Is it UIKit, CoreAnimation, OpenGL ES or a combination. All Some hint for UIKit or some sort of combination is the theme selector at the bottom of the main menu, which acts like some kind of a UIControl.
Somebody...
I is possible make the openGL background transparent so you can se what is behind the openGL layer?
...
How to load photo in apple official sample GLImageProcessing ?
I have succeed to load photo via UIImagePickerControllerDelegate, but in this sample, all image processing is based on OpenGL, which has its routine.
My purpose is to find out one solution to change the photo source, then I can use this sample to process different photos.
...
Hello there. I'm trying to get a bunch of stuff done in OpenGLES, but here's where I'm starting - drawing stuff to a texture, then displaying that texture.
I create some buffers:
glGenFramebuffersOES(1, &frameBuffer);
glGenRenderbuffersOES(1, &colorRenderbuffer);
glBindFramebufferOES(GL_FRAMEBUFFER_OES, frameBuffer);
And then I set ...
I'm trying to mash in a simple blur on an image I'm rendering in OpenGL ES 1.1. I've looked around and found various suggestions for how this might be done, but none that have given good results.
It seems best to render the image to a texture, which I do, as most of the options I've seen online operate on textures rather than anything e...
Hello!
I'm writing an iPhone application which uses UIView with a CAEAGLayer as its layer. Everything is fine and working apart from 1 small problem: sometimes it crashes with EXC_BAD_ACCESS and the following stack trace:
[EAGLView draw]
glDrawArrays_Exec
PrepareToDraw
DrawFramebufferMakeResident
AttachmentMakeResid...