So, I know how to take a screenshot with UIKit:
UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
UIGraphicsBeginImageContext(window.bounds.size);
[window.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteTo...
I thought this should be easy, but... geesh! A vendor gave me a fairly simple demo program meant to showcase some trivial icon animations. The target platform is an embedded system (MX51) with accelerated OpenGL ES 2.0/OpenVG and EGL support.
Unfortunately, the demo also has an annoying dependency on a few Qt utility classes (e.g., QIm...
I am trying to draw point sprites with OpenGL ES on iPhone. It's possible there could be very many of them (1000) and up to 64 pixels wide (maybe that's my problem right there - is there a limit or could I be using too much memory?)
I am using CADisplayLink to time the frames. What happens is that the first gl drawing function tends to ...
I am trying to create a simple 3-D app for android that will have an additional view layered on top of the OpenGL view (much like the SurfaceViewOverlay example in the API demos). I'm running into an issue trying to implement that method with an extended GLSurfaceView class. I've set up an example where I'm trying to do a combination of ...
Hi guys,
This is kind of weird, but I noticed that up to 40 percents of the rendering time is spent inside glAlphaFuncx. I know that alpha testing is very expensive, but the interesting thing is I do not use it :) No single place of code uses alpha testing, neither do I invoke this function in any other way.
I also checked GL layer for...
G'day,
I'm trying to update part of a VBO with a call to glBufferSubData(). When I update from the start (0) of my existing shadow buffer, there is no problem, as the buffer starts reading from 0. The following will read 0 to y from the buffer and place it at 0 to y in the VBO:
gl.glBufferSubData(GL11.GL_ARRAY_BUFFER, 0, y, mPositionBu...
That's what the Dalvik LogCat is saying whenever I uncomment the last line, below. So somewhere along the way, a current context isn't being created at all. Why? Thanks for any help.
final EGL10 egl = (EGL10) EGLContext.getEGL();
final EGLDisplay eglDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
egl.eglInitialize(eglDisplay,...
I found http://www.vvi.com/index.html for Xcode that allows you to create charts on the iphone. I want to create a 3D Surface Chart that will pull from a database. Is there another SDK or instructions that will allow you to do the same in OpenGL on the iPhone.
...
In order to obtain a 'window' arg to use in EGL.eglMakeCurrent, I have to obtain that 'window' value returned by EGL.eglCreateWindowSurface(display, config, native_window, attrib_list). My question is: what is native_window, and where do I obtain that from?
Thanks for any help.
...
I'm trying to decide on whether to primarily use floats or ints for all 3D-related elements in my app (which is C++ for the most part). I understand that most ARM-based devices have no hardware floating point support, so I figure that any heavy lifting with floats would be noticeably slower.
However, I'm planning to prep all data for th...
I'm currently playing around with 2D graphics in android and have been using a plain old SurfaceView to draw Drawables and Bitmaps to the screen. This has been working alright, but there's a little stutter in the sprite movement, and I'm wondering the feasibility to do a real time (but not terrible fast) game with this.
I know GLSurfac...
I recently accidentally updated my iPad to version 3.2.1 and had to update Xcode and SDK to continue development.
However all of my apps that ran perfectly fine before, don't display anything when ran in the new versions.
There are no error messages and the apps seem to be running just fine, except that all that is displayed is a black...
Hi!
I'm generating an image using quartz 2d and I want to use it as an opengl texture.
The tricky part is that I want to use as few bits per pixel as possible, so I'm creating cgContext as following:
int bitsPerComponent = 5;
int bytesPerPixel = 2;
int width = 1024;
int height = 1024;
void* imageData = malloc(width * height * bytesPerP...
Hi,
I'm a newbie and trying to display a sprite on my iPhone screen using OpenGL ES.
I know its far simpler and easier to do it with cocos2d but now I'm trying to code directly on OpenGL.
Is there any simple yet efficient way to load and display sprites in OpenGL ES. What I've found until now is much much complex. :(
...
I've got the following method that is called when the user clicks a position on the screen:
public void setup(int xi, int yi){
int f = 0;
PerspectiveCamera camera = new PerspectiveCamera();
camera.setViewport(320, 508);
camera.update();
Ray touch = camera.getPickRay(xi, yi);
while(f < GLCamTest.array.l...
I'm getting some intermittent bottlenecks on my 2D OpenGL ES iPhone game. When I profiled it in Shark, nothing remarkable came up. In the game, the background takes up the whole screen and I have about 7-8 smaller sprites continuously moving across the screen. For the most part it runs smoothly, but every now and then I'll get a small f...
I'm a bit of a newb when it comes to threading, so any pointers in the right direction would be a great help. I've got a game with both a fairly heavy update function, and a fairly heavy draw function. I'd assume that the majority of the weight in the draw function is going to happen on the GPU. Because of this, I'd like to start calcula...
Right now, I'm playing with OpenGL ES on the iPhone using Oolong Engine. This might be a silly question, but how necessary is it to clean up after OpenGL when the app exits? My problem is that I have a static vector that manages loading models, and loosely ensures that models aren't loaded twice. Because of this, all the handles to the V...
I'm trying to transform vertices with a shader program, but i can't understand the results.
I prepared a projection, a view(trans), and model(trans) matrices:
First i have a vertex shader function of: viewproj * position. In a Objective-C program i start with identity multiplicated by a translation and projection matrices and then unifo...
Could someone provide me with a start on the best way to go about this? What I want is circles within circles (for theoretical purpose let's say 3 circles). Each cirlces edge should be animated to mimic the aurora borealis (northern lights). They should flow and have subtle color changes. Any help would be greatly appreciated.
Some gene...