Exemplo n.º 1
0
 public Particle(Tortoise2d game, Texture t, float x, float y, float w, float h, float vx, float vy, float ax, float ay,
                 float growx, float growy, float r, float g, float b, float a, float cr, float cg, float cb, float ca, int time)
 {
     this.game  = game;
     this.t     = t;
     this.x     = x;
     this.y     = y;
     this.w     = w;
     this.h     = h;
     this.vx    = vx;
     this.vy    = vy;
     this.ax    = ax;
     this.ay    = ay;
     this.growx = growx;
     this.growy = growy;
     this.r     = r;
     this.g     = g;
     this.b     = b;
     this.a     = a;
     this.cr    = cr;
     this.cg    = cg;
     this.cb    = cb;
     this.ca    = ca;
     this.time  = time;
     tick       = 0;
     alive      = true;
 }
Exemplo n.º 2
0
 //ok
 public void END(Tortoise2d m)
 {
     Shader.Bind(null);
     core.ClearData();
     //GL.Flush();
     //GL.Finish();
     m.SwapBuffers();
 }
Exemplo n.º 3
0
 public Camera(Tortoise2d game, float x, float y)
 {
     this.game = game;
     this.x    = x;
     this.y    = y;
     zoomx     = 1;
     zoomy     = 1;
 }
Exemplo n.º 4
0
 public Renderable(Tortoise2d t, string textureName)
 {
     this.t  = t;
     texture = t.textures.GetSprite(textureName);
     p       = new Vector2[4];
     for (int i = 0; i < 4; i++)
     {
         p[i] = new Vector2();
     }
 }
Exemplo n.º 5
0
 public Renderable(Tortoise2d t, Texture texture)
 {
     this.t       = t;
     this.texture = texture;
     p            = new Vector2[4];
     for (int i = 0; i < 4; i++)
     {
         p[i] = new Vector2();
     }
 }
Exemplo n.º 6
0
        public ParticleSystem(Tortoise2d game, Texture t, int size)
        {
            this.size = size;
            this.game = game;
            this.t    = t;

            parts = new Particle[size];
            for (int i = 0; i < parts.Length; i++)
            {
                parts[i]       = new Particle(game, t, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0);
                parts[i].alive = false;
            }
        }
Exemplo n.º 7
0
        public Renderer(Tortoise2d gg, int w, int h, int sprites, int maxlights, TextureManager t, Grid g)
        {
            game   = gg;
            tm     = t;
            width  = w;
            height = h;

            _1920scale = (float)w / 1920;
            _1080scale = (float)h / 1080;
            //if not replace your stone-age-gpu for a decent one!
            Shader.GetSupported();

            shader_plain        = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_plain.glsl"));
            shader_w_light      = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_with_light.glsl"));
            shader_o_light      = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_only_light.glsl"));
            shader_merge        = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_merge.glsl"));
            shader_merge_effect = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_merge_effect.glsl"));
            core      = new RendererCore(sprites);
            fbo       = new Fbo(width, height);
            this.grid = g;
        }
Exemplo n.º 8
0
 public Program()
 {
     g = new Tortoise2d("Test", 1920, 1080, 16, 9, 1000, 10);
     g.SetGameFunctions(Load, Init, Update, Render);
     g.Run(60, 60);
 }