Qt + OpenGL ES + N900
我正在尝试使用 Qt 为 N900 开发一个简单的(?)应用程序,但我什至不知道何时开始。 我想点击屏幕上的任意位置,保持该位置,通过 OpenGL ES 渲染对象,然后能够选择它并修改其外观。 所以,我的问题是:
- 据我所知,N900 不支持触摸事件。尽管如此,QtSDK 中存在的触摸示例(几乎)对我有用。那么我应该使用 QGesture 还是使用 QtMouse 进行点击(或 QTouchEvent)?
- 假设我有点击的位置坐标,如果我理解正确的话,我应该稍后将它们从屏幕坐标转换为对象坐标,对吧?
- 对于“拾取对象”部分,OpenGL ES 2.0 是否支持选择缓冲区?否则,如何实现(光线追踪)?
任何让我开始的提示将非常感激!
I am trying to develop a simple (?) application for N900 using Qt, but I don't even know when to start.
I want to tap anywhere in the screen, keep that position, render an object through OpenGL ES there and then be able to pick it and modify its appearance.
So, my questions:
- From what I've read N900 doesn't support touch events. Nevertheless, the touch examples that exist in QtSDK (almost) worked for me. Should I go for QGesture then or maybe with QtMouse for the tapping (or QTouchEvent)?
- Supposing I have the tapped position coordinates, I should later transform them from screen coordinates to object coordinates, if I understand correctly, right?
- For the 'picking object' part, does OpenGL ES 2.0 support the select buffer? Or otherwise, how could that be implemented (ray tracing) ?
Any hint to get me started would be very appreciated!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
但有 QWidget::mapToGlobal() 和朋友允许这些转换。
QGraphicsView 有mapFromScene 和mapToScene 出于相同的目的。
But there are QWidget::mapToGlobal() and friends allowing these conversions.
QGraphicsView has mapFromScene and mapToScene for the same purpose.