C# 클래스 Axiom.Graphics.GpuProgramUsage

This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit.
Using a vertex or fragment program can get fairly complex; besides the fairly rudimentary process of binding a program to the GPU for rendering, managing usage has few complications, such as:
  • Programs can be high level (e.g. Cg, GLSlang) or low level (assembler). Using either should be relatively seamless, although high-level programs give you the advantage of being able to use named parameters, instead of just indexed registers
  • Programs and parameters can be shared between multiple usages, in order to save memory
  • When you define a user of a program, such as a material, you often want to be able to set up the definition but not load / compile / assemble the program at that stage, because it is not needed just yet. The program should be loaded when it is first needed, or earlier if specifically requested. The program may not be defined at this time, you may want to have scripts that can set up the definitions independent of the order in which those scripts are loaded.
This class packages up those details so you don't have to worry about them. For example, this class lets you define a high-level program and set up the parameters for it, without having loaded the program (which you normally could not do). When the program is loaded and compiled, this class will then validate the parameters you supplied earlier and turn them into runtime parameters.

Just incase it wasn't clear from the above, this class provides linkage to both GpuProgram and HighLevelGpuProgram, despite its name.

상속: DisposableObject, Resource.IListener
파일 보기 프로젝트 열기: mono-soc-2011/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
parameters GpuProgramParameters
program Axiom.Graphics.GpuProgram
type GpuProgramType

공개 메소드들

메소드 설명
Clone ( ) : GpuProgramUsage

Creates and returns a copy of this GpuProgramUsage object.

GpuProgramUsage ( GpuProgramType type ) : System

Default constructor.

비공개 메소드들

메소드 설명
Load ( ) : void

Load this usage (and ensure program is loaded).

Unload ( ) : void

Unload this usage.

메소드 상세

Clone() 공개 메소드

Creates and returns a copy of this GpuProgramUsage object.
public Clone ( ) : GpuProgramUsage
리턴 GpuProgramUsage

GpuProgramUsage() 공개 메소드

Default constructor.
public GpuProgramUsage ( GpuProgramType type ) : System
type GpuProgramType Type of program to link to.
리턴 System

프로퍼티 상세

parameters 보호되어 있는 프로퍼티

Low level GPU program parameters.
protected GpuProgramParameters,Axiom.Graphics parameters
리턴 GpuProgramParameters

program 보호되어 있는 프로퍼티

Reference to the program whose usage is being specified within this class.
protected GpuProgram,Axiom.Graphics program
리턴 Axiom.Graphics.GpuProgram

type 보호되어 있는 프로퍼티

Type of program (vertex or fragment) this usage is being specified for.
protected GpuProgramType type
리턴 GpuProgramType