Martin Radev | 66fb820 | 2016-07-28 11:45:20 +0300 | [diff] [blame^] | 1 | // |
| 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 | |
| 14 | using namespace angle; |
| 15 | |
| 16 | namespace gl |
| 17 | { |
| 18 | |
| 19 | bool 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 |