Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/BL_BlenderShader.cpp
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | if (enable) { | ||||
| assert(rasty != NULL); // XXX Kinda hacky, but SetProg() should always have the rasterizer if enable is true | assert(rasty != NULL); // XXX Kinda hacky, but SetProg() should always have the rasterizer if enable is true | ||||
| float viewmat[4][4], viewinvmat[4][4]; | float viewmat[4][4], viewinvmat[4][4]; | ||||
| const MT_Matrix4x4& view = rasty->GetViewMatrix(); | const MT_Matrix4x4& view = rasty->GetViewMatrix(); | ||||
| const MT_Matrix4x4& viewinv = rasty->GetViewInvMatrix(); | const MT_Matrix4x4& viewinv = rasty->GetViewInvMatrix(); | ||||
| view.getValue(&viewmat[0][0]); | view.getValue(&viewmat[0][0]); | ||||
| viewinv.getValue(&viewinvmat[0][0]); | viewinv.getValue(&viewinvmat[0][0]); | ||||
| GPU_material_bind(mGPUMat, mLightLayer, mBlenderScene->lay, time, 1, viewmat, viewinvmat, NULL, false); | GPU_material_bind(mGPUMat, mLightLayer, mBlenderScene->lay, time, 1, viewmat, viewinvmat, NULL); | ||||
| } | } | ||||
| else | else | ||||
| GPU_material_unbind(mGPUMat); | GPU_material_unbind(mGPUMat); | ||||
| } | } | ||||
| } | } | ||||
| int BL_BlenderShader::GetAttribNum() | int BL_BlenderShader::GetAttribNum() | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines | |||||