Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DirectX: about DirectX LockRect()

Tags:

directx

I am new to directx, and I am trying to understand why do we need to lock surface before we can manipulate it? Can anyone help me explain?

like image 766
biloon Avatar asked Apr 16 '26 19:04

biloon


1 Answers

You have to Lock surfaces and buffers in order to tell the GPU, that you are manipulating these resources. These are necessary to syncronize the GPU and the program running on the CPU.

like image 183
Constantinius Avatar answered Apr 19 '26 01:04

Constantinius