gvr::BufferSpec

#include <gvr.h>

Convenience C++ wrapper for gvr_buffer_spec, an opaque pixel buffer specification.

Summary

Frees the underlying gvr_buffer_spec on destruction.

Inheritance

Inherits from: gvr::WrapperBase< gvr_buffer_spec, gvr_buffer_spec_destroy >

Public functions

GetSamples() const
int32_t
Gets the number of samples per pixel in the buffer.
GetSize() const
Gets the buffer's size.
SetColorFormat(ColorFormat color_format)
void
Sets the color format for this buffer.
SetDepthStencilFormat(DepthStencilFormat depth_stencil_format)
void
Sets the depth and stencil format for this buffer.
SetMultiviewLayers(int32_t num_layers)
void
For more information, see gvr_buffer_spec_set_multiview_layers().
SetSamples(int32_t num_samples)
void
Sets the number of samples per pixel.
SetSize(const Sizei & size)
void
Sets the buffer's size.
SetSize(int32_t width, int32_t height)
void
Sets the buffer's size to the passed width and height.

Public functions

GetSamples

int32_t GetSamples() const 

Gets the number of samples per pixel in the buffer.

For more information, see gvr_buffer_spec_get_samples().

GetSize

Sizei GetSize() const 

Gets the buffer's size.

The default value is the recommended render target size. For more information, see gvr_buffer_spec_get_size().

SetColorFormat

void SetColorFormat(
  ColorFormat color_format
)

Sets the color format for this buffer.

For more information, see gvr_buffer_spec_set_color_format().

SetDepthStencilFormat

void SetDepthStencilFormat(
  DepthStencilFormat depth_stencil_format
)

Sets the depth and stencil format for this buffer.

For more information, see gvr_buffer_spec_set_depth_stencil_format().

SetMultiviewLayers

void SetMultiviewLayers(
  int32_t num_layers
)

For more information, see gvr_buffer_spec_set_multiview_layers().

SetSamples

void SetSamples(
  int32_t num_samples
)

Sets the number of samples per pixel.

For more information, see gvr_buffer_spec_set_samples().

SetSize

void SetSize(
  const Sizei & size
)

Sets the buffer's size.

For more information, see gvr_buffer_spec_set_size().

SetSize

void SetSize(
  int32_t width,
  int32_t height
)

Sets the buffer's size to the passed width and height.

For more information, see gvr_buffer_spec_set_size().

Details
Parameters
width
The width in pixels. Must be greater than 0.
height
The height in pixels. Must be greater than 0.