Esempio 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));
        }
Esempio 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();
        }
Esempio n. 3
0
 protected abstract GraphicDevice CreateInstance(GraphicDeviceDesc data);
Esempio n. 4
0
 public GraphicDevice CreateDevice(GraphicDeviceDesc description)
 {
     return(_device = CreateInstance(description));
 }
Esempio n. 5
0
 protected abstract DeviceInfo InitDevice(GraphicDeviceDesc desc);