DirectX Clipping/Blitting Problems - Making progress

Started by
0 comments, last by Koro 21 years, 11 months ago
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?
"To want is to live. Satisfaction is death."
Advertisement
Does anyone have any thoughts or ideas at all about this problem and how to fix it? Anyone??
"To want is to live. Satisfaction is death."

This topic is closed to new replies.

Advertisement