GrGLAssembleInterface.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright 2014 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #include "gl/GrGLInterface.h"
  8. typedef GrGLFuncPtr (*GrGLGetProc)(void* ctx, const char name[]);
  9. /**
  10. * Generic function for creating a GrGLInterface for an either OpenGL or GLES. It calls
  11. * get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
  12. */
  13. SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get);
  14. /**
  15. * Generic function for creating a GrGLInterface for an OpenGL (but not GLES) context. It calls
  16. * get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
  17. */
  18. SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc get);
  19. /**
  20. * Generic function for creating a GrGLInterface for an OpenGL ES (but not Open GL) context. It
  21. * calls get() to get each function address. ctx is a generic ptr passed to and interpreted by
  22. * get().
  23. */
  24. SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc get);
  25. /** Deprecated version of GrGLMakeAssembledInterface() that returns a bare pointer. */
  26. SK_API const GrGLInterface* GrGLAssembleInterface(void *ctx, GrGLGetProc get);