gfx/angle/src/libGLESv2/renderer/SwapChain9.h

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:dca2108b2151
1 //
2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6
7 // SwapChain9.h: Defines a back-end specific class for the D3D9 swap chain.
8
9 #ifndef LIBGLESV2_RENDERER_SWAPCHAIN9_H_
10 #define LIBGLESV2_RENDERER_SWAPCHAIN9_H_
11
12 #include "common/angleutils.h"
13 #include "libGLESv2/renderer/SwapChain.h"
14
15 namespace rx
16 {
17 class Renderer9;
18
19 class SwapChain9 : public SwapChain
20 {
21 public:
22 SwapChain9(Renderer9 *renderer, HWND window, HANDLE shareHandle,
23 GLenum backBufferFormat, GLenum depthBufferFormat);
24 virtual ~SwapChain9();
25
26 EGLint resize(EGLint backbufferWidth, EGLint backbufferHeight);
27 virtual EGLint reset(EGLint backbufferWidth, EGLint backbufferHeight, EGLint swapInterval);
28 virtual EGLint swapRect(EGLint x, EGLint y, EGLint width, EGLint height);
29 virtual void recreate();
30
31 virtual IDirect3DSurface9 *getRenderTarget();
32 virtual IDirect3DSurface9 *getDepthStencil();
33 virtual IDirect3DTexture9 *getOffscreenTexture();
34
35 static SwapChain9 *makeSwapChain9(SwapChain *swapChain);
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(SwapChain9);
39
40 void release();
41
42 Renderer9 *mRenderer;
43 EGLint mHeight;
44 EGLint mWidth;
45 EGLint mSwapInterval;
46
47 IDirect3DSwapChain9 *mSwapChain;
48 IDirect3DSurface9 *mBackBuffer;
49 IDirect3DSurface9 *mRenderTarget;
50 IDirect3DSurface9 *mDepthStencil;
51 IDirect3DTexture9* mOffscreenTexture;
52 };
53
54 }
55 #endif // LIBGLESV2_RENDERER_SWAPCHAIN9_H_

mercurial