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

Side by Side Diff: gpu/demos/gles2_book/demo_hello_triangle.cc

Issue 22299002: Reland a portion of r215672. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « gpu/demos/demos.gyp ('k') | gpu/demos/gles2_book/demo_mip_map_2d.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This is a simple example that draws a single triangle with
6 // a minimal vertex/fragment shader. The purpose of this
7 // example is to demonstrate the basic concepts of
8 // OpenGL ES 2.0 rendering.
9
10 #include "gpu/demos/framework/demo_factory.h"
11 #include "gpu/demos/gles2_book/example.h"
12 #include "third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.h"
13
14 namespace gpu {
15 namespace demos {
16
17 namespace gles2_book {
18 class HelloTriangle : public Example<HTUserData> {
19 public:
20 HelloTriangle() {
21 RegisterCallbacks(htInit, NULL, htDraw, htShutDown);
22 }
23
24 const wchar_t* Title() const {
25 return L"Hello Triangle";
26 }
27 };
28 } // namespace gles2_book
29
30 Demo* CreateDemo() {
31 return new gles2_book::HelloTriangle();
32 }
33
34 } // namespace demos
35 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/demos/demos.gyp ('k') | gpu/demos/gles2_book/demo_mip_map_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698