So I was trying to do a 3d starfield program in c++ and sdl and I thought what if I change the origin points to the middle of the screen so when I change the depth they were coming from the center. I realized that sdl does not have such a function and I saw that OpenGL has one, but setting it up was pain in the ass, so I started creating my own function and I don't really know how to do this.
If anyone knows how to implement that function or do this another way I would really appreciate that! So thanks in advance!
Sorry for being so late, I actually fixed the problem and also posted it to github so it is way more easier to read and download. Now I am trying to make the perspective follow the direction the mouse drags. But thanks anyway for helping!
link: https://github.com/zetef/sdl-3d-starfield