Home > Archive > Visual Basic DirectX > January 2005 > DX7 --> 8 Conversion.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
DX7 --> 8 Conversion.
|
|
| Nissan-NMUK 2005-01-23, 9:04 pm |
| Hello,
I have the following code in DirectX 7:
With backSurface
'Draw the direction-indicator line and circles
If mMse.Moving Then
.setDrawStyle 2
.DrawLine mMse.DownX, mMse.DownY, mMse.X, mMse.Y
.setDrawStyle 0
.DrawCircle mMse.DownX, mMse.DownY, 8
.DrawCircle mMse.X, mMse.Y, 5
End If
End With
Where backSurface is of type DirectDrawSurface7. Can anyone tell me what
the equivalent of this is in DirectX 8? I can't seem to find the DrawLine
and DrawCircle methods and the only surface I can find is Direct3DSurface8?
Kind regards, and thanks,
Adam M.
| |
| Phil Taylor 2005-01-23, 9:04 pm |
| arent DrawLine and DrawCircle themselves utility routines? if you cant find
them and tranlate them, then you need to do all the work by hand.
in translating to 3d, you can DrawPrim line primitives for the lines.
circles, you will have to calculate the points on the circle and draw the
lines.
"Nissan-NMUK" <nissan-nmuk@newsgroup.nospam> wrote in message
news:A4EB0D93-064E-4268-BAE1-ECC1DAAA0890@microsoft.com...
> Hello,
>
> I have the following code in DirectX 7:
>
> With backSurface
> 'Draw the direction-indicator line and circles
> If mMse.Moving Then
> .setDrawStyle 2
> .DrawLine mMse.DownX, mMse.DownY, mMse.X, mMse.Y
> .setDrawStyle 0
> .DrawCircle mMse.DownX, mMse.DownY, 8
> .DrawCircle mMse.X, mMse.Y, 5
> End If
> End With
>
> Where backSurface is of type DirectDrawSurface7. Can anyone tell me what
> the equivalent of this is in DirectX 8? I can't seem to find the DrawLine
> and DrawCircle methods and the only surface I can find is
> Direct3DSurface8?
>
> Kind regards, and thanks,
>
>
> Adam M.
| |
| Rhett Gong [MSFT] 2005-01-23, 9:04 pm |
| DrawLine and DrawCircle is a member of DirectDrawSurface7 which is exposed
by DirectX7 for Visual Basic type library. DirectX8 does not provide
DirectDrawSurface8, so we have to use IDirectDrawSurface7 and draw lines by
ourselves.
We could call GetDC to create a GDI-compatible device context for the
surface, and then call GDI function LineTo to draw a line from the current
position up to the specified point. HTH
Best regards,
Rhett Gong [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
| |
| Phil Taylor 2005-01-23, 9:04 pm |
|
"Rhett Gong [MSFT]" <v-raygon@online.microsoft.com> wrote in message
news:qYV2x7S$EHA.2768@cpmsftngxa10.phx.gbl...
> DrawLine and DrawCircle is a member of DirectDrawSurface7 which is
> exposed
> by DirectX7 for Visual Basic type library. DirectX8 does not provide
> DirectDrawSurface8, so we have to use IDirectDrawSurface7 and draw lines
> by
> ourselves.
> We could call GetDC to create a GDI-compatible device context for the
> surface, and then call GDI function LineTo to draw a line from the current
> position up to the specified point. HTH
given there is no direct connection between D3D and DDraw in DX8, you would
have to do this along the lines of what the Texture3D sample does.
>
>
> Best regards,
> Rhett Gong [MSFT]
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
>
> This posting is provided "AS IS" with no warranties and confers no rights.
>
|
|
|
|
|