Gradient
This commit is contained in:
@ -216,6 +216,16 @@ public class ObjectGl {
|
||||
this.vertexArray = new VertexArray(Primitive.createRectangle(this.zPos, this.width, this.height), Primitive.rectangle_indices, colorBuffer, Primitive.stdTexWrap);
|
||||
}
|
||||
|
||||
public void setColorVerticalGradient(Vector3f color1, Vector3f color2){
|
||||
float[] colorBuffer = new float[] {
|
||||
color1.x, color1.y, color1.z,
|
||||
color1.x, color1.y, color1.z,
|
||||
color2.x, color2.y, color2.z,
|
||||
color2.x, color2.y, color2.z
|
||||
};
|
||||
this.vertexArray = new VertexArray(Primitive.createRectangle(this.zPos, this.width, this.height), Primitive.rectangle_indices, colorBuffer, Primitive.stdTexWrap);
|
||||
}
|
||||
|
||||
public void setTextureWrap(float[] texture){
|
||||
this.textureWrap = texture;
|
||||
this.vertexArray.swapTextureBufferObject(texture);
|
||||
|
Reference in New Issue
Block a user