Page 5 of 5 FirstFirst ... 345
Results 41 to 42 of 42

Thread: Need help with DrawAlpha

  1. #41

    Need help with DrawAlpha

    Well, I was messing - again - with 1.06 DelphiX, and I've got why it is ****ed up at me:
    If I comment this line:
    {$Define DrawHWAcc}
    then it works perfectly... Wonder what does this enable that messes up drawing THIS much...

  2. #42

    Need help with DrawAlpha

    hmm, I also see that this for the TDirectDrawSurface part is only present for TDirectDrawSurface.Draw... Which would also tell why were SOME things okay more or less while this was on... question: what the heck could be wrong with D2D.D2DRenderDrawDDS? Someone please help, cuz this might as well fix my slowdown prob...

    Edit: Okay, umm, some lil more exact description... I'm storing the images in TDirectDrawSurface-s... There's one surface with the background picture, that's mostly megs of memory... Well, it completely doesn't display that. Then there are some menu pictures that I store in the system memory... Now those are switched up, sometimes drawn to a bad place, things like that... Then there are images that store multiple frames of an animation... Those aren't cut out from the main picture when drawn... aaand... As I've looked, StretchDraw() uses the perfectly same way as Draw(), and StretchDraw doesn't even have this IFDEF, so guess I've always used that... It worked and works... aaaaand, it's quite late and I'm a little crappy with numbers prolly, but "D2D.D2DRenderDrawDDS(Source, Bounds(X, Y, SrcRect.Right - SrcRect.Left, SrcRect.Bottom - SrcRect.Top), Transparent, 0);" seems to be totally right to me, and that's the only difference that I've seen between Draw() and StretchDraw... Oh, and of course if I take the IFDEF out, the unaccelerated Draw works PERFECTLY... So I don't think it'd be some error with my calling the Draw...

    Edit2: Yet another question could be: why do the menu pictures crap up when I draw them from an imagelist? I still have DrawHWAcc disabled and I'm commenting and uncommenting the IFDEFs, so, no, I'm not THAT much of an idiot that I've enabled the wrong thing on the ImageLists' Draw method...

    Edit3: Correction, TDirectDrawSurface has 2 StretchDraws overloaded and only the one without sourcerect parameter has acceleration... So I guess I haven't used that one after all, so the baddy should be the D2D.D2DRenderDrawDDS...

    Edit4: Okay, guess it wasn't intended to work for the Draw that had a source rect in it at all, so I removed it... The latest and final question of mine would be... could anyone come up with a smart idea for drawing sub-images of one bigger image? I don't know DirectX good enough to do that

Page 5 of 5 FirstFirst ... 345

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •