   Vertices are getting messed up
  I am so confused.  My verticies are changing color from BLACK to RED and they should be white.  I have been to many people for help and nobody can seem to help me... what am I doing wrong?vertex.hstruct MenuVertex{  MenuVertex(){}  MenuVertex(float x, float y, float z, D3DCOLOR diffuse, float u, float v )  {    x_ = x; y_ = y; z_ = z;    u_ = u; v_ = v;    diffuse_ = diffuse;  }  float x_, y_, z_;  D3DCOLOR diffuse_;  float u_, v_; // texture coordinates};#define FVF_MENUVERTEX (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1)#ifndef __MENU_H__#define __MENU_H__#include <d3dx9.h>#include "vertex.h"class Menu{private:  IDirect3DDevice9 *MENU_Device_;  IDirect3DVertexBuffer9 *MENU_VB_;  IDirect3DIndexBuffer9  *MENU_IB_;  D3DXMATRIX MENU_Background_Transform_;public:  Menu(IDirect3DDevice9 *Device, int width, int height);  ~Menu();  void Render();};#endif#include "Menu.h"Menu::Menu(IDirect3DDevice9 *Device, int width, int height): MENU_VB_(0), MENU_IB_(0){  MENU_Device_ = Device;  // Setup the vertex buffer  MENU_Device_->CreateVertexBuffer( 4 * sizeof(MenuVertex), D3DUSAGE_WRITEONLY, FVF_MENUVERTEX, D3DPOOL_MANAGED, &MENU_VB_, 0);  Vertex *vertices;  MENU_VB_->Lock(0, 0, (void **) &vertices, 0);  vertices[0] = Vertex(    3.0f, (float)(height - 100), 99.0f, D3DCOLOR_XRGB(255, 255, 255), 0.0f, 1.0f);  vertices[1] = Vertex(    3.0f,  (float) height - 2  , 99.0f, D3DCOLOR_XRGB(255, 255, 255), 0.0f, 0.0f);  vertices[2] = Vertex( (float)width - 3,  (float) height - 2  , 99.0f, D3DCOLOR_XRGB(255, 255, 255), 1.0f, 0.0f);  vertices[3] = Vertex( (float)width - 3, (float)(height - 100), 99.0f, D3DCOLOR_XRGB(255, 255, 255), 1.0f, 1.0f);  MENU_VB_->Unlock();  // setup the index buffer  MENU_Device_->CreateIndexBuffer( 6 * sizeof(WORD), D3DUSAGE_WRITEONLY, D3DFMT_INDEX16, D3DPOOL_MANAGED, &MENU_IB_, 0);  WORD* indices = 0;  MENU_IB_->Lock(0, 0, (void **) &indices, 0);  indices[0] = 0; indices[1] = 1; indices[2] = 2;  indices[3] = 2; indices[4] = 3; indices[5] = 0;  MENU_IB_->Unlock();  D3DXMATRIX temp_scale;  D3DXMATRIX temp_translate;  D3DXMatrixScaling(&temp_scale, (float) width - 20,(float) height - 10, 1.0F);  D3DXMatrixTranslation(&temp_translate, 0.0f, 0.0f, 10.0f); // some magic numbers here  MENU_Background_Transform_ = temp_scale * temp_translate; }void Menu::Render(){  MENU_Device_->SetStreamSource( 0, MENU_VB_, 0, sizeof(MenuVertex) );  MENU_Device_->SetIndices(MENU_IB_);  MENU_Device_->SetFVF(FVF_MENUVERTEX);  MENU_Device_->BeginScene();  MENU_Device_->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, 4, 0, 2);  MENU_Device_->EndScene();}Menu::~Menu(){  MENU_VB_->Release();  MENU_IB_->Release();}
  Verticies are set in the Menu Contructor   ;struct MenuVertex{  MenuVertex(){}  MenuVertex(float x, float y, float z, D3DCOLOR diffuse, float u, float v )  {    x_ = x; y_ = y; z_ = z;    u_ = u; v_ = v;    diffuse_ = diffuse;  }  float x_, y_, z_;  D3DCOLOR diffuse_;  float u_, v_; // texture coordinates};#define FVF_MENUVERTEX (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1)Your FVF is wrong.  You are using xyz vertices, but describing them as xyzrhw vertices.  Either change the structure to match the FVF or change the FVF to match the structure.   ;  please remove post.....i figured it out   