Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwinglutils.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
56 | { | 56 | { | ||
57 | // Variables | 57 | // Variables | ||
58 | // List of all supported GL extensions | 58 | // List of all supported GL extensions | ||
59 | static QList<QByteArray> glExtensions; | 59 | static QList<QByteArray> glExtensions; | ||
60 | 60 | | |||
61 | 61 | | |||
62 | // Functions | 62 | // Functions | ||
63 | 63 | | |||
64 | void initGL(std::function<resolveFuncPtr(const char*)> resolveFunction) | 64 | void initGL(const std::function<resolveFuncPtr(const char*)> &resolveFunction) | ||
65 | { | 65 | { | ||
66 | // Get list of supported OpenGL extensions | 66 | // Get list of supported OpenGL extensions | ||
67 | if (hasGLVersion(3, 0)) { | 67 | if (hasGLVersion(3, 0)) { | ||
68 | int count; | 68 | int count; | ||
69 | glGetIntegerv(GL_NUM_EXTENSIONS, &count); | 69 | glGetIntegerv(GL_NUM_EXTENSIONS, &count); | ||
70 | 70 | | |||
71 | for (int i = 0; i < count; i++) { | 71 | for (int i = 0; i < count; i++) { | ||
72 | const QByteArray name = (const char *) glGetStringi(GL_EXTENSIONS, i); | 72 | const QByteArray name = (const char *) glGetStringi(GL_EXTENSIONS, i); | ||
▲ Show 20 Lines • Show All 2245 Lines • Show Last 20 Lines |