objective c - OpenGL ES drawing with and without CCRenderTexture -
i know can draw opengl graphics ccrendertexture:
ccrendertexture *rt = [ccrendertexture rendertexturewithwidth:texturewidth height:textureheight]; [rt beginwithclear:1, 1, 1, 1]; // opengl drawing ...... ccglenablevertexattribs(kccvertexattribflag_position | kccvertexattribflag_color); glvertexattribpointer(kccvertexattrib_position, 2, gl_float, gl_false, 0, vertices); glvertexattribpointer(kccvertexattrib_color, 4, gl_float, gl_false, 0, colors); glblendfunc(cc_blend_src, cc_blend_dst); gldrawarrays(gl_triangle_strip, 0, (glsizei)nvertices); [rt end];
without ccrendertexture, seems ok, too:
// opengl drawing ...... ccglenablevertexattribs(kccvertexattribflag_position | kccvertexattribflag_color); glvertexattribpointer(kccvertexattrib_position, 2, gl_float, gl_false, 0, vertices); glvertexattribpointer(kccvertexattrib_color, 4, gl_float, gl_false, 0, colors); glblendfunc(cc_blend_src, cc_blend_dst); gldrawarrays(gl_triangle_strip, 0, (glsizei)nvertices);
what difference opengl drawing , without ccrendertexture?
Comments
Post a Comment