OpenGL sample? — Oculus
New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

OpenGL sample?

JustinJustin Posts: 11
edited April 2013 in Support
Is there an OpenGL sample? If not would someone be willing to make a super simple one. Pretty please? :)

Comments

  • MrGeddingsMrGeddings Posts: 604
    Art3mis
    better yet get Minecraft to work for it its OpenGL right? thatd be awesome ;-)
  • MrGeddings wrote:
    better yet get Minecraft to work for it its OpenGL right? thatd be awesome ;-)
    Minecraft is OpenGL via LWJGL on Java... so someone ( notch! ) would likely need to connect it through Java and then someone would need to modify Minecraft ( Jeb! ) with that.
  • YamYam Posts: 33
    MrGeddings wrote:
    better yet get Minecraft to work for it its OpenGL right? thatd be awesome ;-)
    Minecraft is OpenGL via LWJGL on Java... so someone ( notch! ) would likely need to connect it through Java and then someone would need to modify Minecraft ( Jeb! ) with that.

    Although not officially announced notch has already posted here looks like its in the works.

    I have been having my own thoughts on this, looked into fish eye methods for open GL
    it looks like the easiest way is to do a ortho cube projection and warp it to meet your needs.
    on the surface there are advantages to this as you would be able to reuse sides for both eyes.

    BUT i'm skeptical this would work a lot of the reason a stereoscopic image works is the subtle differences lost in ortho.
    I'm waiting for my headset before I start dealing with these issues does anyone know if any on the current engine solutions are open source yet I'm guessing the torque engine will be.
  • tlopestlopes Posts: 163
    All of the LibOVR code should work just fine for C++ OpenGL projects. The only thing you'd have to whip up yourself is a GLSL fragment shader to handle the barrel warp, but that isn't too difficult (you can probably even run the existing HLSL pixel shader through one of those HLSL->GLSL converters and it'd work, or just port it yourself).
  • kojackkojack Posts: 5,455 Volunteer Moderator
    Or use CG. Changing the hlsl shader to cg is very simple (they are a lot more similar to each other than they are to glsl). My ogre oculus rift demo can run in opengl or directx using the same cg shader. Although it's not much use to show how to use opengl since all that is abstracted away.
Sign In or Register to comment.