Re: [AD] al_set_target_bitmap and transforms

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 10/20/2016 8:29 PM, SiegeLord wrote:
Yes, that's what is happening. Yes, that'd be a reasonable addition to the documentation (this is documented inside al_use_transform right now, but perhaps it makes sense to have this mentioned in al_set_target_bitmap too).

-SL

On 10/20/2016 09:49 AM, Edgar Reynaldo wrote:
Hey people,

I was just wondering, what happens when al_set_target_bitmap is called
with respect to transformations? I assume since each bitmap has its own
transforms, that they are made current when al_set_target_bitmap is
called? I see a call to new_display->vt->set_target_bitmap(new_display,
bitmap);

and

new_display->vt->update_transformation(new_display, bitmap);

at the end of al_set_target_bitmap. Is that what is happening there?

It just seems that this aspect of al_set_target_bitmap is not documented
at all in the manual and that it should be. Edgar


_______________________________________________
Allegro-developers mailing list
Allegro-developers@xxxxxxxxxx
https://mail.gna.org/listinfo/allegro-developers

I've created a patch to supplement the documentation for al_set_target_bitmap. Let me know if you want it modified. It is attached.

Edgar






 docs/src/refman/graphics.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/src/refman/graphics.txt b/docs/src/refman/graphics.txt
index 6e26042..92dadae 100644
--- a/docs/src/refman/graphics.txt
+++ b/docs/src/refman/graphics.txt
@@ -1152,6 +1152,11 @@ To return to drawing to a display, set the backbuffer of the display as the
 target bitmap, using [al_get_backbuffer]. As a convenience, you may also use
 [al_set_target_backbuffer].
 
+Each allegro bitmap maintains two transformation matrices associated with it for
+drawing onto the bitmap. There is a view matrix and a projection matrix. When you
+call al_set_target_bitmap, these will be made current for the bitmap, affecting
+global OpenGL and DirectX states depending on the driver in use.
+
 Each video bitmap is tied to a display. When a video bitmap is set to as the
 target bitmap, the display that the bitmap belongs to is automatically made
 "current" for the calling thread (if it is not current already).  Then drawing


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/