Skip to content

Commit

Permalink
Added README.md document to LLGL/Backend/ folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Jul 3, 2023
1 parent 3292c73 commit d4a2018
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions include/LLGL/Backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Backend include files

Use these include files (`*.inl`) to declare all required functions for the respective interface for your own renderer implementation. None of these headers are required for regular use of LLGL.

## Example

### `MyOwnRenderer.h`

```cpp
#include <LLGL/CommandBuffer.h>

class MyOwnRenderer : public LLGL::CommandBuffer {
public:
#include <LLGL/Backend/CommandBuffer.inl>
public:
MyOwnRenderer();
~MyOwnRenderer();
private:
MyRendererData privateData;
};
```
### `MyOwnRenderer.cpp`
```cpp
#include "MyOwnRenderer.h"
MyOwnRenderer::MyOwnRenderer() {
/* Initialize OpenGL or Direct3D etc. */
}
MyOwnRenderer::~MyOwnRenderer() {
/* Clean up OpenGL or Direct3D etc. */
}
void MyOwnRenderer::Begin() {
/* Implements LLGL::CommandBuffer::Begin() ... */
}
void MyOwnRenderer::End() {
/* Implements LLGL::CommandBuffer::End() ... */
}
/* All other interface functions ... */
```

0 comments on commit d4a2018

Please sign in to comment.