# Juliet\include\Graphics\GraphicsBuffer

## Source Files
- Header: `Juliet\include\Graphics\GraphicsBuffer.h`

## AI Description
The `GraphicsBuffer` and `GraphicsTransferBuffer` classes in the Juliet library are designed to manage graphics buffers, which are essential for storing data that is used by shaders during rendering. These buffers can be either read from or written to by the GPU, depending on their usage.

The main purpose of these classes is to encapsulate the creation, management, and operations related to graphics buffers. They provide a high-level interface for developers to interact with graphics resources efficiently.

### Key Features:

1. **Buffer Usage**: The `GraphicsBuffer` class supports various buffer usages such as index buffers, constant buffers, structured buffers, and none. This allows developers to choose the appropriate buffer type based on their specific requirements.

2. **Transfer Buffer Usage**: The `GraphicsTransferBuffer` class is used for transferring data between host memory and graphics memory. It provides methods for downloading data from the GPU to host memory and uploading data from host memory to the GPU.

3. **Buffer Create Info**: The `BufferCreateInfo` struct allows developers to specify various properties of a buffer, such as its size, stride, usage, and whether it is dynamic. This flexibility enables developers to create buffers with specific characteristics tailored to their needs.

4. **Opaque Data**: Both classes are designed to be opaque, meaning that they do not expose any internal implementation details. This ensures that the library remains flexible and can evolve without affecting existing code.

### Usage:

To use these classes, developers first need to include the `GraphicsBuffer.h` header file in their source files. They can then create a buffer using the `CreateBuffer` function, passing in the necessary parameters such as size, stride, usage, and dynamic flag.

```cpp
// Include the GraphicsBuffer header file
#include "W:\Classified\Juliet\Juliet\include\Graphics\GraphicsBuffer.h"

int main() {
    // Create a buffer with specific properties
    Juliet::BufferCreateInfo createInfo = {1024, 4, Juliet::BufferUsage::IndexBuffer, false};
    Juliet::GraphicsBuffer buffer = Juliet::CreateBuffer(createInfo);

    // Use the buffer for rendering

    return 0;
}
```

By using these classes, developers can efficiently manage graphics buffers in their applications, ensuring that they are used correctly and effectively.

## Symbols

### Namespace `Juliet`

#### Classes, Structs & Unions
- `struct BufferCreateInfo`
- `struct TransferBufferCreateInfo`

#### Enums
- `enum class BufferUsage`
- `enum class TransferBufferUsage`

