Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
AlphaNode.cpp
#include "AlphaNode.h"
void AlphaNode::setOpacity(GLubyte opac) {
mOpacity = opac;
if (_bufferCount) {
for (int i = 0; i < _bufferCount; i++) {
_buffer[i].colors.a = mOpacity;
}
}
if (_bufferCountGLPoint) {
for (int i = 0; i < _bufferCountGLPoint; i++) {
_bufferGLPoint[i].colors.a = mOpacity;
}
}
if (_bufferCountGLLine) {
for (int i = 0; i < _bufferCountGLLine; i++) {
_bufferGLLine[i].colors.a = mOpacity;
}
_dirtyGLLine = true;
}
_dirty = true;
}
bool AlphaNode::init() {
if (!DrawNode::init()) {
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment