iphone Programming Glossary: glblendfunc
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 self.player void glkView GLKView view drawInRect CGRect rect glClearColor 1 1 1 1 glClear GL_COLOR_BUFFER_BIT glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glEnable GL_BLEND Condition satisfied to draw a line code given below otherwise the.. actualVelocity 0 void glkView GLKView view drawInRect CGRect rect glClearColor 1 1 1 1 glClear GL_COLOR_BUFFER_BIT glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glEnable GL_BLEND Condition satisfied to draw a line code given below otherwise the.. void glkView GLKView view drawInRect CGRect rect glClearColor 1 1 1 1 glClear GL_COLOR_BUFFER_BIT glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glEnable GL_BLEND Condition satisfied to draw a line code given below otherwise the..
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 textureBot glUniform1i inputTextureTop 2 glUniform1i inputTextureBot 3 glUniform1f alphaTop alpha glEnable GL_BLEND glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glVertexAttribPointer position 2 GL_FLOAT 0 0 imageVertices glVertexAttribPointer inputTextureCoordinate..
OpenGL ES iPhone - drawing anti aliased lines http://stackoverflow.com/questions/1813035/opengl-es-iphone-drawing-anti-aliased-lines ES 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..
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_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 tmpquad i .s quad i .s..
OpenGL ES; rendering texture created from CGBitmapContext http://stackoverflow.com/questions/2713890/opengl-es-rendering-texture-created-from-cgbitmapcontext glOrthof 0 xSize 0 ySize 1.0f 1.0f glMatrixMode GL_MODELVIEW glColor4f 1.0f 1.0f 1.0f 1.0f glEnable GL_TEXTURE_2D glBlendFunc GL_ONE GL_SRC_COLOR GLuint texture 1 glGenTextures 1 texture 0 glBindTexture GL_TEXTURE_2D texture 0 glTexParameteri GL_TEXTURE_2D..
OpenGL ES (IPhone) alpha blending looks weird http://stackoverflow.com/questions/4012035/opengl-es-iphone-alpha-blending-looks-weird looks weird I'm writing a game for IPhone in Opengl ES and I'm experiencing a problem with alpha blending I'm using glBlendFunc Gl.GL_SRC_ALPHA Gl.GL_ONE_MINUS_SRC_ALPHA to achieve alpha blending and trying to compose a scene with several layers so..
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 where it should bleed through. In your question it was black. Now to draw the background set the blend function to glBlendFunc GL_ONE_MINUS_DST_COLOR GL_DST_COLOR and draw the background texture. EDIT Here is the code I describe above. Please note.. 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 texture_x 1.0 texture_y.. 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 y glTexCoord2f texture_x..
How can I improve the performance of my custom OpenGL ES 2.0 depth texture generation? http://stackoverflow.com/questions/6051237/how-can-i-improve-the-performance-of-my-custom-opengl-es-2-0-depth-texture-gener In order to achieve the proper generation of this depth texture GL_DEPTH_TEST is disabled GL_BLEND is enabled with glBlendFunc GL_ONE GL_ONE and glBlendEquation is set to GL_MIN_EXT . I know that a scene output in this manner isn't the fastest on..
Undo drawing in Paint Application http://stackoverflow.com/questions/6689600/undo-drawing-in-paint-application GL_RENDERBUFFER_OES viewRenderbuffer context presentRenderbuffer GL_RENDERBUFFER_OES at last restore the mixed mode glBlendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA This code is not efficient and it has so many faults..Have a look at images before and After..
Overlay Color Blend in OpenGL ES / iOS / Cocos2d http://stackoverflow.com/questions/8771413/overlay-color-blend-in-opengl-es-ios-cocos2d a Cocos2d project although I think it can be applied to generic OGL ES void draw super draw glBlendColor 0 255 0 255 glBlendFunc GL_ZERO GL_SRC_COLOR glColor4ub 255 0 255 255 glLineWidth 2 CGPoint vertices2 ccp 0 100 ccp 100 100 ccp 100 0 DrawingHelper.. using either glEnable GL_ALPHA_TEST glAlphaFunc GL_GEQUAL 0.995 not using 1.0 for some margin or glEnable GL_BLEND glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA The effects are not created by setting the blend function or mode but by texture environment..
GLPaint Brush Effect with blur and bevel http://stackoverflow.com/questions/9399852/glpaint-brush-effect-with-blur-and-bevel with different values for the width and the Height for the brush but still it remains same . Do i need to consider glBlendFunc or Is it achievable thorough changing the width and the heigh of the brush. Thanks in advance. iphone ios opengl es xcode4.2..
Record the drawing as a m4v video file - OpenGL http://stackoverflow.com/questions/9661259/record-the-drawing-as-a-m4v-video-file-opengl GL_VERTEX_ARRAY glEnable GL_BLEND Set a blending function appropriate for premultiplied alpha pixel data glBlendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA glEnable GL_POINT_SPRITE_OES glTexEnvf GL_POINT_SPRITE_OES GL_COORD_REPLACE_OES GL_TRUE glPointSize..
|