Enlarging the point size

Started by
6 comments, last by Evil Steve 17 years ago
I am using DrawPrimitive D3DPT_POINTLIST (Directx8 + vb) to draw a list of points. I want to enlarge the size of the point drawn(I mean the points drawn are very small. I want to draw a bigger dot for each point). How to do this?
Advertisement
You don't. The points are pixels. To draw anything larger you'll need to render a triangle list, or look into point sprites (Which require a texture).
I understand you can't do it using D3DPT_POINTLIST. I should create say a sphere(triangles forming the sphere) and render them. Can you explain more?
Quote:Original post by spiffycrony
I understand you can't do it using D3DPT_POINTLIST. I should create say a sphere(triangles forming the sphere) and render them. Can you explain more?
D3DPT_POINTLIST is a list of pixels-sized points, you can't change the size of them. Rendering full spheres for each point would be pretty inefficient, you'd be better using small sprites, which are squares textured to look like spheres. The C++ interface is ID3DXSprite, I don't know about the VB one, but it'll be similarly named.
Quote:Original post by Evil Steve
Quote:Original post by spiffycrony
I understand you can't do it using D3DPT_POINTLIST. I should create say a sphere(triangles forming the sphere) and render them. Can you explain more?
D3DPT_POINTLIST is a list of pixels-sized points, you can't change the size of them. Rendering full spheres for each point would be pretty inefficient, you'd be better using small sprites, which are squares textured to look like spheres. The C++ interface is ID3DXSprite, I don't know about the VB one, but it'll be similarly named.


It is my understanding that you can most certainly increase the point size with SetRenderState(D3DRS_POINTSIZE,...). Only its default setting results in pixel-sized, screen space scaled points. Also you can still use D3DPT_POINTLIST to draw the points, wheter D3DRS_POINTSPRITEENABLE is enabled or not. If it is enabled then drawing a D3DPT_POINTLIST will draw a list of point sprites. Also you can increase the point size by using a vertex format that contains a pointsize member. And, the ID3DXSprite interface is not required for any of this.
.
Quote:Original post by Mastaba
Quote:Original post by Evil Steve
Quote:Original post by spiffycrony
I understand you can't do it using D3DPT_POINTLIST. I should create say a sphere(triangles forming the sphere) and render them. Can you explain more?
D3DPT_POINTLIST is a list of pixels-sized points, you can't change the size of them. Rendering full spheres for each point would be pretty inefficient, you'd be better using small sprites, which are squares textured to look like spheres. The C++ interface is ID3DXSprite, I don't know about the VB one, but it'll be similarly named.


It is my understanding that you can most certainly increase the point size with SetRenderState(D3DRS_POINTSIZE,...). Only its default setting results in pixel-sized, screen scaled points. Also you can still use D3DPT_POINTLIST to draw the points, wheter D3DRS_POINTSPRITEENABLE is enabled or not. If it is enabled then drawing a D3DPT_POINTLIST will draw a list of point sprites. Also you can increase the point size by using a vertex format that contains a pointsize member. And, the ID3DXSprite interface is not required for any of this.

I think that's a DX9 feature, the OP asked about DX8.
Sirob Yes.» - status: Work-O-Rama.
Quote:Original post by sirob
I think that's a DX9 feature, the OP asked about DX8.

Ah, I missed that detail.
.
Quote:Original post by Mastaba
It is my understanding that you can most certainly increase the point size with SetRenderState(D3DRS_POINTSIZE,...). Only its default setting results in pixel-sized, screen space scaled points. Also you can still use D3DPT_POINTLIST to draw the points, wheter D3DRS_POINTSPRITEENABLE is enabled or not. If it is enabled then drawing a D3DPT_POINTLIST will draw a list of point sprites. Also you can increase the point size by using a vertex format that contains a pointsize member. And, the ID3DXSprite interface is not required for any of this.
Ah, my bad, I thought that was only for point sprites, not normal points.

This topic is closed to new replies.

Advertisement