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 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)); }