Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 39

Thread: Slow when drawing the Map into another surface

  1. #21

    Slow when drawing the Map into another surface

    Quote Originally Posted by nildo
    Quote Originally Posted by Legolas
    It works fine here
    The Website or the DRAW command?
    The web site, sorry
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  2. #22

    Slow when drawing the Map into another surface

    Aaaaaaaaaaaaaaaaaa I can't make this Damm DRAW to work....

  3. #23

    Slow when drawing the Map into another surface

    The undelphix site seems to work for me.

    nildo, we understand you're having some difficulties, but unless you tell us exactly what is going wrong, we can't help you.
    this line: Surface.Draw is not working. Or it's working, but the layer surface does not get's to the main surface
    That doesn't make a lot of sense. From the looks of it your code looks okay, but then, we're missing a lot of the whole picture. Perhaps you can tell what kind of error you're getting.

  4. #24

    Slow when drawing the Map into another surface

    I managed to get to the site. Interesting logo Looks incredibly similar to one which I drew a few years ago... ... tut tut..

  5. #25

    Slow when drawing the Map into another surface

    I'll describe exatly what's happening:

    I am writting the World Editor for my MMORPG. I started it last week, and now I'm writting the layer wich you define the colision map. So, my engine so far has 2 layers.

    The main layer is where I draw the isometric Grid.
    The second layer is where I draw the colision points to show on the screen.

    Here is the initial state of my world editor, right after I open it:



    The next step is to define the colision points. We will use the 12¬? button to define the points. Then my World Editor Engine draws the Surface of my Colision Points Layer to the main surface. Using this line to draw:

    Code:
    Surface.BltFast( 0, 0, Surface.ClientRect, 0, FLayers[ nAux ].Surface );
    code1

    the result will be this:



    Yesss... Since here everything is OK!! The colision points that where draw on a new surface is there! Wuhuuu!

    But that is not enought.... I wan't to draw this colision surface using alpha channel. Then I'll change the BltFast method to DrawAlpha or just Draw. Then, changing that line quoted as code1 to this, and adding the colision points:

    Code:
    Surface.Draw( 0, 0, Surface.ClientRect, FLayers[ nAux ].Surface );
    I get the following result:



    Look that the colision points.. Can't see them? Yes! You can't see because the DRAW method is not doing it's job... But wait, look what happen if I resize the window, manually:



    The Draw only applys when I resize my window.
    That's the strange problem that is happening!

    Really thaaaaaaank you!

  6. #26

    Slow when drawing the Map into another surface

    Have you compared the internal workings of Surface.Draw and Surface.BltFast ( stepped through the code )?

    It sounds like some kind of "repaint" message is not being fired when Surface.Draw is used, while it is being fired when Surface.BltFast is used. Compare the 2 lots of code and see if there is anything major that sticks out.

    Same may be the case for DrawAlaha.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  7. #27
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Slow when drawing the Map into another surface

    [size=9px]For all your DelphiX, UnDelphiX concerns, I highly recommend this thread. [/size]
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #28

    Slow when drawing the Map into another surface

    Quote Originally Posted by savage
    Have you compared the internal workings of Surface.Draw and Surface.BltFast ( stepped through the code )?

    It sounds like some kind of "repaint" message is not being fired when Surface.Draw is used, while it is being fired when Surface.BltFast is used. Compare the 2 lots of code and see if there is anything major that sticks out.

    Same may be the case for DrawAlaha.
    The difference is big. BltFast uses this:

    Code:
    ISurface.BltFast&#40;X, Y, Source.IDDSurface, @SrcRect, DWORD&#40;Flags&#41;&#41;;
    while the Draw, DrawAlpha and the others use a set of calls totally different from BltFast starting from the function D2D.D2DRenderDrawDDSXY

  9. #29

    Slow when drawing the Map into another surface

    I have to agree with savage about the paint message not doing his job. However my knowledge of (un)delphix doesn't go far enough to help you with a solution that does work.

    Unless ijcro joins the discussion some time soon, I suggest sending him a pm describing your problem. He may be able to help you out.

  10. #30

    Slow when drawing the Map into another surface

    Sent!

Page 3 of 4 FirstFirst 1234 LastLast

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
  •