   Texture frequently updated from array
  Here's what I'm trying to do : I have a fairly large bitmap of arbitrary dimensions in an array (under the form uint32_t *array) that is frequently updated (up to 60 times a second) and that I'm trying to display flat on the screen (like an in-game minimap if you will).Since unlike a regular texture it's updated very often and its dimensions aren't a power of two the proper efficient way to do it should be quite unlike creating a regular texture, am I right? So what would be the appropriate way to do it?Thanks in advance.   
  How about DrawPixels? You also can use PixelZoom (not sure if that name is correct) to change the output size of the bitmap when displaying it.   ;Quote:Original post by A_SNHere's what I'm trying to do : I have a fairly large bitmap of arbitrary dimensions in an array (under the form uint32_t *array) that is frequently updated (up to 60 times a second) and that I'm trying to display flat on the screen (like an in-game minimap if you will).Since unlike a regular texture it's updated very often and its dimensions aren't a power of two the proper efficient way to do it should be quite unlike creating a regular texture, am I right? So what would be the appropriate way to do it?All modern cards support the ARB_texture_non_power_of_two extension, which allows you to create arbitrary shaped textures. Previous generation cards support ARB_texture_rectangle, which is a more limited extension along the same lines.If you have one of these extensions available, it should be as simple as creating the texture once, and then updating the texture data whenever necessary with glTexSubImage2D().   ;Quote:Original post by surfiHow about DrawPixels? You also can use PixelZoom (not sure if that name is correct) to change the output size of the bitmap when displaying it.Thanks a lot! Just tried that and it works great.   ;Quote:Original post by A_SNQuote:Original post by surfiHow about DrawPixels? You also can use PixelZoom (not sure if that name is correct) to change the output size of the bitmap when displaying it.Thanks a lot! Just tried that and it works great.Be aware that glDrawPixels will often be slower than the texture upload method, and support under recent drivers can be a little iffy.   ;Ack, there's a problem with glDrawPixels, it displays my bitmap upside down.. Any way to make OpenGL flip it? glPixelZoom is useless since it rotates around the 0 coordinates.EDIT: Nevermind, worked it out.Quote:Original post by swiftcoderQuote:Original post by A_SNQuote:Original post by surfiHow about DrawPixels? You also can use PixelZoom (not sure if that name is correct) to change the output size of the bitmap when displaying it.Thanks a lot! Just tried that and it works great.Be aware that glDrawPixels will often be slower than the texture upload method, and support under recent drivers can be a little iffy.I can see that glDrawPixels isn't so fast in full screen. So far I haven't had any luck with glTexSubImage2D though, all I could get was a blue square...   ;Quote:Original post by A_SNI can see that glDrawPixels isn't so fast in full screen. So far I haven't had any luck with glTexSubImage2D though, all I could get was a blue square...Make sure you created the texture (using glTexImage2D) first - glTexSubImage2D only updates an existing texture.   ;  If you need even more speed you can transfer texture using a PBO, that way you might get DMA transfer from CPU to GPU.   ;Quote:Original post by swiftcoderQuote:Original post by A_SNI can see that glDrawPixels isn't so fast in full screen. So far I haven't had any luck with glTexSubImage2D though, all I could get was a blue square...Make sure you created the texture (using glTexImage2D) first - glTexSubImage2D only updates an existing texture.Quote:Original post by mrrIf you need even more speed you can transfer texture using a PBO, that way you might get DMA transfer from CPU to GPU.Using glDrawPixels is unpractically slow on my 10 year old Power Mac G4 450 MHz with an ATI Rage 128 AGP, I get like 5 FPS on a 1000x700 window, would any of those alternatives make it any faster for such old machines with slow GPUs?   