MakeSolidColorTextureRGB function

Texture MakeSolidColorTextureRGB(
  1. ChronosGL cgl,
  2. String url,
  3. Vector3 rgb
)

Implementation

Texture MakeSolidColorTextureRGB(ChronosGL cgl, String url, VM.Vector3 rgb) {
  int r = (255.0 * rgb.r).round();
  int g = (255.0 * rgb.g).round();
  int b = (255.0 * rgb.b).round();
  return ImageTexture(cgl, url, MakeSolidColorCanvas("rgb($r, $g, $b)"));
}