public void Draw(IndexBuffer indexbuffer, IAttributeBuffer vertexbuffer, IAttributeBuffer texturebuffer, float darkness, Texture2D texture, int count, int offset, bool alphablending = true) { Apply(texture.ID, indexbuffer, vertexbuffer, texturebuffer, alphablending); brightnessHandle.Set(darkness); GL.DrawElements(BeginMode.Triangles, count, DrawElementsType.UnsignedShort, new IntPtr(offset)); }
protected void Apply(int texture, IndexBuffer indexbuffer, IAttributeBuffer vertexbuffer, IAttributeBuffer texturebuffer, bool alphaBlending) { Apply(vertexbuffer, alphaBlending); texturebuffer.Bind(textureCoordsHandle); textureHandle.Set(texture); indexbuffer.Bind( ); }
public BufferBatch(IndexBuffer indexbuffer, IAttributeBuffer vertexbuffer, IAttributeBuffer colorbuffer, IAttributeBuffer texturebuffer) { IndexBuffer = indexbuffer; VertexBuffer = vertexbuffer; ColorBuffer = colorbuffer; TextureBuffer = texturebuffer; }
public void Draw(IndexBuffer indexbuffer, IAttributeBuffer vertexbuffer, IAttributeBuffer texturebuffer, Texture2D texture, Matrix matrix, int count, bool alphablending = true) { Apply(texture.ID, indexbuffer, vertexbuffer, texturebuffer, alphablending); mvpMatrixHandle.Set(matrix.MVP); GL.DrawElements(BeginMode.Triangles, count, DrawElementsType.UnsignedShort, IntPtr.Zero); }
protected void Apply(IAttributeBuffer vertexbuffer, bool alphaBlending) { if (alphaBlending) { EnableAlphaBlending( ); } vertexbuffer.Bind(positionHandle); }
public void Draw(IAttributeBuffer vertexBuffer, Color color, Matrix matrix, float width, int count, bool alphaBlending = true) { Apply(vertexBuffer, alphaBlending); colorHandle.Set(color.ToArray()); mvpmatrixHandle.Set(matrix.MVP); GL.LineWidth(width); GL.DrawArrays(BeginMode.LineStrip, 0, count); }
public void Draw(IAttributeBuffer vertexbuffer, IAttributeBuffer sizebuffer, IAttributeBuffer colorbuffer, int count, bool alphablending = true) { Apply(vertexbuffer, alphablending); sizebuffer.Bind(sizeHandle); colorbuffer.Bind(colorHandle); // matrixHandle.Set(Emitter.Matrix.MVP); GL.DrawArrays(BeginMode.Points, 0, count); }
public void Draw(IndexBuffer indexbuffer, IAttributeBuffer vertexbuffer, IAttributeBuffer texturebuffer, IAttributeBuffer colorbuffer, Texture2D texture, Matrix matrix, int count, int offset, bool alphablending = true) { Debug.CheckGL(this); Apply(texture.ID, indexbuffer, vertexbuffer, texturebuffer, alphablending); Debug.CheckGL(this); colorbuffer.Bind(colorHandle); Debug.CheckGL(this); mvpMatrixHandle.Set(matrix.MVP); Debug.CheckGL(this); GL.DrawElements(BeginMode.Triangles, count, DrawElementsType.UnsignedShort, new IntPtr(offset)); Debug.CheckGL(this); }
public void Draw(IndexBuffer indexBuffer, IAttributeBuffer vertexBuffer, IAttributeBuffer baseTextureBuffer, IAttributeBuffer ampTextureBuffer, Texture2D baseTexture, Texture2D ampTexture, Matrix matrix, int count, int offset, bool alphaBlending = true) { indexBuffer.Bind( ); Apply(vertexBuffer, alphaBlending); baseTextureHandle.Set(baseTexture.ID, 0); ampTextureHandle.Set(ampTexture.ID, 1); baseTextureBuffer.Bind(baseTextureCoordsHandle); ampTextureBuffer.Bind(ampTextureCoordsHandle); mvpMatrixHandle.Set(matrix.MVP); GL.DrawElements(BeginMode.Triangles, count, DrawElementsType.UnsignedShort, new IntPtr(offset)); }
public BufferBatch(IAttributeBuffer vertexbuffer, IAttributeBuffer sizebuffer, IAttributeBuffer colorbuffer) { VertexBuffer = vertexbuffer; SizeBuffer = sizebuffer; ColorBuffer = colorbuffer; }