Exemplo n.º 1
0
        //public abstract ShaderCode CompileFromMemory(
        //  string shaderCode,
        //  ShaderMacro[] defines,
        //  Include include,
        //  string functionName,
        //  string profile,
        //  ShaderFlags flags);

        //public abstract ShaderCode CompileFromFile(
        //    string filename,
        //    ShaderMacro[] defines,
        //    Include include,
        //    string functionName,
        //    string profile,
        //    ShaderFlags flags);

        public GraphicDevice CreateDevice(GraphicDeviceType type = GraphicDeviceType.Hardware)
        {
            GraphicDeviceDesc desc = new GraphicDeviceDesc
            {
                DriverType = type
            };

            return(CreateDevice(desc));
        }
Exemplo n.º 2
0
        public GraphicDevice(GraphicDeviceDesc desc)
        {
            rasStack   = new RasterizerStateStack(this);
            blendStack = new BlendStateStack(this);
            depthStack = new DepthStencilStateStack(this);

            _desc = desc;

            _deviceInfo = InitDevice(desc);
            InitIA();
            InitShading();
            InitRS();
            InitOM();
        }
Exemplo n.º 3
0
 protected abstract GraphicDevice CreateInstance(GraphicDeviceDesc data);
Exemplo n.º 4
0
 public GraphicDevice CreateDevice(GraphicDeviceDesc description)
 {
     return(_device = CreateInstance(description));
 }
Exemplo n.º 5
0
 protected abstract DeviceInfo InitDevice(GraphicDeviceDesc desc);