Running OpenGL programs remotely

I’m on a Windows box running X-Win32 when ssh’d into a unix machine on which i’m writing and compiling code. I can run things like Matlab and other visual applications this way, but when I try to execute my OpenGL progam (make window, draw triangle) it crashes X-Win. Maybe this isn’t the right place to ask, but I was wondering if anyone knew a solution to this?