January 15, 2021, 05:46:59 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Graphics
»
[bmx] Multi-Colored Line by USNavyFish [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bmx] Multi-Colored Line by USNavyFish [ 1+ years ago ] (Read 405 times)
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
Function
DrawMultiColorLines
(
x0:
Float
, y0:
Float
, x1:
Float
, y1:
Float
, rgb0:
Byte
[
]
, rgb1:
Byte
[
]
)
glDisable GL_TEXTURE_2D
glBegin GL_LINES
glColor3ub
(
rgb0
[
0
]
, rgb0
[
1
]
, rgb0
[
2
]
)
glVertex2f
(
x0,y0
)
glColor3ub
(
rgb1
[
0
]
, rgb1
[
1
]
, rgb1
[
2
]
)
glVertex2f
(
x1 , y1
)
glEnd
glEnable GL_TEXTURE_2D
glColor3ub
(
255
,
255
,
255
)
End
Function
Comments :
none...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Graphics
»
[bmx] Multi-Colored Line by USNavyFish [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal