2014-09-17 15:08:41 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* 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-26 17:10:25 -08:00
|
|
|
|
2014-09-17 15:08:41 -07:00
|
|
|
#include "GLContext.h"
|
2015-01-26 17:10:25 -08:00
|
|
|
#include "WebGLProgram.h"
|
2014-09-17 15:08:41 -07:00
|
|
|
|
2015-01-26 17:10:25 -08:00
|
|
|
namespace mozilla {
|
2014-09-17 15:08:41 -07:00
|
|
|
|
|
|
|
// -------------------------------------------------------------------------
|
|
|
|
// Programs and shaders
|
2015-01-26 17:10:25 -08:00
|
|
|
|
2014-09-17 15:08:41 -07:00
|
|
|
GLint
|
2015-01-26 17:10:25 -08:00
|
|
|
WebGL2Context::GetFragDataLocation(WebGLProgram* prog, const nsAString& name)
|
2014-09-17 15:08:41 -07:00
|
|
|
{
|
2015-01-26 17:10:25 -08:00
|
|
|
if (IsContextLost())
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (!ValidateObject("getFragDataLocation: program", prog))
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
return prog->GetFragDataLocation(name);
|
2014-09-17 15:08:41 -07:00
|
|
|
}
|
2015-01-26 17:10:25 -08:00
|
|
|
|
|
|
|
} // namespace mozilla
|