Jump to content
  • Advertisement

Archived

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

Koro

DirectX Clipping/Blitting Problems - Making progress

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

Ok, after long searching, I finally found the bugged code in my program, but I cant seem to figure out why it wont work. The bugged code is in my initializing of the clippers, aparently. I initilize surfaces and stuff, and then the clippers in this section of code: ''Create Clipper Dim lpddclipper As DirectDrawClipper Set lpddclipper = lpdd.CreateClipper(0) ''Set Clipper To Window Call lpddclipper.SetHWnd(hwnd) ''Set Current Clipper If Not windowedmode Then Call lpddsback.SetClipper(lpddclipper) Else Call lpddsprimary.SetClipper(lpddclipper) End If This code works fine, so far. The problem is, that the way it clips, is if an image gets part of it clipped, it just doesnt display it. So the edges are really poor looking. The code I added just after it to fix this problem and make scrolling smooth is: Dim r(0) As RECT r(0) = NewRECT(0, 0, ddsdprimary.lWidth,ddsdprimary.lHeight) Set lpddclipper = lpdd.CreateClipper(0) Call lpddclipper.SetClipList(1, r()) Call lpddsback.SetClipper(lpddclipper) Call lpddsbuffer.SetClipper(lpddclipper) The newrect function is just one that simplifies setting up a rect. Anyways, this is the section of code that gives me screwed up graphics whenever it clips an image at the top left corner. Can anyone see what Im doing wrong?

Share this post


Link to post
Share on other sites
Advertisement
Does anyone have any thoughts or ideas at all about this problem and how to fix it? Anyone??

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!