TexturePlane scales after texture ratio

This commit is contained in:
Sebastian Piwell
2016-03-30 09:42:46 -04:00
parent 0bcdb88874
commit 57afa8fe9f
2 changed files with 3 additions and 1 deletions
@@ -122,6 +122,9 @@ void TexturePlane::render(){
glm::mat4 transform = glm::mat4(1.0);
float textureRatio = (float (_texture->height()/float(_texture->width())));
transform = glm::scale(transform, glm::vec3(1, textureRatio, 1));
glm::mat4 rotx = glm::rotate(transform, static_cast<float>(M_PI_2), glm::vec3(1, 0, 0));
glm::mat4 roty = glm::rotate(transform, static_cast<float>(M_PI_2), glm::vec3(0, 1, 0));
// glm::mat4 rot = glm::mat4(1.0);
-1
View File
@@ -75,7 +75,6 @@ properties::Property* property(const std::string& uri) {
SceneGraphNode* node = sceneGraphNode("DataSurfaces");
if(node){
std::cout << "DataSurfaces node found!" << std::endl;
std::shared_ptr<DataSurface> ds = static_cast <DataSurfaceContainer*>(node->renderable())->dataSurface(nodeName);
if(ds){
return ds->property(remainingUri);