Re: [AD] Meaning of the texture coordinates for the primitives addon |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Meaning of the texture coordinates for the primitives addon
- From: Elias Pschernig <elias.pschernig@xxxxxxxxxx>
- Date: Tue, 08 Sep 2009 01:14:24 +0200
On Mon, 2009-09-07 at 16:43 -0600, Thomas Fjellstrom wrote:
>
> My only beef with that is keeping the clipping state when changing to a bitmap
> of a different size really doesn't make sense.
>
> My suggested option is to keep the state in the bitmap itself, and just not
> reset it when switching the target bitmap.
Yes, that's what I meant. Whenever something is drawn, the clipping
rectangle of the current target bitmap is used.
Internally, the OpenGL driver wouldn't change, it still would call
glScissor() inside al_set_target_bitmap, updating it to the passed in
bitmap's clipping rectangle. Just not reset that rectangle first.
>
> What will OpenGL do when you switch the FBO and start drawing? Does it keep
> all of its state? Or do you have to reset all of the rendering state?
You have to reset state - FBOs don't contain any state. It's what makes
them different from pbuffers - those retain the complete OpenGL state.