1 #ifndef ALLOFW_OMNISTEREO_H 2 #define ALLOFW_OMNISTEREO_H 105 virtual void onCaptureViewport(
const CaptureInfo& info);
124 virtual void setLens(
float eye_separation = 0.0f,
float sphere_radius = 1.0f) = 0;
235 virtual int getViewportCount() = 0;
239 virtual ViewportInfo getViewport(
int viewport_index) = 0;
243 virtual BlendData getBlendData(
int viewport_index) = 0;
247 virtual WarpData getWarpData(
int viewport_index) = 0;
251 virtual GLTextureID getBlendTexture(
int viewport_index) = 0;
255 virtual GLTextureID getWarpTexture(
int viewport_index) = 0;
260 static WarpBlend* CreateEquirectangular(
int width,
int height);
266 static WarpBlend* CreatePerspective(
int width,
int height,
float fov);
271 static WarpBlend* LoadAllosphereCalibration(
const char* calibration_path,
const char* hostname =
nullptr);
static const int kCompositeMask_Back
Show the scene.
Definition: omnistereo.h:48
virtual void setDelegate(Delegate *delegate)=0
StereoTexture front
Definition: omnistereo.h:144
Quaternion viewport_rotation
Viewport pose.
Definition: omnistereo.h:84
static OmniStereo * Create(Configuration *conf)
Vector3f * data
3D positions for each pixel relative to the viewing center.
Definition: omnistereo.h:209
static const int kPanoramaModeEquirectangular
Definition: omnistereo.h:33
static const int kStereoMode_Dual_RL
Dual, left-right.
Definition: omnistereo.h:26
static const int kEye_Left
Single eye.
Definition: omnistereo.h:40
Size2i size
Width and height of the blend map.
Definition: omnistereo.h:219
float viewport_aspect
Viewport aspect ratio.
Definition: omnistereo.h:88
static const int kCompositeMask_Front
Show the back buffer.
Definition: omnistereo.h:49
CompositeMask mask
Definition: omnistereo.h:143
Capture info.
Definition: omnistereo.h:73
Pose pose
Current pose.
Definition: omnistereo.h:75
static const int kCompositeMask_Panorama_Cubemap_YUV420P
Panorama is cubemap.
Definition: omnistereo.h:53
CompositeInfo()
Definition: omnistereo.h:149
Panorama is cubemap.
Definition: omnistereo.h:57
static const int kEye_Right
Left eye.
Definition: omnistereo.h:41
Class for Omnistereo rendering.
Definition: omnistereo.h:16
static const int kStereoMode_Active
Only show right eye.
Definition: omnistereo.h:24
float sphere_radius
Sphere radius.
Definition: omnistereo.h:81
static void Destroy(OmniStereo *omnistereo)
float eye_separation
Eye separation.
Definition: omnistereo.h:79
virtual void setUniforms(GLuint program, const Delegate::CaptureInfo &info)=0
static const int kEye
Definition: omnistereo.h:39
virtual void setClipRange(float near, float far)=0
OmniStereo delegate class.
Definition: omnistereo.h:70
void setUniforms(GLuint program) const
Definition: omnistereo.h:99
static const int kCompositeMask_Panorama_Equirectangular
Show the panorama.
Definition: omnistereo.h:51
int PanoramaMode
Anaglyph, red/cyan.
Definition: omnistereo.h:32
Rectangle2 viewport
The viewport coordinates in screen pixels.
Definition: omnistereo.h:225
virtual void setPose(const Pose &pose)=0
virtual void capture()=0
Capture the scene.
virtual void setResolution(int size=1024)=0
int Eye
Equirectangular panorama mode.
Definition: omnistereo.h:38
bool enforce_aspect_ratio
Should OmniStereo maintain the viewport aspect ratio.
Definition: omnistereo.h:229
virtual StereoTexture getDepthCubemapTexture()=0
Vector4f * data
Alpha map in RGBA.
Definition: omnistereo.h:217
virtual StereoTexture getCubemapTexture()=0
YAML-based configuration reader.
Definition: config.h:12
Eye eye
Which eye.
Definition: omnistereo.h:77
virtual const char * getShaderCode()=0
Definition: geometry.h:16
static const int kCompositeMask_Panorama
Show the front buffer.
Definition: omnistereo.h:50
float near
Near clipping distance.
Definition: omnistereo.h:90
StereoTexture()
Definition: omnistereo.h:66
virtual void composite(const Rectangle2i &viewport, const CompositeInfo &info=CompositeInfo())=0
virtual void setStereoMode(StereoMode stereo_mode)=0
GLTextureID L
Definition: omnistereo.h:61
float far
Far clipping distance.
Definition: omnistereo.h:92
virtual void setLens(float eye_separation=0.0f, float sphere_radius=1.0f)=0
Viewport information.
Definition: omnistereo.h:223
Warp and blend information for a display configuration.
Definition: omnistereo.h:203
static const int kStereoMode_Mono
Definition: omnistereo.h:21
int CompositeMask
Right eye.
Definition: omnistereo.h:46
float viewport_fovy
Viewport fovy.
Definition: omnistereo.h:86
Warp map data.
Definition: omnistereo.h:207
Composite info structure.
Definition: omnistereo.h:142
static const int kCompositeMask_Scene
Definition: omnistereo.h:47
float aspect_ratio
Target aspect ratio of the viewport.
Definition: omnistereo.h:231
Definition: quaternion.h:9
int StereoMode
Stereo mode.
Definition: omnistereo.h:20
Size2i screen_resolution
Target screen resolution (OmniStereo will determine the size of internal framebuffers based on this v...
Definition: omnistereo.h:227
Size2i size
Width and height of the warp map.
Definition: omnistereo.h:211
static const int kCompositeMask_Panorama_Cubemap
Panorama is equirectangular.
Definition: omnistereo.h:52
virtual GLuint compositeCustomizeShader(const char *code)=0
static const int kStereoMode_Right
Only show left eye.
Definition: omnistereo.h:23
OmniStereo * omnistereo
The OmniStereo object.
Definition: omnistereo.h:95
StereoTexture panorama
Definition: omnistereo.h:146
GLTextureID eyes[2]
Definition: omnistereo.h:64
GLuint GLTextureID
OpenGL texture ID.
Definition: omnistereo.h:13
virtual void compositeRestoreShader()=0
Restore the composite shader to default.
GLTextureID R
Left eye texture.
Definition: omnistereo.h:62
Blend map data.
Definition: omnistereo.h:215
virtual ~Delegate()
Definition: omnistereo.h:107
static const int kStereoMode_Left
Mono.
Definition: omnistereo.h:22
static const int kStereoMode_Anaglyph_Red_Cyan
Dual, right-left.
Definition: omnistereo.h:27
static const int kStereoMode_Dual_LR
Active stereo.
Definition: omnistereo.h:25