Anyone got working example with ovrLayerType_QuadHeadLocked?
Does anyone know of a publicly readable code example of a working Rift application that uses ovrLayerType_QuadHeadLocked or ovrLayerType_QuadInWorld?
I'm following the developer documentation at https://developer.oculus.com/documentat ... der_layers
I got my basic rendering working with SDK 0.7, and now I'm trying to add a second layer. I'm pretty much following the code example in the documentation (except the symbol "ovrLayerType_Quad" in the docs, does not appear to exist in SDK 0.7). I figure the "ovrLayerType_QuadHeadLocked" is probably more likely than "ovrLayerType_QuadInWorld" to lead to the first experience of "Hey I seem my layer actually rendering for the first time", but I have experimented with each, and I have yet to see any evidence of a second layer.
Sorry I don't have a complete code example at the moment. This is embedded in 100,000 lines of code. But if this problem drags on, I will probably try to implement a simple standalone example using the AWESOME PYTHON BINDINGS I recently made.
I'm following the developer documentation at https://developer.oculus.com/documentat ... der_layers
I got my basic rendering working with SDK 0.7, and now I'm trying to add a second layer. I'm pretty much following the code example in the documentation (except the symbol "ovrLayerType_Quad" in the docs, does not appear to exist in SDK 0.7). I figure the "ovrLayerType_QuadHeadLocked" is probably more likely than "ovrLayerType_QuadInWorld" to lead to the first experience of "Hey I seem my layer actually rendering for the first time", but I have experimented with each, and I have yet to see any evidence of a second layer.
Sorry I don't have a complete code example at the moment. This is embedded in 100,000 lines of code. But if this problem drags on, I will probably try to implement a simple standalone example using the AWESOME PYTHON BINDINGS I recently made.
// Second Monoscopic Quad layer for menus
// Create HUD layer, fixed to the player's torso
hudLayer.Header.Type = ovrLayerType_QuadHeadLocked; // Was non-existent "ovrLayerType_Quad" in the docs...
hudLayer.Header.Flags = ovrLayerFlag_TextureOriginAtBottomLeft | ovrLayerFlag_HighQuality;
hudLayer.ColorTexture = hudTextureSet; // single texture for both eyes;
// 50cm in front and 20cm down from the player's nose,
// fixed relative to their torso.
float hudScale = 1.0f;
hudLayer.QuadPoseCenter.Position.x = 0.00f * hudScale;
hudLayer.QuadPoseCenter.Position.y = -0.20f * hudScale;
hudLayer.QuadPoseCenter.Position.z = -0.50f * hudScale;
hudLayer.QuadPoseCenter.Orientation = ovrQuatf();
// HUD is 50cm wide, 30cm tall.
hudLayer.QuadSize.x = 0.50f * hudScale;
hudLayer.QuadSize.y = 0.30f * hudScale;
// Display all of the HUD texture.
hudLayer.Viewport.Pos.x = 0.0f;
hudLayer.Viewport.Pos.y = 0.0f;
hudLayer.Viewport.Size.w = 1.0f;
hudLayer.Viewport.Size.h = 1.0f;
