public void OnDrawFrame(IGL10 gl) { if (Width == 0 || Height == 0) { return; } SystemTime.Tick(); var rightNow = SystemTime.Now; step = (now == 0 ? 0 : rightNow - now); now = rightNow; if (step <= 0) { return; } Step(); NoosaScript.Get().ResetCamera(); GLES20.GlScissor(0, 0, Width, Height); GLES20.GlClear(GLES20.GlColorBufferBit); Draw(); }
public override void Draw() { base.Draw(); var script = NoosaScript.Get(); texture.Bind(); script.Camera(Camera); script.UModel.valueM4(Matrix); script.Lighting(Rm, Gm, Bm, Am, RA, Ga, Ba, Aa); script.DrawQuadSet(verticesBuffer, 9); }
public override void Draw() { base.Draw(); var script = NoosaScript.Get(); font.Texture.Bind(); if (Dirty) { UpdateVertices(); } script.Camera(Camera); script.UModel.valueM4(Matrix); script.Lighting(Rm, Gm, Bm, Am, RA, Ga, Ba, Aa); script.DrawQuadSet(Quads, RealLength); }
public override void Draw() { base.Draw(); var script = NoosaScript.Get(); texture.Bind(); script.UModel.valueM4(Matrix); script.Lighting(Rm, Gm, Bm, Am, RA, Ga, Ba, Aa); if (!updated.IsEmpty) { UpdateVertices(); } script.Camera(Camera); script.DrawQuadSet(quads, size); }
public override void Draw() { base.Draw(); var script = NoosaScript.Get(); texture.Bind(); script.Camera(Camera); script.UModel.valueM4(Matrix); script.Lighting(Rm, Gm, Bm, Am, RA, Ga, Ba, Aa); if (dirty) { verticesBuffer.Position(0); verticesBuffer.Put(vertices); dirty = false; } script.DrawQuad(verticesBuffer); }