@brief ��Ⱦ����
| 460 | |
| 461 | /// @brief ��Ⱦ���� |
| 462 | bool RenderTexture(ResTexture* tex, BlendMode blend, const f2dGraphics2DVertex vertex[])LNOEXCEPT |
| 463 | { |
| 464 | if (m_GraphType != GraphicsType::Graph2D) |
| 465 | { |
| 466 | LERROR("RenderTexture: ֻ��2D��Ⱦ������ִ�и÷���"); |
| 467 | return false; |
| 468 | } |
| 469 | |
| 470 | // ���û�� |
| 471 | updateGraph2DBlendMode(blend); |
| 472 | |
| 473 | // �������� |
| 474 | f2dGraphics2DVertex tVertex[4]; |
| 475 | memcpy(tVertex, vertex, sizeof(tVertex)); |
| 476 | |
| 477 | // ����UV��[0,1]���� |
| 478 | for (int i = 0; i < 4; ++i) |
| 479 | { |
| 480 | tVertex[i].u /= (float)tex->GetTexture()->GetWidth(); |
| 481 | tVertex[i].v /= (float)tex->GetTexture()->GetHeight(); |
| 482 | } |
| 483 | |
| 484 | m_Graph2D->DrawQuad(tex->GetTexture(), tVertex, false); |
| 485 | return true; |
| 486 | } |
| 487 | |
| 488 | /// @brief ��Ⱦ���� |
| 489 | bool RenderTexture(const char* name, BlendMode blend, f2dGraphics2DVertex vertex[])LNOEXCEPT |
no test coverage detected