xboxscene.org forums

Author Topic: Direct X Question  (Read 50 times)

yaazz

  • Archived User
  • Hero Member
  • *
  • Posts: 1370
Direct X Question
« on: January 23, 2005, 12:13:00 PM »

I was just thinking, Since Xbox uses Direct X 8, there is no Direct Draw, meaning learning Direct X 7 is kind of useless for Xbox Development?
Logged

JapanFred

  • Archived User
  • Full Member
  • *
  • Posts: 116
Direct X Question
« Reply #1 on: January 23, 2005, 06:04:00 PM »

smile.gif
Logged

yaazz

  • Archived User
  • Hero Member
  • *
  • Posts: 1370
Direct X Question
« Reply #2 on: January 23, 2005, 08:51:00 PM »

No Idea what that is, but I will!
Logged

JapanFred

  • Archived User
  • Full Member
  • *
  • Posts: 116
Direct X Question
« Reply #3 on: January 24, 2005, 08:20:00 AM »

QUOTE(yaazz @ Jan 24 2005, 05:22 AM)
No Idea what that is, but I will!
Logged

yaazz

  • Archived User
  • Hero Member
  • *
  • Posts: 1370
Direct X Question
« Reply #4 on: January 24, 2005, 10:11:00 AM »

QUOTE
//Initializing code
ID3DXSprite *pScreenSprite;
tells the compiler to use the heap memory 
D3DXCreareSprite(m_pd3dDevice, &pScreenSprite);
allocate memory for a picture
IDirect3DTexture8 *pTex = D3DXCreateTextureFromFile(m_pd3dDevice, "D:\\Media\\Image.jpg", &pScreenSprite);
I assume this is what loads the picture into memory although I don't understand it
//Rendering Code
pScreenSprite->Begin();
begin being a function, or C++ code I dont know
pScreenSprite->Draw(pTex, NULL, NULL, NULL, 0.0f, &D3DXVECTOR2(100.0f, 100.0f), 0xffffffff);
null=0 I assume, and it is the co-ordinates for making a square, dunno about the rest
pScreenSprite->End;

stop writing to the screen
Logged

yaazz

  • Archived User
  • Hero Member
  • *
  • Posts: 1370
Direct X Question
« Reply #5 on: January 30, 2005, 04:51:00 PM »

Bump, am I correct in the above post?
Logged

JapanFred

  • Archived User
  • Full Member
  • *
  • Posts: 116
Direct X Question
« Reply #6 on: January 31, 2005, 05:15:00 AM »

CODE


//Initializing code
ID3DXSprite *pScreenSprite;
//Allocate ID3DXSprite to memory

D3DXCreateSprite(m_pd3dDevice, &pScreenSprite);
//Actually Create the sprite it'self using the IDirect3DDevice.

IDirect3DTexture8 *pTex = D3DXCreateTextureFromFile(m_pd3dDevice, "D:\\Media\\Image.jpg", &pScreenSprite);
//Create a texture from a file on the HD, and place it in another Texture file.

//Rendering Code
pScreenSprite->Begin();
//Lock the buffer (Maybe?)

pScreenSprite->Draw(pTex, NULL, NULL, NULL, 0.0f, &D3DXVECTOR2(100.0f, 100.0f), 0xffffffff);
//Draw our Texture we just loaded to screen.

pScreenSprite->End();
//Unlock the buffer? (Maybe?)


Logged

yaazz

  • Archived User
  • Hero Member
  • *
  • Posts: 1370
Direct X Question
« Reply #7 on: January 31, 2005, 07:57:00 PM »

ok that makes a little bit more sense, thanks!
Logged