blob: 75975049480633493fc3c904e8d1423fa6b6730f [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
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000283 if (mRenderTarget)
284 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000285 mWidth = width;
286 mHeight = height;
287 mInternalFormat = format;
daniel@transgaming.comca7c0082010-08-24 19:20:20 +0000288 mD3DFormat = requestedFormat;
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000289 mSamples = supportedSamples;
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000290 }
daniel@transgaming.com70d312a2010-04-20 18:52:38 +0000291}
292
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000293Colorbuffer::~Colorbuffer()
294{
295 if (mRenderTarget)
296 {
297 mRenderTarget->Release();
298 }
299}
300
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000301GLsizei Colorbuffer::getWidth() const
302{
303 if (mTexture)
304 {
305 return mTexture->getWidth();
306 }
307
308 return mWidth;
309}
310
311GLsizei Colorbuffer::getHeight() const
312{
313 if (mTexture)
314 {
315 return mTexture->getHeight();
316 }
317
318 return mHeight;
319}
320
321GLenum Colorbuffer::getInternalFormat() const
322{
323 if (mTexture)
324 {
325 return mTexture->getInternalFormat();
326 }
327
328 return mInternalFormat;
329}
330
331D3DFORMAT Colorbuffer::getD3DFormat() const
332{
333 if (mTexture)
334 {
335 return mTexture->getD3DFormat();
336 }
337
338 return mD3DFormat;
339}
340
341bool Colorbuffer::isFloatingPoint() const
342{
343 if (mTexture)
344 {
345 return mTexture->isFloatingPoint();
346 }
347
348 return false;
349}
350
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000351bool Colorbuffer::isColorbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000352{
353 return true;
354}
355
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000356IDirect3DSurface9 *Colorbuffer::getRenderTarget()
357{
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000358 if (mTexture)
359 {
360 if (mRenderTarget)
361 {
362 mRenderTarget->Release();
363 }
364
365 mRenderTarget = mTexture->getRenderTarget(mTarget);
366 }
367
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000368 return mRenderTarget;
369}
370
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000371DepthStencilbuffer::DepthStencilbuffer(IDirect3DSurface9 *depthStencil) : mDepthStencil(depthStencil)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000372{
373 if (depthStencil)
374 {
375 depthStencil->AddRef();
376
377 D3DSURFACE_DESC description;
378 depthStencil->GetDesc(&description);
379
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000380 mWidth = description.Width;
381 mHeight = description.Height;
382 mInternalFormat = dx2es::ConvertDepthStencilFormat(description.Format);
383 mSamples = dx2es::GetSamplesFromMultisampleType(description.MultiSampleType);
daniel@transgaming.comca7c0082010-08-24 19:20:20 +0000384 mD3DFormat = description.Format;
385 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000386}
387
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000388DepthStencilbuffer::DepthStencilbuffer(int width, int height, GLsizei samples)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000389{
390 IDirect3DDevice9 *device = getDevice();
391
392 mDepthStencil = NULL;
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000393
394 int supportedSamples = getContext()->getNearestSupportedSamples(D3DFMT_D24S8, samples);
395
396 if (supportedSamples == -1)
397 {
398 error(GL_OUT_OF_MEMORY);
399
400 return;
401 }
402
403 HRESULT result = device->CreateDepthStencilSurface(width, height, D3DFMT_D24S8, es2dx::GetMultisampleTypeFromSamples(supportedSamples),
404 0, FALSE, &mDepthStencil, 0);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000405
406 if (result == D3DERR_OUTOFVIDEOMEMORY || result == E_OUTOFMEMORY)
407 {
408 error(GL_OUT_OF_MEMORY);
409
410 return;
411 }
412
413 ASSERT(SUCCEEDED(result));
414
415 if (mDepthStencil)
416 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000417 mWidth = width;
418 mHeight = height;
419 mInternalFormat = GL_DEPTH24_STENCIL8_OES;
daniel@transgaming.comca7c0082010-08-24 19:20:20 +0000420 mD3DFormat = D3DFMT_D24S8;
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000421 mSamples = supportedSamples;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000422 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000423}
424
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000425DepthStencilbuffer::~DepthStencilbuffer()
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000426{
427 if (mDepthStencil)
428 {
429 mDepthStencil->Release();
430 }
431}
432
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000433bool DepthStencilbuffer::isDepthbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000434{
435 return true;
436}
437
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000438bool DepthStencilbuffer::isStencilbuffer() const
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000439{
440 return true;
441}
442
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000443IDirect3DSurface9 *DepthStencilbuffer::getDepthStencil()
444{
445 return mDepthStencil;
446}
447
448Depthbuffer::Depthbuffer(IDirect3DSurface9 *depthStencil) : DepthStencilbuffer(depthStencil)
449{
450 if (depthStencil)
451 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000452 mInternalFormat = GL_DEPTH_COMPONENT16; // If the renderbuffer parameters are queried, the calling function
453 // will expect one of the valid renderbuffer formats for use in
454 // glRenderbufferStorage
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000455 }
456}
457
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000458Depthbuffer::Depthbuffer(int width, int height, GLsizei samples) : DepthStencilbuffer(width, height, samples)
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000459{
460 if (getDepthStencil())
461 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000462 mInternalFormat = GL_DEPTH_COMPONENT16; // If the renderbuffer parameters are queried, the calling function
463 // will expect one of the valid renderbuffer formats for use in
464 // glRenderbufferStorage
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000465 }
466}
467
468Depthbuffer::~Depthbuffer()
469{
470}
471
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000472bool Depthbuffer::isDepthbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000473{
474 return true;
475}
476
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000477bool Depthbuffer::isStencilbuffer() const
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000478{
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000479 return false;
480}
481
482Stencilbuffer::Stencilbuffer(IDirect3DSurface9 *depthStencil) : DepthStencilbuffer(depthStencil)
483{
484 if (depthStencil)
485 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000486 mInternalFormat = GL_STENCIL_INDEX8; // If the renderbuffer parameters are queried, the calling function
487 // will expect one of the valid renderbuffer formats for use in
488 // glRenderbufferStorage
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000489 }
490}
491
daniel@transgaming.com1f135d82010-08-24 19:20:36 +0000492Stencilbuffer::Stencilbuffer(int width, int height, GLsizei samples) : DepthStencilbuffer(width, height, samples)
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000493{
494 if (getDepthStencil())
495 {
daniel@transgaming.comd2fd4f22011-02-01 18:49:11 +0000496 mInternalFormat = GL_STENCIL_INDEX8; // If the renderbuffer parameters are queried, the calling function
497 // will expect one of the valid renderbuffer formats for use in
498 // glRenderbufferStorage
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000499 }
500}
501
502Stencilbuffer::~Stencilbuffer()
503{
504}
505
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000506bool Stencilbuffer::isDepthbuffer() const
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000507{
508 return false;
509}
510
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000511bool Stencilbuffer::isStencilbuffer() const
daniel@transgaming.comcdacc8e2010-07-28 19:20:50 +0000512{
513 return true;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000514}
515}