Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Side by Side Diff: ui/gl/gl_helper.h

Issue 2094823002: gl_unittests: on a core profile, use VAOs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify ShouldTestsUseVAOs Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/gl/gl_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef UI_GL_GL_HELPER_H_ 5 #ifndef UI_GL_GL_HELPER_H_
6 #define UI_GL_GL_HELPER_H_ 6 #define UI_GL_GL_HELPER_H_
7 7
8 #include "ui/gl/gl_bindings.h" 8 #include "ui/gl/gl_bindings.h"
9 #include "ui/gl/gl_export.h" 9 #include "ui/gl/gl_export.h"
10 10
(...skipping 16 matching lines...) Expand all
27 // Attaches 2 shaders, links them to a program, and checks for errors. 27 // Attaches 2 shaders, links them to a program, and checks for errors.
28 // Returns program, 0 on failure. 28 // Returns program, 0 on failure.
29 static GLuint SetupProgram(GLuint vertex_shader, GLuint fragment_shader); 29 static GLuint SetupProgram(GLuint vertex_shader, GLuint fragment_shader);
30 30
31 // Sets up a vertex buffer containing 4 vertices that can be used to draw 31 // Sets up a vertex buffer containing 4 vertices that can be used to draw
32 // a quad as a tri-strip. 32 // a quad as a tri-strip.
33 static GLuint SetupQuadVertexBuffer(); 33 static GLuint SetupQuadVertexBuffer();
34 34
35 // Draws a quad to the currently bound frame buffer. 35 // Draws a quad to the currently bound frame buffer.
36 static void DrawQuad(GLuint vertex_buffer); 36 static void DrawQuad(GLuint vertex_buffer);
37
38 // When using the desktop core profile we have to bind a VAO before
39 // calling glVertexAttribPointer.
40 static bool ShouldTestsUseVAOs();
37 }; 41 };
38 42
39 } // namespace gl 43 } // namespace gl
40 44
41 #endif // UI_GL_GL_HELPER_H_ 45 #endif // UI_GL_GL_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gl/gl_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698