Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: None | Size: 0.47 KB | Hits: 102 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. ID3DXLine*                              line;
  2. void drawLine( int posX, int posY, int posX2, int posY2, int width, DWORD color )
  3. {
  4.         if(!line)
  5.                 return;
  6.        
  7.         D3DXVECTOR2 vLine[2];
  8.         vLine[0].x      = posX;
  9.         vLine[0].y      = posY;
  10.         vLine[1].x      = posX2;
  11.         vLine[1].y      = posY2;
  12.  
  13.         line->SetWidth( width );
  14.         line->SetAntialias( false );  
  15.         line->SetGLLines( false );
  16.  
  17.         line->Begin( );
  18.         line->Draw( vLine, 2, color );
  19.         line->End( );
  20. }
  21.  
  22. //TRY!
  23.  
  24. drawLine(100, 200, 100, 200, 4.0f, D3DCOLOR_ARGB(255, 0, 255, 0) );?