¡@

Home 

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

iphone Programming Glossary: gl_float

Drawing into OpenGL ES framebuffer and getting UIImage from it on iPhone

http://stackoverflow.com/questions/10936157/drawing-into-opengl-es-framebuffer-and-getting-uiimage-from-it-on-iphone

GL_RENDERBUFFER_OES colorRenderbuffer should I do this glEnableClientState GL_VERTEX_ARRAY glVertexPointer 2 GL_FLOAT 0 line glColor4f 1.0 0.0 0.0 1.0 glLineWidth 10 glDrawArrays GL_LINES 0 2 draw line with two points myContext presentRenderbuffer..

OpenGL ES iPhone - drawing anti aliased lines

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

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.. 0 colors glEnableClientState GL_COLOR_ARRAY points is a pointer to floats 2 per vertex glVertexPointer 2 GL_FLOAT 0 points glEnableClientState GL_VERTEX_ARRAY glDrawArrays GL_TRIANGLE_STRIP 0 points_count glDisableClientState GL_VERTEX_ARRAY..

Advice on speeding up OpenGL ES 1.1 on the iPhone

http://stackoverflow.com/questions/1844765/advice-on-speeding-up-opengl-es-1-1-on-the-iphone

GL_SHORT seemed to improve FPS but the Tiler Utilization is still in the 90 range a lot of the time. I'm still using GL_FLOAT for my texture coordinates. I suppose I could knock those down to GL_SHORT and save four more bytes per vertex. Update 5..

Draw to offscreen renderbuffer in OpenGL ES (iPhone)

http://stackoverflow.com/questions/1853551/draw-to-offscreen-renderbuffer-in-opengl-es-iphone

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.. 0 0 512 512 reset pointers after finishing drawing to textures glViewport 0 0 BWIDTH BHEIGHT glVertexPointer 2 GL_FLOAT 0 canvas canvas vertices glTexCoordPointer 2 GL_FLOAT 0 texels glBindTexture GL_TEXTURE_2D boundtexture bind to the texture.. to textures glViewport 0 0 BWIDTH BHEIGHT glVertexPointer 2 GL_FLOAT 0 canvas canvas vertices glTexCoordPointer 2 GL_FLOAT 0 texels glBindTexture GL_TEXTURE_2D boundtexture bind to the texture which is the special render target glBindFramebufferOES..

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

texels . .. . X rotated samples filter across texel corners . .. . Pass one center nearest sample glVertexPointer 2 GL_FLOAT sizeof V2fT2f quad 0 .x glTexCoordPointer 2 GL_FLOAT sizeof V2fT2f quad 0 .s glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE.. corners . .. . Pass one center nearest sample glVertexPointer 2 GL_FLOAT sizeof V2fT2f quad 0 .x glTexCoordPointer 2 GL_FLOAT sizeof V2fT2f quad 0 .s glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE GL_MODULATE glColor4f 1.0 5 1.0 5 1.0 5 1.0 validateTexEnv.. tmpquad i .y quad i .t 0.5 offh tmpquad i .s quad i .s 1.5 offw tmpquad i .t quad i .t 0.5 offh glTexCoordPointer 2 GL_FLOAT sizeof V2fT2f tmpquad 0 .x glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE GL_REPLACE glActiveTexture GL_TEXTURE1 glEnable..

Can example “GLImageProcessing” work with multi filters

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

result.t glClear GL_COLOR_BUFFER_BIT glDisable GL_BLEND process 1 adjust brightness float t 1.2 glVertexPointer 2 GL_FLOAT sizeof V2fT2f flipquad 0 .x glTexCoordPointer 2 GL_FLOAT sizeof V2fT2f flipquad 0 .s glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE.. process 1 adjust brightness float t 1.2 glVertexPointer 2 GL_FLOAT sizeof V2fT2f flipquad 0 .x glTexCoordPointer 2 GL_FLOAT sizeof V2fT2f flipquad 0 .s glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE GL_COMBINE static GLfloat constColor 4 0.1 0.2.. biased up and the addition done in signed space. glActiveTexture GL_TEXTURE1 glEnable GL_TEXTURE_2D glVertexPointer 2 GL_FLOAT sizeof V2fT2f flipquad 0 .x glTexCoordPointer 2 GL_FLOAT sizeof V2fT2f flipquad 0 .s glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE..

Drawing app on iPad using OpenGL

http://stackoverflow.com/questions/4606680/drawing-app-on-ipad-using-opengl

1.0 segments windowHeight is the height of you drawing canvas. midPoint CGPointMake x windowHeight y glVertexPointer 2 GL_FLOAT 0 vertices glDrawArrays GL_POINTS 0 segments 2 return midPoint That will draw based on three points. The control is the..

Undo drawing in Paint Application

http://stackoverflow.com/questions/6689600/undo-drawing-in-paint-application

GL_POINT_SPRITE_OES GL_COORD_REPLACE_OES GL_TRUE glPointSize 64 mbrushscale Render the vertex array glVertexPointer 2 GL_FLOAT 0 eraseBuffer glDrawArrays GL_POINTS 0 vertexCount Display the buffer glBindRenderbufferOES GL_RENDERBUFFER_OES viewRenderbuffer..

Overlay Color Blend in OpenGL ES / iOS / Cocos2d

http://stackoverflow.com/questions/8771413/overlay-color-blend-in-opengl-es-ios-cocos2d

GL_TEXTURE_2D glDisableClientState GL_TEXTURE_COORD_ARRAY glDisableClientState GL_COLOR_ARRAY glVertexPointer 2 GL_FLOAT 0 poli if closePolygon glDrawArrays GL_TRIANGLE_FAN 0 points else glDrawArrays GL_LINE_STRIP 0 points glEnableClientState..

Record the drawing as a m4v video file - OpenGL

http://stackoverflow.com/questions/9661259/record-the-drawing-as-a-m4v-video-file-opengl

2 vertexCount 1 start.y end.y start.y GLfloat i GLfloat count vertexCount 1 Render the vertex array glVertexPointer 2 GL_FLOAT 0 vertexBuffer glDrawArrays GL_POINTS 0 vertexCount Display the buffer glBindRenderbufferOES GL_RENDERBUFFER_OES viewRenderbuffer..

Draw a straight line using OpenGL ES in iPhone?

http://stackoverflow.com/questions/9736887/draw-a-straight-line-using-opengl-es-in-iphone

GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT const GLfloat line 0.5f 0.5f point A 0.5f 0.5f point B glVertexPointer 2 GL_FLOAT 0 line glEnableClientState GL_VERTEX_ARRAY glDrawArrays GL_LINES 0 2 When i run the project only the gray color only appearing.. GLKVertexAttribPosition the currently bound buffer holds the data 2 number of coordinates per vertex GL_FLOAT the data type of each component GL_FALSE can the data be scaled 2 4 how many bytes per vertex 2 floats per vertex NULL..