Changeset 5846a74 in git


Ignore:
Timestamp:
06/08/16 05:01:14 (3 years ago)
Author:
Olly Betts <olly@…>
Branches:
line_contents, master, stereo, travis-osx
Children:
99b3298
Parents:
8f9bade6
git-author:
Olly Betts <olly@…> (06/08/16 04:59:21)
git-committer:
Olly Betts <olly@…> (06/08/16 05:01:14)
Message:

Invalidate opengl hints upon new survex version

The rendering code may have changed, so it is useful to recheck

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gla-gl.cc

    r8f9bade6 r5846a74  
    414414
    415415    save_hints = false;
     416
    416417    vendor = wxString((const char *)glGetString(GL_VENDOR), wxConvUTF8);
    417418    renderer = wxString((const char *)glGetString(GL_RENDERER), wxConvUTF8);
    418     wxConfigBase * cfg = wxConfigBase::Get();
    419419    {
     420        wxConfigBase * cfg = wxConfigBase::Get();
    420421        wxString s;
    421         if (cfg->Read(wxT("opengl_vendor"), &s, wxString()) && s == vendor &&
     422        if (cfg->Read(wxT("opengl_survex"), &s, wxString()) && s == wxT(VERSION) &&
     423            cfg->Read(wxT("opengl_vendor"), &s, wxString()) && s == vendor &&
    422424            cfg->Read(wxT("opengl_renderer"), &s, wxString()) && s == renderer) {
    423             // The vendor and renderer are the same as the values we have cached,
    424             // so use the hints we have cached.
     425            // The survex version, vendor and renderer are the same as those
     426            // we cached hints for, so use those hints.
    425427            int v;
    426428            if (cfg->Read(wxT("blob_method"), &v, 0) &&
     
    706708
    707709    wxConfigBase * cfg = wxConfigBase::Get();
     710    cfg->Write(wxT("opengl_survex"), wxT(VERSION));
    708711    cfg->Write(wxT("opengl_vendor"), vendor);
    709712    cfg->Write(wxT("opengl_renderer"), renderer);
Note: See TracChangeset for help on using the changeset viewer.