| 119 | } |
| 120 | |
| 121 | void ImageComponent::render(const Eigen::Affine3f& parentTrans) |
| 122 | { |
| 123 | Eigen::Affine3f trans = parentTrans * getTransform(); |
| 124 | Renderer::setMatrix(trans); |
| 125 | |
| 126 | if(mTexture && getOpacity() > 0) |
| 127 | { |
| 128 | GLfloat points[12], texs[12]; |
| 129 | GLubyte colors[6*4]; |
| 130 | |
| 131 | if(mTiled) |
| 132 | { |
| 133 | float xCount = mSize.x() / getTextureSize().x(); |
| 134 | float yCount = mSize.y() / getTextureSize().y(); |
| 135 | |
| 136 | Renderer::buildGLColorArray(colors, (mColorShift >> 8 << 8)| (getOpacity()), 6); |
| 137 | buildImageArray(0, 0, points, texs, xCount, yCount); |
| 138 | }else{ |
| 139 | Renderer::buildGLColorArray(colors, (mColorShift >> 8 << 8) | (getOpacity()), 6); |
| 140 | buildImageArray(0, 0, points, texs); |
| 141 | } |
| 142 | |
| 143 | drawImageArray(points, texs, colors, 6); |
| 144 | } |
| 145 | |
| 146 | GuiComponent::renderChildren(trans); |
| 147 | } |
| 148 | |
| 149 | void ImageComponent::buildImageArray(int posX, int posY, GLfloat* points, GLfloat* texs, float px, float py) |
| 150 | { |
nothing calls this directly
no test coverage detected