- float uv_width = uv_right - uv_left;
- float uv_height = uv_bottom - uv_top;
-
- float uv_left = this->uv_left + (uv_width * src_x) / this->width;
- float uv_top = this->uv_top + (uv_height * src_y) / this->height;
- float uv_right = this->uv_left + (uv_width * (src_x + width)) / this->width;
- float uv_bottom = this->uv_top + (uv_height * (src_y + height)) / this->height;
-
- glColor4f(1.0f, 1.0f, 1.0f, alpha);
- glBindTexture(GL_TEXTURE_2D, texture->get_handle());
-
- intern_draw(dst_x, dst_y,
- dst_x + width, dst_y + height,
- uv_left, uv_top, uv_right, uv_bottom, effect);