Pixel test
Hi,
Can someone explain me how to test pixel color under direct x ??
Thanks a lot
JunGhans
It depends on the version of dx you are using, and on the pixel format you are using. In short, you just lock the surface, get a pointer to the surface, and read back the data in a manner appropriate to your pixel format/pixel depth.
Also, later versions of dx (8 and I think 7 as well) prevent you from locking the primary surface, so you cant test a pixel on the primary surface with these. You can still test pixels on other surfaces though. Bear in mind also that locking surfaces is generally slow, so dont expect to be able to test every pixel on the screen every frame and still have a halfway decent framerate.
Also, later versions of dx (8 and I think 7 as well) prevent you from locking the primary surface, so you cant test a pixel on the primary surface with these. You can still test pixels on other surfaces though. Bear in mind also that locking surfaces is generally slow, so dont expect to be able to test every pixel on the screen every frame and still have a halfway decent framerate.
I''m pretty sure you Can lock also primary surface in DDraw 7;
God saw all that he had made. Shit happens sometimes. --the sixth day.
You''re probably right, I cant remember. I do know that they definitely try to discourage it though, for various reasons.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement