This code is all inside a header.
#ifndef GLEXTENSIONS_H
#define GLEXTENSIONS_H
#include <windows.h>
#include <gl/gl.h>
#include "Vector3.h"
template <typename V>
void glVertex(const V& v)
{
}
template <>
void glVertex< Math::Vector3f >(const Math::Vector3f& v)
{
glVertex3fv(&v.x);
}
#endif
// Note: Vector3f is defined (in the Math namespace):
// typedef Vector3<float> Vector3f;
Interestingly, I only get the linker error when the header is included by more than one file, but it is clearly guarded against multiple inclusions, so I don't understand how that could be causing an issue.
I get the feeling that it has something to do with the fact that I'm specializing over a type that is parameterized itself, but I can't seem to find any information regarding how to handle this (assuming I'm not handling it right already).
I'm using VC++05 v8.0
Thanks in advance.












