daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +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 | |
daniel@transgaming.com | 1d6aff2 | 2012-11-28 19:30:42 +0000 | [diff] [blame] | 7 | // Renderer9.h: Defines a back-end specific class for the D3D9 renderer. |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 8 | |
| 9 | #ifndef LIBGLESV2_RENDERER_RENDERER9_H_ |
| 10 | #define LIBGLESV2_RENDERER_RENDERER9_H_ |
| 11 | |
| 12 | #include <set> |
| 13 | #include <map> |
| 14 | #include <vector> |
| 15 | |
| 16 | #define GL_APICALL |
| 17 | #include <GLES2/gl2.h> |
| 18 | #include <GLES2/gl2ext.h> |
| 19 | #define EGLAPI |
| 20 | #include <EGL/egl.h> |
| 21 | |
daniel@transgaming.com | 1d6aff2 | 2012-11-28 19:30:42 +0000 | [diff] [blame] | 22 | #include <d3d9.h> |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 23 | |
| 24 | #include "common/angleutils.h" |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 25 | #include "libGLESv2/Context.h" |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 26 | #include "libGLESv2/renderer/ShaderCache.h" |
daniel@transgaming.com | 4a186ed | 2012-11-28 20:56:15 +0000 | [diff] [blame] | 27 | #include "libGLESv2/renderer/VertexDeclarationCache.h" |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 28 | #include "libGLESv2/renderer/Renderer.h" |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 29 | #include "libGLESv2/IndexDataManager.h" |
daniel@transgaming.com | 67094ee | 2012-11-28 20:53:04 +0000 | [diff] [blame] | 30 | |
| 31 | namespace gl |
| 32 | { |
daniel@transgaming.com | a9c7142 | 2012-11-28 20:58:45 +0000 | [diff] [blame] | 33 | class D3DConstantTable; |
daniel@transgaming.com | 67094ee | 2012-11-28 20:53:04 +0000 | [diff] [blame] | 34 | class VertexDataManager; |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 35 | class StreamingIndexBuffer; |
| 36 | struct TranslatedAttribute; |
daniel@transgaming.com | 67094ee | 2012-11-28 20:53:04 +0000 | [diff] [blame] | 37 | } |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 38 | |
daniel@transgaming.com | 76d3e6e | 2012-10-31 19:55:33 +0000 | [diff] [blame] | 39 | namespace rx |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 40 | { |
| 41 | |
| 42 | class Renderer9 : public Renderer |
| 43 | { |
| 44 | public: |
daniel@transgaming.com | 95ffbc1 | 2012-10-31 19:55:27 +0000 | [diff] [blame] | 45 | Renderer9(egl::Display *display, HDC hDc, bool softwareDevice); |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 46 | virtual ~Renderer9(); |
| 47 | |
daniel@transgaming.com | b64ed28 | 2012-11-28 20:54:02 +0000 | [diff] [blame] | 48 | static Renderer9 *makeRenderer9(Renderer *renderer); |
| 49 | |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 50 | virtual EGLint initialize(); |
| 51 | virtual bool resetDevice(); |
| 52 | |
| 53 | virtual int generateConfigs(ConfigDesc **configDescList); |
| 54 | virtual void deleteConfigs(ConfigDesc *configDescList); |
| 55 | |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 56 | void startScene(); |
| 57 | void endScene(); |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 58 | |
| 59 | virtual void sync(bool block); |
daniel@transgaming.com | b9bb279 | 2012-11-28 19:36:49 +0000 | [diff] [blame] | 60 | |
| 61 | virtual SwapChain *createSwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat); |
| 62 | |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 63 | IDirect3DQuery9* allocateEventQuery(); |
| 64 | void freeEventQuery(IDirect3DQuery9* query); |
| 65 | |
| 66 | // resource creation |
daniel@transgaming.com | 113f0eb | 2012-10-31 18:46:58 +0000 | [diff] [blame] | 67 | IDirect3DVertexShader9 *createVertexShader(const DWORD *function, size_t length); |
| 68 | IDirect3DPixelShader9 *createPixelShader(const DWORD *function, size_t length); |
| 69 | HRESULT createVertexBuffer(UINT Length, DWORD Usage, IDirect3DVertexBuffer9 **ppVertexBuffer); |
| 70 | HRESULT createIndexBuffer(UINT Length, DWORD Usage, D3DFORMAT Format, IDirect3DIndexBuffer9 **ppIndexBuffer); |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 71 | #if 0 |
| 72 | void *createTexture2D(); |
| 73 | void *createTextureCube(); |
daniel@transgaming.com | 4f0af57 | 2012-10-31 19:55:46 +0000 | [diff] [blame] | 74 | void *createQuery(); |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 75 | void *createIndexBuffer(); |
| 76 | void *createVertexbuffer(); |
| 77 | |
| 78 | // state setup |
| 79 | void applyShaders(); |
| 80 | void applyConstants(); |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 81 | #endif |
| 82 | virtual void setSamplerState(gl::SamplerType type, int index, const gl::SamplerState &sampler); |
| 83 | virtual void setTexture(gl::SamplerType type, int index, gl::Texture *texture); |
| 84 | |
daniel@transgaming.com | 237bc7e | 2012-11-28 21:01:06 +0000 | [diff] [blame] | 85 | virtual void setRasterizerState(const gl::RasterizerState &rasterState); |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 86 | virtual void setBlendState(const gl::BlendState &blendState, const gl::Color &blendColor, |
| 87 | unsigned int sampleMask); |
daniel@transgaming.com | 08c331d | 2012-11-28 19:38:39 +0000 | [diff] [blame] | 88 | virtual void setDepthStencilState(const gl::DepthStencilState &depthStencilState, int stencilRef, |
daniel@transgaming.com | 3a0ef48 | 2012-11-28 21:01:20 +0000 | [diff] [blame] | 89 | int stencilBackRef, bool frontFaceCCW); |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 90 | |
daniel@transgaming.com | 04f1b33 | 2012-11-28 21:00:40 +0000 | [diff] [blame] | 91 | virtual void setScissorRectangle(const gl::Rectangle &scissor); |
daniel@transgaming.com | 4c4ce23 | 2012-11-28 21:01:40 +0000 | [diff] [blame] | 92 | virtual bool setViewport(const gl::Rectangle &viewport, float zNear, float zFar, bool ignoreViewport, |
daniel@transgaming.com | 83e80ee | 2012-11-28 19:40:53 +0000 | [diff] [blame] | 93 | gl::ProgramBinary *currentProgram, bool forceSetUniforms); |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 94 | |
daniel@transgaming.com | ae39ee2 | 2012-11-28 19:42:02 +0000 | [diff] [blame] | 95 | virtual bool applyRenderTarget(gl::Framebuffer *frameBuffer); |
daniel@transgaming.com | 5fbf177 | 2012-11-28 20:54:43 +0000 | [diff] [blame] | 96 | virtual void applyShaders(gl::ProgramBinary *programBinary); |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 97 | virtual bool applyPrimitiveType(GLenum primitiveType, GLsizei elementCount); |
| 98 | virtual GLenum applyVertexBuffer(gl::ProgramBinary *programBinary, gl::VertexAttribute vertexAttributes[], GLint first, GLsizei count, GLsizei instances); |
| 99 | virtual GLenum applyIndexBuffer(const GLvoid *indices, gl::Buffer *elementArrayBuffer, GLsizei count, GLenum mode, GLenum type, gl::TranslatedIndexData *indexInfo); |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 100 | |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 101 | virtual void drawArrays(GLenum mode, GLsizei count, GLsizei instances); |
daniel@transgaming.com | 97400dd | 2012-11-28 20:57:00 +0000 | [diff] [blame] | 102 | virtual void drawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, gl::Buffer *elementArrayBuffer, const gl::TranslatedIndexData &indexInfo); |
daniel@transgaming.com | 67094ee | 2012-11-28 20:53:04 +0000 | [diff] [blame] | 103 | |
daniel@transgaming.com | 084a257 | 2012-11-28 20:55:17 +0000 | [diff] [blame] | 104 | virtual void clear(const gl::ClearParameters &clearParams, gl::Framebuffer *frameBuffer); |
daniel@transgaming.com | d084c62 | 2012-11-28 19:36:05 +0000 | [diff] [blame] | 105 | |
daniel@transgaming.com | c43a605 | 2012-11-28 19:41:51 +0000 | [diff] [blame] | 106 | virtual void markAllStateDirty(); |
| 107 | |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 108 | // lost device |
| 109 | virtual void markDeviceLost(); |
| 110 | virtual bool isDeviceLost(); |
| 111 | virtual bool testDeviceLost(bool notify); |
| 112 | virtual bool testDeviceResettable(); |
| 113 | |
| 114 | // Renderer capabilities |
daniel@transgaming.com | 1d6aff2 | 2012-11-28 19:30:42 +0000 | [diff] [blame] | 115 | IDirect3DDevice9 *getDevice() { return mDevice; } |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 116 | virtual DWORD getAdapterVendor() const; |
| 117 | virtual const char *getAdapterDescription() const; |
| 118 | virtual GUID getAdapterIdentifier() const; |
| 119 | |
| 120 | virtual bool getDXT1TextureSupport(); |
| 121 | virtual bool getDXT3TextureSupport(); |
| 122 | virtual bool getDXT5TextureSupport(); |
| 123 | virtual bool getEventQuerySupport(); |
| 124 | virtual bool getFloat32TextureSupport(bool *filtering, bool *renderable); |
| 125 | virtual bool getFloat16TextureSupport(bool *filtering, bool *renderable); |
| 126 | virtual bool getLuminanceTextureSupport(); |
| 127 | virtual bool getLuminanceAlphaTextureSupport(); |
| 128 | virtual bool getVertexTextureSupport() const; |
| 129 | virtual bool getNonPower2TextureSupport() const; |
| 130 | virtual bool getDepthTextureSupport() const; |
| 131 | virtual bool getOcclusionQuerySupport() const; |
| 132 | virtual bool getInstancingSupport() const; |
| 133 | virtual bool getTextureFilterAnisotropySupport() const; |
| 134 | virtual float getTextureMaxAnisotropy() const; |
| 135 | virtual bool getShareHandleSupport() const; |
| 136 | |
daniel@transgaming.com | 9549bea | 2012-11-28 20:57:23 +0000 | [diff] [blame] | 137 | virtual int getMajorShaderModel() const; |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 138 | virtual float getMaxPointSize() const; |
| 139 | virtual int getMaxTextureWidth() const; |
| 140 | virtual int getMaxTextureHeight() const; |
| 141 | virtual bool get32BitIndexSupport() const; |
| 142 | DWORD getCapsDeclTypes() const; // D3D9_REPLACE |
| 143 | virtual int getMinSwapInterval() const; |
| 144 | virtual int getMaxSwapInterval() const; |
| 145 | |
| 146 | virtual GLsizei getMaxSupportedSamples() const; |
| 147 | int getNearestSupportedSamples(D3DFORMAT format, int requested) const; |
daniel@transgaming.com | a957168 | 2012-11-28 19:33:08 +0000 | [diff] [blame] | 148 | |
| 149 | D3DFORMAT ConvertTextureInternalFormat(GLint internalformat); |
daniel@transgaming.com | 1d80eee | 2012-11-28 19:33:31 +0000 | [diff] [blame] | 150 | |
daniel@transgaming.com | a9c7142 | 2012-11-28 20:58:45 +0000 | [diff] [blame] | 151 | // Pixel operations |
daniel@transgaming.com | 31b13e1 | 2012-11-28 19:34:30 +0000 | [diff] [blame] | 152 | virtual bool copyToRenderTarget(TextureStorage2D *dest, TextureStorage2D *source); |
| 153 | virtual bool copyToRenderTarget(TextureStorageCubeMap *dest, TextureStorageCubeMap *source); |
daniel@transgaming.com | 1d80eee | 2012-11-28 19:33:31 +0000 | [diff] [blame] | 154 | |
daniel@transgaming.com | 3838088 | 2012-11-28 19:36:39 +0000 | [diff] [blame] | 155 | virtual bool copyImage(gl::Framebuffer *framebuffer, const RECT &sourceRect, GLenum destFormat, |
| 156 | GLint xoffset, GLint yoffset, TextureStorage2D *storage, GLint level); |
| 157 | virtual bool copyImage(gl::Framebuffer *framebuffer, const RECT &sourceRect, GLenum destFormat, |
| 158 | GLint xoffset, GLint yoffset, TextureStorageCubeMap *storage, GLenum target, GLint level); |
daniel@transgaming.com | de8a7ff | 2012-11-28 19:34:13 +0000 | [diff] [blame] | 159 | |
daniel@transgaming.com | 6c87217 | 2012-11-28 19:39:33 +0000 | [diff] [blame] | 160 | virtual bool blitRect(gl::Framebuffer *readTarget, gl::Rectangle *readRect, gl::Framebuffer *drawTarget, gl::Rectangle *drawRect, |
| 161 | bool blitRenderTarget, bool blitDepthStencil); |
| 162 | virtual void readPixels(gl::Framebuffer *framebuffer, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, |
| 163 | GLsizei outputPitch, bool packReverseRowOrder, GLint packAlignment, void* pixels); |
| 164 | |
daniel@transgaming.com | a9c7142 | 2012-11-28 20:58:45 +0000 | [diff] [blame] | 165 | // RenderTarget creation |
daniel@transgaming.com | f242365 | 2012-11-28 20:53:50 +0000 | [diff] [blame] | 166 | virtual RenderTarget *createRenderTarget(SwapChain *swapChain, bool depth); |
| 167 | virtual RenderTarget *createRenderTarget(int width, int height, GLenum format, GLsizei samples, bool depth); |
| 168 | |
daniel@transgaming.com | a9c7142 | 2012-11-28 20:58:45 +0000 | [diff] [blame] | 169 | // Shader operations |
daniel@transgaming.com | 7b18d0c | 2012-11-28 21:04:10 +0000 | [diff] [blame] | 170 | virtual ShaderExecutable *loadExecutable(const void *function, size_t length, GLenum type, void *data); |
daniel@transgaming.com | a9c7142 | 2012-11-28 20:58:45 +0000 | [diff] [blame] | 171 | virtual ShaderExecutable *compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, GLenum type); |
| 172 | |
| 173 | // D3D9-renderer specific methods |
daniel@transgaming.com | de8a7ff | 2012-11-28 19:34:13 +0000 | [diff] [blame] | 174 | bool boxFilter(IDirect3DSurface9 *source, IDirect3DSurface9 *dest); |
| 175 | |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 176 | D3DPOOL getTexturePool(DWORD usage) const; |
| 177 | |
| 178 | private: |
| 179 | DISALLOW_COPY_AND_ASSIGN(Renderer9); |
| 180 | |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 181 | void drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, int minIndex, gl::Buffer *elementArrayBuffer); |
| 182 | |
daniel@transgaming.com | 222ee08 | 2012-11-28 19:31:49 +0000 | [diff] [blame] | 183 | void getMultiSampleSupport(D3DFORMAT format, bool *multiSampleArray); |
daniel@transgaming.com | 1d80eee | 2012-11-28 19:33:31 +0000 | [diff] [blame] | 184 | bool copyToRenderTarget(IDirect3DSurface9 *dest, IDirect3DSurface9 *source, bool fromManaged); |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 185 | |
daniel@transgaming.com | 113f0eb | 2012-10-31 18:46:58 +0000 | [diff] [blame] | 186 | D3DPOOL getBufferPool(DWORD usage) const; |
| 187 | |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 188 | HMODULE mD3d9Module; |
| 189 | HDC mDc; |
| 190 | |
| 191 | void initializeDevice(); |
| 192 | D3DPRESENT_PARAMETERS getDefaultPresentParameters(); |
| 193 | void releaseDeviceResources(); |
| 194 | |
| 195 | UINT mAdapter; |
| 196 | D3DDEVTYPE mDeviceType; |
daniel@transgaming.com | 95ffbc1 | 2012-10-31 19:55:27 +0000 | [diff] [blame] | 197 | bool mSoftwareDevice; // FIXME: Deprecate |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 198 | IDirect3D9 *mD3d9; // Always valid after successful initialization. |
| 199 | IDirect3D9Ex *mD3d9Ex; // Might be null if D3D9Ex is not supported. |
| 200 | IDirect3DDevice9 *mDevice; |
| 201 | IDirect3DDevice9Ex *mDeviceEx; // Might be null if D3D9Ex is not supported. |
| 202 | |
daniel@transgaming.com | de8a7ff | 2012-11-28 19:34:13 +0000 | [diff] [blame] | 203 | Blit *mBlit; |
| 204 | |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 205 | HWND mDeviceWindow; |
| 206 | |
| 207 | bool mDeviceLost; |
| 208 | D3DCAPS9 mDeviceCaps; |
| 209 | D3DADAPTER_IDENTIFIER9 mAdapterIdentifier; |
| 210 | |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 211 | D3DPRIMITIVETYPE mPrimitiveType; |
| 212 | int mPrimitiveCount; |
| 213 | GLsizei mRepeatDraw; |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 214 | |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 215 | bool mSceneStarted; |
| 216 | bool mSupportsNonPower2Textures; |
| 217 | bool mSupportsTextureFilterAnisotropy; |
| 218 | int mMinSwapInterval; |
| 219 | int mMaxSwapInterval; |
| 220 | |
| 221 | std::map<D3DFORMAT, bool *> mMultiSampleSupport; |
| 222 | GLsizei mMaxSupportedSamples; |
| 223 | |
daniel@transgaming.com | 220e79a | 2012-11-28 19:42:11 +0000 | [diff] [blame] | 224 | // current render target states |
| 225 | unsigned int mAppliedRenderTargetSerial; |
| 226 | unsigned int mAppliedDepthbufferSerial; |
| 227 | unsigned int mAppliedStencilbufferSerial; |
| 228 | bool mDepthStencilInitialized; |
| 229 | bool mRenderTargetDescInitialized; |
| 230 | rx::RenderTarget::Desc mRenderTargetDesc; |
daniel@transgaming.com | 3a0ef48 | 2012-11-28 21:01:20 +0000 | [diff] [blame] | 231 | unsigned int mCurStencilSize; |
daniel@transgaming.com | 237bc7e | 2012-11-28 21:01:06 +0000 | [diff] [blame] | 232 | unsigned int mCurDepthSize; |
daniel@transgaming.com | 220e79a | 2012-11-28 19:42:11 +0000 | [diff] [blame] | 233 | |
daniel@transgaming.com | 0393e5b | 2012-11-28 20:55:33 +0000 | [diff] [blame] | 234 | IDirect3DStateBlock9 *mMaskedClearSavedState; |
| 235 | |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 236 | // previously set render states |
| 237 | bool mForceSetDepthStencilState; |
| 238 | gl::DepthStencilState mCurDepthStencilState; |
daniel@transgaming.com | 08c331d | 2012-11-28 19:38:39 +0000 | [diff] [blame] | 239 | int mCurStencilRef; |
| 240 | int mCurStencilBackRef; |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 241 | bool mCurFrontFaceCCW; |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 242 | |
| 243 | bool mForceSetRasterState; |
| 244 | gl::RasterizerState mCurRasterState; |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 245 | |
| 246 | bool mForceSetScissor; |
| 247 | gl::Rectangle mCurScissor; |
| 248 | unsigned int mCurRenderTargetWidth; |
| 249 | unsigned int mCurRenderTargetHeight; |
| 250 | |
daniel@transgaming.com | 83e80ee | 2012-11-28 19:40:53 +0000 | [diff] [blame] | 251 | bool mForceSetViewport; |
| 252 | gl::Rectangle mCurViewport; |
| 253 | float mCurNear; |
| 254 | float mCurFar; |
| 255 | |
daniel@transgaming.com | 493d4f8 | 2012-11-28 19:35:45 +0000 | [diff] [blame] | 256 | bool mForceSetBlendState; |
| 257 | gl::BlendState mCurBlendState; |
| 258 | gl::Color mCurBlendColor; |
| 259 | GLuint mCurSampleMask; |
| 260 | |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 261 | unsigned int mAppliedIBSerial; |
| 262 | |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 263 | // A pool of event queries that are currently unused. |
| 264 | std::vector<IDirect3DQuery9*> mEventQueryPool; |
| 265 | VertexShaderCache mVertexShaderCache; |
| 266 | PixelShaderCache mPixelShaderCache; |
daniel@transgaming.com | 67094ee | 2012-11-28 20:53:04 +0000 | [diff] [blame] | 267 | |
| 268 | gl::VertexDataManager *mVertexDataManager; |
| 269 | VertexDeclarationCache mVertexDeclarationCache; |
daniel@transgaming.com | 91207b7 | 2012-11-28 20:56:43 +0000 | [diff] [blame] | 270 | |
| 271 | gl::IndexDataManager *mIndexDataManager; |
| 272 | gl::StreamingIndexBuffer *mLineLoopIB; |
daniel@transgaming.com | 2507f41 | 2012-10-31 18:46:48 +0000 | [diff] [blame] | 273 | }; |
| 274 | |
| 275 | } |
| 276 | #endif // LIBGLESV2_RENDERER_RENDERER9_H_ |