修正鼠标事件延迟问题.不再把旋转相机事件纳入事件队列

This commit is contained in:
JackLee 2026-04-10 23:16:27 +08:00
parent 5a9727957a
commit 4e51d0bef9
2 changed files with 2 additions and 7 deletions

View File

@ -92,7 +92,7 @@ void RenderThread::renderLoop() {
initFontMgr(); initFontMgr();
eglSubCore=new EGLSubCore(); eglSubCore=new EGLSubCore();
eglSubCore->InitEGLSubCore(thrInfo.eglCore->GetEGLDisplay(), thrInfo.eglCore->GetEGLConfig(), thrInfo.win); eglSubCore->InitEGLSubCore(thrInfo.eglCore->GetEGLDisplay(), thrInfo.eglCore->GetEGLConfig(), thrInfo.win);
Render* render=new Render(thrInfo.width,thrInfo.height); render=new Render(thrInfo.width,thrInfo.height);
if (render->init(thrInfo.eglCore->GetEGLDisplay(),eglSubCore->eglCtx,thrInfo.eglCore->GetEGLConfig())) { if (render->init(thrInfo.eglCore->GetEGLDisplay(),eglSubCore->eglCtx,thrInfo.eglCore->GetEGLConfig())) {
OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_PRINT_DOMAIN, "NativeRenderInit ","Render Init Done"); OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_PRINT_DOMAIN, "NativeRenderInit ","Render Init Done");
}else{ }else{
@ -178,11 +178,7 @@ void RenderThread::loadModel(const std::string& filePath) {
void RenderThread::setRotation(float xAngle, float yAngle) { void RenderThread::setRotation(float xAngle, float yAngle) {
std::lock_guard<std::mutex> lock(commandMutex_); std::lock_guard<std::mutex> lock(commandMutex_);
RenderCommand cmd(CMD_SET_ROTATION); render->setRotation(xAngle,yAngle);
cmd.param2 = xAngle;
cmd.param3 = yAngle;
commandQueue_.push(cmd);
commandCondition_.notify_one();
} }
void RenderThread::setTranslation(float x, float y) { void RenderThread::setTranslation(float x, float y) {

View File

@ -78,7 +78,6 @@ private:
}; };
std::queue<RenderCommand> commandQueue_; std::queue<RenderCommand> commandQueue_;
std::mutex callbackMutex_; std::mutex callbackMutex_;
Callback renderCompleteCallback_; Callback renderCompleteCallback_;
Handle(Font_FontMgr) ftMgr ; Handle(Font_FontMgr) ftMgr ;