January 15, 2021, 05:46:59 PM

Author Topic: [bmx] Multi-Colored Line by USNavyFish [ 1+ years ago ]  (Read 405 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bmx] Multi-Colored Line by USNavyFish [ 1+ years ago ]
« on: June 29, 2017, 12:28:39 AM »
Title : Multi-Colored Line
Author : USNavyFish
Posted : 1+ years ago

Description : This function uses OpenGL to draw a line that fades from one color to another.

Code :
Code: BlitzMax
  1. Function DrawMultiColorLines(x0:Float , y0:Float , x1:Float , y1:Float , rgb0:Byte[] , rgb1:Byte[])
  2.         glDisable GL_TEXTURE_2D
  3.         glBegin GL_LINES
  4.         glColor3ub(rgb0[0] , rgb0[1] , rgb0[2])
  5.         glVertex2f(x0,y0)
  6.         glColor3ub(rgb1[0] , rgb1[1] , rgb1[2])
  7.         glVertex2f(x1 , y1)            
  8.         glEnd
  9.         glEnable GL_TEXTURE_2D
  10.         glColor3ub(255,255,255)
  11. End Function


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal