daniel@transgaming.com | feae9b3 | 2012-11-28 19:34:56 +0000 | [diff] [blame] | 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 | // renderer11_utils.h: Conversion functions and other utility routines |
| 8 | // specific to the D3D11 renderer. |
| 9 | |
daniel@transgaming.com | 65e6537 | 2012-11-28 19:33:50 +0000 | [diff] [blame] | 10 | #define GL_APICALL |
| 11 | #include <GLES2/gl2.h> |
| 12 | #include <GLES2/gl2ext.h> |
daniel@transgaming.com | feae9b3 | 2012-11-28 19:34:56 +0000 | [diff] [blame] | 13 | #include <d3d11.h> |
| 14 | |
daniel@transgaming.com | fa34b34 | 2012-11-28 19:38:01 +0000 | [diff] [blame] | 15 | #include "libGLESv2/angletypes.h" |
| 16 | |
| 17 | namespace gl_d3d11 |
| 18 | { |
| 19 | |
| 20 | D3D11_BLEND ConvertBlendFunc(GLenum glBlend); |
| 21 | D3D11_BLEND_OP ConvertBlendOp(GLenum glBlendOp); |
| 22 | UINT8 ConvertColorMask(bool maskRed, bool maskGreen, bool maskBlue, bool maskAlpha); |
| 23 | |
| 24 | D3D11_CULL_MODE ConvertCullMode(bool cullEnabled, GLenum cullMode); |
| 25 | |
| 26 | } |
daniel@transgaming.com | 6b14771 | 2012-11-28 19:37:24 +0000 | [diff] [blame] | 27 | |
daniel@transgaming.com | feae9b3 | 2012-11-28 19:34:56 +0000 | [diff] [blame] | 28 | namespace d3d11_gl |
| 29 | { |
| 30 | |
| 31 | GLenum ConvertBackBufferFormat(DXGI_FORMAT format); |
| 32 | GLenum ConvertDepthStencilFormat(DXGI_FORMAT format); |
| 33 | GLenum ConvertRenderbufferFormat(DXGI_FORMAT format); |
| 34 | GLenum ConvertTextureInternalFormat(DXGI_FORMAT format); |
| 35 | } |
| 36 | |
| 37 | namespace gl_d3d11 |
| 38 | { |
| 39 | DXGI_FORMAT ConvertRenderbufferFormat(GLenum format); |
| 40 | DXGI_FORMAT ConvertTextureInternalFormat(GLenum internalformat); |
| 41 | } |