fehler
-
hi!
hab mir mal so ein sample geladen...jedoch folgende errors:device.DeviceCreated += new System.EventHandler(this.OnCreateDevice);
error CS0117: 'Microsoft.DirectX.Direct3D.Device' does not contain a definition for 'DeviceCreated'font = Direct3D.Font.FromFont(device, new System.Drawing.Font(System.Drawing.FontFamily.GenericSerif,10.0f));
error 'Microsoft.DirectX.Direct3D.Font' does not contain a definition for 'FromFont'device.Lights[0].Commit();//let d3d know about the light
error Microsoft.DirectX.Direct3D.Light' does not contain a definition for 'Commit'font.DrawText(helptext, new System.Drawing.Rectangle(10,10,250,400),Direct3D.DrawTextFormat.None ,System.Drawing.Color.Red);
error CS1502: The best overloaded method match for 'Microsoft.DirectX.Direct3D.Font.DrawText(Microsoft.DirectX.Direct3D.Sprite, string, System.Drawing.Point, System.Drawing.Color)' has some invalid argumentsstring helptext =
"Controls\n" +
"F1 - Toggle help\n" +
"Space - Stop planet rotation\n" +
"Arrows - Rotate around planet\n" +
"PageUp\\Down - Increase\\Decrease rotation speed\n"+
"Home\\End - Zoom in\\out\n"+
"Insert\\Delete - Ambient light up\\down\n"+
"O - Orthopgrahic projection\n"+
"P - Perspective projection\n";font.DrawText(helptext, new System.Drawing.Rectangle(10,10,250,400),Direct3D.DrawTextFormat.None ,System.Drawing.Color.Red);
error CS1503: Argument '1': cannot convert from 'string' to 'Microsoft.DirectX.Direct3D.Sprite'
error CS1503: Argument '2': cannot convert from 'System.Drawing.Rectangle' to 'string'
error CS1503: Argument '3': cannot convert from 'Microsoft.DirectX.Direct3D.DrawTextFormat' to 'System.Drawing.Point'verts[v].SetNormal(Vector3.Normalize(new Vector3(verts[v].X, verts[v].Y, verts[v].Z)));
error CS0117: 'Microsoft.DirectX.Direct3D.CustomVertex.PositionNormalTextured' does not contain a definition for 'SetNormal'liegt das daran das ich directX 9.0c sdk Dezember 2004 habe?
cu
-
Sieht nach nem DirectX-Samplecode aus... Hast du das das DirectX-SDK installiert bzw. wenigstens die erforderlichen DirectX-Includes/Libs in deinem Include/Lib verzeichnis bereitgestellt??? Wenn nicht findet sich das komplette neue DirectX SDK unter http://www.microsoft.com/downloads/details.aspx?FamilyID=4e825a37-0c94-4421-9ec8-156e52525d11&DisplayLang=en sofern der Link funktioniert
Das komplette SDK is aber bissl arg groß, du kannst im Internet eventuell nach abgespeckten Versionen suchen die nur die zum kompilieren benötigten files enthalten