D3d_set_hidden - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

NOTOC {{-}}

Notation

Description

Sets the use of hidden surface removal which is a method of determining if faces are behind other faces and should be drawn. This utilizes what is called a depth buffer (also known as a Z-buffer) and will test every pixel as it gets copied to the screen based on a stored depth value for each pixel. This is why transparent objects need to be drawn before other objects so that the pixel can blend instead of being copied over, d3d_set_zwriteenable can also fix some of these occurrences.

Parameters

  • enable boolean value whether or not to use hidden surface removal (true or false)

Return Values

No values are returned from the function.

Example Call

d3d_set_hidden(true);
d3d_draw_block(-20, -20, -20, 20, 20, 20, background_get_texture(bg_example), 1, 1);

This demonstrates the use of hidden surface removal when drawing a cube, if successful the cube should appear normally and you should not see the inside faces of the cube.