mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 14:18:31 +09:00
[Feat] (...): Handle pixel store correctly.
This commit is contained in:
@@ -109,6 +109,17 @@ namespace MobileGL {
|
||||
Unknown = -1
|
||||
};
|
||||
|
||||
struct PixelStoreParameters {
|
||||
Bool SwapBytes = false;
|
||||
Bool LSBFirst = false;
|
||||
Int RowLength = 0;
|
||||
Int ImageHeight = 0;
|
||||
Int SkipPixels = 0;
|
||||
Int SkipRows = 0;
|
||||
Int SkipImages = 0;
|
||||
Int Alignment = 4;
|
||||
};
|
||||
|
||||
namespace MG_State {
|
||||
namespace GLState {
|
||||
class RenderState {
|
||||
@@ -147,6 +158,7 @@ namespace MobileGL {
|
||||
// Pixel Store
|
||||
void SetPixelStoreParam(PixelStoreParam param, Int value);
|
||||
Int GetPixelStoreParam(PixelStoreParam param) const;
|
||||
PixelStoreParameters GetPixelStoreParameters(Bool isUnpack) const;
|
||||
|
||||
// Cull Face
|
||||
void SetCullFaceMode(CullFaceMode mode);
|
||||
@@ -180,7 +192,8 @@ namespace MobileGL {
|
||||
Float m_clearDepth = 1.0f;
|
||||
|
||||
// Pixel Store
|
||||
Array<Int, static_cast<SizeT>(PixelStoreParam::PixelStoreParamCount)> m_pixelStoreParams;
|
||||
PixelStoreParameters m_packParameters;
|
||||
PixelStoreParameters m_unpackParameters;
|
||||
|
||||
// Cull Face
|
||||
Bool m_cullFaceEnabled = false;
|
||||
|
||||
Reference in New Issue
Block a user