言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

GL.Clear

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static function Clear(clearDepth: bool, clearColor: bool, backgroundColor: Color, depth: float = 1.0f): void;
public static void Clear(bool clearDepth, bool clearColor, Color backgroundColor, float depth = 1.0f);
public static def Clear(clearDepth as bool, clearColor as bool, backgroundColor as Color, depth as float = 1.0f) as void

Parameters

clearDepth デプスバッファがクリアされるべきかどうか
clearColor カラーバッファがクリアされるべきかどうか
backgroundColor truetrue の場合のみ、この色でクリアします
depth truetrue の場合のみ、このデプスでZバッファをクリアします

Description

現在のレンダリングバッファをクリアします

これはスクリーンまたはアクティブなRenderTexture内に描画しているものをクリアします。 いくつかのカメラでどこかの何かを描画するような、ほとんどの状況では、おそらく スカイボックスの背景で既にクリアされています。 See Also: GL.ClearWithSkybox.