| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium 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 #ifndef GPU_PGL_PGL_H | 5 #ifndef GPU_PGL_PGL_H |
| 6 #define GPU_PGL_PGL_H | 6 #define GPU_PGL_PGL_H |
| 7 | 7 |
| 8 #include "npapi.h" | 8 #include "npapi.h" |
| 9 #include "npapi_extensions.h" | 9 #include "npapi_extensions.h" |
| 10 | 10 |
| 11 #ifdef __cplusplus |
| 11 extern "C" { | 12 extern "C" { |
| 13 #endif |
| 14 |
| 12 typedef void* PGLContext; | 15 typedef void* PGLContext; |
| 13 typedef bool PGLBoolean; | 16 typedef bool PGLBoolean; |
| 14 | 17 |
| 18 // Create A PGL context from a Pepper 3D device context. |
| 15 PGLContext pglCreateContext(NPP npp, | 19 PGLContext pglCreateContext(NPP npp, |
| 16 NPDevice* device, | 20 NPDevice* device, |
| 17 NPDeviceContext3D* device_context); | 21 NPDeviceContext3D* device_context); |
| 22 |
| 23 // Set the current PGL context for the calling thread. |
| 18 PGLBoolean pglMakeCurrent(PGLContext pgl_context); | 24 PGLBoolean pglMakeCurrent(PGLContext pgl_context); |
| 19 PGLBoolean pglSwapBuffers(); | 25 |
| 26 // Get the calling thread's current PGL context. |
| 27 PGLContext pglGetCurrentContext(void); |
| 28 |
| 29 // Display everything that has been rendered since the last call. |
| 30 PGLBoolean pglSwapBuffers(void); |
| 31 |
| 32 // Destroy the given PGL context. |
| 20 PGLBoolean pglDestroyContext(PGLContext pgl_context); | 33 PGLBoolean pglDestroyContext(PGLContext pgl_context); |
| 34 |
| 35 #ifdef __cplusplus |
| 21 } // extern "C" | 36 } // extern "C" |
| 37 #endif |
| 22 | 38 |
| 23 #endif // GPU_PGL_PGL_H | 39 #endif // GPU_PGL_PGL_H |
| OLD | NEW |