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.

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 on other sites
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 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 on other sites
I have NV 6600.
If that's true, is there another way to make big points?

And by the way, how to create line patterns (without textures)?

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 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 on other sites
Quote:
 Original post by ReaVeR-AndreyWhy 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 on other sites
Thanx guys, I guess I'll just check if hardware supports large points and if it doesn't just draw 4 dots instead of 1 large.

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 on other sites
Quote:
 Original post by fuchiefckummm 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.

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 9
• 9
• 11
• 11
• 23
• Forum Statistics

• Total Topics
633679
• Total Posts
3013294
×