Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
PrimitivesRenderer3D.cs
浏览该文件的文档.
1using Engine.Media;
2
3namespace Engine.Graphics {
4 public class PrimitivesRenderer3D : BasePrimitivesRenderer<FlatBatch3D, TexturedBatch3D, FontBatch3D> {
5 public FlatBatch3D FlatBatch(int layer = 0,
6 DepthStencilState depthStencilState = null,
7 RasterizerState rasterizerState = null,
8 BlendState blendState = null) {
9 depthStencilState = depthStencilState ?? DepthStencilState.Default;
10 rasterizerState = rasterizerState ?? RasterizerState.CullNoneScissor;
11 blendState = blendState ?? BlendState.AlphaBlend;
12 return FindFlatBatch(layer, depthStencilState, rasterizerState, blendState);
13 }
14
16 bool useAlphaTest = false,
17 int layer = 0,
18 DepthStencilState depthStencilState = null,
19 RasterizerState rasterizerState = null,
20 BlendState blendState = null,
21 SamplerState samplerState = null) {
22 depthStencilState = depthStencilState ?? DepthStencilState.Default;
23 rasterizerState = rasterizerState ?? RasterizerState.CullNoneScissor;
24 blendState = blendState ?? BlendState.AlphaBlend;
25 samplerState = samplerState ?? SamplerState.LinearClamp;
26 return FindTexturedBatch(
27 texture,
28 useAlphaTest,
29 layer,
30 depthStencilState,
31 rasterizerState,
32 blendState,
33 samplerState
34 );
35 }
36
38 int layer = 0,
39 DepthStencilState depthStencilState = null,
40 RasterizerState rasterizerState = null,
41 BlendState blendState = null,
42 SamplerState samplerState = null) {
43 depthStencilState = depthStencilState ?? DepthStencilState.Default;
44 rasterizerState = rasterizerState ?? RasterizerState.CullNoneScissor;
45 blendState = blendState ?? BlendState.AlphaBlend;
46 samplerState = samplerState ?? SamplerState.LinearClamp;
47 return FindFontBatch(font, layer, depthStencilState, rasterizerState, blendState, samplerState);
48 }
49 }
50}
T1 FindFlatBatch(int layer, DepthStencilState depthStencilState, RasterizerState rasterizerState, BlendState blendState)
T3 FindFontBatch(BitmapFont font, int layer, DepthStencilState depthStencilState, RasterizerState rasterizerState, BlendState blendState, SamplerState samplerState)
T2 FindTexturedBatch(Texture2D texture, bool useAlphaTest, int layer, DepthStencilState depthStencilState, RasterizerState rasterizerState, BlendState blendState, SamplerState samplerState)
static readonly BlendState AlphaBlend
static readonly DepthStencilState Default
FlatBatch3D FlatBatch(int layer=0, DepthStencilState depthStencilState=null, RasterizerState rasterizerState=null, BlendState blendState=null)
TexturedBatch3D TexturedBatch(Texture2D texture, bool useAlphaTest=false, int layer=0, DepthStencilState depthStencilState=null, RasterizerState rasterizerState=null, BlendState blendState=null, SamplerState samplerState=null)
FontBatch3D FontBatch(BitmapFont font, int layer=0, DepthStencilState depthStencilState=null, RasterizerState rasterizerState=null, BlendState blendState=null, SamplerState samplerState=null)
static readonly RasterizerState CullNoneScissor