K
kakarot
I'm new to VB.net and DirectX, so I'm following a tutorial in a book
that is apparently written in VS6. I'm using the the VB Express 2005.
The problem lies using the CopyRects function. In the book, the
function calls for a RECT variable. The CopyRects function now calls
for a IntPtr variable where the RECT was in the book. The same goes
for a POINT variable later in the function. Here is a snipet of the
code:
Dim sourceRect As DxVBLibA.RECT
'Setup RECT
sourceRect.left = sourcex
sourceRect.top = sourcey
sourceRect.right = sourcex + width
sourceRect.bottom = sourcey + height
'Create POINT
Dim point1 As DxVBLibA.POINT
'Setup POINT
point1.x = destx
point1.y = desty
'Draw Tile
d3ddev.CopyRects(source, sourceRect, 1, backBuffer, point1)
d3ddev is of dxvbliba.direct3ddevice8. What the function is calling
for is a IntPtr in place where the sourceRect and point1 is located.
If anyone has any clue, please help.
Thanks in advance,
Klaki
that is apparently written in VS6. I'm using the the VB Express 2005.
The problem lies using the CopyRects function. In the book, the
function calls for a RECT variable. The CopyRects function now calls
for a IntPtr variable where the RECT was in the book. The same goes
for a POINT variable later in the function. Here is a snipet of the
code:
Dim sourceRect As DxVBLibA.RECT
'Setup RECT
sourceRect.left = sourcex
sourceRect.top = sourcey
sourceRect.right = sourcex + width
sourceRect.bottom = sourcey + height
'Create POINT
Dim point1 As DxVBLibA.POINT
'Setup POINT
point1.x = destx
point1.y = desty
'Draw Tile
d3ddev.CopyRects(source, sourceRect, 1, backBuffer, point1)
d3ddev is of dxvbliba.direct3ddevice8. What the function is calling
for is a IntPtr in place where the sourceRect and point1 is located.
If anyone has any clue, please help.
Thanks in advance,
Klaki