2018-11-30 22:52:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2014-09-18 02:08:41 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "WebGL2Context.h"
|
2015-01-27 04:10:25 +03:00
|
|
|
|
2014-09-18 02:08:41 +04:00
|
|
|
#include "GLContext.h"
|
2015-01-27 04:10:25 +03:00
|
|
|
#include "WebGLProgram.h"
|
2014-09-18 02:08:41 +04:00
|
|
|
|
2015-01-27 04:10:25 +03:00
|
|
|
namespace mozilla {
|
2014-09-18 02:08:41 +04:00
|
|
|
|
|
|
|
// -------------------------------------------------------------------------
|
|
|
|
// Programs and shaders
|
2015-01-27 04:10:25 +03:00
|
|
|
|
2016-11-02 00:58:07 +03:00
|
|
|
GLint WebGL2Context::GetFragDataLocation(const WebGLProgram& prog,
|
|
|
|
const nsAString& name) {
|
2018-07-27 07:46:33 +03:00
|
|
|
const FuncScope funcScope(*this, "getFragDataLocation");
|
2015-01-27 04:10:25 +03:00
|
|
|
if (IsContextLost()) return -1;
|
|
|
|
|
2018-07-27 07:46:33 +03:00
|
|
|
if (!ValidateObject("program", prog)) return -1;
|
2015-01-27 04:10:25 +03:00
|
|
|
|
2016-11-02 00:58:07 +03:00
|
|
|
return prog.GetFragDataLocation(name);
|
2014-09-18 02:08:41 +04:00
|
|
|
}
|
2015-01-27 04:10:25 +03:00
|
|
|
|
|
|
|
} // namespace mozilla
|