Re: [AD] al_set_target_bitmap and transforms

[ Thread Index | Date Index | More 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).


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,


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

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.


 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
+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+