Direct X & C# - Teapot

This is a discussion on Direct X & C# - Teapot within the C# Programming forums, part of the General Programming Boards category; Hello, At the moment i am learning how to use c# and c++ with direct x. I am using a ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Location
    UK
    Posts
    2

    Question Direct X & C# - Teapot

    Hello,
    At the moment i am learning how to use c# and c++ with direct x. I am using a book called "Begining 3D Game Proggramming". I only know the basics of c and c++. I am doing the 1st exercise in the book which you have to make a spinning teapot, it tells you to make an emty project (managed) using the microft direct x sdk then i open it up with microsoft Visual c# 2005 express and i execute the empty project and it works i then add the code the book asks me to, and it dooesnt work. It wouldnt let me attach the source (teapot.cs) so i have attched a text file with source in becuase its quite big!

    Sorry for long explanation

    Please can you tell me the problem
    Thanks,
    Alex.
    P.s its probbably just a stupid mistake i have made
    Attached Files Attached Files
    Last edited by AlexIllsley; 03-11-2006 at 06:42 AM.

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    What doesn't work? Are there any compiler errors? If so, post them.

  3. #3
    Registered User
    Join Date
    Mar 2006
    Location
    UK
    Posts
    2
    Ok, the program will not compile and it has the following errors:


    • The name "device" does not exist in the current context

    and it says that error 5 times

  4. #4
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You haven't created a device object anywhere.
    Also, managed directx (which you use) is obsolete. It's probably better to use SlimDX or XNA instead.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Direct Input shutting down improperly
    By Deo in forum Game Programming
    Replies: 3
    Last Post: 06-14-2005, 07:54 AM
  2. Direct x 8 include files
    By Zoalord in forum Game Programming
    Replies: 2
    Last Post: 03-17-2004, 04:07 PM
  3. Direct X
    By MicroFiend in forum C++ Programming
    Replies: 2
    Last Post: 03-21-2003, 02:34 PM
  4. Direct Music Illegal Static Member Call error
    By FwyWice in forum Game Programming
    Replies: 4
    Last Post: 11-30-2002, 05:14 PM
  5. Direct Music Trouble
    By FwyWice in forum Game Programming
    Replies: 5
    Last Post: 11-29-2002, 04:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21