0

I want to use OpenGL ES to scale and display an image on the screen. The image is going to be updated about 20 times per second, so the idea was to paint directly into the texture. While scaling should be done by the graphic card, the pixel format is guaranteed to be in the correct format by my application. My application needs to manipulate the image on a pixel-by-pixel basis. Due to the architecture of the application I would like to avoid calls like settexel(x,y,color) but write directly into memory.

  • Is it possible to directly access a texture in the (graphic card's?) memory and change it pixel-wise?
  • If not, is it possible to use something like settexel(x,y,color) to change a texture?

Thanks for any help!

  • What platform is this on? That will dictate what the best path to achieving this is. For example, iOS has some capabilities for directly writing to texture memory. – Brad Larson Jul 01 '12 at 15:00
  • I am looking for a generic approach (as far as possible). The hardware I am currently working with is a Freescale iMX53 board (http://www.freescale.com/webapp/sps/site/taxonomy.jsp?code=IMX53_FAMILY). – Sebastian Vogel Jul 01 '12 at 22:04

1 Answers1

0

Ok, after asking some guys at my company I found out that there is no clean way to access the graphic memory directly (solution 1) or to access the main memory from within a shader (solution 2).

Thus, I will store the pixels in the main memory and move the changed regions via glTextSubImage2D into the graphic memory.

Thanks to everybody who helped me with this!