<p>there is no direct way to place a pixel on a window I am afraid.
An indirect way would be to draw a small quad equal to the size of a pixel in relation to your window</p>
<p>and essential y d3d 11 and 12 are most useful to draw geometry
So I recommend you start from there and take your creativity ahead</p>

CC BY-SA 4.0
2021-05-12T18:07:52.633Z
2021-05-12T18:07:52.633Z
Vishwas Srivastava
<p>If you want to draw pixels you can create a 2d texture resource and draw this texture to a fullscreen quad/triangle. After you set this up you can update the texture's pixels on the host site, update the texture and draw.
If you specifically after this drawing method you can use Direct2D for this (D2D is a wrapper on D3D, so you don't need hundreds of lines of code to set this up).</p>

CC BY-SA 4.0
2022-02-07T09:05:50.853Z
2022-02-07T09:05:50.853Z
jarirg
<p>I'm interested in direct3d game programming and I'm just a beginner.
I'm familiar with the Win32 API and i was wondering...
how to put a certain pixel somewhere in the window
is there like a function or anythting?
thank you...</p>

CC BY-SA 4.0
2021-05-10T18:00:41.980Z
Welcome to CG. I would recommend starting with some DirectX tutorials. You can find plenty of them on the internet. Personally, I have never worked with DirectX, but with OpenGL. "Just drawing" a pixel requires you to do some rather complicated setup and to get a basic understanding of how modern graphic cards put the pixels onto your screen. So I am not sure if you will get an answer to your question that will be helpful to you. Also, we need more details about what you have done so far and what exactly the problem is you are facing.
wychmaster
CC BY-SA 4.0
2021-05-11T05:42:13.423Z
I'd recommend googling for a "Hello triangle" example (for d3d of course), that will contain all that is needed to do basic setup and basic drawing
PaulHK
<pixels>
how to put a pixel somewhere in a window(directx)
GameDev99
# how to put a pixel somewhere in a window(directx)

(Asked by: username_0 on 2021-05-09)

I'm interested in direct3d game programming and I'm just a beginner.
I'm familiar with the Win32 API and i was wondering...
how to put a certain pixel somewhere in the window
is there like a function or anythting?
thank you...

**Tags:** pixels

> **Comments:**
> **username_1**: Welcome to CG. I would recommend starting with some DirectX tutorials. You can find plenty of them on the internet. Personally, I have never worked with DirectX, but with OpenGL. "Just drawing" a pixel requires you to do some rather complicated setup and to get a basic understanding of how modern graphic cards put the pixels onto your screen. So I am not sure if you will get an answer to your question that will be helpful to you. Also, we need more details about what you have done so far and what exactly the problem is you are facing.  
> **username_2**: I'd recommend googling for a "Hello triangle" example (for d3d of course), that will contain all that is needed to do basic setup and basic drawing  

---

## 2 answers

### Answer by username_3 on 2021-05-12. Score: 0

there is no direct way to place a pixel on a window I am afraid.
An indirect way would be to draw a small quad equal to the size of a pixel in relation to your window

and essential y d3d 11 and 12 are most useful to draw geometry
So I recommend you start from there and take your creativity ahead


---

### Answer by username_4 on 2022-02-07. Score: 0

If you want to draw pixels you can create a 2d texture resource and draw this texture to a fullscreen quad/triangle. After you set this up you can update the texture's pixels on the host site, update the texture and draw.
If you specifically after this drawing method you can use Direct2D for this (D2D is a wrapper on D3D, so you don't need hundreds of lines of code to set this up).


---

