Jump to content
  • Advertisement
Sign in to follow this  
ReaVeR-Andrey

D3DRS_POINTSIZE [solved]

This topic is 4891 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Why doesn't D3DRS_POINTSIZE work? Here's my code:
void Ellipse ( int x, int y )
{
   if ( lpDev == NULL )
      return;
   Vertex2D pt ( Vector2D ( (float) x, (float) y ), c );
   SetRenderState ( D3DRS_POINTSIZE, 3 );
   lpDev->DrawPrimitiveUP ( D3DPT_POINTLIST, 1, &pt, sizeof ( Vertex2D ) );
}


[Edited by - ReaVeR-Andrey on July 22, 2005 2:24:15 AM]

Share this post


Link to post
Share on other sites
Advertisement
I'm not all into how those work.

But as far as I know, POINTSIZE isn't supported by all cards, neither for all sizes.

Share this post


Link to post
Share on other sites
What card do you have? ATI has supported point sprites for a while, but nVidia has only added support in their latest 6x00 cards. There are caps bits regarding point sprites you should be checking, such as FVFCaps & D3DFVFCAPS_PSIZE, and MaxPointSize.

Share this post


Link to post
Share on other sites
Points can be done using billboard quads, will produce the very same effect.

Line patterns? LINELIST perhaps or did I misunderstand you?

Share this post


Link to post
Share on other sites
Also, note that pointsize is a float, and you're not using the trickery necessary to set a renderstate to a float.

From the SDK:
m_pDevice9->SetRenderState(D3DRS_POINTSIZE, *((DWORD*)&PointSize));


Your 6600 should be okay, but for other cards you might need an alternate approach. Either draw textured quads, or if you detect a lack of point sprite support you can use software vertex processing, or mixed processing, using hardware for everything except point sprites, and swapping to software to draw your point sprites, then swapping back to hardware again.


Look into ID3DXLine for lines with patterns.

Share this post


Link to post
Share on other sites
Quote:
Original post by ReaVeR-Andrey
Why doesn't D3DRS_POINTSIZE work?
Here's my code:
*** Source Snippet Removed ***


Check maximal point size :

D3DCAPS9 d3dCaps;
pDevice->Device3D ()->GetDeviceCaps (&d3dCaps);
m_fMaxPointSize = d3dCaps.MaxPointSize;

if (d3dCaps.FVFCaps & D3DFVFCAPS_PSIZE)
m_bDeviceSupportsPSIZE = true;
else
m_bDeviceSupportsPSIZE = false;

Share this post


Link to post
Share on other sites
ummm i'm really guessing here... so don't flame me if i'm being stupid...., but don't you have to set your D3DRS_POINTSPRITEENABLE to true?

Share this post


Link to post
Share on other sites
Quote:
Original post by fuchiefck
ummm i'm really guessing here... so don't flame me if i'm being stupid...., but don't you have to set your D3DRS_POINTSPRITEENABLE to true?


No, it works fine without them.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!