mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 12:48:32 +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:
@@ -3,20 +3,66 @@
|
||||
namespace MobileGL {
|
||||
namespace MG_State {
|
||||
namespace GLState {
|
||||
// Error
|
||||
void GLContext::RecordError(ErrorCode code, SharedPtr<ErrorInfo> info) {
|
||||
m_errorState.RecordError(code, info);
|
||||
}
|
||||
|
||||
bool GLContext::HasGLError() const {
|
||||
return m_errorState.HasGLError();
|
||||
}
|
||||
|
||||
Optional<const Error> GLContext::PeekGLError() const {
|
||||
return m_errorState.PeekGLError();
|
||||
}
|
||||
|
||||
Optional<Error> GLContext::PopGLError() {
|
||||
return m_errorState.PopGLError();
|
||||
}
|
||||
|
||||
bool GLContext::HasNonGLError() const {
|
||||
return m_errorState.HasNonGLError();
|
||||
}
|
||||
|
||||
Optional<const Error> GLContext::PeekNonGLError() const {
|
||||
return m_errorState.PeekNonGLError();
|
||||
}
|
||||
|
||||
Optional<Error> GLContext::PopNonGLError() {
|
||||
return m_errorState.PopNonGLError();
|
||||
}
|
||||
|
||||
void GLContext::ClearErrors() {
|
||||
m_errorState.Clear();
|
||||
}
|
||||
|
||||
// Buffer
|
||||
Vector<Uint> GLContext::GenBufferNames(Uint number) {
|
||||
return bufferState_.GenerateNames(number);
|
||||
return m_bufferState.GenerateNames(number);
|
||||
}
|
||||
|
||||
SharedPtr<BufferObject> GLContext::GetBufferObject(Uint index) {
|
||||
return bufferState_.GetBufferObject(index);
|
||||
return m_bufferState.GetBufferObject(index);
|
||||
}
|
||||
|
||||
BindingSlot<BufferObject>& GLContext::GetBufferBindingSlot(BufferTarget target) {
|
||||
return bufferState_.GetBindingSlot(target);
|
||||
return m_bufferState.GetBindingSlot(target);
|
||||
}
|
||||
|
||||
SharedPtr<BufferObject> GLContext::CreateBufferObject(Uint index) {
|
||||
return bufferState_.CreateBufferObject(index);
|
||||
return m_bufferState.CreateBufferObject(index);
|
||||
}
|
||||
|
||||
void GLContext::MarkBufferObjectForDeletion(Uint index) {
|
||||
m_bufferState.MarkBufferObjectForDeletion(index);
|
||||
}
|
||||
|
||||
bool GLContext::ValidateBufferName(Uint index) const {
|
||||
return m_bufferState.ValidateName(index);
|
||||
}
|
||||
|
||||
bool GLContext::ValidateBufferObject(Uint index) const {
|
||||
return m_bufferState.ValidateBufferObject(index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user