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); } }
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); }
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); } }
public void LoadTexture(Bitmap texture) { Texture = new Texture(texture); }
public Effect(Coords start, Texture texture, int howLong) { position = start; maxTime=howLong; }