Forum
Contact





DirectX using C#
DirectX using C++
DirectX using Visual Basic



Latest Forum posts

 Suggestion to change a few lines
  Posted by: Insomnica
  When: 06/09/2010 at 14:37:05

 Collision with series 1
  Posted by: radulph
  When: 05/09/2010 at 13:33:14

 HLSL calculating normals
  Posted by: miroslavign
  When: 04/09/2010 at 17:26:26

 Collision with series 1
  Posted by: ToastbrotX
  When: 04/09/2010 at 16:52:02

 HLSL calculating normals
  Posted by: Rich_Zap
  When: 04/09/2010 at 15:00:20

 Collision with series 1
  Posted by: ToastbrotX
  When: 04/09/2010 at 12:28:41

 HLSL calculating normals
  Posted by: miroslavign
  When: 04/09/2010 at 08:46:31

 Walk along a wall
  Posted by: Anonymous
  When: 03/09/2010 at 10:28:02

 model problems
  Posted by: muffinman
  When: 03/09/2010 at 06:47:32

 Vertices problem
  Posted by: Anonymous
  When: 03/09/2010 at 05:48:35

 OcTree Question
  Posted by: Zorzomezz
  When: 03/09/2010 at 04:07:03

 error x3000:syntax error
  Posted by: Anonymous
  When: 02/09/2010 at 06:55:17

 Reflection problem in corners ...
  Posted by: Anonymous
  When: 31/08/2010 at 20:53:30

 OcTree Question
  Posted by: radulph
  When: 31/08/2010 at 18:00:04

 model problems
  Posted by: Archenon
  When: 30/08/2010 at 05:54:27

 Changing computer breaks my game
  Posted by: Archenon
  When: 30/08/2010 at 05:49:50

 model problems
  Posted by: muffinman
  When: 28/08/2010 at 16:58:10

 Vertices problem
  Posted by: Anonymous
  When: 27/08/2010 at 15:35:36

 Changing computer breaks my game
  Posted by: radulph
  When: 27/08/2010 at 07:12:24

 effects file and XNA 4.0 (Beta)
  Posted by: radulph
  When: 26/08/2010 at 06:33:33




Topic: A lot of errors



  
Goto parent category
  
Create a new user account


   A lot of errors
 Poster : Annihil8
 Posts: 10
 Country : Belgium
 City: Lanaken

  
Posted by Annihil8 on 08/08/2006 at 10:07:15
Hi,

I'm getting a lot of errors.
First is the windowed property, I had to change it to IsWindowed.
Second:
device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams);
==> this gives a pointer error. So I changed it to this.Handle

Third:
CustomVertex.TransformedColored[] vertices
==>CustomVertex could not be resolved.I've added the library Microsoft.DirectX.Direct3D.CustomVertex.TransformedColored[] vertices although it stands between the usings

Next 2 errors i didn't knew how to solve
Forth:
vertices[0].Color = Color.Red.ToArgb();
==>can not convert int to color

Fifth:
device.DrawUserPrimitives(PrimitiveType.TriangleList, 1, vertices);
==>DX.Graphicsbuffer inspected instead of vertices.

I hope that somebody can help me, because I really want to learn it.
 Poster : riemer
 Posts: 1388
 Country : Belgium
 City: Antwerp

  
Posted by riemer on 08/08/2006 at 11:33:37
The first error is a tipical change in the DirectX 2.0 version.

Go to your references, and you'll see you have added a reference to DirectX 2.0.0.0 instead of the 1.something version.

Let us know if it worked!
zeker doen
 Poster : Annihil8
 Posts: 10
 Country : Belgium
 City: Lanaken

  
Posted by Annihil8 on 09/08/2006 at 15:03:28
All the references are 1.0...
When "re"-adding I get that directX.Direct3D.device is an ambigious reference. Very strange there has to be something with the libraries
 Poster : riemer
 Posts: 1388
 Country : Belgium
 City: Antwerp

  
Posted by riemer on 10/08/2006 at 05:16:44
Maybe starting a new project, while making sure you select the 1.xxx references could help ?

If you cant solve it, let me know and I'll post a small zip file containing a DirectX starter project.
 Poster : Annihil8
 Posts: 10
 Country : Belgium
 City: Lanaken

  
Posted by Annihil8 on 14/08/2006 at 06:26:46
If you could do so, I get it only working on vs2003. Vs2005 doesn't even start :)
 Poster : riemer
 Posts: 1388
 Country : Belgium
 City: Antwerp

  
Posted by riemer on 15/08/2006 at 04:47:14
OK you can try this file:

http://www.riemers.net/Files/Forum/EmptyApp.zip

It simply contains a Visual Studio 2005 project, filled with the code from the second chapter and with the needed references. It runs on my PC. If you get any errors, let me know.
 Poster : Annihil8
 Posts: 10
 Country : Belgium
 City: Lanaken

  
Posted by Annihil8 on 08/09/2006 at 01:55:17
Tnx, it did worked indeed, can't find the difference in my projects although.

Grtz

annihil8
 Poster : riemer
 Posts: 1388
 Country : Belgium
 City: Antwerp

  
Posted by riemer on 08/09/2006 at 02:48:57
Then it can only be a difference in the references or project settings.
 Poster : Comboy
 Posts: 5
 Country :
 City:

  
Posted by Comboy on 18/08/2007 at 09:25:47
This line sends out an error
vertices[0].Position = new Vector4(150f, 100f, 0f, 1f);


it works when converted into

vertices[0].SetPosition ( new Vector4(150f, 100f, 0f, 1f));



actually there’s no Position property, Why is that? I’m using VS7 with DXSDK 9 for C#
 Poster : riemer
 Posts: 1388
 Country : Belgium
 City: Antwerp

  
Posted by riemer on 18/08/2007 at 14:19:42
That method was changed in the DirectX SDK about 1.5 years ago. Try dloading and installing the latest DirectX SDK.

  
Post a new reply
 





Google
 
Web www.riemers.net
If you appreciate the amount of time I spend creating and updating
these pages, feel free to donate -- any amount is welcome !
- Website design & DirectX code : Riemer Grootjans -
©2006 Riemer Grootjans


News
Home
Forum
XNA 2.0 Recipes Book (8)
XNA 3.0 Recipes Book (8)
Downloads
Extra Reading (3)
Matrices: geometrical
Matrix Mathematics
Homogenous matrices
Community Projects (1)
Tutorials (160)
XNA 3.0 using C# (89)
DirectX using C# (54)
Series 1:Terrain (14)
Opening a window
Linking to the Device
Drawing a triangle
Camera
Rotation - Translation
Indices
Terrain creation
Terrain from file
DirectInput
Importing bmp files
Colored vertices
DirectX Light basics
Mesh creation
Mesh lighting
Series 2: Flightsim (19)
Series 3: HLSL (19)
Short Tuts (2)
Resizing problem
Checking Device caps
DirectX using C++ (15)
DirectX using VB (2)