OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "remoting/client/gl_helpers.h" | 5 #include "remoting/client/display/gl_helpers.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace remoting { | 9 namespace remoting { |
10 | 10 |
11 GLuint CompileShader(GLenum shader_type, const char* shader_source) { | 11 GLuint CompileShader(GLenum shader_type, const char* shader_source) { |
12 GLuint shader = glCreateShader(shader_type); | 12 GLuint shader = glCreateShader(shader_type); |
13 | 13 |
14 if (shader != 0) { | 14 if (shader != 0) { |
15 int shader_source_length = strlen(shader_source); | 15 int shader_source_length = strlen(shader_source); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 GLuint CreateBuffer(const void* data, int size) { | 76 GLuint CreateBuffer(const void* data, int size) { |
77 GLuint buffer; | 77 GLuint buffer; |
78 glGenBuffers(1, &buffer); | 78 glGenBuffers(1, &buffer); |
79 glBindBuffer(GL_ARRAY_BUFFER, buffer); | 79 glBindBuffer(GL_ARRAY_BUFFER, buffer); |
80 glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW); | 80 glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW); |
81 glBindBuffer(GL_ARRAY_BUFFER, 0); | 81 glBindBuffer(GL_ARRAY_BUFFER, 0); |
82 return buffer; | 82 return buffer; |
83 } | 83 } |
84 | 84 |
85 } // namespace remoting | 85 } // namespace remoting |
OLD | NEW |