| 1138 | } |
| 1139 | |
| 1140 | void RendererGL::FillRect( const v2 & xy0, const v2 & xy1, u32 color ) |
| 1141 | { |
| 1142 | PrepareRenderState(mScreenToDevice.mRaw, gRDPOtherMode.depth_source ? false : true); |
| 1143 | |
| 1144 | v2 screen0; |
| 1145 | v2 screen1; |
| 1146 | ConvertN64ToScreen( xy0, screen0 ); |
| 1147 | ConvertN64ToScreen( xy1, screen1 ); |
| 1148 | |
| 1149 | DL_PF( " Screen: %.1f,%.1f -> %.1f,%.1f", screen0.x, screen0.y, screen1.x, screen1.y ); |
| 1150 | |
| 1151 | const f32 depth = gRDPOtherMode.depth_source ? mPrimDepth : 0.0f; |
| 1152 | |
| 1153 | float positions[] = { |
| 1154 | screen0.x, screen0.y, depth, |
| 1155 | screen1.x, screen0.y, depth, |
| 1156 | screen0.x, screen1.y, depth, |
| 1157 | screen1.x, screen1.y, depth, |
| 1158 | }; |
| 1159 | |
| 1160 | // NB - these aren't needed. Could just pass NULL to RenderDaedalusVtxStreams? |
| 1161 | TexCoord uvs[] = { |
| 1162 | TexCoord( 0.f, 0.f ), |
| 1163 | TexCoord( 1.f, 0.f ), |
| 1164 | TexCoord( 0.f, 1.f ), |
| 1165 | TexCoord( 1.f, 1.f ), |
| 1166 | }; |
| 1167 | |
| 1168 | u32 colours[] = { |
| 1169 | color, |
| 1170 | color, |
| 1171 | color, |
| 1172 | color, |
| 1173 | }; |
| 1174 | |
| 1175 | RenderDaedalusVtxStreams(GL_TRIANGLE_STRIP, positions, uvs, colours, 4); |
| 1176 | |
| 1177 | #ifdef DAEDALUS_DEBUG_DISPLAYLIST |
| 1178 | ++mNumRect; |
| 1179 | #endif |
| 1180 | } |
| 1181 | |
| 1182 | void RendererGL::Draw2DTexture(f32 x0, f32 y0, f32 x1, f32 y1, |
| 1183 | f32 u0, f32 v0, f32 u1, f32 v1, |
no test coverage detected