Hi,
I dont know where this is supposed to be posted but here goes.
Is there the function to set individual pixel values, and also read back from the display.
Thanks
steaky
Setting and Getting individual pixel colours
-
- Posts: 6
- Joined: Thu Jun 04, 2009 6:25 pm
Re: Setting and Getting individual pixel colours
In general: you don't want to do that. If you want to draw sprites or glyphs for text it is much more efficient to store them as texture and draw screen-aligned quads. If you want to draw the result of some software rendering process it may still be more efficient to render into a texture and draw a quad.
If you REALLY have to draw individual pixel you've got two choices:
- draw into the external framebuffer. That's a bit tricky, because colours are are stored in YUV. But you can just poke values into the memory occupied by the active frame, and it will be visible immediately. Remember to flush your cache when you're done!
- draw into the embedded framebuffer.
You're still responsible for copying the result into the external framebuffer when you're done.
If you REALLY have to draw individual pixel you've got two choices:
- draw into the external framebuffer. That's a bit tricky, because colours are are stored in YUV. But you can just poke values into the memory occupied by the active frame, and it will be visible immediately. Remember to flush your cache when you're done!
- draw into the embedded framebuffer.
Code: Select all
void GX_PokeARGB(u16 x,u16 y,GXColor color);
void GX_PokeZ(u16 x,u16 y,u32 z);
Who is online
Users browsing this forum: No registered users and 2 guests