Advertisement

Trouble with DirectX9 point sprites

Started by December 30, 2015 01:38 AM
0 comments, last by Steve_Segreto 9 years, 2 months ago

Hey,

I'm having problems with getting point sprites to actually have different sizes. I've tried many things like having the size defined in the vertex deleraction, but nothing seems to be actually getting them to change size. They do scale with distance from the projection, however.

Another thing, is they always seem to go to the max possible size, which is... Annoying.

Any tips?

Thanks,
- TSB

Can you provide some of your failing code for example please?

Be careful when passing a float for your pointsize that you properly cast your float to the DWORD the API expects:

m_pDevice9->SetRenderState(D3DRS_POINTSIZE, *((DWORD*)&pointSize));

https://msdn.microsoft.com/en-us/library/windows/desktop/bb172599%28v=vs.85%29.aspx

This topic is closed to new replies.

Advertisement