mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
add alpha color support to billboard overlay
This commit is contained in:
parent
b2e725c964
commit
5bcbfe96b8
1 changed files with 4 additions and 1 deletions
|
@ -73,7 +73,10 @@ void BillboardOverlay::render() {
|
|||
float x = _fromImage.width() / (2.0f * maxSize);
|
||||
float y = -_fromImage.height() / (2.0f * maxSize);
|
||||
|
||||
glColor3f(1.0f, 1.0f, 1.0f);
|
||||
const float MAX_COLOR = 255;
|
||||
xColor color = getColor();
|
||||
float alpha = getAlpha();
|
||||
glColor4f(color.red / MAX_COLOR, color.green / MAX_COLOR, color.blue / MAX_COLOR, alpha);
|
||||
glBegin(GL_QUADS); {
|
||||
glTexCoord2f((float)_fromImage.x() / (float)_size.width(),
|
||||
(float)_fromImage.y() / (float)_size.height());
|
||||
|
|
Loading…
Reference in a new issue