maze using openGl C#

um tring tp build a maze using openGL and i want to know how to make it stop when it hit ani wall??

Please post a properly written question which contains at least one legible sentence that states your problem.

OpenGL is for rendering; logic about the maze is not dependent on OpenGL. Design you maze then think about rendering after