A few tweaks
This commit is contained in:
parent
44f70454ad
commit
a055d42829
@ -768,6 +768,7 @@ void draw2DImageFromRTT(GLuint texture, size_t texture_w, size_t texture_h,
|
||||
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect,
|
||||
bool useAlphaChannelOfTexture)
|
||||
{
|
||||
glEnable(GL_BLEND);
|
||||
float width, height,
|
||||
center_pos_x, center_pos_y,
|
||||
tex_width, tex_height,
|
||||
|
@ -1920,7 +1920,7 @@ void Skin::process3DPane(IGUIElement *element, const core::recti &rect,
|
||||
{
|
||||
ModelViewWidget* mvw = dynamic_cast<ModelViewWidget*>(widget);
|
||||
FrameBuffer* fb = mvw->getFrameBuffer();
|
||||
if (fb->getRTT().size() > 0)
|
||||
if (fb != NULL && fb->getRTT().size() > 0)
|
||||
{
|
||||
draw2DImageFromRTT(fb->getRTT()[0], 512, 512,
|
||||
rect, core::rect<s32>(0, 0, 512, 512), NULL, true);
|
||||
|
@ -154,6 +154,9 @@ void ModelViewWidget::update(float delta)
|
||||
if (fabsf(angle - m_rotation_target) < 2.0f) m_rotation_mode = ROTATE_OFF;
|
||||
}
|
||||
|
||||
if (!irr_driver->isGLSL())
|
||||
return;
|
||||
|
||||
if (m_rtt_provider == NULL)
|
||||
{
|
||||
std::string name = "model view ";
|
||||
|
@ -1509,8 +1509,6 @@ void KartSelectionScreen::updateKartWidgetModel(uint8_t widget_id,
|
||||
{
|
||||
const KartModel &kart_model = kp->getMasterKartModel();
|
||||
|
||||
Log::error("Kart", "Kart <%s> width : %f, length : %f", selection.c_str(), kart_model.getWidth(), kart_model.getLength());
|
||||
|
||||
float scale = 35.0f;
|
||||
if (kart_model.getLength() > 1.45f)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user