d3d_set_hidden(enable)

From ENIGMA

Jump to: navigation, search

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

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

Return Values

void: This function does not return anything.

Example Call

// 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.
d3d_set_hidden(true);
d3d_draw_block(-20, -20, -20, 20, 20, 20, background_get_texture(bg_example), 1, 1);
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox