| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string.h> | 5 #include <string.h> |
| 6 | 6 |
| 7 #include "main.h" | 7 #include "main.h" |
| 8 #include "xlib_window.h" | 8 #include "xlib_window.h" |
| 9 | 9 |
| 10 GLXContext glx_context = NULL; | 10 GLXContext glx_context = NULL; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 62 } |
| 63 | 63 |
| 64 void DestroyContext() { | 64 void DestroyContext() { |
| 65 glXMakeCurrent(xlib_display, 0, NULL); | 65 glXMakeCurrent(xlib_display, 0, NULL); |
| 66 glXDestroyContext(xlib_display, glx_context); | 66 glXDestroyContext(xlib_display, glx_context); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void SwapBuffers() { | 69 void SwapBuffers() { |
| 70 glXSwapBuffers(xlib_display, xlib_window); | 70 glXSwapBuffers(xlib_display, xlib_window); |
| 71 } | 71 } |
| 72 |
| 73 bool SwapInterval(int interval) { |
| 74 return glXSwapIntervalSGI(interval) == 0; |
| 75 } |
| OLD | NEW |