示例#1
0
 protected void RenderString(string value)
 {
     if (SharedResources.StringTextureCache.ContainsKey (value)) {
         StringTexture  = SharedResources.StringTextureCache[value];
     } else {
         StringTexture = new Texture (SharedResources.InGameFont, value, TextBrush, (int)Width, (int)Height);
         SharedResources.StringTextureCache.Add(value, StringTexture);
     }
 }
示例#2
0
        protected void DrawTexture(Texture outputTex)
        {
            GL.Enable(EnableCap.Texture2D);
            GL.BindTexture(TextureTarget.Texture2D, outputTex.glId);

            GL.Begin(BeginMode.Quads);
                GL.TexCoord2(0f,0f);
                GL.Vertex3(X,Y,Z);
            GL.TexCoord2(1f,0f);
                GL.Vertex3(X+Width,Y,Z);
                GL.TexCoord2(1f,1f);
                GL.Vertex3(X+Width,Y+Height,Z);
                GL.TexCoord2(0f,1f);
                GL.Vertex3(X,Y+Height,Z);
            GL.End();
            GL.Disable (EnableCap.Texture2D);
        }
示例#3
0
 public void LoadTexture(String TextureFileName)
 {
     if (SharedResources.TextureCache.ContainsKey (TextureFileName)) {
         Texture = SharedResources.TextureCache [TextureFileName];
     } else {
         Texture = new BeatDown.Renderer.Resources.Texture(Render.Instance.settings.TextureDirectory+ TextureFileName);
         SharedResources.TextureCache.Add(TextureFileName, Texture);
     }
 }
示例#4
0
 public void LoadTexture(Bitmap texture)
 {
     Texture = new Texture(texture);
 }
示例#5
0
 public Effect(Coords start,  Texture texture, int howLong)
 {
     position = start;
     maxTime=howLong;
 }