本文整理汇总了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 );
}
示例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 );
}
示例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>();
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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";
}
示例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;
}
示例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 );
}
}
示例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;
}
示例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 );
}
示例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;
}
示例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 )
{
}
示例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" );
}