Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# DirectX 3D
hi all
im trying to display 3d objectusing direct x and i get this error
"An unhandled exception of type 'Microsoft.DirectX.Direct3D.Direct3DXException' occurred in Microsoft.DirectX.Direct3DX.dll" with additional information "error application"
in this methode:
public void drawMesh(Object3D objct, Matrix mat)
            object1.scale=new Vector3(scalex,scaley,scalez);
            object1.translation= new Vector3(transx, transy, transz);
            SetupLights(100, -50, -100);
            _device.RenderState.CullMode = Cull.Clockwise;
                if (objct.extddMatrls != null)
                    _device.Transform.World = Matrix.RotationZ(rotz) * Matrix.RotationY(roty) * Matrix.RotationX(rotx) * Matrix.Scaling(object1.scale) * Matrix.Translation(object1.translation) * mat;
                    for (int count = 0; count < objct.extddMatrls.Length; count++)
                        _device.Material = objct.matrls[count];
                        _device.SetTexture(0, objct.textre[count]);
                        objct.mesh.DrawSubset(count);// here i got the error

thx and have nice day!!!!!
Posted 21-Jun-12 2:01am
Edited 21-Jun-12 2:08am
sidali.kadi at 21-Jun-12 9:08am
anyone can helps me?????????????

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

salam guys
i found the solution.the probleme was that i forgot to add those methodes:

that's all.
have a nice day

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Peter Leow 255
1 Mika Wendelius 240
2 CHill60 195
3 TheRealSteveJudge 180
4 Zoltán Zörgő 178
0 Sergey Alexandrovich Kryukov 8,658
1 OriginalGriff 6,591
2 Peter Leow 3,982
3 Zoltán Zörgő 3,604
4 Richard MacCutchan 2,510

Advertise | Privacy | Mobile
Web04 | 2.8.150123.1 | Last Updated 24 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100