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