Esempio n. 1
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;
        }
Esempio n. 2
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;
        }