本文整理汇总了C#中Quad.SetPosition方法的典型用法代码示例。如果您正苦于以下问题:C# Quad.SetPosition方法的具体用法?C# Quad.SetPosition怎么用?C# Quad.SetPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quad
的用法示例。
在下文中一共展示了Quad.SetPosition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LightingComponent
public LightingComponent(GraphicsDevice device)
{
_quad = new Quad(device);
_quad.SetPosition(depth: 0.99999f);
_restoreDepth = new Material(Content.Load<Effect>("RestoreDepth"));
_copyTexture = new Material(Content.Load<Effect>("CopyTexture"));
}
示例2: OnLoad
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
VSync = VSyncMode.On;
Console.WriteLine("GL Version " + GL.GetString(StringName.Version));
GL.ClearColor( Color4.CornflowerBlue );
GL.Enable(EnableCap.DepthTest);
for( int i = 0; i < 6; i++ ) {
Quad newObject = new Quad();
Random rand = new Random();
newObject.SetSize( new Vector2(32, 32) );
newObject.SetPosition( new Vector3( rand.Next(32,480), rand.Next(32, 200), 0 ));
m_objects.Add( newObject );
}
// TODO: read from file
string vss =
"#version 130\n"+
"in vec4 in_position;"+
"in vec3 in_color;\n"+
"out vec3 color;\n"+
"uniform mat4 mv;\n"+
"uniform mat4 p;\n"+
"void main() {\n"+
" color = in_color;\n"+
" gl_Position = p * mv * in_position;\n"+
"}\n";
string fss =
"#version 130\n"+
"in vec3 color;\n"+
"out vec4 out_color;\n"+
"void main() {\n"+
" out_color = vec4(color, 1.0);\n"+
"}\n";
m_shader.LoadFromString(vss, fss);
Screen scr = new Screen("TitleMenu");
}