C# Класс Axiom.CgPrograms.CgProgram

Specialization of HighLevelGpuProgram to provide support for nVidia's Cg language.
Cg can be used to compile common, high-level, C-like code down to assembler language for both GL and Direct3D, for multiple graphics cards. You must supply a list of profiles which your program must support using SetProfiles() before the program is loaded in order for this to work. The program will then negotiate with the renderer to compile the appropriate program for the API and graphics card capabilities.
Наследование: Axiom.Graphics.HighLevelGpuProgram
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
cgContext System.IntPtr
cgProgram System.IntPtr
entry string
profiles string[]
selectedCgProfile int
selectedProfile string

Открытые методы

Метод Описание
CgProgram ( ResourceManager parent, string name, ulong handle, string group, bool isManual, IManualResourceLoader loader, IntPtr context ) : System

Constructor.

SetParam ( string name, string val ) : bool

Method for passing parameters into the CgProgram.

Touch ( ) : void

Only bother with supported programs.

Защищенные методы

Метод Описание
BuildConstantDefinitions ( ) : void
CreateLowLevelImpl ( ) : void

Create as assembler program from the compiled source supplied by the Cg compiler.

LoadFromSource ( ) : void

PopulateParameterNames ( GpuProgramParameters parms ) : void

SelectProfile ( ) : void

Internal method which works out which profile to use for this program

UnloadImpl ( ) : void

Unloads the Cg program.

Описание методов

BuildConstantDefinitions() защищенный метод

protected BuildConstantDefinitions ( ) : void
Результат void

CgProgram() публичный метод

Constructor.
public CgProgram ( ResourceManager parent, string name, ulong handle, string group, bool isManual, IManualResourceLoader loader, IntPtr context ) : System
parent Axiom.Core.ResourceManager
name string Name of this program.
handle ulong
group string
isManual bool
loader IManualResourceLoader
context System.IntPtr CG context id.
Результат System

CreateLowLevelImpl() защищенный метод

Create as assembler program from the compiled source supplied by the Cg compiler.
protected CreateLowLevelImpl ( ) : void
Результат void

LoadFromSource() защищенный метод

protected LoadFromSource ( ) : void
Результат void

PopulateParameterNames() защищенный метод

protected PopulateParameterNames ( GpuProgramParameters parms ) : void
parms Axiom.Graphics.GpuProgramParameters
Результат void

SelectProfile() защищенный метод

Internal method which works out which profile to use for this program
protected SelectProfile ( ) : void
Результат void

SetParam() публичный метод

Method for passing parameters into the CgProgram.
public SetParam ( string name, string val ) : bool
name string /// Param name. ///
val string /// Param value. ///
Результат bool

Touch() публичный метод

Only bother with supported programs.
public Touch ( ) : void
Результат void

UnloadImpl() защищенный метод

Unloads the Cg program.
protected UnloadImpl ( ) : void
Результат void

Описание свойств

cgContext защищенное свойство

Current Cg context id.
protected IntPtr,System cgContext
Результат System.IntPtr

cgProgram защищенное свойство

Current Cg program id.
protected IntPtr,System cgProgram
Результат System.IntPtr

entry защищенное свойство

Entry point of the Cg program.
protected string entry
Результат string

profiles защищенное свойство

List of requested profiles for this program.
protected string[] profiles
Результат string[]

selectedCgProfile защищенное свойство

protected int selectedCgProfile
Результат int

selectedProfile защищенное свойство

Chosen profile for this program.
protected string selectedProfile
Результат string