MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / render

Method render

src/components/ImageComponent.cpp:121–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void 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
149void ImageComponent::buildImageArray(int posX, int posY, GLfloat* points, GLfloat* texs, float px, float py)
150{

Callers

nothing calls this directly

Calls 2

setMatrixFunction · 0.85
buildGLColorArrayFunction · 0.85

Tested by

no test coverage detected