Removes getContext calls from Colorbuffer and DepthStencilbuffer constructors.

TRAC 21817 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1343 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent b783398c
...@@ -3435,11 +3435,6 @@ int Context::getMaxSupportedSamples() const ...@@ -3435,11 +3435,6 @@ int Context::getMaxSupportedSamples() const
return mRenderer->getMaxSupportedSamples(); return mRenderer->getMaxSupportedSamples();
} }
int Context::getNearestSupportedSamples(D3DFORMAT format, int requested) const
{
return mRenderer->getNearestSupportedSamples(format, requested);
}
bool Context::supportsEventQueries() const bool Context::supportsEventQueries() const
{ {
return mSupportsEventQueries; return mSupportsEventQueries;
......
...@@ -489,7 +489,6 @@ class Context ...@@ -489,7 +489,6 @@ class Context
int getMaximumCubeTextureDimension() const; int getMaximumCubeTextureDimension() const;
int getMaximumTextureLevel() const; int getMaximumTextureLevel() const;
GLsizei getMaxSupportedSamples() const; GLsizei getMaxSupportedSamples() const;
int getNearestSupportedSamples(D3DFORMAT format, int requested) const;
const char *getExtensionString() const; const char *getExtensionString() const;
const char *getRendererString() const; const char *getRendererString() const;
bool supportsEventQueries() const; bool supportsEventQueries() const;
......
...@@ -398,10 +398,11 @@ Colorbuffer::Colorbuffer(IDirect3DSurface9 *renderTarget) : mRenderTarget(render ...@@ -398,10 +398,11 @@ Colorbuffer::Colorbuffer(IDirect3DSurface9 *renderTarget) : mRenderTarget(render
Colorbuffer::Colorbuffer(int width, int height, GLenum format, GLsizei samples) : mRenderTarget(NULL) Colorbuffer::Colorbuffer(int width, int height, GLenum format, GLsizei samples) : mRenderTarget(NULL)
{ {
IDirect3DDevice9 *device = getDisplay()->getRenderer()->getDevice(); // D3D9_REPLACE renderer::Renderer *renderer = getDisplay()->getRenderer();
IDirect3DDevice9 *device = renderer->getDevice(); // D3D9_REPLACE
D3DFORMAT requestedFormat = es2dx::ConvertRenderbufferFormat(format); D3DFORMAT requestedFormat = es2dx::ConvertRenderbufferFormat(format);
int supportedSamples = getContext()->getNearestSupportedSamples(requestedFormat, samples); int supportedSamples = renderer->getNearestSupportedSamples(requestedFormat, samples);
if (supportedSamples == -1) if (supportedSamples == -1)
{ {
...@@ -471,11 +472,12 @@ DepthStencilbuffer::DepthStencilbuffer(IDirect3DSurface9 *depthStencil) : mDepth ...@@ -471,11 +472,12 @@ DepthStencilbuffer::DepthStencilbuffer(IDirect3DSurface9 *depthStencil) : mDepth
DepthStencilbuffer::DepthStencilbuffer(int width, int height, GLsizei samples) DepthStencilbuffer::DepthStencilbuffer(int width, int height, GLsizei samples)
{ {
IDirect3DDevice9 *device = getDisplay()->getRenderer()->getDevice(); // D3D9_REPLACE renderer::Renderer *renderer = getDisplay()->getRenderer();
IDirect3DDevice9 *device = renderer->getDevice(); // D3D9_REPLACE
mDepthStencil = NULL; mDepthStencil = NULL;
int supportedSamples = getContext()->getNearestSupportedSamples(D3DFMT_D24S8, samples); int supportedSamples = renderer->getNearestSupportedSamples(D3DFMT_D24S8, samples);
if (supportedSamples == -1) if (supportedSamples == -1)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment