Beispiel #1
0
        public void Render(TranslatableShader shader, params ObjectGroup[] args)
        {
            if (args.Length == 0)
            {
                args = objGroups;
            }

            foreach (ObjectGroup objGroup in args)
            {
                vbo.Render(shader, BeginMode.Triangles, objGroup.startPosition, objGroup.endPosition - objGroup.startPosition);
            }
        }
Beispiel #2
0
        public void Render(TranslatableShader s)
        {
            s.setModelMatrix(Transformation);
            s.SetTexture("tex", sailTexture);
            obj.Render(s, sail);
            s.SetTexture("tex", woodTexture);
            obj.Render(s, boat);
            s.SetTexture("tex", coverTexture);
            obj.Render(s, cover);
            s.SetTexture("tex", coverTexture);
            float wheelRotation = time * 2.0f;

            s.setModelMatrix(Matrix4.Mult(Matrix4.CreateRotationX(wheelRotation), Matrix4.Mult(Matrix4.CreateTranslation(0f, 3.60631f, 0f), myTransformation)));
            obj.Render(s, wheel);
        }