Public Member Functions | Public Attributes | List of all members
BufferDescriptor Struct Reference

BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects. More...

`#include <bufferDescriptor.h>`

## Public Member Functions
| BufferDescriptor ()
| Default Constructor. More...
| BufferDescriptor (int o, int l, int s)
| Constructor. More...
int | GetLocalOffset () const
| Returns the relative offset within a stride. More...
bool | IsValid () const
| True if the descriptor values are internally consistent. More...
void | Reset ()
| Resets the descriptor to default. More...
bool | operator== (BufferDescriptor const &other) const
| True if the descriptors are identical. More...
bool | operator!= (BufferDescriptor const &other) const
| True if the descriptors are not identical. More...

## Public Attributes
int | offset
| offset to desired element data More...
int | length
| number or length of the data More...
int | stride
| stride to the next element More...

## Detailed Description

BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects.

The offset of BufferDescriptor can also be used to express a batching offset if the data buffer is combined across multiple objects together.

- Note that each element has the same data type (float)

Definition at line 61 of file bufferDescriptor.h.

## Constructor & Destructor Documentation

## § BufferDescriptor() [1/2]

BufferDescriptor | ( |  | ) |
| inline

Default Constructor.

Definition at line 64 of file bufferDescriptor.h.

## § BufferDescriptor() [2/2]

BufferDescriptor | ( | int | o,
|  | int | l,
|  | int | s
| ) |  |
| inline

Constructor.

Definition at line 67 of file bufferDescriptor.h.

## Member Function Documentation

## § GetLocalOffset()

int GetLocalOffset | ( |  | ) | const
| inline

Returns the relative offset within a stride.

Definition at line 70 of file bufferDescriptor.h.

## § IsValid()

bool IsValid | ( |  | ) | const
| inline

True if the descriptor values are internally consistent.

Definition at line 75 of file bufferDescriptor.h.

## § operator!=()

bool operator!= | ( | BufferDescriptor const & | other | ) | const
| inline

True if the descriptors are not identical.

Definition at line 93 of file bufferDescriptor.h.

## § operator==()

bool operator== | ( | BufferDescriptor const & | other | ) | const
| inline

True if the descriptors are identical.

Definition at line 86 of file bufferDescriptor.h.

## § Reset()

void Reset | ( |  | ) |
| inline

Resets the descriptor to default.

Definition at line 81 of file bufferDescriptor.h.

## Member Data Documentation

## § length

int length

number or length of the data

Definition at line 100 of file bufferDescriptor.h.

## § offset

int offset

offset to desired element data

Definition at line 98 of file bufferDescriptor.h.

## § stride

int stride

stride to the next element

Definition at line 102 of file bufferDescriptor.h.

The documentation for this struct was generated from the following file:

- opensubdiv/osd/bufferDescriptor.h