mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-05 22:03:36 +00:00
Fix headset types;
This commit is contained in:
parent
e80f390151
commit
1714804651
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
typedef void (*headsetRenderCallback)(int eyeIndex, void* userdata);
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
EYE_LEFT,
|
EYE_LEFT,
|
||||||
EYE_RIGHT
|
EYE_RIGHT
|
||||||
|
@ -34,6 +32,7 @@ typedef struct {
|
||||||
} Controller;
|
} Controller;
|
||||||
|
|
||||||
typedef vec_t(Controller*) vec_controller_t;
|
typedef vec_t(Controller*) vec_controller_t;
|
||||||
|
typedef void (*headsetRenderCallback)(HeadsetEye eye, void* userdata);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
void (*destroy)(void* headset);
|
void (*destroy)(void* headset);
|
||||||
|
|
|
@ -499,7 +499,7 @@ void viveRenderTo(void* headset, headsetRenderCallback callback, void* userdata)
|
||||||
mat4_multiply(transform, head);
|
mat4_multiply(transform, head);
|
||||||
|
|
||||||
// Projection
|
// Projection
|
||||||
matrix = vive->system->GetProjectionMatrix(eye, vive->clipNear, vive->clipFar).m;
|
matrix = vive->system->GetProjectionMatrix(vrEye, vive->clipNear, vive->clipFar).m;
|
||||||
mat4_fromMat44(projection, matrix);
|
mat4_fromMat44(projection, matrix);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
|
@ -518,7 +518,7 @@ void viveRenderTo(void* headset, headsetRenderCallback callback, void* userdata)
|
||||||
ETextureType textureType = ETextureType_TextureType_OpenGL;
|
ETextureType textureType = ETextureType_TextureType_OpenGL;
|
||||||
Texture_t eyeTexture = { (void*) texture, textureType, EColorSpace_ColorSpace_Gamma };
|
Texture_t eyeTexture = { (void*) texture, textureType, EColorSpace_ColorSpace_Gamma };
|
||||||
EVRSubmitFlags flags = EVRSubmitFlags_Submit_Default;
|
EVRSubmitFlags flags = EVRSubmitFlags_Submit_Default;
|
||||||
vive->compositor->Submit(eye, &eyeTexture, NULL, flags);
|
vive->compositor->Submit(vrEye, &eyeTexture, NULL, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
vive->isRendering = 0;
|
vive->isRendering = 0;
|
||||||
|
|
Loading…
Reference in a new issue