Here is the VS2010 project that has been cleaned up to keep only the billboard objects.
Should work with your 2013 PRO.
I have moved most of the specific GDImage CHART code, into chart.h
Please, tell me if there is something i forget to past into this project.
Added
Here is a couple of missing functions to add into chart.h, to replace the call to the GDImage ZI_ResizeGLWindow
void setGLPerspective(IN float rFovy, IN float rAspect, IN float zNear, IN float zFar) {
float rXmin, rXmax, rYmin, rYmax;
const double mul = 0.00872664626;
rYmax = (float) (zNear * tan(rFovy * mul));
rYmin = -rYmax;
rXmin = rYmin * rAspect;
rXmax = rYmax * rAspect;
glFrustum(rXmin, rXmax, rYmin, rYmax, zNear, zFar);
}
long GLfovy(IN long nFovy, IN long RW) {
static long WasnFovy;
if (RW) {
if (nFovy < 1) { nFovy = 45; }
WasnFovy = min(nFovy, 180);
}
if (WasnFovy == 0) { WasnFovy = 45; }
return WasnFovy;
}
//void ZI_ResizeGLWindow (IN HWND hWnd) {
void gl_ResizeGLWindow (IN HWND hWnd) {
RECT rc; GetClientRect(hWnd, &rc);
glViewport( 0, 0, rc.right, rc.bottom);
float rAspect = (float) (rc.right / (float)rc.bottom);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
long nFovy = GLfovy(0,0); if (nFovy == 0) { nFovy = 45; }
setGLPerspective((float) nFovy, rAspect, 2.0f, 100000.0f);
glMatrixMode(GL_MODELVIEW);
}