WebGL2ContextPrograms.cpp 776 B

1234567891011121314151617181920212223242526272829
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "WebGL2Context.h"
  6. #include "GLContext.h"
  7. #include "WebGLProgram.h"
  8. namespace mozilla {
  9. // -------------------------------------------------------------------------
  10. // Programs and shaders
  11. GLint
  12. WebGL2Context::GetFragDataLocation(const WebGLProgram& prog, const nsAString& name)
  13. {
  14. if (IsContextLost())
  15. return -1;
  16. if (!ValidateObject("getFragDataLocation: program", prog))
  17. return -1;
  18. return prog.GetFragDataLocation(name);
  19. }
  20. } // namespace mozilla