Help Wanted

HelP !!! – HoMeR

homer

Member

Posts: 106
From: sydney,nsw,australia
Registered: 07-22-2002
Sup Everyone,

Im Trying To Learn Direct 3d 7 In Retained Mode Using Visual Basic 6 and the first tutorial i read explained how to load and display a .x files with lighting .....it wont load my .x files only the .x file that came w/ the tutorial i get a runtime error object doesnt exist X( ie my .x mesh heres the line of code in question followed by all the code....

thanks X(

.LoadFromFile App.Path & "\car.x", 0, D3DRMLOAD_FROMFILE, Nothing, Nothing


;code here

Dim frame As Direct3DRMFrame3
Dim xfile As Direct3DRMMeshBuilder3

Private Sub Form_Load()
RMCanvas1.StartWindowed
RMCanvas1.SceneFrame.SetSceneBackground vbBlack
Set frame = RMCanvas1.D3DRM.CreateFrame(RMCanvas1.SceneFrame)
Set lights = RMCanvas1.D3DRM.CreateLight(D3DRMLIGHT_DIRECTIONAL, &HFFFFFFFF)
Set xfile = RMCanvas1.D3DRM.CreateMeshBuilder
With xfile
.LoadFromFile App.Path & "\car.x", 0, D3DRMLOAD_FROMFILE, Nothing, Nothing
.ScaleMesh 2, 2, 2
.Translate 0, 0, 0
End With
frame.AddVisual xfile
End Sub

------------------
HoMaH :P

homer

Member

Posts: 106
From: sydney,nsw,australia
Registered: 07-22-2002
o and im using the custom control rm.ocx

------------------
HoMaH :P