Home | History | Annotate | Download | only in libagl

Lines Matching defs:depth

171     GGLSurface              depth;
179 depth.version = sizeof(GGLSurface);
180 depth.data = 0;
181 depth.format = depthFormat;
186 free(depth.data);
390 // allocate a corresponding depth-buffer
393 if (depth.format) {
394 depth.width = width;
395 depth.height = height;
396 depth.stride = depth.width; // use the width here
397 uint64_t allocSize = static_cast<uint64_t>(depth.stride) *
398 static_cast<uint64_t>(depth.height) * 2;
399 if (depth.stride < 0 || depth.height > INT_MAX ||
403 depth.data = (GGLubyte*)malloc(allocSize);
404 if (depth.data == 0) {
546 // reallocate the depth-buffer if needed
552 if (depth.data) {
553 free(depth.data);
554 depth.width = width;
555 depth.height = height;
556 depth.stride = buffer->stride;
557 uint64_t allocSize = static_cast<uint64_t>(depth.stride) *
558 static_cast<uint64_t>(depth.height) * 2;
559 if (depth.stride < 0 || depth.height > INT_MAX ||
564 depth.data = (GGLubyte*)malloc(allocSize);
565 if (depth.data == 0) {
607 if (depth.data != gl->rasterizer.state.buffers.depth.data)
608 gl->rasterizer.procs.depthBuffer(gl, &depth);
663 virtual bool initCheck() const { return !depth.format || depth.data!=0; }
679 depth.width = pixmap->width;
680 depth.height = pixmap->height;
681 depth.stride = depth.width; // use the width here
682 uint64_t allocSize = static_cast<uint64_t>(depth.stride) *
683 static_cast<uint64_t>(depth.height) * 2;
684 if (depth.stride < 0 || depth.height > INT_MAX ||
689 depth.data = (GGLubyte*)malloc(allocSize);
690 if (depth.data == 0) {
706 if (depth.data != gl->rasterizer.state.buffers.depth.data)
707 gl->rasterizer.procs.depthBuffer(gl, &depth);
766 depth.width = pbuffer.width;
767 depth.height = pbuffer.height;
768 depth.stride = depth.width; // use the width here
769 uint64_t allocSize = static_cast<uint64_t>(depth.stride) *
770 static_cast<uint64_t>(depth.height) * 2;
771 if (depth.stride < 0 || depth.height > INT_MAX ||
776 depth.data = (GGLubyte*)malloc(allocSize);
777 if (depth.data == 0) {
789 if (depth.data != gl->rasterizer.state.buffers.depth.data)
790 gl->rasterizer.procs.depthBuffer(gl, &depth);