0

I'd like to start learning Direct3D, but I'm unable to fully focus on it with 99% of the code in tutorials targeted only at creating and maintaining a window, which I don't even care about.

I want to know if there's a way I could jump straight into Direct3D itself without worrying about windows (think SDL level simplicity with OpenGL).

I've read articles by people who've supposedly used SDL and D3D, but, at this stage, not knowing anything about D3D the articles are all in chinese for me.

genpfault
  • 51,148
  • 11
  • 85
  • 139
ConcernedMan
  • 139
  • 1
  • 1
  • 4

2 Answers2

0

Creating a window with the Win32 API can take a bit long, you have to fill out a structure to create a window class and then call a CreateWindowEx function that takes gazillion parameters. However once you stick that code into a helper function all you have to do the next time you need a d3d window is something like :

   D3DWindow window = createD3DWindow(800,600,32);

   while(window.running)
   {
     window.handleInput();
     window.render();
   }

You can take the creation code from any of the SDK samples and put it in your library/source and jump straight into putting triangles on the screen.

http://msdn.microsoft.com/en-us/library/ff729718.aspx should help.

Barış Uşaklı
  • 13,440
  • 7
  • 40
  • 66
0

Get one of these books: http://www.amazon.co.uk/s/ref=ntt_athr_dp_sr_1?_encoding=UTF8&field-author=Frank%20D.%20Luna&search-alias=books-uk

Source code is included, use the code to do the window creation etc as per Baris' suggestion, then go D3D agogo!

The books are good for beginners too! :)

Dene B
  • 486
  • 4
  • 9