d3d_set_projection_ortho(x,y,w,h,angle)

From ENIGMA

(Difference between revisions)
Jump to: navigation, search
m (replacing function titles with notation using AWB)
m (replacing function titles with notation using AWB)
Line 1: Line 1:
{{FuncTitle|d3d_set_projection_ortho|x,y,w,h,angle}}
{{FuncTitle|d3d_set_projection_ortho|x,y,w,h,angle}}
-
 
== Description ==
== Description ==
Sets the use of a 3D orthographic projection used with any further draw calls. The purpose of it is mainly for drawing your Heads-Up-Display (HUD) after your 3D projections as a layer on top of it, in which case you would also want to disable hidden surface removal to avoid "clipping" off parts of the hud. Also useful for making 2D games have some 3D element's such as lighting because they require 3D mode.
Sets the use of a 3D orthographic projection used with any further draw calls. The purpose of it is mainly for drawing your Heads-Up-Display (HUD) after your 3D projections as a layer on top of it, in which case you would also want to disable hidden surface removal to avoid "clipping" off parts of the hud. Also useful for making 2D games have some 3D element's such as lighting because they require 3D mode.

Revision as of 08:57, 22 April 2013

Description

Sets the use of a 3D orthographic projection used with any further draw calls. The purpose of it is mainly for drawing your Heads-Up-Display (HUD) after your 3D projections as a layer on top of it, in which case you would also want to disable hidden surface removal to avoid "clipping" off parts of the hud. Also useful for making 2D games have some 3D element's such as lighting because they require 3D mode.

Parameters

Return Values

none: The function has no return values

Example Call

d3d_set_projection_ortho(0, 0, view_wview[0], view_hview[0], 0);
d3d_draw_block(50, 50, -50, 100, 100, 50, background_get_texture(bg_example), 1, 1);

// draw hud
d3d_set_hidden(false);
draw_text(50, 50, "Hello world!");

Demonstrates the use of drawing a 3D cube and then drawing some text on top of it.

Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox