-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added README.md document to LLGL/Backend/ folder.
- Loading branch information
1 parent
3292c73
commit d4a2018
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ... */ | ||
``` |