New function
Closed this issue · 5 comments
MisterAlex95 commented
Hello!
Thanks for your lib !
I didn't find any fonctions to get color of one pixel. Am I stupid or it's true ? :)
Thanks !
xerpi commented
Do you want to get the pixel from the texture or the framebuffer?
MisterAlex95 commented
Framebuffer will be perfect :)
xerpi commented
You can do something like:
unsigned int get_pixel(int x, int y)
{
unsigned int *buffer = vita2d_get_current_fb();
return buffer[x + y * 544];
}
But be careful when you call vita2d_get_current_fb(), the GPU may still be writing to the framebuffer when you try to read from it.
MisterAlex95 commented
Thank a lot !
ljkgpxs commented
Why not add a new function vita2d_draw_texture_part_scale_rotate_hotspot ;)