-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Add new VirtualDMD class and replace RGB32 with RGB24 (#6)
- Loading branch information
Showing
10 changed files
with
276 additions
and
143 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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,41 @@ | ||
#pragma once | ||
|
||
#ifdef _MSC_VER | ||
#define DMDUTILAPI __declspec(dllexport) | ||
#define DMDUTILCALLBACK __stdcall | ||
#else | ||
#define DMDUTILAPI __attribute__((visibility("default"))) | ||
#define DMDUTILCALLBACK | ||
#endif | ||
|
||
#include <cstdint> | ||
|
||
namespace DMDUtil | ||
{ | ||
|
||
class DMDUTILAPI VirtualDMD | ||
{ | ||
public: | ||
VirtualDMD(int width, int height); | ||
~VirtualDMD(); | ||
|
||
void Update(uint8_t* pLevelData, uint8_t* pRGB24Data); | ||
int GetWidth() { return m_width; } | ||
int GetHeight() { return m_height; } | ||
int GetLength() const { return m_length; } | ||
int GetPitch() const { return m_pitch; } | ||
uint8_t* GetLevelData(); | ||
uint8_t* GetRGB24Data(); | ||
|
||
private: | ||
int m_width; | ||
int m_height; | ||
int m_length; | ||
int m_pitch; | ||
int m_update; | ||
|
||
uint8_t* m_pLevelData; | ||
uint8_t* m_pRGB24Data; | ||
}; | ||
|
||
} // namespace DMDUtil |
Oops, something went wrong.