Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 910 vs 911 for /trunk/Source Code/Platform/Video/Buffers/RenderTarget/RTAttachmentPool.cpp

Diff revisions: vs.
  @@ -44,17 +44,21 @@
44 44 for (U8 j = 0; j < other._attachment[i].size(); ++j) {
45 45 const RTAttachment_ptr& att = other._attachment[i][j];
46 46 if (att != nullptr) {
47 - RTAttachment::Type type = static_cast<RTAttachment::Type>(i);
48 - update(type, j, att->texture()->getDescriptor());
47 + RTAttachmentDescriptor descriptor = {};
48 + descriptor._clearColour = att->clearColour();
49 + descriptor._index = j;
50 + descriptor._type = static_cast<RTAttachment::Type>(i);
51 + descriptor._texDescriptor = att->texture()->getDescriptor();
52 +
53 + update(descriptor);
49 54 }
50 55 }
51 56 }
52 57 }
53 58
54 - RTAttachment_ptr& RTAttachmentPool::update(RTAttachment::Type type,
55 - U8 index,
56 - const TextureDescriptor& descriptor) {
57 -
59 + RTAttachment_ptr& RTAttachmentPool::update(const RTAttachmentDescriptor& descriptor) {
60 + U8 index = descriptor._index;
61 + RTAttachment::Type type = descriptor._type;
58 62 assert(index < to_U8(_attachment[to_U32(type)].size()));
59 63
60 64 RTAttachment_ptr& ptr = getInternal(_attachment, type, index);
  @@ -75,7 +79,7 @@
75 79 index,
76 80 _parent.getGUID()));
77 81 textureAttachment.setThreadedLoading(false);
78 - textureAttachment.setPropertyDescriptor(descriptor);
82 + textureAttachment.setPropertyDescriptor(descriptor._texDescriptor);
79 83
80 84 GFXDevice& context = _parent.context();
81 85 ResourceCache& parentCache = context.parent().resourceCache();
  @@ -86,6 +90,7 @@
86 90 tex->loadData(info, NULL, vec2<U16>(_parent.getWidth(), _parent.getHeight()));
87 91
88 92 ptr->texture(tex);
93 + ptr->clearColour(descriptor._clearColour);
89 94
90 95 _attachmentCount[to_U32(type)]++;
91 96