mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Feat|Fix|Improvement] (All): Continue building the basic structure.
Feat: implement MG_Impl/Buffer Feat: implement MG_State/ErrorState and integrate it into MG_State/GLContext Feat: add buffer deletion management Feat: introduce `INSERTION_POINT` (https://github.com/MobileGL-Dev/MobileGLCodeManager) Feat: add tests about MG_Impl/Buffer and buffer deletion feature Feat: add several converters Fix: fix some compiling errors Fix: fix some incorrect behaviors in MG_State/Buffer Improvement: remove some current statements at the beginning of the source file, which will be added uniformly soon Improvement: optimize some naming
This commit is contained in:
@@ -7,15 +7,31 @@ namespace MobileGL {
|
||||
public:
|
||||
GLContext() = default;
|
||||
|
||||
// Error
|
||||
void RecordError(ErrorCode code, SharedPtr<ErrorInfo> info = nullptr);
|
||||
bool HasGLError() const;
|
||||
Optional<const Error> PeekGLError() const;
|
||||
Optional<Error> PopGLError();
|
||||
bool HasNonGLError() const;
|
||||
Optional<const Error> PeekNonGLError() const;
|
||||
Optional<Error> PopNonGLError();
|
||||
void ClearErrors();
|
||||
|
||||
// Buffer
|
||||
Vector<Uint> GenBufferNames(Uint number);
|
||||
SharedPtr<BufferObject> GetBufferObject(Uint index);
|
||||
BindingSlot<BufferObject>& GetBufferBindingSlot(BufferTarget target);
|
||||
SharedPtr<BufferObject> CreateBufferObject(Uint index);
|
||||
SharedPtr<BufferObject> CreateBufferObject(Uint index);
|
||||
void MarkBufferObjectForDeletion(Uint index);
|
||||
bool ValidateBufferName(Uint index) const;
|
||||
bool ValidateBufferObject(Uint index) const;
|
||||
|
||||
private:
|
||||
// Error
|
||||
ErrorState m_errorState;
|
||||
|
||||
// Buffer
|
||||
BufferState bufferState_;
|
||||
BufferState m_bufferState;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user