* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <windows.h>
+#include "3dtext.h"
+
+#include <winbase.h>
+#include <wingdi.h>
+#include <winuser.h>
#include <scrnsave.h>
#include <math.h>
-#include <GL/gl.h>
#include <GL/glu.h>
-#include <tchar.h>
#include "resource.h"
-#include "3dtext.h"
static HGLRC hRC; // Permanent Rendering Context
static HDC hDC; // Private GDI Device Context
0.0f, // Deviation From The True Outlines
0.2f, // Font Thickness In The Z Direction
WGL_FONT_POLYGONS, // Use Polygons, Not Lines
- gmf); // Address Of Buffer To Recieve Data
+ gmf); // Address Of Buffer To Receive Data
// Calculate the string extent
for (i = 0; i < _tcslen(m_Text); i++)
// Handles Rendering
GLvoid DrawGLScene(GLvoid)
{
+ // Save ticks count of previous frame here
+ static DWORD dwTicks = 0;
+
// Clear The Screen And The Depth Buffer
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(0.0f, 0.0f, 1.0f);
// Increase The Rotation Variable
- rot += 0.1f;
+ if(dwTicks)
+ rot += (GetTickCount() - dwTicks) / 20.0f;
+ dwTicks = GetTickCount();
}
LRESULT CALLBACK