The web site, sorryOriginally Posted by nildo
Aaaaaaaaaaaaaaaaaa I can't make this Damm DRAW to work....
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.
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.this line: Surface.Draw is not working. Or it's working, but the layer surface does not get's to the main 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:
code1Code:Surface.BltFast( 0, 0, Surface.ClientRect, 0, FLayers[ nAux ].Surface );
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:
I get the following result:Code:Surface.Draw( 0, 0, Surface.ClientRect, FLayers[ nAux ].Surface );
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!
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.
[size=9px]For all your DelphiX, UnDelphiX concerns, I highly recommend this thread. [/size]
The difference is big. BltFast uses this:Originally Posted by savage
while the Draw, DrawAlpha and the others use a set of calls totally different from BltFast starting from the function D2D.D2DRenderDrawDDSXYCode:ISurface.BltFast(X, Y, Source.IDDSurface, @SrcRect, DWORD(Flags));
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.
Sent!
Bookmarks