¡@

Home 

2014/10/15 ¤U¤È 10:09:51

iphone Programming Glossary: gl_triangle_strip

How to draw a line inside the fish movement (OpenGLES in iPhone)?

http://stackoverflow.com/questions/10499077/how-to-draw-a-line-inside-the-fish-movement-opengles-in-iphone

the images . Here i will explain you what i did and what i tried in my project. Step 1 I draw a Background Image used GL_TRIANGLE_STRIP . Here is my sample code void viewDidLoad super viewDidLoad self.context EAGLContext alloc initWithAPI kEAGLRenderingAPIOpenGLES2.. 2 GL_FLOAT GL_FALSE sizeof TexturedVertex void offset offsetof TexturedVertex textureVertex glDrawArrays GL_TRIANGLE_STRIP 0 4 Step 2 After i draw a background image for my view am going to draw a fish images in the screen by using GL_TRIANGLE_STRIP.. 0 4 Step 2 After i draw a background image for my view am going to draw a fish images in the screen by using GL_TRIANGLE_STRIP . The fish images are always in moving. Here is my sample code void update if Test NO self.timeSinceLastSpawn self.timeSinceLastUpdate..

How do I blend two textures with different co-ordinates in OpenGL ES 2.0 on iPhone?

http://stackoverflow.com/questions/12242443/how-do-i-blend-two-textures-with-different-co-ordinates-in-opengl-es-2-0-on-ipho

2 GL_FLOAT 0 0 textureCoordinates glClearColor 0.0 0.0 0.0 0.0 glClear GL_COLOR_BUFFER_BIT glDrawArrays GL_TRIANGLE_STRIP 0 4 glBindRenderbuffer GL_RENDERBUFFER viewRenderbuffer context presentRenderbuffer GL_RENDERBUFFER Vertex shader... attribute..

Applying brightness and contrast with OpenGL ES

http://stackoverflow.com/questions/1506299/applying-brightness-and-contrast-with-opengl-es

GL_TEXTURE_ENV GL_SRC0_ALPHA GL_PREVIOUS glColor4f h h h 0.75 0.5 h 2x extrapolation validateTexEnv glDrawArrays GL_TRIANGLE_STRIP 0 4 Restore state glDisable GL_TEXTURE_2D glTexEnvi GL_TEXTURE_ENV GL_OPERAND1_RGB GL_SRC_COLOR glTexEnvi GL_TEXTURE_ENV..

OpenGL ES iPhone - drawing anti aliased lines

http://stackoverflow.com/questions/1813035/opengl-es-iphone-drawing-anti-aliased-lines

How do I create blurred text in an iPhone view?

http://stackoverflow.com/questions/227305/how-do-i-create-blurred-text-in-an-iphone-view

glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE GL_MODULATE glColor4f 1.0 5 1.0 5 1.0 5 1.0 validateTexEnv glDrawArrays GL_TRIANGLE_STRIP 0 4 Pass two accumulate two rotated linear samples glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_LINEAR glTexParameteri.. glTexEnvi GL_TEXTURE_ENV GL_SRC0_ALPHA GL_PRIMARY_COLOR glColor4f 0.5 0.5 0.5 2.0 5 validateTexEnv glDrawArrays GL_TRIANGLE_STRIP 0 4 Pass three accumulate two rotated linear samples for i 0 i 4 i tmpquad i .x quad i .s 0.5 offw tmpquad i .y quad i.. 0.5 offw tmpquad i .y quad i .t 1.5 offh tmpquad i .s quad i .s 0.5 offw tmpquad i .t quad i .t 1.5 offh glDrawArrays GL_TRIANGLE_STRIP 0 4 Restore state glDisableClientState GL_TEXTURE_COORD_ARRAY glClientActiveTexture GL_TEXTURE0 glBindTexture GL_TEXTURE_2D..

OpenGL ES; rendering texture created from CGBitmapContext

http://stackoverflow.com/questions/2713890/opengl-es-rendering-texture-created-from-cgbitmapcontext

1.0f 0.0f 0.0f 1.0f 1.0f 1.0f glVertexPointer 3 GL_FLOAT 0 verts glTexCoordPointer 2 GL_FLOAT 0 texCords glDrawArrays GL_TRIANGLE_STRIP 0 4 glDisable GL_TEXTURE_2D The result is a white square. Not the green one as intended. Can anyone spot the error s in..

OpenGL: How to implement an “eraser” tool?

http://stackoverflow.com/questions/292071/opengl-how-to-implement-an-eraser-tool

GL_TEXTURE_2D circleBrush glVertexPointer 3 GL_FLOAT 0 verts glTexCoordPointer 2 GL_FLOAT 0 coords glDrawArrays GL_TRIANGLE_STRIP 0 4 EDIT 2 Unfortunately stencil buffers are not available on the iPhone. EDIT 3 Framebuffer objects are available on the..

Can example “GLImageProcessing” work with multi filters

http://stackoverflow.com/questions/4375479/can-example-glimageprocessing-work-with-multi-filters

GL_TEXTURE_ENV GL_SRC0_ALPHA GL_PREVIOUS glColor4f h h h 0.75 0.5 h 2x extrapolation validateTexEnv glDrawArrays GL_TRIANGLE_STRIP 0 4 save to file snapshot result test3.jpg Restore state glDisable GL_TEXTURE_2D glTexEnvi GL_TEXTURE_ENV GL_OPERAND1_RGB..

Why is this OpenGL ES code slow on iPhone?

http://stackoverflow.com/questions/450042/why-is-this-opengl-es-code-slow-on-iphone

GL_COLOR_BUFFER_BIT glLoadIdentity glTranslatef tx 100 ty 100 10 for int i 0 i 200 i glTranslatef 1 1 0 glDrawArrays GL_TRIANGLE_STRIP 0 4 .. drawView is called every time the screen is touched or the finger on the screen is moved and tx ty are set to the..

Explain how OpenGL ES background images work

http://stackoverflow.com/questions/4820372/explain-how-opengl-es-background-images-work

Use of VAO around VBO in Open ES iPhone app Causes EXC_BAD_ACCESS When Call to glDrawElements

http://stackoverflow.com/questions/6240863/use-of-vao-around-vbo-in-open-es-iphone-app-causes-exc-bad-access-when-call-to-g

glBindTexture GL_TEXTURE_2D videoFrameTexture Update uniform values glUniform1i videoFrameUniform 0 glDrawArrays GL_TRIANGLE_STRIP 0 4 program use glBindVertexArrayOES arrayObject glDisable GL_TEXTURE_2D glEnable GL_DEPTH_TEST CC3GLMatrix projection CC3GLMatrix..

iOS CVImageBuffer distorted from AVCaptureSessionDataOutput with AVCaptureSessionPresetPhoto

http://stackoverflow.com/questions/6540710/ios-cvimagebuffer-distorted-from-avcapturesessiondataoutput-with-avcapturesessio

glBindBuffer GL_ARRAY_BUFFER self vertexBuffer glBindBuffer GL_ELEMENT_ARRAY_BUFFER self indexBuffer glDrawElements GL_TRIANGLE_STRIP 4 GL_UNSIGNED_SHORT BUFFER_OFFSET 0 glBindBuffer GL_ARRAY_BUFFER 0 glBindBuffer GL_ELEMENT_ARRAY_BUFFER 0 self context presentRenderbuffer..