Пример #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;
 }