Does anyone know why this may happen:
I draw to a 2D screen using glDrawArrays with GL_POINTS (interleaved array). If I flip the buffers (presentRenderbuffer) after ever call to glDrawArrays -- so after each "tile" is drawn -- everything works fine.
This is, of course, inefficient.. so if I move the presentRenderBuffer outside of the ...
So I have this irregular shaped polygon. I draw it by filling the inside with triangles.
The outside I added a border by used GLLineLoop.
Now I want to draw second line (of a different color) inside. any ideas on how to do that?
Line1: ================
Line2: ----------------
Not
Line1(width 3): ================
Line2(width 1): ...
Hi,
I have been developing iPhone Applications for a couple of months. I would like to know your views about the Quartz vs OpenGL ES 1.x or 2.0 learning curve. You can tell your perspective. My Questions are
*I am a wannabe game developer, So is it a good idea to first develop in quartz , then move
on to OpenGL ES or does it not mak...
I need a library that can manage polygon modeling and basic transformation like rotating and translating. I'd rather not redevelop everything from scratch
Thanks
...
I'm working on a little game in OpenGL ES.
In the background, there is a world/map. The map is just a large texture.
Zoom/pinch/pan is used to move around. And I'm using glOrthof (left, right, bottom, top, zNear, zFar) to implement the zoom/pinch.
When I zoom in, the sprites on top of the map is also zoomed in. But I would like to have ...
I have this vertex array of a cube
float vertex_coordinates [] = {
-12.43796, -12.43796, 12.43796, -12.43796, 12.43796, 12.43796, 12.43796, 12.43796, 12.43796,
12.43796, 12.43796, 12.43796, 12.43796, -12.43796, 12.43796, -12.43796, -12.43796, 12.43796,
12.43796, -12.43796, -12.43796, 12.43796, 12.43796, -12.43796, -12.43796, 12.43796, ...
I notice that the default data type for texture coordinates in the OpenGL docs is GLfloat, but much of the sample code I see written by experienced iphone developers uses GLshort or GLbyte. Is this an optimization?
GLfloat vertices[] = {
// Upper left
x1, y2,
// Lower left
x1, y1,
// Lower right
x2, y1,
// Upper right...
I'm making an iPhone game based on the CrashLanding sample code. The sample code includes some Open GL ES stuff (Texture2D and MyEAGLView). What are some ways to improve the performance of this code?
I'm fine w/ making certain trade-offs to improve the performance... but I don't what these trade-offs might be. For example perhaps o...
Hey everyone,
I'm porting an OpenGL app from the iPhone to Android, and I need to
render OpenGL content to a texture. Since framebuffers are not
available in OpenGL 1.0 and the DROID is the only Android phone with the framebuffer OpenGL extension, I'm trying to draw using OpenGL and
then copy the result into a texture using glCopyTexIma...
this shows up with the color red:
VertexColorSet(&colors[vertexCounter], 1.0f, 0.0f, 0.0f, 1.0f);
this shows the color black:
VertexColorSet(&colors[vertexCounter], 0.9f, 0.0f, 0.0f, 1.0f);
why is it the color black shouldn't it just be a darker shade of red?
glEnableClientState(GL_COLOR_ARRAY);
glColor4f(1.0f, 1.0f, 1.0f, 1.0...
I have been trying to use OpenGL ES 2.0 to make a photo viewing application. To optimize the code I'm changing the textures loaded with the objects as the user scrolls down. But image loading into the texture takes some time and thus the effect is not good. To solve the above problem I tried using multithreading with the following ways:
...
OK, I'm still brand new to iPhone development. I have a free game on the app store, Winner Pong, but it's just a Pong clone (who would've guessed) that uses the standard UIImageViews for the sprites. Now I want to do something a little more complicated, and port my game for the Xbox 360, Trippin Alien, to the iPhone. I obviously can't ke...
To reproduce the problem:
Download Apple's sample project GLGravity:
http://developer.apple.com/iphone/library/samplecode/GLGravity/index.html
"Build and Go" on a device.
Observe how smooth it is. Then, touch anywhere on the screen. Observe how jerky and slow it becomes. Eventually, it becomes unresponsive.
Why? And how would you...
Hi,
I want to have a alpha blended window over a video playing in the background. Considering the fact that a window cannot be made alpha blended over another window unless you take a snap of the background, I had to resort to OpenGL. I have few options for this:
(1) To show an object on the WinCE window without showing the OpenGL ES w...
To draw a dotted line in OpenGL I can use glLineStipple, but how do I achieve the same effect in OpenGL ES 1?
...
Hi,
I am making an opengles 2.0 application where i need to make the background of the window transparent and then show a blended object over it. Please can someone tell me how can i make window background transparent. The appearance i want is that it sud appear as if only a blended object is in front.
Any help will be greatly appreciat...
Normally, you'd use something like:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
glLineWidth(2.0f);
glVertexPointer(2, GL_FLOAT, 0, points);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_LINE_STRIP, 0, num_points);
glDisableClientState(GL_VERTEX_ARRAY);
It looks good in t...
I am trying to move my code from Java to C, and I have encountered a problem while trying to find a function in C that can take an array of ints and create a bitmap from it for OpenGL. In Java, I used
bitmap = Bitmap.createBitmap( {int array name} , w, h, Config.RGB_565);
Is there a similar function that I can use in C, or a workar...
I'm working on writing a rather basic app. It uses minimal touch input, and mostly just plays fancy animations. There isn't much animation, but the way it's currently done seems super inefficient and uses far too much memory.
The view is split into two parts, the bottom 1/5th is just one image that doesn't ever change. The rest of it i...
I have an OpenGL ES 1.1 project on iPhone, based heavily on the empty OpenGL ES application given here:
http://iphonedevelopment.blogspot.com/2009/06/empty-opengl-es-application-project.html
I'm testing on a 3G (not 3GS) device, 8GB.
The paint loop in my app which does openGL operations is doing quite a lot each time it renders the sc...