I figured I might as well post the code, its not long at all
#include "particle.h"Particle::Particle(LPDIRECT3DDEVICE8 device) { D3DDevice=device; //High quality filtering to make things look nice SetSize(5.0f); SetTexture("Particle.bmp"); D3DDevice->CreateVertexBuffer(6*sizeof(CustomV),D3DUSAGE_WRITEONLY,PARTICLEFVF,D3DPOOL_MANAGED,&vb); SetColor(255,255,255); UpdateVertices();}void Particle::SetColor(int r, int g, int b) { r1=r; g1=g; b1=b; UpdateVertices();}void Particle::UpdateVertices() { VOID* pVertices; CustomV cvVertices[]={ {-size, -size,0.0f,D3DCOLOR_XRGB(r1,g1,b1), 0.0f,1.0f,}, {-size, size, 0.0f, D3DCOLOR_XRGB(r1,g1,b1),0.0f, 0.0f,}, {size, -size, 0.0f,D3DCOLOR_XRGB(r1,g1,b1), 1.0f, 1.0f,}, {size, -size, 0.0f, D3DCOLOR_XRGB(r1,g1,b1),1.0f, 1.0f,}, {-size, size,0.0f,D3DCOLOR_XRGB(r1,g1,b1), 0.0f, 0.0f, }, {size, size,0.0f,D3DCOLOR_XRGB(r1,g1,b1), 1.0f, 0.0f, }}; vb->Lock(0,0, (BYTE**)&pVertices,0); memcpy(pVertices,cvVertices,sizeof(cvVertices)); vb->Unlock();}void Particle::SetSize(float s) { size=s;}void Particle::SetTexture(char *file) { D3DXCreateTextureFromFile(D3DDevice, file, &tex);}void Particle::Render() { D3DDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_ONE); D3DDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_ONE); D3DDevice->SetRenderState(D3DRS_LIGHTING,FALSE); D3DDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); D3DDevice->SetTexture(0,tex); D3DDevice->SetVertexShader(PARTICLEFVF); D3DDevice->SetStreamSource(0,vb,sizeof(CustomV)); D3DDevice->DrawPrimitive(D3DPT_TRIANGLELIST,0,2); D3DDevice->SetRenderState(D3DRS_LIGHTING,TRUE); D3DDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);}