Board index » delphi » DelphiX components help with DXDraw

DelphiX components help with DXDraw

  I am just trying to test the dxdraw component by just putting a single
image to the dxdraw surface.  Anyone with any experience with the delphiX
components please tell me why the following does not display the image?

dximagelist1.Items.find('item').draw(dxdraw1.surface, 10, 10, 0);
dxdraw1.flip;

any help would be greatly appreciated.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

 

Re:DelphiX components help with DXDraw


Use OpenGl

Quote
cwils...@wvu.edu wrote in message <6iel37$7d...@nnrp1.dejanews.com>...
>  I am just trying to test the dxdraw component by just putting a single
>image to the dxdraw surface.  Anyone with any experience with the delphiX
>components please tell me why the following does not display the image?

>dximagelist1.Items.find('item').draw(dxdraw1.surface, 10, 10, 0);
>dxdraw1.flip;

>any help would be greatly appreciated.

>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/   Now offering spam-free web-based newsreading

Re:DelphiX components help with DXDraw


Quote
Ray Adams wrote:
> Use OpenGl

OK, now that we've gotten the no-value added answer out of the way . . .

Quote
> >dximagelist1.Items.find('item').draw(dxdraw1.surface, 10, 10, 0);
> >dxdraw1.flip;

Not wickedly familiar with DelphiX (I use DGC), but here are some things you
could try:

- Are you sure it's pulling the image out of the imagelist OK? Can you use
this code and draw the image, say, to the canvas of a TImage you drop on your
form? (Not using DDraw, in other words.)
- I assume (10, 10, 0) are . . . maybe x, y and the number of the surface? Are
you sure this is visible on the screen? Are you sure you don't have some kind
of clipping turned on? How about this . . . is surface 0 the front buffer? If
so, you would be drawing to the front surface, then flipping it behind the
back, hiding what you just drew.
- Is there some kind of Visible or Active property set to False? (In DGC, this
is called FlippingEnabled.)
- If it's not the front surface, have you tried drawing directly to a front
surface & not doing a flip?

Just a few thoughts that might get you going in the right direction . . .

TK

Re:DelphiX components help with DXDraw


Quote
cwils...@wvu.edu wrote:

>   I am just trying to test the dxdraw component by just putting a
> single
> image to the dxdraw surface.  Anyone with any experience with the
> delphiX
> components please tell me why the following does not display the
> image?

> dximagelist1.Items.find('item').draw(dxdraw1.surface, 10, 10, 0);
> dxdraw1.flip;

You probably have forgotten to set the property dxImageList1.DXDRAW to
your dxdraw1 object.

BTW. is DelphiX a very good library for using DirectX, I love it.  It
makes DirectX programming a piece of cake.

Pascal

--------------------------------------------------------------------
{*word*137} software engineer

                                               ing. Pascal Dutilleul
                                            Pascal.Dutill...@ping.be  
--------------------------------------------------------------------

Other Threads