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

Unified Diff: remoting/client/gl_helpers.h

Issue 2045963004: [Remoting] OpenGL Rendering Layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inlines Shaders & Fixes build files 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/gl_helpers.h
diff --git a/remoting/client/gl_helpers.h b/remoting/client/gl_helpers.h
new file mode 100644
index 0000000000000000000000000000000000000000..8dba721fbae157f92d41e80882c9ee8eb21489da
--- /dev/null
+++ b/remoting/client/gl_helpers.h
@@ -0,0 +1,29 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_CLIENT_GL_HELPERS_H_
+#define REMOTING_CLIENT_GL_HELPERS_H_
+
+#include "base/macros.h"
+#include "remoting/client/sys_opengl.h"
+
+namespace remoting {
+
+// Compiles a shader and returns the reference to the shader if it succeeds.
+GLuint CompileShader(GLenum shader_type, const char* shader_source);
+
+// Creates a program with the given reference to the vertex shader and fragment
+// shader. returns the reference of the program if it succeeds.
+GLuint CreateProgram(GLuint vertex_shader, GLuint fragment_shader);
+
+// Creates and returns the texture names if it succeeds.
+GLuint CreateTexture();
+
+// Creates a GL_ARRAY_BUFFER and fills it with |data|. Returns the reference to
+// the buffer.
+GLuint CreateBuffer(const void* data, int size);
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_GL_HELPERS_H_

Powered by Google App Engine
This is Rietveld 408576698