Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4b9d6bb52142
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8fafafcc8c89
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Jun 26, 2019

  1. More MSAA fallback fixes

    azonenberg committed Jun 26, 2019
    Copy the full SHA
    8fafafc View commit details
Showing with 7 additions and 4 deletions.
  1. +1 −0 glscopeclient/WaveformArea.cpp
  2. +2 −0 glscopeclient/WaveformArea.h
  3. +2 −0 glscopeclient/WaveformArea_events.cpp
  4. +2 −4 glscopeclient/WaveformArea_rendering.cpp
1 change: 1 addition & 0 deletions glscopeclient/WaveformArea.cpp
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ WaveformArea::WaveformArea(
, m_channel(channel)
, m_parent(parent)
, m_pixelsPerVolt(1)
, m_msaaEnabled(true)
{
SharedCtorInit();
}
2 changes: 2 additions & 0 deletions glscopeclient/WaveformArea.h
Original file line number Diff line number Diff line change
@@ -279,6 +279,8 @@ class WaveformArea : public Gtk::GLArea
DRAG_TRIGGER,
DRAG_CURSOR
} m_dragState;

bool m_msaaEnabled;
};

#endif
2 changes: 2 additions & 0 deletions glscopeclient/WaveformArea_events.cpp
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ void WaveformArea::on_resize(int width, int height)
m_waveformTexture.AllocateMultisample(width, height, 4);
ResetTextureFiltering();
m_waveformFramebuffer.SetTexture(m_waveformTexture, GL_TEXTURE_2D_MULTISAMPLE);
m_msaaEnabled = true;
if(!m_waveformFramebuffer.IsComplete())
{
//Failed to allocate the texture as multisample. Try doing non-multisample.
@@ -97,6 +98,7 @@ void WaveformArea::on_resize(int width, int height)
m_waveformTexture.SetData(width, height, NULL);
ResetTextureFiltering();
m_waveformFramebuffer.SetTexture(m_waveformTexture, GL_TEXTURE_2D);
m_msaaEnabled = false;
if(!m_waveformFramebuffer.IsComplete())
{
LogError("FBO is still incomplete (non-multisample fallback): %x\n",
6 changes: 2 additions & 4 deletions glscopeclient/WaveformArea_rendering.cpp
Original file line number Diff line number Diff line change
@@ -344,9 +344,7 @@ void WaveformArea::RenderPersistenceOverlay()

void WaveformArea::RenderTrace()
{
bool msaa = false;

if(msaa)
if(m_msaaEnabled)
m_waveformFramebuffer.Bind(GL_FRAMEBUFFER);
else
m_waveformFramebufferResolved.Bind(GL_FRAMEBUFFER);
@@ -383,7 +381,7 @@ void WaveformArea::RenderTrace()
glDisable(GL_SCISSOR_TEST);

//Resolve the multisample framebuffer
if(msaa)
if(m_msaaEnabled)
{
m_waveformFramebuffer.Bind(GL_READ_FRAMEBUFFER);
m_waveformFramebufferResolved.Bind(GL_DRAW_FRAMEBUFFER);