• Advertisement

Archived

This topic is now archived and is closed to further replies.

back buffer and clipper

This topic is 6517 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When in exclusive mode and you''ve made a double buffer, does releasing the primary surface also release the back surface? Do I want to attach a clipper to the back buffer or front? When releasing a surface with a clipper attached, do I just release the clipper first, and release the surface normally, or is there a special call I should make first? --- "Best not say more. Bedways is rightways now, so best we go homeways and get bit of spatchka. Right, right." -Dim / Clockwork Orange

Share this post


Link to post
Share on other sites
Advertisement
1) the backbuffer should be released by your app, i am not sure if ddraw does it, but just do it for the sake of it

2) attach a clipper to the front buffer if you want to clip the surface into a window, i am not sure what you have to do if you want to use a clipper to do some blitting stuff

3) well, i only release the surface, i think ddraw automatically deletes the clipper. *think* that is

Share this post


Link to post
Share on other sites
>>When in exclusive mode and you''ve made a double buffer, >>does releasing the primary surface also release the back >>surface?

That depends, if you created the backbuffer as an attached
surface to the primary surf, then it''s enough to just
release the primary surface(all attached surfaces will also be released). Otherwise, you will have to
release the backbuffer also sepperately.

>>Do I want to attach a clipper to the back buffer or >>front? When releasing a surface with a clipper attached, >>do I just release the clipper first, and release the >>surface normally, or is there a special call I should >>make first?

I think the Clipper should be attached to the frontbuffer.
Regarding the releaseorder, I think you must first release the backbuffer, and then the clipper. Ín that case
you prevent the surface from using the a released clipper..
Not 100% sure here , maybe someone else here can give you a more specific answer.

/ Tooon


Share this post


Link to post
Share on other sites
I believe that it''s the reverse order of creation.
Also if you do try and release the backbuffer after the primary surface that it''s attached to, it will give you an access violation.

Also please don''t use quotes so much, remember that we have just read the message and it''s a pain to read it twice.


The_Minister

Share this post


Link to post
Share on other sites
1. If you created the back buffer using complex surface and then GetAttachedSurface( ) DDraw releases all surfaces created like this when you release the surface that creaed them

2. The clipper is ussualy attached to the front buffer. I think you''ve got to release the clipper yourself.
But I also think that all objects are released when the app ends.

Octavian
E-mail: octavsoft@octavsoft.freeservers.com
Webpage: octavsoft.freeservers.com

Share this post


Link to post
Share on other sites
You must clip to the back buffer, otherwise you will write to invalid memory anyway.
If the back buffer is clipped, the front buffer will never recieve invalid coordinates.


The_Minister

Share this post


Link to post
Share on other sites

  • Advertisement