Seite 1 von 1

QImage und OpenGL

Verfasst: 27. Oktober 2008 01:00
von Superheftig
Kann mir mal jemand veraten warum QT kein RGBA format besitzt?

Wie kann ich es denn schaffen mit qt ein RGBA format zu erstellen. Dieses brauche ich für OpenGL.
Die funktionen von QWidget::bindTexture ist auch nicht wirklich hilfreich, weil man keine Parameter einstellen kann oder mip mapping benutzten kann.

Verfasst: 27. Oktober 2008 01:41
von phil collins
QGLWidget bietet da folgende Möglichkeit:

QImage convertToGLFormat ( const QImage & img )

Verfasst: 27. Oktober 2008 23:28
von Superheftig
Also QImage besitzt due Funktion convertToFormat. Da muss man allerdings ein format übergeben in das man konvertieren will. Da RGBA nicht existiert bringt die Funktion nicht.
QImage convertToGLFormat ( const QImage & img ) existiert bei mir leider nicht. Keine ahnung wo du die her hast.

Verfasst: 27. Oktober 2008 23:44
von solarix
Keine ahnung wo du die her hast.
entweder du liest den Tipp von phil nochmals.. oder du gibst "convertToGLFormat" in google ein. Dann wirst du sicher fündig...

Verfasst: 27. Oktober 2008 23:49
von Superheftig
hehe :)