OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 #include <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
7 #include <GLES2/gl2extchromium.h> | 7 #include <GLES2/gl2extchromium.h> |
8 | 8 |
9 #include "gpu/command_buffer/service/context_group.h" | 9 #include "gpu/command_buffer/service/context_group.h" |
10 #include "gpu/command_buffer/tests/gl_manager.h" | 10 #include "gpu/command_buffer/tests/gl_manager.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 void TearDown() override { gl_.Destroy(); } | 23 void TearDown() override { gl_.Destroy(); } |
24 | 24 |
25 GLManager gl_; | 25 GLManager gl_; |
26 }; | 26 }; |
27 | 27 |
28 class WebGLProgramTest : public GLProgramTest { | 28 class WebGLProgramTest : public GLProgramTest { |
29 protected: | 29 protected: |
30 void SetUp() override { | 30 void SetUp() override { |
31 GLManager::Options options; | 31 GLManager::Options options; |
32 options.webgl_version = 1; | 32 options.context_type = gles2::CONTEXT_TYPE_WEBGL1; |
33 gl_.Initialize(options); | 33 gl_.Initialize(options); |
34 } | 34 } |
35 }; | 35 }; |
36 | 36 |
37 TEST_F(GLProgramTest, GetSetUniform) { | 37 TEST_F(GLProgramTest, GetSetUniform) { |
38 static const char* v_shader_str = SHADER( | 38 static const char* v_shader_str = SHADER( |
39 attribute vec4 a_vertex; | 39 attribute vec4 a_vertex; |
40 attribute vec3 a_normal; | 40 attribute vec3 a_normal; |
41 | 41 |
42 uniform mat4 u_modelViewProjMatrix; | 42 uniform mat4 u_modelViewProjMatrix; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 271 |
272 glLinkProgram(program); | 272 glLinkProgram(program); |
273 | 273 |
274 GLint linked = 0; | 274 GLint linked = 0; |
275 glGetProgramiv(program, GL_LINK_STATUS, &linked); | 275 glGetProgramiv(program, GL_LINK_STATUS, &linked); |
276 EXPECT_NE(0, linked); | 276 EXPECT_NE(0, linked); |
277 } | 277 } |
278 | 278 |
279 } // namespace gpu | 279 } // namespace gpu |
280 | 280 |
OLD | NEW |