| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2016 Google Inc. | 3 * Copyright 2016 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GLWindowContext_unix.h" | 9 #include "GLWindowContext_unix.h" |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return; | 83 return; |
| 84 } | 84 } |
| 85 glXMakeCurrent(fDisplay, None, nullptr); | 85 glXMakeCurrent(fDisplay, None, nullptr); |
| 86 glXDestroyContext(fDisplay, fGLContext); | 86 glXDestroyContext(fDisplay, fGLContext); |
| 87 fGLContext = nullptr; | 87 fGLContext = nullptr; |
| 88 } | 88 } |
| 89 | 89 |
| 90 | 90 |
| 91 void GLWindowContext_unix::onSwapBuffers() { | 91 void GLWindowContext_unix::onSwapBuffers() { |
| 92 if (fDisplay && fGLContext) { | 92 if (fDisplay && fGLContext) { |
| 93 printf("swapping\n"); | |
| 94 glXSwapBuffers(fDisplay, fWindow); | 93 glXSwapBuffers(fDisplay, fWindow); |
| 95 } | 94 } |
| 96 } | 95 } |
| 97 | 96 |
| 98 | 97 |
| 99 } //namespace sk_app | 98 } //namespace sk_app |
| OLD | NEW |