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

Unified Diff: mojo/apps/js/bindings/gl/context.h

Issue 114883003: Implement more of the JavaScript GL API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asdf Created 7 years 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
« no previous file with comments | « mojo/apps/js/bindings/connector.js ('k') | mojo/apps/js/bindings/gl/context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/bindings/gl/context.h
diff --git a/mojo/apps/js/bindings/gl/context.h b/mojo/apps/js/bindings/gl/context.h
index a5a3ca10dc0d5338b49ff0d91356ba335631177f..081dbb259fe87a70393d421ba6cd30ba2281d08b 100644
--- a/mojo/apps/js/bindings/gl/context.h
+++ b/mojo/apps/js/bindings/gl/context.h
@@ -10,19 +10,17 @@
#include "gin/handle.h"
#include "gin/public/wrapper_info.h"
#include "gin/wrappable.h"
-#include "mojo/apps/js/bindings/gl/opaque.h"
#include "v8/include/v8.h"
namespace gin {
class Arguments;
+class ArrayBufferView;
}
namespace mojo {
namespace js {
namespace gl {
-typedef Opaque Shader;
-
// Context implements WebGLRenderingContext.
class Context : public gin::Wrappable<Context> {
public:
@@ -30,12 +28,23 @@ class Context : public gin::Wrappable<Context> {
static gin::Handle<Context> Create(v8::Isolate* isolate, uint64_t encoded,
int width, int height);
- static gin::Handle<Shader> CreateShader(const gin::Arguments& arguments,
- GLenum type);
- static void ShaderSource(gin::Handle<Shader> shader,
- const std::string& source);
- static void CompileShader(const gin::Arguments& arguments,
- gin::Handle<Shader> shader);
+
+ static void BufferData(GLenum target, const gin::ArrayBufferView& buffer,
+ GLenum usage);
+ static void CompileShader(const gin::Arguments& args, GLuint shader);
+ static GLuint CreateBuffer();
+ static void DrawElements(GLenum mode, GLsizei count, GLenum type,
+ uint64_t indices);
+ static GLint GetAttribLocation(GLuint program, const std::string& name);
+ static std::string GetProgramInfoLog(GLuint program);
+ static std::string GetShaderInfoLog(GLuint shader);
+ static GLint GetUniformLocation(GLuint program, const std::string& name);
+ static void ShaderSource(GLuint shader, const std::string& source);
+ static void UniformMatrix4fv(GLint location, GLboolean transpose,
+ const gin::ArrayBufferView& buffer);
+ static void VertexAttribPointer(GLuint index, GLint size, GLenum type,
+ GLboolean normalized, GLsizei stride,
+ uint64_t offset);
private:
virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
« no previous file with comments | « mojo/apps/js/bindings/connector.js ('k') | mojo/apps/js/bindings/gl/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698