Line data Source code
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 :
6 : #include "WebGL2Context.h"
7 :
8 : #include "GLContext.h"
9 : #include "WebGLProgram.h"
10 :
11 : namespace mozilla {
12 :
13 : // -------------------------------------------------------------------------
14 : // Programs and shaders
15 :
16 : GLint
17 0 : WebGL2Context::GetFragDataLocation(const WebGLProgram& prog, const nsAString& name)
18 : {
19 0 : if (IsContextLost())
20 0 : return -1;
21 :
22 0 : if (!ValidateObject("getFragDataLocation: program", prog))
23 0 : return -1;
24 :
25 0 : return prog.GetFragDataLocation(name);
26 : }
27 :
28 : } // namespace mozilla
|