Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15401531 authored by John Reck's avatar John Reck
Browse files

Extensions must load in ctor

Because Caches is terrible

Change-Id: I91e2442d97664759ee2c7602eb7172f009b20d53
parent e490a146
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ bool Caches::init() {
}

void Caches::initExtensions() {
    mExtensions.load();
    if (mExtensions.hasDebugMarker()) {
        eventMark = glInsertEventMarkerEXT;

+0 −1
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ void DeviceInfo::initialize() {
}

void DeviceInfo::load() {
    mExtensions.load();
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
}

+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ namespace uirenderer {
#endif


void Extensions::load() {
Extensions::Extensions() {
    auto extensions = StringUtils::split((const char*) glGetString(GL_EXTENSIONS));
    mHasNPot = extensions.has("GL_OES_texture_npot");
    mHasFramebufferFetch = extensions.has("GL_NV_shader_framebuffer_fetch");
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ namespace uirenderer {

class Extensions {
public:
    void load();
    Extensions();

    inline bool hasNPot() const { return mHasNPot; }
    inline bool hasFramebufferFetch() const { return mHasFramebufferFetch; }