| 1090 | } |
| 1091 | |
| 1092 | void RendererGL::TexRectFlip( u32 tile_idx, const v2 & xy0, const v2 & xy1, TexCoord st0, TexCoord st1 ) |
| 1093 | { |
| 1094 | UpdateTileSnapshots( tile_idx ); |
| 1095 | |
| 1096 | // NB: we have to do this after UpdateTileSnapshot, as it set up mTileTopLeft etc. |
| 1097 | // We have to do it before PrepareRenderState, because those values are applied to the graphics state. |
| 1098 | PrepareTexRectUVs(&st0, &st1); |
| 1099 | |
| 1100 | PrepareRenderState(mScreenToDevice.mRaw, gRDPOtherMode.depth_source ? false : true); |
| 1101 | |
| 1102 | v2 screen0; |
| 1103 | v2 screen1; |
| 1104 | ConvertN64ToScreen( xy0, screen0 ); |
| 1105 | ConvertN64ToScreen( xy1, screen1 ); |
| 1106 | |
| 1107 | DL_PF( " Screen: %.1f,%.1f -> %.1f,%.1f", screen0.x, screen0.y, screen1.x, screen1.y ); |
| 1108 | DL_PF( " Texture: %.1f,%.1f -> %.1f,%.1f", st0.s / 32.f, st0.t / 32.f, st1.s / 32.f, st1.t / 32.f ); |
| 1109 | |
| 1110 | const f32 depth = gRDPOtherMode.depth_source ? mPrimDepth : 0.0f; |
| 1111 | |
| 1112 | float positions[] = { |
| 1113 | screen0.x, screen0.y, depth, |
| 1114 | screen1.x, screen0.y, depth, |
| 1115 | screen0.x, screen1.y, depth, |
| 1116 | screen1.x, screen1.y, depth, |
| 1117 | }; |
| 1118 | |
| 1119 | TexCoord uvs[] = { |
| 1120 | TexCoord( st0.s, st0.t ), |
| 1121 | TexCoord( st0.s, st1.t ), |
| 1122 | TexCoord( st1.s, st0.t ), |
| 1123 | TexCoord( st1.s, st1.t ), |
| 1124 | }; |
| 1125 | |
| 1126 | u32 colours[] = { |
| 1127 | 0xffffffff, |
| 1128 | 0xffffffff, |
| 1129 | 0xffffffff, |
| 1130 | 0xffffffff, |
| 1131 | }; |
| 1132 | |
| 1133 | RenderDaedalusVtxStreams(GL_TRIANGLE_STRIP, positions, uvs, colours, 4); |
| 1134 | |
| 1135 | #ifdef DAEDALUS_DEBUG_DISPLAYLIST |
| 1136 | ++mNumRect; |
| 1137 | #endif |
| 1138 | } |
| 1139 | |
| 1140 | void RendererGL::FillRect( const v2 & xy0, const v2 & xy1, u32 color ) |
| 1141 | { |
no test coverage detected