It is currently Thu Dec 14, 2017 11:48 am

All times are UTC - 5 hours

 Page 1 of 1 [ 2 posts ] 
Author Message
 Post subject: Shader VMK 57 - Scale & Rotate Image2d
PostPosted: Thu Oct 23, 2014 10:02 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
In this video I show how I implemented the solution the challenge 4. By the end of the video you'll be able to control the position, scale and rotation of any image2d instance.

 Post subject: Re: Shader VMK 57 - Scale & Rotate Image2d
PostPosted: Fri Oct 24, 2014 5:36 pm 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 450
I noticed a few subtle differences. I noticed that you incorporated a default axis of rotation in the Image2D class with z set to -1 instead of allow the user to specify which axis to choose. The method of translating and starting over was the same, the scaling was very similar. The major difference I seen was in the rotation itself. I knew there was any easier way to change direction and I was thinking of either cos or sin functions, but I was just not getting it to work correctly. I noticed you are using degrees, however when I was reading about the GLM library on the website they have a macro definition #define GLM_FORCE_RADIANS that would cause all of the GLM's library to use radians over degrees. This would make for easier programming with GLSL shaders since OpenGL mostly uses and relies on radians as opposed to degrees. Other than that yes this was what I was expecting. Nicely done!

If some one is following this video series and has reached this point and you would like to use Radians as opposed to Degrees, you need to have this "#define GLM_FORCE_RADIANS" in your stdafx.h before any GLM includes.

Display posts from previous:  Sort by  
 Page 1 of 1 [ 2 posts ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to: