This is still an outstanding issue.
I am trying to get a point sprites system workign render a sun in my world. I noticed another user asking a similar question (with the same code, presumably from my class :) ) but they were not able to complete this. My current code for this is as follows:
float fPointSize = 10.0f,fPointScaleB = 100.0f;
IDirect3DDevice9 *m_Device = LudoRenderer::GetInstance()->GetDevice(); m_Device->SetRenderState(D3DRS_POINTSPRITEENABLE,true); m_Device->SetRenderState(D3DRS_POINTSCALEENABLE,true);
m_Device->SetRenderState(D3DRS_POINTSIZE,
*((DWORD*)&fPointSize));
m_Device->SetRenderState(D3DRS_POINTSCALE_B,
*((DWORD*)&fPointScaleB));
m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
m_Device->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_ONE);
m_Device->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_ONE);
std::wstring hardcoded = L"..\\Data\\sun.png";
m_SunTexture = LudoTextureManager::GetInstance()->GetTextureData(hardcoded.c_str()).m_Texture;
m_Device->SetTexture(0,m_SunTexture);
m_Device->DrawPrimitive(D3DPT_POINTLIST,0,12);
I do not see my sun on the screen, and it seems to be doing the alpha blend on the rest of my world, rather than on any sun I'm trying to load. Could this be because of which devices I'm using? Any help would be greatly appreciated :)