コード例 #1
0
ファイル: GraphicsDevice.cs プロジェクト: xbayrockx/OpenRA
        public GraphicsDevice(Size size, WindowMode window)
            : base(size, window, requiredExtensions)
        {
            Context = Tao.Cg.Cg.cgCreateContext();

            Tao.Cg.Cg.cgSetErrorCallback(errorCallback);

            CgGl.cgGLRegisterStates(Context);
            CgGl.cgGLSetManageTextureParameters(Context, true);
            VertexProfile   = CgGl.cgGLGetLatestProfile(CgGl.CG_GL_VERTEX);
            FragmentProfile = CgGl.cgGLGetLatestProfile(CgGl.CG_GL_FRAGMENT);
        }