You find that these functions are slow. That’s normal.
From: https://www.opengl.org/wiki/Common_Mistakes#glGetFloatv_glGetBooleanv_glGetDoublev_glGetIntegerv
I am sorry, Oculus. But I’m not going to use you SDK Rendering and will invest another 30-60 hrs trying to replicate the ovr distortion myself.
Oculus SDK OpenGL Rendering saves most states of gl twice every frame. I didn’t count, but I’m guessing that is at least 25 glGet calls per eye per frame. That’s 75 * 2 * 25 = 3750 glGet calls per second, if you want to think about it that way.
I guess doing the distortion rendering myself will take alot of effort, but once it’s done, I hope it will be superior in performance.
Please don’t get me wrong, though: I don’t think it’s bad, that Oculus saves and restores states before and after doing it’s gl calls. I just don’t want to accept the performance loss this brings for me, also, they did forget some flags, which I would have to manually save and restore to fix my rendering with Irrlicht.
I just don’t know how or if “Direct to Rift” mode will be implementable this way. I’ll tell you once I found out.
This post was imported from tumblr