Jump to content
  • Advertisement
Sign in to follow this  
Hooch180

Simplest Way of drawing line, point, pixel

This topic is 2638 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

Hello.
I'm using SlimDX and C#.

Can you tell me how to draw a simple line and pixel using directx9?
I don't want this line to be textured, 3d or shaded or affect by lighting.

I just want to draw simple 2d solid colored line and pixel.

Share this post


Link to post
Share on other sites
Advertisement

Hello.
I'm using SlimDX and C#.

Can you tell me how to draw a simple line and pixel using directx9?
I don't want this line to be textured, 3d or shaded or affect by lighting.

I just want to draw simple 2d solid colored line and pixel.


If you use fixed function T/L and rasterization:

Disable lighting, and set up your texture stage state 0 so that it selects argument 0; set tss 0 argument
0 to solid color. Then use the device interface's DrawPrimitiveUP function, and as its parameter specify that you want to draw lines or points

If you use shaders:

Set up your pixel shader so that it outputs a solid color regardless of any incoming parameters; then use DrawPrimitiveUP as above.

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!