Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | #include "precompiled.h" |
michael@0 | 2 | // |
michael@0 | 3 | // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. |
michael@0 | 4 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 5 | // found in the LICENSE file. |
michael@0 | 6 | // |
michael@0 | 7 | |
michael@0 | 8 | // Renderbuffer.cpp: the gl::Renderbuffer class and its derived classes |
michael@0 | 9 | // Colorbuffer, Depthbuffer and Stencilbuffer. Implements GL renderbuffer |
michael@0 | 10 | // objects and related functionality. [OpenGL ES 2.0.24] section 4.4.3 page 108. |
michael@0 | 11 | |
michael@0 | 12 | #include "libGLESv2/Renderbuffer.h" |
michael@0 | 13 | #include "libGLESv2/renderer/RenderTarget.h" |
michael@0 | 14 | |
michael@0 | 15 | #include "libGLESv2/Texture.h" |
michael@0 | 16 | #include "libGLESv2/renderer/Renderer.h" |
michael@0 | 17 | #include "libGLESv2/utilities.h" |
michael@0 | 18 | |
michael@0 | 19 | namespace gl |
michael@0 | 20 | { |
michael@0 | 21 | unsigned int RenderbufferStorage::mCurrentSerial = 1; |
michael@0 | 22 | |
michael@0 | 23 | RenderbufferInterface::RenderbufferInterface() |
michael@0 | 24 | { |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | // The default case for classes inherited from RenderbufferInterface is not to |
michael@0 | 28 | // need to do anything upon the reference count to the parent Renderbuffer incrementing |
michael@0 | 29 | // or decrementing. |
michael@0 | 30 | void RenderbufferInterface::addProxyRef(const Renderbuffer *proxy) |
michael@0 | 31 | { |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | void RenderbufferInterface::releaseProxy(const Renderbuffer *proxy) |
michael@0 | 35 | { |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | GLuint RenderbufferInterface::getRedSize() const |
michael@0 | 39 | { |
michael@0 | 40 | return gl::GetRedSize(getActualFormat()); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | GLuint RenderbufferInterface::getGreenSize() const |
michael@0 | 44 | { |
michael@0 | 45 | return gl::GetGreenSize(getActualFormat()); |
michael@0 | 46 | } |
michael@0 | 47 | |
michael@0 | 48 | GLuint RenderbufferInterface::getBlueSize() const |
michael@0 | 49 | { |
michael@0 | 50 | return gl::GetBlueSize(getActualFormat()); |
michael@0 | 51 | } |
michael@0 | 52 | |
michael@0 | 53 | GLuint RenderbufferInterface::getAlphaSize() const |
michael@0 | 54 | { |
michael@0 | 55 | return gl::GetAlphaSize(getActualFormat()); |
michael@0 | 56 | } |
michael@0 | 57 | |
michael@0 | 58 | GLuint RenderbufferInterface::getDepthSize() const |
michael@0 | 59 | { |
michael@0 | 60 | return gl::GetDepthSize(getActualFormat()); |
michael@0 | 61 | } |
michael@0 | 62 | |
michael@0 | 63 | GLuint RenderbufferInterface::getStencilSize() const |
michael@0 | 64 | { |
michael@0 | 65 | return gl::GetStencilSize(getActualFormat()); |
michael@0 | 66 | } |
michael@0 | 67 | |
michael@0 | 68 | ///// RenderbufferTexture2D Implementation //////// |
michael@0 | 69 | |
michael@0 | 70 | RenderbufferTexture2D::RenderbufferTexture2D(Texture2D *texture, GLenum target) : mTarget(target) |
michael@0 | 71 | { |
michael@0 | 72 | mTexture2D.set(texture); |
michael@0 | 73 | } |
michael@0 | 74 | |
michael@0 | 75 | RenderbufferTexture2D::~RenderbufferTexture2D() |
michael@0 | 76 | { |
michael@0 | 77 | mTexture2D.set(NULL); |
michael@0 | 78 | } |
michael@0 | 79 | |
michael@0 | 80 | // Textures need to maintain their own reference count for references via |
michael@0 | 81 | // Renderbuffers acting as proxies. Here, we notify the texture of a reference. |
michael@0 | 82 | void RenderbufferTexture2D::addProxyRef(const Renderbuffer *proxy) |
michael@0 | 83 | { |
michael@0 | 84 | mTexture2D->addProxyRef(proxy); |
michael@0 | 85 | } |
michael@0 | 86 | |
michael@0 | 87 | void RenderbufferTexture2D::releaseProxy(const Renderbuffer *proxy) |
michael@0 | 88 | { |
michael@0 | 89 | mTexture2D->releaseProxy(proxy); |
michael@0 | 90 | } |
michael@0 | 91 | |
michael@0 | 92 | rx::RenderTarget *RenderbufferTexture2D::getRenderTarget() |
michael@0 | 93 | { |
michael@0 | 94 | return mTexture2D->getRenderTarget(mTarget); |
michael@0 | 95 | } |
michael@0 | 96 | |
michael@0 | 97 | rx::RenderTarget *RenderbufferTexture2D::getDepthStencil() |
michael@0 | 98 | { |
michael@0 | 99 | return mTexture2D->getDepthStencil(mTarget); |
michael@0 | 100 | } |
michael@0 | 101 | |
michael@0 | 102 | GLsizei RenderbufferTexture2D::getWidth() const |
michael@0 | 103 | { |
michael@0 | 104 | return mTexture2D->getWidth(0); |
michael@0 | 105 | } |
michael@0 | 106 | |
michael@0 | 107 | GLsizei RenderbufferTexture2D::getHeight() const |
michael@0 | 108 | { |
michael@0 | 109 | return mTexture2D->getHeight(0); |
michael@0 | 110 | } |
michael@0 | 111 | |
michael@0 | 112 | GLenum RenderbufferTexture2D::getInternalFormat() const |
michael@0 | 113 | { |
michael@0 | 114 | return mTexture2D->getInternalFormat(0); |
michael@0 | 115 | } |
michael@0 | 116 | |
michael@0 | 117 | GLenum RenderbufferTexture2D::getActualFormat() const |
michael@0 | 118 | { |
michael@0 | 119 | return mTexture2D->getActualFormat(0); |
michael@0 | 120 | } |
michael@0 | 121 | |
michael@0 | 122 | GLsizei RenderbufferTexture2D::getSamples() const |
michael@0 | 123 | { |
michael@0 | 124 | return 0; |
michael@0 | 125 | } |
michael@0 | 126 | |
michael@0 | 127 | unsigned int RenderbufferTexture2D::getSerial() const |
michael@0 | 128 | { |
michael@0 | 129 | return mTexture2D->getRenderTargetSerial(mTarget); |
michael@0 | 130 | } |
michael@0 | 131 | |
michael@0 | 132 | ///// RenderbufferTextureCubeMap Implementation //////// |
michael@0 | 133 | |
michael@0 | 134 | RenderbufferTextureCubeMap::RenderbufferTextureCubeMap(TextureCubeMap *texture, GLenum target) : mTarget(target) |
michael@0 | 135 | { |
michael@0 | 136 | mTextureCubeMap.set(texture); |
michael@0 | 137 | } |
michael@0 | 138 | |
michael@0 | 139 | RenderbufferTextureCubeMap::~RenderbufferTextureCubeMap() |
michael@0 | 140 | { |
michael@0 | 141 | mTextureCubeMap.set(NULL); |
michael@0 | 142 | } |
michael@0 | 143 | |
michael@0 | 144 | // Textures need to maintain their own reference count for references via |
michael@0 | 145 | // Renderbuffers acting as proxies. Here, we notify the texture of a reference. |
michael@0 | 146 | void RenderbufferTextureCubeMap::addProxyRef(const Renderbuffer *proxy) |
michael@0 | 147 | { |
michael@0 | 148 | mTextureCubeMap->addProxyRef(proxy); |
michael@0 | 149 | } |
michael@0 | 150 | |
michael@0 | 151 | void RenderbufferTextureCubeMap::releaseProxy(const Renderbuffer *proxy) |
michael@0 | 152 | { |
michael@0 | 153 | mTextureCubeMap->releaseProxy(proxy); |
michael@0 | 154 | } |
michael@0 | 155 | |
michael@0 | 156 | rx::RenderTarget *RenderbufferTextureCubeMap::getRenderTarget() |
michael@0 | 157 | { |
michael@0 | 158 | return mTextureCubeMap->getRenderTarget(mTarget); |
michael@0 | 159 | } |
michael@0 | 160 | |
michael@0 | 161 | rx::RenderTarget *RenderbufferTextureCubeMap::getDepthStencil() |
michael@0 | 162 | { |
michael@0 | 163 | return NULL; |
michael@0 | 164 | } |
michael@0 | 165 | |
michael@0 | 166 | GLsizei RenderbufferTextureCubeMap::getWidth() const |
michael@0 | 167 | { |
michael@0 | 168 | return mTextureCubeMap->getWidth(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0); |
michael@0 | 169 | } |
michael@0 | 170 | |
michael@0 | 171 | GLsizei RenderbufferTextureCubeMap::getHeight() const |
michael@0 | 172 | { |
michael@0 | 173 | return mTextureCubeMap->getHeight(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0); |
michael@0 | 174 | } |
michael@0 | 175 | |
michael@0 | 176 | GLenum RenderbufferTextureCubeMap::getInternalFormat() const |
michael@0 | 177 | { |
michael@0 | 178 | return mTextureCubeMap->getInternalFormat(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0); |
michael@0 | 179 | } |
michael@0 | 180 | |
michael@0 | 181 | GLenum RenderbufferTextureCubeMap::getActualFormat() const |
michael@0 | 182 | { |
michael@0 | 183 | return mTextureCubeMap->getActualFormat(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0); |
michael@0 | 184 | } |
michael@0 | 185 | |
michael@0 | 186 | GLsizei RenderbufferTextureCubeMap::getSamples() const |
michael@0 | 187 | { |
michael@0 | 188 | return 0; |
michael@0 | 189 | } |
michael@0 | 190 | |
michael@0 | 191 | unsigned int RenderbufferTextureCubeMap::getSerial() const |
michael@0 | 192 | { |
michael@0 | 193 | return mTextureCubeMap->getRenderTargetSerial(mTarget); |
michael@0 | 194 | } |
michael@0 | 195 | |
michael@0 | 196 | ////// Renderbuffer Implementation ////// |
michael@0 | 197 | |
michael@0 | 198 | Renderbuffer::Renderbuffer(rx::Renderer *renderer, GLuint id, RenderbufferInterface *instance) : RefCountObject(id) |
michael@0 | 199 | { |
michael@0 | 200 | ASSERT(instance != NULL); |
michael@0 | 201 | mInstance = instance; |
michael@0 | 202 | } |
michael@0 | 203 | |
michael@0 | 204 | Renderbuffer::~Renderbuffer() |
michael@0 | 205 | { |
michael@0 | 206 | delete mInstance; |
michael@0 | 207 | } |
michael@0 | 208 | |
michael@0 | 209 | // The RenderbufferInterface contained in this Renderbuffer may need to maintain |
michael@0 | 210 | // its own reference count, so we pass it on here. |
michael@0 | 211 | void Renderbuffer::addRef() const |
michael@0 | 212 | { |
michael@0 | 213 | mInstance->addProxyRef(this); |
michael@0 | 214 | |
michael@0 | 215 | RefCountObject::addRef(); |
michael@0 | 216 | } |
michael@0 | 217 | |
michael@0 | 218 | void Renderbuffer::release() const |
michael@0 | 219 | { |
michael@0 | 220 | mInstance->releaseProxy(this); |
michael@0 | 221 | |
michael@0 | 222 | RefCountObject::release(); |
michael@0 | 223 | } |
michael@0 | 224 | |
michael@0 | 225 | rx::RenderTarget *Renderbuffer::getRenderTarget() |
michael@0 | 226 | { |
michael@0 | 227 | return mInstance->getRenderTarget(); |
michael@0 | 228 | } |
michael@0 | 229 | |
michael@0 | 230 | rx::RenderTarget *Renderbuffer::getDepthStencil() |
michael@0 | 231 | { |
michael@0 | 232 | return mInstance->getDepthStencil(); |
michael@0 | 233 | } |
michael@0 | 234 | |
michael@0 | 235 | GLsizei Renderbuffer::getWidth() const |
michael@0 | 236 | { |
michael@0 | 237 | return mInstance->getWidth(); |
michael@0 | 238 | } |
michael@0 | 239 | |
michael@0 | 240 | GLsizei Renderbuffer::getHeight() const |
michael@0 | 241 | { |
michael@0 | 242 | return mInstance->getHeight(); |
michael@0 | 243 | } |
michael@0 | 244 | |
michael@0 | 245 | GLenum Renderbuffer::getInternalFormat() const |
michael@0 | 246 | { |
michael@0 | 247 | return mInstance->getInternalFormat(); |
michael@0 | 248 | } |
michael@0 | 249 | |
michael@0 | 250 | GLenum Renderbuffer::getActualFormat() const |
michael@0 | 251 | { |
michael@0 | 252 | return mInstance->getActualFormat(); |
michael@0 | 253 | } |
michael@0 | 254 | |
michael@0 | 255 | GLuint Renderbuffer::getRedSize() const |
michael@0 | 256 | { |
michael@0 | 257 | return mInstance->getRedSize(); |
michael@0 | 258 | } |
michael@0 | 259 | |
michael@0 | 260 | GLuint Renderbuffer::getGreenSize() const |
michael@0 | 261 | { |
michael@0 | 262 | return mInstance->getGreenSize(); |
michael@0 | 263 | } |
michael@0 | 264 | |
michael@0 | 265 | GLuint Renderbuffer::getBlueSize() const |
michael@0 | 266 | { |
michael@0 | 267 | return mInstance->getBlueSize(); |
michael@0 | 268 | } |
michael@0 | 269 | |
michael@0 | 270 | GLuint Renderbuffer::getAlphaSize() const |
michael@0 | 271 | { |
michael@0 | 272 | return mInstance->getAlphaSize(); |
michael@0 | 273 | } |
michael@0 | 274 | |
michael@0 | 275 | GLuint Renderbuffer::getDepthSize() const |
michael@0 | 276 | { |
michael@0 | 277 | return mInstance->getDepthSize(); |
michael@0 | 278 | } |
michael@0 | 279 | |
michael@0 | 280 | GLuint Renderbuffer::getStencilSize() const |
michael@0 | 281 | { |
michael@0 | 282 | return mInstance->getStencilSize(); |
michael@0 | 283 | } |
michael@0 | 284 | |
michael@0 | 285 | GLsizei Renderbuffer::getSamples() const |
michael@0 | 286 | { |
michael@0 | 287 | return mInstance->getSamples(); |
michael@0 | 288 | } |
michael@0 | 289 | |
michael@0 | 290 | unsigned int Renderbuffer::getSerial() const |
michael@0 | 291 | { |
michael@0 | 292 | return mInstance->getSerial(); |
michael@0 | 293 | } |
michael@0 | 294 | |
michael@0 | 295 | void Renderbuffer::setStorage(RenderbufferStorage *newStorage) |
michael@0 | 296 | { |
michael@0 | 297 | ASSERT(newStorage != NULL); |
michael@0 | 298 | |
michael@0 | 299 | delete mInstance; |
michael@0 | 300 | mInstance = newStorage; |
michael@0 | 301 | } |
michael@0 | 302 | |
michael@0 | 303 | RenderbufferStorage::RenderbufferStorage() : mSerial(issueSerial()) |
michael@0 | 304 | { |
michael@0 | 305 | mWidth = 0; |
michael@0 | 306 | mHeight = 0; |
michael@0 | 307 | mInternalFormat = GL_RGBA4; |
michael@0 | 308 | mActualFormat = GL_RGBA8_OES; |
michael@0 | 309 | mSamples = 0; |
michael@0 | 310 | } |
michael@0 | 311 | |
michael@0 | 312 | RenderbufferStorage::~RenderbufferStorage() |
michael@0 | 313 | { |
michael@0 | 314 | } |
michael@0 | 315 | |
michael@0 | 316 | rx::RenderTarget *RenderbufferStorage::getRenderTarget() |
michael@0 | 317 | { |
michael@0 | 318 | return NULL; |
michael@0 | 319 | } |
michael@0 | 320 | |
michael@0 | 321 | rx::RenderTarget *RenderbufferStorage::getDepthStencil() |
michael@0 | 322 | { |
michael@0 | 323 | return NULL; |
michael@0 | 324 | } |
michael@0 | 325 | |
michael@0 | 326 | GLsizei RenderbufferStorage::getWidth() const |
michael@0 | 327 | { |
michael@0 | 328 | return mWidth; |
michael@0 | 329 | } |
michael@0 | 330 | |
michael@0 | 331 | GLsizei RenderbufferStorage::getHeight() const |
michael@0 | 332 | { |
michael@0 | 333 | return mHeight; |
michael@0 | 334 | } |
michael@0 | 335 | |
michael@0 | 336 | GLenum RenderbufferStorage::getInternalFormat() const |
michael@0 | 337 | { |
michael@0 | 338 | return mInternalFormat; |
michael@0 | 339 | } |
michael@0 | 340 | |
michael@0 | 341 | GLenum RenderbufferStorage::getActualFormat() const |
michael@0 | 342 | { |
michael@0 | 343 | return mActualFormat; |
michael@0 | 344 | } |
michael@0 | 345 | |
michael@0 | 346 | GLsizei RenderbufferStorage::getSamples() const |
michael@0 | 347 | { |
michael@0 | 348 | return mSamples; |
michael@0 | 349 | } |
michael@0 | 350 | |
michael@0 | 351 | unsigned int RenderbufferStorage::getSerial() const |
michael@0 | 352 | { |
michael@0 | 353 | return mSerial; |
michael@0 | 354 | } |
michael@0 | 355 | |
michael@0 | 356 | unsigned int RenderbufferStorage::issueSerial() |
michael@0 | 357 | { |
michael@0 | 358 | return mCurrentSerial++; |
michael@0 | 359 | } |
michael@0 | 360 | |
michael@0 | 361 | unsigned int RenderbufferStorage::issueCubeSerials() |
michael@0 | 362 | { |
michael@0 | 363 | unsigned int firstSerial = mCurrentSerial; |
michael@0 | 364 | mCurrentSerial += 6; |
michael@0 | 365 | return firstSerial; |
michael@0 | 366 | } |
michael@0 | 367 | |
michael@0 | 368 | Colorbuffer::Colorbuffer(rx::Renderer *renderer, rx::SwapChain *swapChain) |
michael@0 | 369 | { |
michael@0 | 370 | mRenderTarget = renderer->createRenderTarget(swapChain, false); |
michael@0 | 371 | |
michael@0 | 372 | if (mRenderTarget) |
michael@0 | 373 | { |
michael@0 | 374 | mWidth = mRenderTarget->getWidth(); |
michael@0 | 375 | mHeight = mRenderTarget->getHeight(); |
michael@0 | 376 | mInternalFormat = mRenderTarget->getInternalFormat(); |
michael@0 | 377 | mActualFormat = mRenderTarget->getActualFormat(); |
michael@0 | 378 | mSamples = mRenderTarget->getSamples(); |
michael@0 | 379 | } |
michael@0 | 380 | } |
michael@0 | 381 | |
michael@0 | 382 | Colorbuffer::Colorbuffer(rx::Renderer *renderer, int width, int height, GLenum format, GLsizei samples) : mRenderTarget(NULL) |
michael@0 | 383 | { |
michael@0 | 384 | mRenderTarget = renderer->createRenderTarget(width, height, format, samples, false); |
michael@0 | 385 | |
michael@0 | 386 | if (mRenderTarget) |
michael@0 | 387 | { |
michael@0 | 388 | mWidth = width; |
michael@0 | 389 | mHeight = height; |
michael@0 | 390 | mInternalFormat = format; |
michael@0 | 391 | mActualFormat = mRenderTarget->getActualFormat(); |
michael@0 | 392 | mSamples = mRenderTarget->getSamples(); |
michael@0 | 393 | } |
michael@0 | 394 | } |
michael@0 | 395 | |
michael@0 | 396 | Colorbuffer::~Colorbuffer() |
michael@0 | 397 | { |
michael@0 | 398 | if (mRenderTarget) |
michael@0 | 399 | { |
michael@0 | 400 | delete mRenderTarget; |
michael@0 | 401 | } |
michael@0 | 402 | } |
michael@0 | 403 | |
michael@0 | 404 | rx::RenderTarget *Colorbuffer::getRenderTarget() |
michael@0 | 405 | { |
michael@0 | 406 | if (mRenderTarget) |
michael@0 | 407 | { |
michael@0 | 408 | return mRenderTarget; |
michael@0 | 409 | } |
michael@0 | 410 | |
michael@0 | 411 | return NULL; |
michael@0 | 412 | } |
michael@0 | 413 | |
michael@0 | 414 | DepthStencilbuffer::DepthStencilbuffer(rx::Renderer *renderer, rx::SwapChain *swapChain) |
michael@0 | 415 | { |
michael@0 | 416 | mDepthStencil = renderer->createRenderTarget(swapChain, true); |
michael@0 | 417 | if (mDepthStencil) |
michael@0 | 418 | { |
michael@0 | 419 | mWidth = mDepthStencil->getWidth(); |
michael@0 | 420 | mHeight = mDepthStencil->getHeight(); |
michael@0 | 421 | mInternalFormat = mDepthStencil->getInternalFormat(); |
michael@0 | 422 | mSamples = mDepthStencil->getSamples(); |
michael@0 | 423 | mActualFormat = mDepthStencil->getActualFormat(); |
michael@0 | 424 | } |
michael@0 | 425 | } |
michael@0 | 426 | |
michael@0 | 427 | DepthStencilbuffer::DepthStencilbuffer(rx::Renderer *renderer, int width, int height, GLsizei samples) |
michael@0 | 428 | { |
michael@0 | 429 | |
michael@0 | 430 | mDepthStencil = renderer->createRenderTarget(width, height, GL_DEPTH24_STENCIL8_OES, samples, true); |
michael@0 | 431 | |
michael@0 | 432 | mWidth = mDepthStencil->getWidth(); |
michael@0 | 433 | mHeight = mDepthStencil->getHeight(); |
michael@0 | 434 | mInternalFormat = GL_DEPTH24_STENCIL8_OES; |
michael@0 | 435 | mActualFormat = mDepthStencil->getActualFormat(); |
michael@0 | 436 | mSamples = mDepthStencil->getSamples(); |
michael@0 | 437 | } |
michael@0 | 438 | |
michael@0 | 439 | DepthStencilbuffer::~DepthStencilbuffer() |
michael@0 | 440 | { |
michael@0 | 441 | if (mDepthStencil) |
michael@0 | 442 | { |
michael@0 | 443 | delete mDepthStencil; |
michael@0 | 444 | } |
michael@0 | 445 | } |
michael@0 | 446 | |
michael@0 | 447 | rx::RenderTarget *DepthStencilbuffer::getDepthStencil() |
michael@0 | 448 | { |
michael@0 | 449 | if (mDepthStencil) |
michael@0 | 450 | { |
michael@0 | 451 | return mDepthStencil; |
michael@0 | 452 | } |
michael@0 | 453 | |
michael@0 | 454 | return NULL; |
michael@0 | 455 | } |
michael@0 | 456 | |
michael@0 | 457 | Depthbuffer::Depthbuffer(rx::Renderer *renderer, int width, int height, GLsizei samples) : DepthStencilbuffer(renderer, width, height, samples) |
michael@0 | 458 | { |
michael@0 | 459 | if (mDepthStencil) |
michael@0 | 460 | { |
michael@0 | 461 | mInternalFormat = GL_DEPTH_COMPONENT16; // If the renderbuffer parameters are queried, the calling function |
michael@0 | 462 | // will expect one of the valid renderbuffer formats for use in |
michael@0 | 463 | // glRenderbufferStorage |
michael@0 | 464 | } |
michael@0 | 465 | } |
michael@0 | 466 | |
michael@0 | 467 | Depthbuffer::~Depthbuffer() |
michael@0 | 468 | { |
michael@0 | 469 | } |
michael@0 | 470 | |
michael@0 | 471 | Stencilbuffer::Stencilbuffer(rx::Renderer *renderer, int width, int height, GLsizei samples) : DepthStencilbuffer(renderer, width, height, samples) |
michael@0 | 472 | { |
michael@0 | 473 | if (mDepthStencil) |
michael@0 | 474 | { |
michael@0 | 475 | mInternalFormat = GL_STENCIL_INDEX8; // If the renderbuffer parameters are queried, the calling function |
michael@0 | 476 | // will expect one of the valid renderbuffer formats for use in |
michael@0 | 477 | // glRenderbufferStorage |
michael@0 | 478 | } |
michael@0 | 479 | } |
michael@0 | 480 | |
michael@0 | 481 | Stencilbuffer::~Stencilbuffer() |
michael@0 | 482 | { |
michael@0 | 483 | } |
michael@0 | 484 | |
michael@0 | 485 | } |