mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Also take control over Begin/End
This commit is contained in:
parent
8d6bbc54a9
commit
feb3870f7d
@ -157,14 +157,14 @@ void DrawEngineGLES::ClearInputLayoutMap() {
|
||||
|
||||
void DrawEngineGLES::BeginFrame() {
|
||||
FrameData &frameData = frameData_[render_->GetCurFrame()];
|
||||
frameData.pushIndex->Begin();
|
||||
frameData.pushVertex->Begin();
|
||||
render_->BeginPushBuffer(frameData.pushIndex);
|
||||
render_->BeginPushBuffer(frameData.pushVertex);
|
||||
}
|
||||
|
||||
void DrawEngineGLES::EndFrame() {
|
||||
FrameData &frameData = frameData_[render_->GetCurFrame()];
|
||||
frameData.pushIndex->End();
|
||||
frameData.pushVertex->End();
|
||||
render_->EndPushBuffer(frameData.pushIndex);
|
||||
render_->EndPushBuffer(frameData.pushVertex);
|
||||
tessDataTransfer->EndFrame();
|
||||
}
|
||||
|
||||
|
@ -472,6 +472,14 @@ public:
|
||||
delete pushbuffer;
|
||||
}
|
||||
|
||||
void BeginPushBuffer(GLPushBuffer *pushbuffer) {
|
||||
pushbuffer->Begin();
|
||||
}
|
||||
|
||||
void EndPushBuffer(GLPushBuffer *pushbuffer) {
|
||||
pushbuffer->End();
|
||||
}
|
||||
|
||||
void BindFramebufferAsRenderTarget(GLRFramebuffer *fb, GLRRenderPassAction color, GLRRenderPassAction depth, GLRRenderPassAction stencil, uint32_t clearColor, float clearDepth, uint8_t clearStencil);
|
||||
void BindFramebufferAsTexture(GLRFramebuffer *fb, int binding, int aspectBit, int attachment);
|
||||
bool CopyFramebufferToMemorySync(GLRFramebuffer *src, int aspectBits, int x, int y, int w, int h, Draw::DataFormat destFormat, uint8_t *pixels, int pixelStride);
|
||||
|
@ -540,12 +540,12 @@ OpenGLContext::~OpenGLContext() {
|
||||
void OpenGLContext::BeginFrame() {
|
||||
renderManager_.BeginFrame();
|
||||
FrameData &frameData = frameData_[renderManager_.GetCurFrame()];
|
||||
frameData.push->Begin();
|
||||
renderManager_.BeginPushBuffer(frameData.push);
|
||||
}
|
||||
|
||||
void OpenGLContext::EndFrame() {
|
||||
FrameData &frameData = frameData_[renderManager_.GetCurFrame()];
|
||||
frameData.push->End(); // upload the data!
|
||||
renderManager_.EndPushBuffer(frameData.push); // upload the data!
|
||||
renderManager_.Finish();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user