History

more work on improved model picking

ZappoMan committed 11 years ago

Commit 6b5fdce1 parent f13bf653 files · +1 −26Browse files

Showing the changes to interface/src/renderer/Model.cpp (1 of 3 files). Show all

Unified · Split

interface/src/renderer/Model.cpp+0−18
@@ -103,9 +103,6 @@ Model::SkinLocations Model::_skinNormalSpecularMapLocations; · 102 unmodified lines
103Model::SkinLocations Model::_skinShadowLocations;103Model::SkinLocations Model::_skinShadowLocations;
104Model::SkinLocations Model::_skinTranslucentLocations;104Model::SkinLocations Model::_skinTranslucentLocations;
105 105
106ProgramObject Model::_selectProgram;
107Model::Locations Model::_selectLocations;
108
109void Model::setScale(const glm::vec3& scale) {106void Model::setScale(const glm::vec3& scale) {
110 setScaleInternal(scale);107 setScaleInternal(scale);
111 // if anyone sets scale manually, then we are no longer scaled to fit108 // if anyone sets scale manually, then we are no longer scaled to fit
@@ -390,14 +387,6 @@ void Model::init() { · 278 unmodified lines
390 _skinTranslucentProgram.link();387 _skinTranslucentProgram.link();
391 388
392 initSkinProgram(_skinTranslucentProgram, _skinTranslucentLocations);389 initSkinProgram(_skinTranslucentProgram, _skinTranslucentLocations);
393
394
395 // select/ray picking program
396 _selectProgram.addShaderFromSourceFile(QGLShader::Vertex, Application::resourcesPath() + "shaders/select.vert");
397 _selectProgram.addShaderFromSourceFile(QGLShader::Fragment, Application::resourcesPath() + "shaders/select.frag");
398 _selectProgram.link();
399 initProgram(_selectProgram, _selectLocations);
400
401 }390 }
402}391}
403 392
@@ -2166,13 +2155,6 @@ void Model::pickPrograms(gpu::Batch& batch, RenderMode mode, bool translucent, f · 1762 unmodified lines
2166 ProgramObject* activeProgram = program;2155 ProgramObject* activeProgram = program;
2167 Locations* activeLocations = locations;2156 Locations* activeLocations = locations;
2168 2157
2169 // XXXBHG - hack to render yellow
2170 if (mode == SELECT_RENDER_MODE) {
2171 //activeProgram = &_selectProgram;
2172 //activeLocations = &_selectLocations;
2173 // need skin version
2174 }
2175
2176 if (isSkinned) {2158 if (isSkinned) {
2177 activeProgram = skinProgram;2159 activeProgram = skinProgram;
2178 activeLocations = skinLocations;2160 activeLocations = skinLocations;