C# 클래스 Sparrow.Core.BaseEffect

BaseEffect simplifies the rendering of colored and/or textured polygons. Configure a base effect by updating its state properties. When you call 'prepareToDraw', it will choose the optimal shader program for the given settings and will activate that program. Alpha and matrix uniforms will be passed to the program automatically, and the texture will be bound.
파일 보기 프로젝트 열기: fmotagarcia/sparrow-sharp 1 사용 예제들

공개 메소드들

메소드 설명
PrepareToDraw ( Matrix mvpMatrix, bool premultipliedAlpha, float alpha, bool useTinting, Texture texture = null ) : void

Activates the optimal shader program for the current settings; alpha and matrix uniforms are passed to the program right away, and the texture (if available) is bound. Parameters: mvpMatrix: The modelview-projection matrix used for rendering. Any vertex will be multiplied with this matrix. premultipliedAlpha: Indicates if the color values of texture and vertices use premultiplied alpha. alpha: The alpha value with which every vertex color will be multiplied. useTinting: Set to true if you dont use textures or want to use alpha. texture: The texture that's projected onto the quad, or 'null' if there is none.

비공개 메소드들

메소드 설명
FragmentShaderString ( bool hasTexture, bool useTinting ) : string
VertexShaderString ( bool hasTexture, bool useTinting ) : string

메소드 상세

PrepareToDraw() 공개 메소드

Activates the optimal shader program for the current settings; alpha and matrix uniforms are passed to the program right away, and the texture (if available) is bound. Parameters: mvpMatrix: The modelview-projection matrix used for rendering. Any vertex will be multiplied with this matrix. premultipliedAlpha: Indicates if the color values of texture and vertices use premultiplied alpha. alpha: The alpha value with which every vertex color will be multiplied. useTinting: Set to true if you dont use textures or want to use alpha. texture: The texture that's projected onto the quad, or 'null' if there is none.
public PrepareToDraw ( Matrix mvpMatrix, bool premultipliedAlpha, float alpha, bool useTinting, Texture texture = null ) : void
mvpMatrix Matrix
premultipliedAlpha bool
alpha float
useTinting bool
texture Sparrow.Textures.Texture
리턴 void