protected virtual void RenderNoBindRectangle(Rect2d rect, OGLTexture texture, double distance, double transparency) { Rect2d coords = texture.GetCoordinates(); if (transparency < 1.0) { GL.Color4(1.0, 1.0, 1.0, transparency); } //########## GL.Begin(BeginMode.Quads); //########## GL.TexCoord2(coords.bl); GL.Vertex3(rect.tl.X, rect.tl.Y, distance); GL.TexCoord2(coords.tl); GL.Vertex3(rect.bl.X, rect.bl.Y, distance); GL.TexCoord2(coords.tr); GL.Vertex3(rect.br.X, rect.br.Y, distance); GL.TexCoord2(coords.br); GL.Vertex3(rect.tr.X, rect.tr.Y, distance); //########## GL.End(); //########## if (transparency < 1.0) { GL.Color4(1.0, 1.0, 1.0, 1.0); } }
public FragmentParticle(OGLTexture baseTex, int entw, int enth, int texX, int texY, int fullW, int fullH) : base() { Rect2d coords = baseTex.GetCoordinates(); double w = coords.Width / (fullW * 1.0); double h = coords.Height / (fullH * 1.0); double x = coords.bl.X + w * texX; double y = coords.tl.Y - h * texY - h; width = entw / (fullW * 1.0); height = enth / (fullH * 1.0); texture = new OGLTextureFragment(baseTex.GetID(), x, y, w, h).GetTextureWrapper(); }