The smarter way would be to use OpenGL.
- If you are using C++ or C, then just search only for the DLL libraries and import them into your project.
- If you are using Java, then take a look at either LWJGL or JOGL.
All the libraries etc. are completely free to use, and you can use them in any way you want.