ios - render a small texture every frame and then scale it up? -


using opengl on ios, possible update small texture (by setting each pixel individually) , scale fill screen (60 frames per second)?

you should able update content of texture using glteximage2d.

untested example:

glubyte data[1024]; // 32x32 (power of two)  (int i=0; i<1024; i+=4) {     // write red pixel  (rgba)         data[i] = 255;     data[i+1] = 0;     data[i+2] = 0;     data[i+3] = 255; }  glbindtexture(gl_texture_2d, my_texture); glteximage2d(gl_texture_2d, 0, gl_rgba, 32, 32, 0, gl_rgba, gl_unsigned_byte, data);  // render quad texture. 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -