medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit d9084d926625c8325cc24dbdeceb298916c2bf93
parent d8cf101bd7e45449b8e92010939b771244a82a64
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Sep  8 19:44:13 +0200

Move print_vec3 into platform_opengl.h

Diffstat:
hm.cc | 4----
platform_opengl.h | 10++++++++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hm.cc b/hm.cc @@ -81,10 +81,6 @@ glm::vec3 angles_to_vector_xy( const glm::vec3 & angles ) { return glm::vec3( sin( angles.y ), cos( angles.y ), 0 ); } -static void print_vec3( const std::string & name, const glm::vec3 & v ) { - printf( "%s: %.3f %.3f %.3f\n", name.c_str(), v.x, v.y, v.z ); -} - glm::mat4 P( glm::perspective( glm::radians( 120.0f ), 640.0f / 480.0f, 0.1f, 10000.0f ) ); static WORK_QUEUE_CALLBACK( testwq ) { diff --git a/platform_opengl.h b/platform_opengl.h @@ -11,6 +11,16 @@ #include <stdio.h> #include <stdlib.h> +#include <glm/glm.hpp> + +inline void print_vec( const char * const name, const glm::vec3 v ) { + printf( "%s: %.3f %.3f %.3f\n", name, v.x, v.y, v.z ); +} + +inline void print_vec( const char * const name, const glm::ivec2 v ) { + printf( "%s: %d %d\n", name, v.x, v.y ); +} + inline void glterrible() { GLenum err = glGetError(); const char * error;