当前位置: 首页>>代码示例>>C#>>正文


C# IManualResourceLoader类代码示例

本文整理汇总了C#中IManualResourceLoader的典型用法代码示例。如果您正苦于以下问题:C# IManualResourceLoader类的具体用法?C# IManualResourceLoader怎么用?C# IManualResourceLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IManualResourceLoader类属于命名空间,在下文中一共展示了IManualResourceLoader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ARBGpuProgram

		public ARBGpuProgram( ResourceManager parent, string name, ResourceHandle handle, string group, bool isManual,
		                      IManualResourceLoader loader )
			: base( parent, name, handle, group, isManual, loader )
		{
			// generate a new program
			Gl.glGenProgramsARB( 1, out programId );
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:7,代码来源:ARBGpuProgram.cs

示例2: _create

		/// <summary>
		///    Create the specified type of GpuProgram.
		/// </summary>
		/// <param name="name"></param>
		/// <param name="type"></param>
		/// <returns></returns>
		protected override Resource _create( string name, ulong handle, string group, bool isManual,
		                                     IManualResourceLoader loader, NameValuePairList createParams )
		{
			if ( createParams == null ||
			     ( createParams.ContainsKey( "syntax" ) == false || createParams.ContainsKey( "type" ) == false ) )
			{
				throw new Exception( "You must supply 'syntax' and 'type' parameters" );
			}

			string syntaxCode = createParams[ "syntax" ];
			string type = createParams[ "type" ];

			// if there is none, this syntax code must not be supported
			// just return the base GL program since it won't be doing anything anyway
			if ( this.factories[ syntaxCode ] == null )
			{
				return new GLGpuProgram( this, name, handle, group, isManual, loader );
			}

			GpuProgramType gpt;
			if ( type == "vertex_program" )
			{
				gpt = GpuProgramType.Vertex;
			}
			else
			{
				gpt = GpuProgramType.Fragment;
			}

			return ( (IOpenGLGpuProgramFactory)this.factories[ syntaxCode ] ).Create( this, name, handle, group, isManual, loader,
			                                                                          gpt,
			                                                                          syntaxCode );
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:39,代码来源:GLGpuProgramManager.cs

示例3: GLES2Texture

		private List<Image> loadedImages; //Used to hold images between calls to prepare and load.

		public GLES2Texture( ResourceManager creator, string name, ulong handle, string group, bool isManual, IManualResourceLoader loader, GLES2Support support )
			: base( creator, name, handle, group, isManual, loader )
		{
			this.textureID = 0;
			this.glSupport = support;
			this.surfaceList = new List<HardwarePixelBuffer>();
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:9,代码来源:GLES2Texture.cs

示例4: ATIFragmentShaderGpuProgram

		public ATIFragmentShaderGpuProgram( ResourceManager parent, string name, ResourceHandle handle, string group, bool isManual, IManualResourceLoader loader )
			: base( parent, name, handle, group, isManual, loader )
		{
            throw new AxiomException("This needs upgrading");
			programType = Gl.GL_FRAGMENT_SHADER_ATI;
			programId = Gl.glGenFragmentShadersATI( 1 );
		}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:7,代码来源:ATIFragmentShaderGpuProgram.cs

示例5: ATIFragmentShaderGpuProgram

		public ATIFragmentShaderGpuProgram( ResourceManager parent, string name, ResourceHandle handle, string group, bool isManual, IManualResourceLoader loader )
			: base( parent, name, handle, group, isManual, loader )
		{

			programType = Gl.GL_FRAGMENT_SHADER_ATI;
			programId = Gl.glGenFragmentShadersATI( 1 );
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:7,代码来源:ATIFragmentShaderGpuProgram.cs

示例6: D3DTextureManager

        /*
		public D3DTextureManager(D3D.Direct3D manager, D3D.Device device)
		{
           
		}
         */
         

		protected override Resource _create( string name, ulong handle, string group, bool isManual, IManualResourceLoader loader, NameValuePairList createParams )
		{
            // temporary hack
            manager = D3DRenderSystem.Direct3D9;
            device = D3DRenderSystem.ActiveD3D9Device;
			return new D3DTexture( this, name, handle, group, isManual, loader, this.device, this.manager );
		}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:15,代码来源:D3DTextureManager.cs

示例7: NvparseFragmentProgram

		public NvparseFragmentProgram( ResourceManager parent, string name, ResourceHandle handle, string group, bool isManual, IManualResourceLoader loader )
			: base( parent, name, handle, group, isManual, loader )
		{

			// create a display list
			programId = Gl.glGenLists( 1 );
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:7,代码来源:NvparseFragmentProgram.cs

示例8: GLSLESCgProgram

		public GLSLESCgProgram( ResourceManager creator, string name, ulong handle, string group, bool isManual, IManualResourceLoader loader )
			: base( creator, name, handle, group, isManual, loader )
		{
			/*Port notes
			 * Ogre does something odd with a dictionary here, it looks like it has to do with Material serialization 
			 */

			syntaxCode = "cg";
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:9,代码来源:GLSLESCgProgram.cs

示例9: NV3xGpuProgram

		public NV3xGpuProgram( ResourceManager parent, string name, ResourceHandle handle, string group, bool isManual, IManualResourceLoader loader )
			: base( parent, name, handle, group, isManual, loader )
		{

			// generate the program and store the unique name
			Gl.glGenProgramsNV( 1, out programId );

			// find the GL enum for the type of program this is
			programType = ( Type == GpuProgramType.Vertex ) ? Gl.GL_VERTEX_PROGRAM_NV : Gl.GL_FRAGMENT_PROGRAM_NV;
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:10,代码来源:NV3xGpuProgram.cs

示例10: _create

		protected override Resource _create( string name, ResourceHandle handle, string group, bool isManual, IManualResourceLoader loader, GpuProgramType type, string syntaxCode )
		{
			if ( type == GpuProgramType.Vertex )
			{
				return new D3DVertexProgram( this, name, handle, group, isManual, loader, device );
			}
			else
			{
				return new D3DFragmentProgram( this, name, handle, group, isManual, loader, device );
			}
		}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:11,代码来源:D3DGpuProgramManager.cs

示例11: HLSLProgram

        public HLSLProgram( ResourceManager parent, string name, ResourceHandle handle, string group, bool isManual,
                            IManualResourceLoader loader )
            : base( parent, name, handle, group, isManual, loader )
        {
            //var device = ( (XnaRenderWindow)Root.Instance.AutoWindow ).Driver.XnaDevice;
            //switch(type)
            //{
            //    case GpuProgramType.Fragment:
            //        assemblerProgram = new XnaFragmentProgram(parent, name, handle, group, isManual, loader, device);
            //        break;
            //    case GpuProgramType.Vertex:
            //        assemblerProgram = new XnaVertexProgram( parent, name, handle, group, isManual, loader, device );
            //        break;
            //    case GpuProgramType.Geometry:
            //        break;
            //}

            preprocessorDefines = string.Empty;
        }
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:19,代码来源:HLSLProgram.cs

示例12: _create

		protected override Resource _create( string name, ulong handle, string group, bool isManual, IManualResourceLoader loader, Collections.NameValuePairList createParams )
		{
			string paramSyntax = string.Empty;
			string paramType = string.Empty;

			if ( createParams == null || createParams.ContainsKey( "syntax" ) == false || createParams.ContainsKey( "type" ) == false )
			{
				throw new AxiomException( "You must supply 'syntax' and 'type' parameters" );
			}
			else
			{
				paramSyntax = createParams[ "syntax" ];
				paramType = createParams[ "type" ];
			}
			CreateGpuProgramDelegate iter = null;
			if ( this._programMap.ContainsKey( paramSyntax ) )
			{
				iter = this._programMap[ paramSyntax ];
			}
			else
			{
				// No factory, this is an unsupported syntax code, probably for another rendersystem
				// Create a basic one, it doesn't matter what it is since it won't be used
				return new GLES2GpuProgram( this, name, handle, group, isManual, loader );
			}
			GpuProgramType gpt;
			if ( paramType == "vertex_program" )
			{
				gpt = GpuProgramType.Vertex;
			}
			else
			{
				gpt = GpuProgramType.Fragment;
			}

			return iter( this, name, handle, group, isManual, loader, gpt, paramSyntax );
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:37,代码来源:GLES2GpuProgramManager.cs

示例13: D3D9HLSLProgram

		public D3D9HLSLProgram( ResourceManager parent, string name, ResourceHandle handle, string group, bool isManual,
		                        IManualResourceLoader loader )
			: base( parent, name, handle, group, isManual, loader )
		{
			UseColumnMajorMatrices = true;
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:6,代码来源:HLSLProgram.cs

示例14: XnaFragmentProgram

        internal XnaFragmentProgram( ResourceManager parent, string name, ResourceHandle handle, string group, bool isManual, IManualResourceLoader loader, XFG.GraphicsDevice device )
			: base( parent, name, handle, group, isManual, loader, device )
		{
		}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:4,代码来源:XnaGpuProgram.cs

示例15: _create

		protected override Resource _create( string name, ulong handle, string group, bool isManual,
		                                     IManualResourceLoader loader, NameValuePairList createParams )
		{
			throw new NotImplementedException( "Base class needs update to 1.7.2790" );
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:5,代码来源:D3D9ResourceManager.cs


注:本文中的IManualResourceLoader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。