• Advertisement

Archived

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

dx9 clipper

This topic is 5496 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

i cant figure out how to set the clipper up in managed ddraw with c#. i can set the window property and put the clipper on the primary surface, that works. but i cant seem to use a clipper on the backbuffer, where i do all my blitting. could someone show me how to set the clipper up for this? thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Is a clipper on the backbuffer nessessary? When I was doing DirectDraw7 with VB I don''t remember needing one, just on the primary surface.

Share this post


Link to post
Share on other sites
maybe not, am i looking at this wrong? if you never blit on the primary surface, and do all of you animation on the back buffer, dont you want the clipper on the back buffer? say i have a display of 800x600, and i want to blit at 750,550, and the thing i am blitting is 100x100. if i am going to blit it on the back buffer, isnt that where the clipper needs to be. then i do all my animation on the backbuffer, and everthing that needs to be clipped is, then i call flip, which requires no clipping. am i right here? or am i doing it all wrong. please help.

Share this post


Link to post
Share on other sites
I understand what you mean. You want it to clip the sprite so that you don''t have to worry about if it goes over the boundries of the screen. I''m just now re-teaching myself DirectDraw after putting off my projects for a couple years, and re-learning with DirectX 9 in VB.NET because it''s much better than VB 6 was.

In DirectX 7, I recall being able to set the clipper for the primary and having it clip the sprites properly. (I may be totally wrong.) The old DirectDraw7 documentation says that you can attach clippers to any surface and size them using ClipLists.

Well... I tried experimenting in DirectX9 with this and I''m only successful at attaching it to the Primary surface. When I attach it to the back buffer it crashes. When I blit a sprite outside the screen area it crashes too. Don''t know what to say.

Share this post


Link to post
Share on other sites

  • Advertisement