blob: fed235c8c74f1573c0ddf8c4263f2c23909073bc [file] [log] [blame]
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00001//
2// Copyright (c) 2002-2010 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// Renderbuffer.cpp: the gl::Renderbuffer class and its derived classes
8// Colorbuffer, Depthbuffer and Stencilbuffer. Implements GL renderbuffer
9// objects and related functionality. [OpenGL ES 2.0.24] section 4.4.3 page 108.
10
daniel@transgaming.combbf56f72010-04-20 18:52:13 +000011#include "libGLESv2/Renderbuffer.h"
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000012
daniel@transgaming.combbf56f72010-04-20 18:52:13 +000013#include "libGLESv2/main.h"
enne@chromium.org0fa74632010-09-21 16:18:52 +000014#include "libGLESv2/Texture.h"
daniel@transgaming.combbf56f72010-04-20 18:52:13 +000015#include "libGLESv2/utilities.h"
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000016
17namespace gl
18{
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000019unsigned int RenderbufferStorage::mCurrentSerial = 1;
daniel@transgaming.com092bd482010-05-12 03:39:36 +000020
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000021Renderbuffer::Renderbuffer(GLuint id, RenderbufferStorage *storage) : RefCountObject(id)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000022{
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000023 ASSERT(storage != NULL);
24 mStorage = storage;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000025}
26
27Renderbuffer::~Renderbuffer()
28{
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000029 delete mStorage;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000030}
31
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000032bool Renderbuffer::isColorbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000033{
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000034 return mStorage->isColorbuffer();
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000035}
36
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000037bool Renderbuffer::isDepthbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000038{
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000039 return mStorage->isDepthbuffer();
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000040}
41
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000042bool Renderbuffer::isStencilbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000043{
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000044 return mStorage->isStencilbuffer();
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000045}
46
47IDirect3DSurface9 *Renderbuffer::getRenderTarget()
48{
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000049 return mStorage->getRenderTarget();
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000050}
51
52IDirect3DSurface9 *Renderbuffer::getDepthStencil()
53{
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000054 return mStorage->getDepthStencil();
55}
56
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +000057GLsizei Renderbuffer::getWidth() const
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000058{
59 return mStorage->getWidth();
60}
61
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +000062GLsizei Renderbuffer::getHeight() const
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000063{
64 return mStorage->getHeight();
65}
66
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +000067GLenum Renderbuffer::getInternalFormat() const
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000068{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +000069 return mStorage->getInternalFormat();
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +000070}
71
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +000072GLuint Renderbuffer::getRedSize() const
daniel@transgaming.com4cbc5902010-08-24 19:20:26 +000073{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +000074 return mStorage->getRedSize();
75}
76
77GLuint Renderbuffer::getGreenSize() const
78{
79 return mStorage->getGreenSize();
80}
81
82GLuint Renderbuffer::getBlueSize() const
83{
84 return mStorage->getBlueSize();
85}
86
87GLuint Renderbuffer::getAlphaSize() const
88{
89 return mStorage->getAlphaSize();
90}
91
92GLuint Renderbuffer::getDepthSize() const
93{
94 return mStorage->getDepthSize();
95}
96
97GLuint Renderbuffer::getStencilSize() const
98{
99 return mStorage->getStencilSize();
100}
101
102GLsizei Renderbuffer::getSamples() const
103{
104 return mStorage->getSamples();
daniel@transgaming.com4cbc5902010-08-24 19:20:26 +0000105}
106
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000107unsigned int Renderbuffer::getSerial() const
108{
109 return mStorage->getSerial();
110}
111
112void Renderbuffer::setStorage(RenderbufferStorage *newStorage)
113{
114 ASSERT(newStorage != NULL);
115
116 delete mStorage;
117 mStorage = newStorage;
118}
119
daniel@transgaming.com73a5db62010-10-15 17:58:13 +0000120RenderbufferStorage::RenderbufferStorage() : mSerial(issueSerial())
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000121{
daniel@transgaming.com73a5db62010-10-15 17:58:13 +0000122 mWidth = 0;
123 mHeight = 0;
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000124 mInternalFormat = GL_RGBA4;
daniel@transgaming.com73a5db62010-10-15 17:58:13 +0000125 mD3DFormat = D3DFMT_A8R8G8B8;
126 mSamples = 0;
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000127}
128
129RenderbufferStorage::~RenderbufferStorage()
130{
131}
132
133bool RenderbufferStorage::isColorbuffer() const
134{
135 return false;
136}
137
138bool RenderbufferStorage::isDepthbuffer() const
139{
140 return false;
141}
142
143bool RenderbufferStorage::isStencilbuffer() const
144{
145 return false;
146}
147
148IDirect3DSurface9 *RenderbufferStorage::getRenderTarget()
149{
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000150 return NULL;
151}
152
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000153IDirect3DSurface9 *RenderbufferStorage::getDepthStencil()
154{
155 return NULL;
156}
157
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000158GLsizei RenderbufferStorage::getWidth() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000159{
160 return mWidth;
161}
162
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000163GLsizei RenderbufferStorage::getHeight() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000164{
165 return mHeight;
166}
167
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000168GLenum RenderbufferStorage::getInternalFormat() const
daniel@transgaming.com866f3182010-05-20 19:28:22 +0000169{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000170 return mInternalFormat;
daniel@transgaming.com866f3182010-05-20 19:28:22 +0000171}
172
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000173GLuint RenderbufferStorage::getRedSize() const
daniel@transgaming.com4901fca2010-04-20 18:52:41 +0000174{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000175 return dx2es::GetRedSize(getD3DFormat());
daniel@transgaming.com4901fca2010-04-20 18:52:41 +0000176}
177
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000178GLuint RenderbufferStorage::getGreenSize() const
daniel@transgaming.com1297d922010-09-01 15:47:47 +0000179{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000180 return dx2es::GetGreenSize(getD3DFormat());
daniel@transgaming.com1297d922010-09-01 15:47:47 +0000181}
182
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000183GLuint RenderbufferStorage::getBlueSize() const
daniel@transgaming.com4cbc5902010-08-24 19:20:26 +0000184{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000185 return dx2es::GetBlueSize(getD3DFormat());
186}
187
188GLuint RenderbufferStorage::getAlphaSize() const
189{
190 return dx2es::GetAlphaSize(getD3DFormat());
191}
192
193GLuint RenderbufferStorage::getDepthSize() const
194{
195 return dx2es::GetDepthSize(getD3DFormat());
196}
197
198GLuint RenderbufferStorage::getStencilSize() const
199{
200 return dx2es::GetStencilSize(getD3DFormat());
daniel@transgaming.com4cbc5902010-08-24 19:20:26 +0000201}
202
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000203GLsizei RenderbufferStorage::getSamples() const
204{
205 return mSamples;
206}
207
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000208D3DFORMAT RenderbufferStorage::getD3DFormat() const
209{
210 return mD3DFormat;
211}
212
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000213unsigned int RenderbufferStorage::getSerial() const
daniel@transgaming.com092bd482010-05-12 03:39:36 +0000214{
215 return mSerial;
216}
217
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000218unsigned int RenderbufferStorage::issueSerial()
daniel@transgaming.com092bd482010-05-12 03:39:36 +0000219{
220 return mCurrentSerial++;
221}
222
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000223Colorbuffer::Colorbuffer(IDirect3DSurface9 *renderTarget) : mRenderTarget(renderTarget), mTexture(NULL)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000224{
225 if (renderTarget)
226 {
227 renderTarget->AddRef();
228
229 D3DSURFACE_DESC description;
230 renderTarget->GetDesc(&description);
231
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000232 mWidth = description.Width;
233 mHeight = description.Height;
234 mInternalFormat = dx2es::ConvertBackBufferFormat(description.Format);
daniel@transgaming.comca7c0082010-08-24 19:20:20 +0000235 mD3DFormat = description.Format;
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000236 mSamples = dx2es::GetSamplesFromMultisampleType(description.MultiSampleType);
daniel@transgaming.comca7c0082010-08-24 19:20:20 +0000237 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000238}
239
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000240Colorbuffer::Colorbuffer(Texture *texture, GLenum target) : mRenderTarget(NULL), mTexture(texture), mTarget(target)
enne@chromium.org0fa74632010-09-21 16:18:52 +0000241{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000242 if (texture)
243 {
244 mWidth = texture->getWidth();
245 mHeight = texture->getHeight();
246 mInternalFormat = texture->getInternalFormat();
247 mD3DFormat = texture->getD3DFormat();
248 mSamples = 0;
249
250 mRenderTarget = texture->getRenderTarget(target);
251 }
enne@chromium.org0fa74632010-09-21 16:18:52 +0000252}
253
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000254Colorbuffer::Colorbuffer(int width, int height, GLenum format, GLsizei samples) : mRenderTarget(NULL), mTexture(NULL)
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000255{
256 IDirect3DDevice9 *device = getDevice();
257
daniel@transgaming.comca7c0082010-08-24 19:20:20 +0000258 D3DFORMAT requestedFormat = es2dx::ConvertRenderbufferFormat(format);
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000259 int supportedSamples = getContext()->getNearestSupportedSamples(requestedFormat, samples);
260
261 if (supportedSamples == -1)
262 {
263 error(GL_OUT_OF_MEMORY);
264
265 return;
266 }
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000267
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000268 if (width > 0 && height > 0)
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000269 {
daniel@transgaming.comca7c0082010-08-24 19:20:20 +0000270 HRESULT result = device->CreateRenderTarget(width, height, requestedFormat,
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000271 es2dx::GetMultisampleTypeFromSamples(supportedSamples), 0, FALSE, &mRenderTarget, NULL);
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000272
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000273 if (result == D3DERR_OUTOFVIDEOMEMORY || result == E_OUTOFMEMORY)
274 {
275 error(GL_OUT_OF_MEMORY);
276
277 return;
278 }
279
280 ASSERT(SUCCEEDED(result));
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000281 }
282
apatrick@chromium.org831fe2a2011-03-17 18:44:29 +0000283 mWidth = width;
284 mHeight = height;
285 mInternalFormat = format;
286 mD3DFormat = requestedFormat;
287 mSamples = supportedSamples;
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000288}
289
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000290Colorbuffer::~Colorbuffer()
291{
292 if (mRenderTarget)
293 {
294 mRenderTarget->Release();
295 }
296}
297
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000298GLsizei Colorbuffer::getWidth() const
299{
300 if (mTexture)
301 {
302 return mTexture->getWidth();
303 }
304
305 return mWidth;
306}
307
308GLsizei Colorbuffer::getHeight() const
309{
310 if (mTexture)
311 {
312 return mTexture->getHeight();
313 }
314
315 return mHeight;
316}
317
318GLenum Colorbuffer::getInternalFormat() const
319{
320 if (mTexture)
321 {
322 return mTexture->getInternalFormat();
323 }
324
325 return mInternalFormat;
326}
327
328D3DFORMAT Colorbuffer::getD3DFormat() const
329{
330 if (mTexture)
331 {
332 return mTexture->getD3DFormat();
333 }
334
335 return mD3DFormat;
336}
337
338bool Colorbuffer::isFloatingPoint() const
339{
340 if (mTexture)
341 {
342 return mTexture->isFloatingPoint();
343 }
344
345 return false;
346}
347
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000348bool Colorbuffer::isColorbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000349{
350 return true;
351}
352
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000353IDirect3DSurface9 *Colorbuffer::getRenderTarget()
354{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000355 if (mTexture)
356 {
357 if (mRenderTarget)
358 {
359 mRenderTarget->Release();
360 }
361
362 mRenderTarget = mTexture->getRenderTarget(mTarget);
363 }
364
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000365 return mRenderTarget;
366}
367
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000368DepthStencilbuffer::DepthStencilbuffer(IDirect3DSurface9 *depthStencil) : mDepthStencil(depthStencil)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000369{
370 if (depthStencil)
371 {
372 depthStencil->AddRef();
373
374 D3DSURFACE_DESC description;
375 depthStencil->GetDesc(&description);
376
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000377 mWidth = description.Width;
378 mHeight = description.Height;
379 mInternalFormat = dx2es::ConvertDepthStencilFormat(description.Format);
380 mSamples = dx2es::GetSamplesFromMultisampleType(description.MultiSampleType);
daniel@transgaming.comca7c0082010-08-24 19:20:20 +0000381 mD3DFormat = description.Format;
382 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000383}
384
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000385DepthStencilbuffer::DepthStencilbuffer(int width, int height, GLsizei samples)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000386{
387 IDirect3DDevice9 *device = getDevice();
388
389 mDepthStencil = NULL;
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000390
391 int supportedSamples = getContext()->getNearestSupportedSamples(D3DFMT_D24S8, samples);
392
393 if (supportedSamples == -1)
394 {
395 error(GL_OUT_OF_MEMORY);
396
397 return;
398 }
399
apatrick@chromium.org831fe2a2011-03-17 18:44:29 +0000400 if (width > 0 && height > 0)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000401 {
apatrick@chromium.org831fe2a2011-03-17 18:44:29 +0000402 HRESULT result = device->CreateDepthStencilSurface(width, height, D3DFMT_D24S8, es2dx::GetMultisampleTypeFromSamples(supportedSamples),
403 0, FALSE, &mDepthStencil, 0);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000404
apatrick@chromium.org831fe2a2011-03-17 18:44:29 +0000405 if (result == D3DERR_OUTOFVIDEOMEMORY || result == E_OUTOFMEMORY)
406 {
407 error(GL_OUT_OF_MEMORY);
408
409 return;
410 }
411
412 ASSERT(SUCCEEDED(result));
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000413 }
414
apatrick@chromium.org831fe2a2011-03-17 18:44:29 +0000415 mWidth = width;
416 mHeight = height;
417 mInternalFormat = GL_DEPTH24_STENCIL8_OES;
418 mD3DFormat = D3DFMT_D24S8;
419 mSamples = supportedSamples;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000420}
421
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000422DepthStencilbuffer::~DepthStencilbuffer()
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000423{
424 if (mDepthStencil)
425 {
426 mDepthStencil->Release();
427 }
428}
429
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000430bool DepthStencilbuffer::isDepthbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000431{
432 return true;
433}
434
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000435bool DepthStencilbuffer::isStencilbuffer() const
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000436{
437 return true;
438}
439
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000440IDirect3DSurface9 *DepthStencilbuffer::getDepthStencil()
441{
442 return mDepthStencil;
443}
444
445Depthbuffer::Depthbuffer(IDirect3DSurface9 *depthStencil) : DepthStencilbuffer(depthStencil)
446{
447 if (depthStencil)
448 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000449 mInternalFormat = GL_DEPTH_COMPONENT16; // If the renderbuffer parameters are queried, the calling function
450 // will expect one of the valid renderbuffer formats for use in
451 // glRenderbufferStorage
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000452 }
453}
454
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000455Depthbuffer::Depthbuffer(int width, int height, GLsizei samples) : DepthStencilbuffer(width, height, samples)
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000456{
457 if (getDepthStencil())
458 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000459 mInternalFormat = GL_DEPTH_COMPONENT16; // If the renderbuffer parameters are queried, the calling function
460 // will expect one of the valid renderbuffer formats for use in
461 // glRenderbufferStorage
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000462 }
463}
464
465Depthbuffer::~Depthbuffer()
466{
467}
468
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000469bool Depthbuffer::isDepthbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000470{
471 return true;
472}
473
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000474bool Depthbuffer::isStencilbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000475{
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000476 return false;
477}
478
479Stencilbuffer::Stencilbuffer(IDirect3DSurface9 *depthStencil) : DepthStencilbuffer(depthStencil)
480{
481 if (depthStencil)
482 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000483 mInternalFormat = GL_STENCIL_INDEX8; // If the renderbuffer parameters are queried, the calling function
484 // will expect one of the valid renderbuffer formats for use in
485 // glRenderbufferStorage
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000486 }
487}
488
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000489Stencilbuffer::Stencilbuffer(int width, int height, GLsizei samples) : DepthStencilbuffer(width, height, samples)
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000490{
491 if (getDepthStencil())
492 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000493 mInternalFormat = GL_STENCIL_INDEX8; // If the renderbuffer parameters are queried, the calling function
494 // will expect one of the valid renderbuffer formats for use in
495 // glRenderbufferStorage
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000496 }
497}
498
499Stencilbuffer::~Stencilbuffer()
500{
501}
502
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000503bool Stencilbuffer::isDepthbuffer() const
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000504{
505 return false;
506}
507
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000508bool Stencilbuffer::isStencilbuffer() const
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000509{
510 return true;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000511}
512}