Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

GL.Vertex

マニュアルに切り替える
public static function Vertex(v: Vector3): void;

パラメーター

説明

頂点を送信します。

これは OpenGL での glVertex3f(v.x, v.y, v.z); と同じような 機能性を持つものです。

この関数は GL.BeginGL.End 関数の間で呼び出すことができます。

	// Draws a line from the bottom right
	// to the top left of the Screen
	// Using GL.Vertex
	var mat : Material;

function OnPostRender() { if (!mat) { Debug.LogError("Please Assign a material on the inspector"); return; } GL.PushMatrix(); mat.SetPass(0); GL.LoadOrtho(); GL.Begin(GL.LINES); GL.Vertex(Vector3(1,0,0)); GL.Vertex(Vector3(0,1,0)); GL.End(); GL.PopMatrix(); }