WIP: Moved code out of sdl+gl3 main.cpp toward regular demo.
diff --git a/examples/example_sdl_opengl3/Makefile b/examples/example_sdl_opengl3/Makefile
index 9ac59b0..76601a1 100644
--- a/examples/example_sdl_opengl3/Makefile
+++ b/examples/example_sdl_opengl3/Makefile
@@ -22,7 +22,7 @@
 UNAME_S := $(shell uname -s)
 
 CXXFLAGS = -I../ -I../../
-CXXFLAGS += -g -Wall -Wformat -std=c++03
+CXXFLAGS += -g -Wall -Wformat
 LIBS =
 
 ##---------------------------------------------------------------------
diff --git a/examples/example_sdl_opengl3/main.cpp b/examples/example_sdl_opengl3/main.cpp
index fe4c1d4..0b7dee1 100644
--- a/examples/example_sdl_opengl3/main.cpp
+++ b/examples/example_sdl_opengl3/main.cpp
@@ -22,20 +22,6 @@
 #include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
 #endif
 
-static void GetVtxIdxDelta(ImDrawList* dl, int* vtx, int *idx)
-{
-    static int vtx_n, idx_n;
-    static int vtx_o, idx_o;
-    vtx_n = dl->VtxBuffer.Size;
-    idx_n = dl->IdxBuffer.Size;
-
-    *vtx = vtx_n - vtx_o;
-    *idx = idx_n - idx_o;
-
-    vtx_o = vtx_n;
-    idx_o = idx_n;
-}
-
 // Main code
 int main(int, char**)
 {
@@ -163,95 +149,6 @@
 
             ImGui::Begin("Hello, world!");                          // Create a window called "Hello, world!" and append into it.
 
-            // Rounded corners demo start
-
-            ImGui::TextUnformatted("Press alt to toggle quads (hold to see them).");
-            ImGui::TextUnformatted(io.KeyAlt ? "ALT ON  -- Rasterized quad circle! w00t! OPTIMIZATION!"
-                                             : "ALT OFF -- Regular, boring circle with PathArcToFast.");
-
-            static int r = io.Fonts->RoundCornersMaxSize / 2;
-            ImGui::SliderInt("radius", &r, 0, io.Fonts->RoundCornersMaxSize);
-
-            ImGui::BeginGroup();
-
-            static int s = 20;
-            ImGui::PushItemWidth(120);
-            ImGui::SliderInt("segments", &s, 3, 100);
-            ImGui::PopItemWidth();
-
-            int vtx = 0, idx = 0;
-            ImDrawList* dl = ImGui::GetWindowDrawList();
-
-            {
-                ImGui::Button("", ImVec2(200, 200));
-                GetVtxIdxDelta(dl, &vtx, &idx);
-                ImVec2 min = ImGui::GetItemRectMin();
-                ImVec2 size = ImGui::GetItemRectSize();
-                dl->AddCircleFilled(ImVec2(min.x + size.x / 2, min.y + size.y / 2), r, 0xFFFF00FF, s);
-                GetVtxIdxDelta(dl, &vtx, &idx);
-                ImGui::Text("AddCircleFilled\n %d vtx, %d idx", vtx, idx);
-            }
-            {
-              ImGui::Button("", ImVec2(200, 200));
-              GetVtxIdxDelta(dl, &vtx, &idx);
-              ImVec2 min = ImGui::GetItemRectMin();
-              ImVec2 size = ImGui::GetItemRectSize();
-              dl->AddCircle(ImVec2(min.x + size.x / 2, min.y + size.y / 2), r, 0xFFFF00FF, s);
-              GetVtxIdxDelta(dl, &vtx, &idx);
-              ImGui::Text("AddCircle\n %d vtx, %d idx", vtx, idx);
-            }
-
-            ImGui::EndGroup();
-
-            ImGui::SameLine();
-
-            ImGui::BeginGroup();
-
-            static bool tl = true, tr = true, bl = true, br = true;
-            int flags = 0;
-            ImGui::Checkbox("TL", &tl);
-            ImGui::SameLine(0, 12);
-            ImGui::Checkbox("TR", &tr);
-            ImGui::SameLine(0, 12);
-            ImGui::Checkbox("BL", &bl);
-            ImGui::SameLine(0, 12);
-            ImGui::Checkbox("BR", &br);
-
-            flags |= tl ? ImDrawCornerFlags_TopLeft : 0;
-            flags |= tr ? ImDrawCornerFlags_TopRight : 0;
-            flags |= bl ? ImDrawCornerFlags_BotLeft : 0;
-            flags |= br ? ImDrawCornerFlags_BotRight : 0;
-
-            {
-              ImGui::Button("", ImVec2(200, 200));
-              ImVec2 r_min = ImGui::GetItemRectMin();
-              ImVec2 r_max = ImGui::GetItemRectMax();
-
-              GetVtxIdxDelta(dl, &vtx, &idx);
-              dl->AddRectFilled(r_min, r_max, 0xFFFF00FF, r, flags);
-              GetVtxIdxDelta(dl, &vtx, &idx);
-              ImGui::Text("AddRectFilled\n %d vtx, %d idx", vtx, idx);
-            }
-            {
-              ImGui::Button("", ImVec2(200, 200));
-              ImVec2 r_min = ImGui::GetItemRectMin();
-              ImVec2 r_max = ImGui::GetItemRectMax();
-
-              GetVtxIdxDelta(dl, &vtx, &idx);
-              dl->AddRect(r_min, r_max, 0xFFFF00FF, r, flags);
-              GetVtxIdxDelta(dl, &vtx, &idx);
-              ImGui::Text("AddRect\n %d vtx, %d idx", vtx, idx);
-            }
-
-            ImGui::EndGroup();
-
-            ImGui::Separator();
-
-            ImFontAtlas* atlas = ImGui::GetIO().Fonts;
-            ImGui::Image(atlas->TexID, ImVec2((float)atlas->TexWidth, (float)atlas->TexHeight), ImVec2(0,0), ImVec2(1,1), ImColor(255,255,255,255), ImColor(255,255,255,128));
-
-            // Rounded corners demo end
-
             ImGui::Text("This is some useful text.");               // Display some text (you can use a format strings too)
             ImGui::Checkbox("Demo Window", &show_demo_window);      // Edit bools storing our window open/close state
             ImGui::Checkbox("Another Window", &show_another_window);
diff --git a/imgui_demo.cpp b/imgui_demo.cpp
index d5bc96c..c32e8d8 100644
--- a/imgui_demo.cpp
+++ b/imgui_demo.cpp
@@ -173,6 +173,111 @@
 }
 
 //-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+static void GetVtxIdxDelta(ImDrawList* dl, int* vtx, int *idx)
+{
+    static int vtx_n, idx_n;
+    static int vtx_o, idx_o;
+    vtx_n = dl->VtxBuffer.Size;
+    idx_n = dl->IdxBuffer.Size;
+
+    *vtx = vtx_n - vtx_o;
+    *idx = idx_n - idx_o;
+
+    vtx_o = vtx_n;
+    idx_o = idx_n;
+}
+
+static void TestTextureBasedRender()
+{
+    ImGuiIO& io = ImGui::GetIO();
+
+    ImGui::TextUnformatted("Press SHIFT to toggle quads (hold to see them).");
+    ImGui::TextUnformatted(io.KeyShift ? "SHIFT ON  -- Rasterized quad circle! w00t! OPTIMIZATION!"
+        : "SHIFT OFF -- Regular, boring circle with PathArcToFast.");
+
+    static float radius = io.Fonts->RoundCornersMaxSize * 0.5f;
+    ImGui::SliderFloat("radius", &radius, 0.0f, (float)io.Fonts->RoundCornersMaxSize, "%.0f");
+    ImGui::BeginGroup();
+
+    static int segments = 20;
+    ImGui::PushItemWidth(120);
+    ImGui::SliderInt("segments", &segments, 3, 100);
+    ImGui::PopItemWidth();
+
+    int vtx = 0;
+    int idx = 0;
+    ImDrawList* dl = ImGui::GetWindowDrawList();
+
+    {
+        ImGui::Button("##1", ImVec2(200, 200));
+        GetVtxIdxDelta(dl, &vtx, &idx);
+        ImVec2 min = ImGui::GetItemRectMin();
+        ImVec2 size = ImGui::GetItemRectSize();
+        dl->AddCircleFilled(ImVec2(min.x + size.x * 0.5f, min.y + size.y * 0.5f), radius, 0xFFFF00FF, segments);
+        GetVtxIdxDelta(dl, &vtx, &idx);
+        ImGui::Text("AddCircleFilled\n %d vtx, %d idx", vtx, idx);
+    }
+    {
+        ImGui::Button("##2", ImVec2(200, 200));
+        GetVtxIdxDelta(dl, &vtx, &idx);
+        ImVec2 min = ImGui::GetItemRectMin();
+        ImVec2 size = ImGui::GetItemRectSize();
+        dl->AddCircle(ImVec2(min.x + size.x * 0.5f, min.y + size.y * 0.5f), radius, 0xFFFF00FF, segments);
+        GetVtxIdxDelta(dl, &vtx, &idx);
+        ImGui::Text("AddCircle\n %d vtx, %d idx", vtx, idx);
+    }
+    ImGui::EndGroup();
+
+    ImGui::SameLine();
+
+    ImGui::BeginGroup();
+    static bool tl = true, tr = true, bl = true, br = true;
+    int flags = 0;
+    ImGui::Checkbox("TL", &tl);
+    ImGui::SameLine(0, 12);
+    ImGui::Checkbox("TR", &tr);
+    ImGui::SameLine(0, 12);
+    ImGui::Checkbox("BL", &bl);
+    ImGui::SameLine(0, 12);
+    ImGui::Checkbox("BR", &br);
+
+    flags |= tl ? ImDrawCornerFlags_TopLeft : 0;
+    flags |= tr ? ImDrawCornerFlags_TopRight : 0;
+    flags |= bl ? ImDrawCornerFlags_BotLeft : 0;
+    flags |= br ? ImDrawCornerFlags_BotRight : 0;
+
+    {
+        ImGui::Button("", ImVec2(200, 200));
+        ImVec2 r_min = ImGui::GetItemRectMin();
+        ImVec2 r_max = ImGui::GetItemRectMax();
+
+        GetVtxIdxDelta(dl, &vtx, &idx);
+        dl->AddRectFilled(r_min, r_max, 0xFFFF00FF, radius, flags);
+        GetVtxIdxDelta(dl, &vtx, &idx);
+        ImGui::Text("AddRectFilled\n %d vtx, %d idx", vtx, idx);
+    }
+    {
+        ImGui::Button("", ImVec2(200, 200));
+        ImVec2 r_min = ImGui::GetItemRectMin();
+        ImVec2 r_max = ImGui::GetItemRectMax();
+
+        GetVtxIdxDelta(dl, &vtx, &idx);
+        dl->AddRect(r_min, r_max, 0xFFFF00FF, radius, flags);
+        GetVtxIdxDelta(dl, &vtx, &idx);
+        ImGui::Text("AddRect\n %d vtx, %d idx", vtx, idx);
+    }
+
+    ImGui::EndGroup();
+
+    ImGui::Separator();
+
+    ImFontAtlas* atlas = ImGui::GetIO().Fonts;
+    ImGui::Image(atlas->TexID, ImVec2((float)atlas->TexWidth, (float)atlas->TexHeight), ImVec2(0, 0), ImVec2(1, 1), ImColor(255, 255, 255, 255), ImColor(255, 255, 255, 128));
+}
+
+//-----------------------------------------------------------------------------
 // [SECTION] Demo Window / ShowDemoWindow()
 //-----------------------------------------------------------------------------
 
@@ -302,6 +407,8 @@
     ImGui::Text("dear imgui says hello. (%s)", IMGUI_VERSION);
     ImGui::Spacing();
 
+    TestTextureBasedRender();
+
     if (ImGui::CollapsingHeader("Help"))
     {
         ImGui::Text("PROGRAMMER GUIDE:");