blob: f7406090d1a34e365d9da5fb3654931f2f9afb40 [file] [log] [blame]
Martin Radev66fb8202016-07-28 11:45:20 +03001//
2// Copyright (c) 2016 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// validationES31.cpp: Validation functions for OpenGL ES 3.1 entry point parameters
8
9#include "libANGLE/validationES3.h"
10#include "libANGLE/validationES31.h"
11
12#include "libANGLE/Context.h"
13
14using namespace angle;
15
16namespace gl
17{
18
19bool ValidateGetBooleani_v(Context *context, GLenum target, GLuint index, GLboolean *data)
20{
21 if (!context->getGLVersion().isES31())
22 {
23 context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.1"));
24 return false;
25 }
26
27 if (!ValidateIndexedStateQuery(context, target, index))
28 {
29 return false;
30 }
31
32 return true;
33}
34
35} // namespace gl