- Directly associated with dmabuf memory via EGLImage binding to OpenGL texture
- Created and managed in my own native EGL context
- Writing to this FBO = directly writing to dmabuf (zero-copy)
Используется для всех операций Qpainter для генерации сложного содержания пользовательского интерфейса < /li>
Создано и управляется в контексте QT opengl < /li>
/> < /li>
< /ol>
Предполагаемый рабочий процесс: < /strong> < /p>
- В нативном контексте EGL: импорт dmabuf As eGlimage → Bind to Textur Операции
- После рисунка: Sync qt Fbo Содержание для Native FBO с использованием GlblitFrameBuffer
- Поскольку Native FBO непосредственно связан с dmabuf, шаг 3 завершение означает dmabuf содержит новейшее изображение для DRM/KMS
Мне нужно получить нативный дисплей EGL и контекст из QT, чтобы правильно импортировать dmabuf в качестве eGlimage, но я не могу получить доступ к нативным ручкам QT EGL или установить правильный обмен контекстом.
opengl es Info
[*] render> render> render> render> render> render> render> /> Версия: OpenGL ES 3.2 V1.G2P0-01EAC0.a728B64D6B9D8CADF7F54EB4E167984C < /li>
Поставщик: ARM - GLSL: Opengl es Glsl es 3.20 < /li>
< /ul>
< /ul>
Код: Выделить всё
glContext_ = std::make_unique();
glContext_->create();
QVariant actualNativeHandle = glContext_->nativeHandle();
if (actualNativeHandle.canConvert()) {
QEGLNativeContext actualNativeContext = actualNativeHandle.value();
EGLContext actualContext = actualNativeContext.context();
EGLDisplay actualDisplay = actualNativeContext.display();
// Expected: Valid EGL context and display pointers
// Actual: Both are null/empty
} else {
// Always executes this branch
fprintf(stderr, "Failed to get Qt context's native handle\n");
}
фактическое: NateHandle () Возвращает Qvariant, который не может преобразовать в QEGLNativeContext
. class = "lang-cpp prettyprint-override">
Код: Выделить всё
// My existing native EGL context
EGLContext eglCtx_; // Valid native EGL context
EGLDisplay eglDisplay_; // Valid native EGL display
QEGLNativeContext nativeContext(eglCtx_, eglDisplay_);
QVariant nativeHandle = QVariant::fromValue(nativeContext);
glContext_->setNativeHandle(nativeHandle);
bool success = glContext_->create(); // Returns true, but creates independent context
Actual: GLContext _-> Create () создает независимый контекст, не обмениваясь с моим нативным контекстом
. Qt's native EGL display for dmabuf → EGLImage import
[*]Establish shared contexts between Qt and native EGL
[*]Successfully sync between Qt FBO and dmabuf-backed native FBO
[*]Achieve zero-copy rendering pipeline
Вопросы: < /strong> < /p>
Как я могу правильно получить нативный контекст QT EGL? рендеринг в dmabuf? < /li>
Учитывая ограничения избегания пользовательских шейдеров и необходимости сложного рендеринга UI, какие другие решения существуют?>
Подробнее здесь: https://stackoverflow.com/questions/797 ... ared-egl-c
Мобильная версия