blob: 2ffb75705e65c1b78f7bd4bfc725a75a7b01246a (
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
|
// 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.
#include "webkit/tools/pepper_test_plugin/demo_3d.h"
#if !defined(INDEPENDENT_PLUGIN)
namespace pepper {
Demo3D::Demo3D() {
esInitContext(&context_);
memset(&user_data_, 0, sizeof(HTUserData));
context_.userData = &user_data_;
}
Demo3D::~Demo3D() {
}
void Demo3D::SetWindowSize(int width, int height) {
context_.width = width;
context_.height = height;
}
bool Demo3D::InitGL() {
return htInit(&context_);
}
void Demo3D::ReleaseGL() {
htShutDown(&context_);
}
void Demo3D::Draw() {
htDraw(&context_);
}
} // namespace pepper
#endif // INDEPENDENT_PLUGIN
|