gpu_push_state


描述

With this function you can push the current GPU state onto a stack to be used later. You would generally use this if you want to "save" the current GPU state (things like blend mode, alpha writing, culling, etc... will all be pushed to the stack), then draw something with different settings, and then reset the GPU stack to what it was before (by calling gpu_pop_state).


语法:

gpu_push_state();


返回:

N/A(无返回值)


例如:

gpu_push_state();
gpu_set_blendmode(bm_add);
gpu_set_blendenable(false);
gpu_set_cullmode(true);
with (obj_Effect_Parent)
   {
   draw_self();
   }
gpu_pop_state();

The above code will "save" the current GPU state on the stack, then change certain GPU settings and draw a group of instances before resetting the GPU state to what it was previously.


上一页: GPU Functions
下一页: gpu_pop_state
© Copyright YoYo Games Ltd. 2018 All Rights Reserved