Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceRenderables ¶
type DeviceRenderables struct { // Shader is the render model shader to use Shader *fizzle.RenderShader // contains filtered or unexported fields }
DeviceRenderables creates Renderable objects for connected devices.
func CreateDeviceRenderables ¶
func CreateDeviceRenderables(vrSystem *vr.System, shader *fizzle.RenderShader) (*DeviceRenderables, error)
CreateDeviceRenderables creates a new DeviceRenderables object which creates Renderable objects for each connected device.
func (*DeviceRenderables) GetRenderableForTrackedDevice ¶
func (dr *DeviceRenderables) GetRenderableForTrackedDevice(deviceIndex int) (*fizzle.Renderable, error)
GetRenderableForTrackedDevice will look up the tracked device and create a renderable if one hasn't been cached already.
func (*DeviceRenderables) RenderDevices ¶
func (dr *DeviceRenderables) RenderDevices(vrCompositor *vr.Compositor, perspective mgl.Mat4, view mgl.Mat4, camera fizzle.Camera)
RenderDevices will render all connected devices.
type DistortionLens ¶
type DistortionLens struct { VAO uint32 Verts graphics.Buffer Indices graphics.Buffer IndexCount int32 Shader *fizzle.RenderShader EyeRight *EyeFramebuffer EyeLeft *EyeFramebuffer }
DistortionLens is used to render the VR framebuffers out to a window based on lens distortionvalues calculated in Init().
func CreateDistortionLens ¶
func CreateDistortionLens(vrSystem *vr.System, lensShader *fizzle.RenderShader, eyeLeft, eyeRight *EyeFramebuffer) *DistortionLens
CreateDistortionLens creates a DistortionLens object that can render the framebuffers for the left and right eye to a window.
func (*DistortionLens) Render ¶
func (lens *DistortionLens) Render(windowWidth, windowHeight int32)
Render draws the distortion lens view of the left and right eye framebuffers to the window.
type EyeFramebuffer ¶
type EyeFramebuffer struct { DepthBuffer graphics.Buffer RenderTexture graphics.Texture RenderFramebuffer graphics.Buffer ResolveTexture graphics.Texture ResolveFramebuffer graphics.Buffer }
EyeFramebuffer contains the render buffers and textures used to render each eye in VR.
func CreateStereoRenderTargets ¶
func CreateStereoRenderTargets(width, height uint32) (left, right *EyeFramebuffer)
CreateStereoRenderTargets returns new EyeFramebuffer structs, one for each eye, that are used for rendering.
func (*EyeFramebuffer) Init ¶
func (eyeFB *EyeFramebuffer) Init(width, height uint32)
Init creates the necessary render buffers and render textures for an eye.