¡@

Home 

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

iphone Programming Glossary: glenable

OpenGL ES iPhone - drawing anti aliased lines

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

iPhone drawing anti aliased lines 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.. aliased lines 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.. 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..

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

GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_LINEAR glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MAG_FILTER GL_LINEAR glEnable GL_BLEND glBlendFunc GL_SRC_ALPHA GL_ONE for i 0 i 4 i tmpquad i .x quad i .s 1.5 offw tmpquad i .y quad i .t 0.5 offh.. sizeof V2fT2f tmpquad 0 .x glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE GL_REPLACE glActiveTexture GL_TEXTURE1 glEnable GL_TEXTURE_2D glClientActiveTexture GL_TEXTURE1 glTexCoordPointer 2 GL_FLOAT sizeof V2fT2f tmpquad 0 .s glEnableClientState.. glEnable GL_TEXTURE_2D glClientActiveTexture GL_TEXTURE1 glTexCoordPointer 2 GL_FLOAT sizeof V2fT2f tmpquad 0 .s glEnableClientState GL_TEXTURE_COORD_ARRAY glBindTexture GL_TEXTURE_2D tex glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE GL_COMBINE..

Can example “GLImageProcessing” work with multi filters

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

t Since 0.5 t will be in 0..0.5 it can be 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.. GL_REPLACE glTexEnvi GL_TEXTURE_ENV GL_SRC0_ALPHA GL_PREVIOUS glDisable GL_TEXTURE_2D glActiveTexture GL_TEXTURE2 glEnable GL_TEXTURE_2D glTexEnvi GL_TEXTURE_ENV GL_TEXTURE_ENV_MODE GL_COMBINE glTexEnvi GL_TEXTURE_ENV GL_COMBINE_RGB GL_ADD_SIGNED..

How can I crop an Image with mask and combine it with another image (background) on iPhone? (OpenGL ES 1.1 is preferred)

http://stackoverflow.com/questions/5299452/how-can-i-crop-an-image-with-mask-and-combine-it-with-another-image-background

y 512.0 glTexCoord2f texture_x texture_y 1.0 glVertex2f x y 512.0 glEnd glBindTexture GL_TEXTURE_2D color_texture glEnable GL_BLEND glBlendFunc GL_DST_COLOR GL_ZERO glBegin GL_QUADS glTexCoord2f texture_x texture_y glVertex2f x y glTexCoord2f.. 512.0 glTexCoord2f texture_x texture_y 1.0 glVertex2f x y 512.0 glEnd glBindTexture GL_TEXTURE_2D background_texture glEnable GL_BLEND glBlendFunc GL_ONE_MINUS_DST_COLOR GL_DST_COLOR glBegin GL_QUADS glTexCoord2f texture_x texture_y glVertex2f x.. background_texture NSImage imageNamed @ background texture Enable alpha blending. We'll learn more about this later glEnable GL_BLEND glEnable GL_TEXTURE_2D void draw glClear GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT glColor3f 1.0 1.0 1.0 renderMask..

Undo drawing in Paint Application

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

start.y GLfloat i GLfloat count vertexCount 1 self ChangebrushPic brushimage the erase brush color is transparent. glEnable GL_POINT_SPRITE_OES glTexEnvf GL_POINT_SPRITE_OES GL_COORD_REPLACE_OES GL_TRUE glPointSize 64 mbrushscale Render the vertex..

Overlay Color Blend in OpenGL ES / iOS / Cocos2d

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

2 GL_FLOAT 0 poli if closePolygon glDrawArrays GL_TRIANGLE_FAN 0 points else glDrawArrays GL_LINE_STRIP 0 points glEnableClientState GL_COLOR_ARRAY glEnableClientState GL_TEXTURE_COORD_ARRAY glEnable GL_TEXTURE_2D And here some results As you.. glDrawArrays GL_TRIANGLE_FAN 0 points else glDrawArrays GL_LINE_STRIP 0 points glEnableClientState GL_COLOR_ARRAY glEnableClientState GL_TEXTURE_COORD_ARRAY glEnable GL_TEXTURE_2D And here some results As you can see is a good approximation but.. else glDrawArrays GL_LINE_STRIP 0 points glEnableClientState GL_COLOR_ARRAY glEnableClientState GL_TEXTURE_COORD_ARRAY glEnable GL_TEXTURE_2D And here some results As you can see is a good approximation but this two images has error OpenGL error 0x0502..

Record the drawing as a m4v video file - OpenGL

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

scale 1 1 glViewport 0 0 frame.size.width scale frame.size.height scale glMatrixMode GL_MODELVIEW glDisable GL_DITHER glEnable GL_TEXTURE_2D glEnableClientState GL_VERTEX_ARRAY glEnable GL_BLEND Set a blending function appropriate for premultiplied.. 0 frame.size.width scale frame.size.height scale glMatrixMode GL_MODELVIEW glDisable GL_DITHER glEnable GL_TEXTURE_2D glEnableClientState GL_VERTEX_ARRAY glEnable GL_BLEND Set a blending function appropriate for premultiplied alpha pixel data glBlendFunc.. scale glMatrixMode GL_MODELVIEW glDisable GL_DITHER glEnable GL_TEXTURE_2D glEnableClientState GL_VERTEX_ARRAY glEnable GL_BLEND Set a blending function appropriate for premultiplied alpha pixel data glBlendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA..