1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 10:30:36 +00:00
QB64-PE/internal/help/_DEPTHBUFFER.txt
SteveMcNeill 33adc04fc4 Add temp folder to repo. It's necessary as well!
Just more initial setting on... nothing much to see here.
2022-04-28 13:39:56 -04:00

29 lines
1.5 KiB
Plaintext

{{DISPLAYTITLE:_DEPTHBUFFER}}
The [[_DEPTHBUFFER]] statement turns depth buffering ON or OFF, LOCKs or _CLEARS the buffer.
{{PageSyntax}}
: [[_DEPTHBUFFER]] {ON|OFF|LOCK|_CLEAR}[,handle&]
{{PageDescription}}
* Depth buffers store the distance of each pixel on an image/surface. When 3D drawing occurs new pixels are only drawn if they are closer than the existing pixels. After all content is drawn, it results in a scene which looks correct because content which is closer hides content which is further away.
* Depth buffers are automatically created for any hardware image or surface which is the target/destination of a 3D command (such as the 3D version of [[_MAPTRIANGLE]]).
* The buffering can be turned ON, OFF or LOCKed. The default state is ON.
* [[_DEPTHBUFFER]] _CLEAR can be used to reset/erase the depth buffer, meaning that future drawing will not be blocked by existing/previously buffered depth content.
* Whenever _DISPLAY is called the primary surface's depth buffer is automatically _CLEARed, so unless you are drawing onto a hardware image you may never need to use this option.
* LOCKing the depth buffer makes it read only. New content cannot be drawn unless it is closer than existing content, but when that new content is drawn it will not update the depth buffer.
* Turning OFF or LOCKing the depth buffer is typically performed when semi-transparent content is being drawn.
{{PageSeeAlso}}
* [[_MAPTRIANGLE]]
* [[_PUTIMAGE]]
* [[_DISPLAY]]
{{PageNavigation}}
<