Search Results

Search found 2292 results on 92 pages for 'ian scho es'.

Page 4/92 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • OpenGL ES depth buffer

    - by Istvan
    Hi! I was wondering if I can deallocate the depth buffer in iPhone OpenGL ES to conserve memory? Or it stays until the application finishes? I only need the depth testing in the beginning of the application.

    Read the article

  • iPad OpenGL ES FPS too slow!

    - by pop850
    I'm currently working on an OpenGL ES 1.1 app for the iPad its running at full 768x1024 iPad resolution, with textures, polygons, and the works but only at about 30 fps! (not fast enough for my purposes) im pretty sure its not my code, because when i lowered the resolution, the FPS increased, eventually the normal 60 at iPod touch resoultion Is anyone else encountering this FPS slowdown? should I reduce the size then scale up? any guidance is much appreciated!

    Read the article

  • OpenGL ES 2.0 and glPushMatrix, glPopMatrix

    - by MrDatabase
    Does OpenGL ES 2.0 still support glPushMatrix and glPopMatrix? I'm currently using these in the following way: glPushMatrix(); glTranslatef(xLoc, yLoc, 0); [myTexturePointer drawAtPoint:CGPointZero]; glPopMatrix(); I'm asking because I've read a few things about 2.0 "removing the matrix stack from the spec". Since I'm relatively new to OpenGL I'm not sure where to find a definitive answer.

    Read the article

  • Does OpenGL ES support environment shaders?

    - by Soviut
    I want to make metallic 3d object that appears to be reflective. I want to accomplish this using an environment shader that uses either a sphere or cube map that I can assign an image or texture as the "reflection" source. Does OpenGL ES on the iPhone support this in any versions?

    Read the article

  • Stuttering animation in iPhone OpenGL ES although fps is high

    - by guymic
    I am building a 2d OpenGL es application For iPad it displays a background texture and numerous textures on top of it which are always in motion. Every frame their location is recalculated based on time delta and speed and the entire thing is being rendered at 60 fps successfully, but still as the movement speed of the sprites raises, thing look stuttering. Any ideas? Are there inherit problems with what I'm doing? Are there known design patterns for smooth animation?

    Read the article

  • OpenGL ES Polygon with Normals rendering (Note the 'ES!')

    - by MarqueIV
    Ok... imagine I have a relatively simple solid that has six distinct normals but actually has close to 48 faces (8 faces per direction) and there are a LOT of shared vertices between faces. What's the most efficient way to render that in OpenGL? I know I can place the vertices in an array, then use an index array to render them, but I have to keep breaking my rendering steps down to change the normals (i.e. set normal 1... render 8 faces... set normal 2... render 8 faces, etc.) Because of that I have to maintain an array of index arrays... one for each normal! Not good! The other way I can do it is to use separate normal and vertex arrays (or even interleave them) but that means I need to have a one-to-one ratio for normals to vertices and that means the normals would be duplicated 8 times more than they need to be! On something with a spherical or even curved surface, every normal most likely is different, but for this, it really seems like a waste of memory. In a perfect world I'd like to have my vertex and normal arrays have different lengths, then when I go to draw my triangles or quads To specify the index to each array for that vertex. Now the OBJ file format lets you specify exactly that... a vertex array and a normal array of different lengths, then when you specify the face you are rendering, you specify a vertex and a normal index (as well as a UV coord if you are using textures too) which seems like the perfect solution! 48 vertices but only 8 normals, then pairs of indexes defining the shapes' faces. But I'm not sure how to render that in OpenGL ES (again, note the 'ES'.) Currently I have to 'denormalize' (sorry for the SQL pun there) the normals back to a 1-to-1 with the vertex array, then render. Just wastes memory to me. Anyone help? I hope I'm missing something very simple here. Mark

    Read the article

  • Opengl-es android best way to preload images

    - by lacas
    I have a game app, and i have many screens. The first screen will be the SCREEN.LOADING screen. When the app starting, I want to show a picture "loading please wait" while the images, menus, etc loaded succesfull. I tried asynctask to do this, but its not work in GLThread. What is the way to do this in opengl-es? 03-06 12:46:35.282: ERROR/AndroidRuntime(32736): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() Thanks, Leslie

    Read the article

  • optimizing iPhone OpenGL ES fill rate

    - by NateS
    I have an Open GL ES game on the iPhone. My framerate is pretty sucky, ~20fps. Using the Xcode OpenGL ES performance tool on an iPhone 3G, it shows: Renderer Utilization: 95% to 99% Tiler Utilization: ~27% I am drawing a lot of pretty large images with a lot of blending. If I reduce the number of images drawn, framerates go from ~20 to ~40, though the performance tool results stay about the same (renderer still maxed). I think I'm being limited by the fill rate of the iPhone 3G, but I'm not sure. My questions are: How can I determine with more granularity where the bottleneck is? That is my biggest problem, I just don't know what is taking all the time. If it is fillrate, is there anything I do to improve it besides just drawing less? I am using texture atlases. I have tried to minimize image binds, though it isn't always possible (drawing order, not everything fits on one 1024x1024 texture, etc). Every frame I do 10 image binds. This seem pretty reasonable, but I could be mistaken. I'm using vertex arrays and glDrawArrays. I don't really have a lot of geometry. I can try to be more precise if needed. Each image is 2 triangles and I try to batch things were possible, though often (maybe half the time) images are drawn with individual glDrawArrays calls. Besides the images, I have ~60 triangles worth of geometry being rendered in ~6 glDrawArrays calls. I often glTranslate before calling glDrawArrays. Would it improve the framerate to switch to VBOs? I don't think it is a huge amount of geometry, but maybe it is faster for other reasons? Are there certain things to watch out for that could reduce performance? Eg, should I avoid glTranslate, glColor4g, etc? I'm using glScissor in a 3 places per frame. Each use consists of 2 glScissor calls, one to set it up, and one to reset it to what it was. I don't know if there is much of a performance impact here. If I used PVRTC would it be able to render faster? Currently all my images are GL_RGBA. I don't have memory issues. Here is a rough idea of what I'm drawing, in this order: 1) Switch to perspective matrix. 2) Draw a full screen background image 3) Draw a full screen image with translucency (this one has a scrolling texture). 4) Draw a few sprites. 5) Switch to ortho matrix. 6) Draw a few sprites. 7) Switch to perspective matrix. 8) Draw sprites and some other textured geometry. 9) Switch to ortho matrix. 10) Draw a few sprites (eg, game HUD). Steps 1-6 draw a bunch of background stuff. 8 draws most of the game content. 10 draws the HUD. As you can see, there are many layers, some of them full screen and some of the sprites are pretty large (1/4 of the screen). The layers use translucency, so I have to draw them in back-to-front order. This is further complicated by needing to draw various layers in ortho and others in perspective. I will gladly provide additional information if reqested. Thanks in advance for any performance tips or general advice on my problem!

    Read the article

  • How do I render only part of a texture to a point sprite in OpenGL ES for Android?

    - by nbolton
    Using the libgdx framework, I've figured out how to render a texture to a point sprite. The problem is, it renders the entire texture to the point sprite, where I only want a small part of it (since it's an isometric tile image). Here's a snippet from some demo code I wrote... create() { renderer = new ImmediateModeRenderer(); tiles = Gdx.graphics.newTexture( Gdx.files.internal("data/tiles2.png"), TextureFilter.MipMap, TextureFilter.Linear, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge); Gdx.gl.glClearColor(0.6f, 0.7f, 0.9f, 1); Gdx.gl.glEnable(GL10.GL_TEXTURE_2D); Gdx.gl.glEnable(GL11.GL_POINT_SPRITE_OES); Gdx.gl11.glTexEnvi( GL11.GL_POINT_SPRITE_OES, GL11.GL_COORD_REPLACE_OES, GL11.GL_TRUE); Gdx.gl10.glPointSize(s); tiles.bind(); } render() { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); renderer.begin(GL10.GL_POINTS); // render 3 point sprites at various 3d points renderer.vertex(-.1f, 0, -.1f); renderer.vertex(0, 0, 0); renderer.vertex(.1f, 0, .1f); // ... more vertices here if needed (one for each sprite) ... renderer.end(); }

    Read the article

  • Triangles in a C++ STL Vector as an Objective-C member sometimes draws incorrectly in OpenGL ES

    - by Rahil627
    The polygons draw correctly 80% of the time. When it fails, a vertex is dislocated. The polygon is consistently drawn with the wrong vertex. I checked that the vector is correct during initialization, even when it's wrongly drawn. I'm using Cocos2d. The class member: @interface Polygon : CCSprite { std::vector<float> triangleVertices; } The draw function called in [Polygon draw]: + (void)drawTrianglesWithVertices:(const std::vector<float> &)v { //glEnableClientState(GL_VERTEX_ARRAY); glDisable(GL_TEXTURE_2D); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_COLOR_ARRAY); glVertexPointer(2, GL_FLOAT, 0, &v[0]); glDrawArrays(GL_TRIANGLES, 0, v.size()); //glDisableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_COLOR_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnable(GL_TEXTURE_2D); } Any ideas?

    Read the article

  • Render string to texture in Android and OpenGL ES

    - by Eddie Ringle
    I've googled around everywhere, but cannot find much for rendering strings to textures and then displaying that texture on a quad on the screen. Can someone provide a run-down on the process or provide good resources that describe how? Is rendering strings to textures even the best method for displaying text in an Android OpenGL ES app? EDIT: Okay, so LabelMaker interferes with alpha blending, the texture (created from a PNG with a transparent background) now has a solid black background, rather than a transparent background. If I comment out all the LabelMaker-related code, it works fine.

    Read the article

  • OpenGL ES Simple Undo Last Drawing

    - by Erika
    Hi Everyone, I am trying to figure out how to implement a simple "undo" of last drawing action on the iPhone screen. I draw by first preparing the frame buffer: [EAGLContext setCurrentContext:context]; glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); I then prepare the vertex array and draw this way: glVertexPointer(2, GL_FLOAT, 0, vertexBuffer); glDrawArrays(GL_POINTS, 0, vertexCount); glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); [context presentRenderbuffer:GL_RENDERBUFFER_OES]; How do I simple undo this last action? There has to be a way to save previous state or an built-in OpenGL ES function, I would think. Thanks

    Read the article

  • OpenGL ES canvas size

    - by Chaoz
    Ahoy, I'm working on an OpenGL ES based game for Android using the NDK. My application is targeted towards SDK 1.6 and above. I seem to be having a problem creating a canvas of the phones native size. My rendering is done through a native gameloop that uses OpenGL 1.0. I'm using the emulator and that gives me a 480x320 canvas -- this is totally fine. Then, when I run the same application on my HTC Desire which has a native resolution of 800x480 I'm getting a canvas of 533x320. Anyone have any information on how to deal with/solve this? Any other information about this is also appreciated. Thanks in advance!

    Read the article

  • Why OpenGL ES texture mapping is very slow?

    - by Cinar
    I have an Android application that displays VGA (640x480) frames using OpenGL ES. The application reads each frame from a movie file and updates the texture accordingly. My problem is that, it is taking almost 30 ms. to draw each frame using OpenGL. Similar test using the Canvas/drawBitmap was around 6 ms on the same device. I'm following the same OpenGL calls that VLC Media Player is using, so I'm assuming that those are optimized for this purpose. I just wanted to hear your thoughts and ideas about it?

    Read the article

  • Loading textures in an Android OpenGL ES App.

    - by Omega
    I was wondering if anyone could advise on a good pattern for loading textures in an Android Java & OpenGL ES app. My first concern is determining how many texture names to allocate and how I can efficiently go about doing this prior to rendering my vertices. My second concern is in loading the textures, I have to infer the texture to be loaded based on my game data. This means I'll be playing around with strings, which I understand is something I really shouldn't be doing in my GL thread. Overall I understand what's happening when loading textures, I just want to get the best lifecycle out of it. Are there any other things I should be considering?

    Read the article

  • Concept: Mapping irregular shapes (cartoons, sprites) to triangles in OpenGL ES

    - by Moshe
    I understand how mapping a triangle texture to a triangle works, but how do you map other things? I can't see myself mapping a circle onto a triangle. If it were a quad (square), I could see it happening, but why would a graphic not get warped on a triangle? EDIT: Bonus question: What are some good OpenGL ES tutorials online? Videos and articles count. (I've seen the Stanford University stuff on iTunes U and think it's excellent, but I want more.)

    Read the article

  • opengl es transparent fog in android

    - by Sponge
    I was wondering why the fog i use in opengl es on my android phone isn't transparent when i set the colors alpha to 0. I set the background to transparent and it works fine and the Color class or the toFloatBuffer() method are working fine for my meshes but when i set the fog color to transparent then this fact is ignored. here is the basic code i use for fog in the onSurfaceCreated() method of my renderer: gl.glFogf(GL10.GL_FOG_MODE, GL10.GL_LINEAR); gl.glFogf(GL10.GL_FOG_START, 4.0f); gl.glFogf(GL10.GL_FOG_END, 10.0f); gl.glFogfv(GL10.GL_FOG_COLOR, new Color(0,0,0,0).toFloatBuffer()); gl.glEnable(GL10.GL_FOG);

    Read the article

  • Opengl ES and texcoord

    - by viraptor
    Hi, I've got some code which I would like to translate into Opengl ES. I'm not experienced with it however, so here it goes. The original code does a loop like this: glBegin(GL_TRIANGLES); for(i=0; i<num_triangles; i++) { glNormal(...); glTexCoord2f(...); glVerted3fv(...); glTexCoord2f(...); glVerted3fv(...); glTexCoord2f(...); glVerted3fv(...); } glEnd(); So that's ok - I can change the vertex handling for each triangle in the loop, into the standard: glEnableClientState (GL_VERTEX_ARRAY); glVertexPointer (3, GL_SOMETHING, 0, verts); glDrawArrays (GL_TRIANGLES, 0, 3); But how do I add the texcoord setting into this example?

    Read the article

  • Draw to offscreen renderbuffer in OpenGL ES (iPhone)

    - by David Ensminger
    I'm trying to create an offscreen render buffer in OpenGL ES on the iPhone. I've created the buffer like this: glGenFramebuffersOES(1, &offscreenFramebuffer); glBindFramebufferOES(GL_FRAMEBUFFER_OES, offscreenFramebuffer); glGenRenderbuffersOES(1, &offscreenRenderbuffer); glBindRenderbufferOES(GL_RENDERBUFFER_OES, offscreenRenderbuffer); glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, offscreenRenderbuffer); But I'm confused on how to render the storage. Apple's documentation says to use the EAGLContext renderBufferStorage:fromDrawable: method, but this seems to only work for one render buffer (the main one being displayed). If I use the normal OpenGL function glRenderBufferStorageOES, then I can't seem to get it to display. Here's the code: // this is in the initialization section: glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_RGB8_OES, backingWidth, backingHeight); // and this is when I'm trying to draw to it and display it: glBindFramebufferOES(GL_FRAMEBUFFER_OES, offscreenFramebuffer); GLfloat vc[] = { 0.0f, 0.0f, 0.0f, 10.0f, 10.0f, 10.0f, 0.0f, 0.0f, 0.0f, -10.0f, -10.0f, -10.0f, }; glLoadIdentity(); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 0, vc); glDrawArrays(GL_LINES, 0, 4); glDisableClientState(GL_VERTEX_ARRAY); glBindRenderbufferOES(GL_RENDERBUFFER_OES, offscreenRenderbuffer); [context presentRenderbuffer:GL_RENDERBUFFER_OES]; Doing it this way, nothing is displayed on the screen. However, if I switch out the references to "offscreen...Buffer" to the buffers that were created with the renderBufferStorage method, it works fine. Any suggestions?

    Read the article

  • OpenGL ES, UIView and Status Bar mess

    - by sfider
    I have iPhone (iPhoneOS 3.x) OpenGL ES app that: can be in landscape/portrait orientation can be with/without status bar shown I do this by changing status bar orientation and hidden state, then updating OpenGL view frame so it won't overlap status bar and setting projection matrix appropriately. OpenGL view is in portrait orientation at all time. View controller's shouldAutorotateToInterfaceOrientation: method returns false always, so the status bar won't start autorotating when app is in landscape mode. The problem I have is that I want to use some other UIViews, like: UIWebView, MFMailComposeView, MPMediaPicker. I could show them as modals, but this this have some drawbacks: views will always show in portrait orientation, even if they support landscape orientation views will not autorotate, even if they support it What I do is I take OpenGL view of the window with removeFromSuperview, set transform to the other view so it will be in portrait/landscape orientation when it shows up and place the other view on the window with addSubview:. This works fine without the status bar, but with it there are some problems I cannot work out: MPMediaPicker is sized to fit under status bar, but it slides under it anyway MFMailComposeView does not show navigation bar until it autorotates on device orientation change Does anyone has an idea how can I get it to work?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >