summaryrefslogtreecommitdiffstats
path: root/gpu/demos/gles2_book/simple_vertex_shader.cc
blob: 0f8b72ea1e62a7de33fd26c1179d24ca277c4364 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2010 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.

// This is a simple example that draws a rotating cube in perspective
// using a vertex shader to transform the object.

#include "gpu/demos/framework/demo_factory.h"
#include "gpu/demos/gles2_book/example.h"
#include "third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.h"

namespace gpu {
namespace demos {

namespace gles2_book {
class SimpleVertexShader : public Example<SVSUserData> {
 public:
  SimpleVertexShader() {
    RegisterCallbacks(svsInit, svsUpdate, svsDraw, svsShutDown);
  }

  const wchar_t* Title() const {
    return L"Simple Vertex Shader";
  }

  virtual bool IsAnimated() {
    return true;
  }
};
}  // namespace gles2_book

Demo* CreateDemo() {
  return new gles2_book::SimpleVertexShader();
}

}  // namespace demos
}  // namespace gpu