Jamie Madill | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame^] | 1 | // |
| 2 | // Copyright (c) 2014 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 | // Data.cpp: Container class for all GL relevant state, caps and objects |
| 8 | |
| 9 | #include "libGLESv2/Data.h" |
| 10 | #include "libGLESv2/ResourceManager.h" |
| 11 | |
| 12 | namespace gl |
| 13 | { |
| 14 | |
| 15 | Data::Data(GLint clientVersionIn, const State &stateIn, const Caps &capsIn, |
| 16 | const TextureCapsMap &textureCapsIn, const Extensions &extensionsIn, |
| 17 | const ResourceManager *resourceManagerIn) |
| 18 | : clientVersion(clientVersionIn), |
| 19 | state(&stateIn), |
| 20 | caps(&capsIn), |
| 21 | textureCaps(&textureCapsIn), |
| 22 | extensions(&extensionsIn), |
| 23 | resourceManager(resourceManagerIn) |
| 24 | {} |
| 25 | |
| 26 | Data::~Data() |
| 27 | { |
| 28 | } |
| 29 | |
| 30 | Data::Data(const Data &other) |
| 31 | : clientVersion(other.clientVersion), |
| 32 | state(other.state), |
| 33 | caps(other.caps), |
| 34 | textureCaps(other.textureCaps), |
| 35 | extensions(other.extensions), |
| 36 | resourceManager(other.resourceManager) |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | Data &Data::operator=(const Data &other) |
| 41 | { |
| 42 | clientVersion = other.clientVersion; |
| 43 | state = other.state; |
| 44 | caps = other.caps; |
| 45 | textureCaps = other.textureCaps; |
| 46 | extensions = other.extensions; |
| 47 | resourceManager = other.resourceManager; |
| 48 | return *this; |
| 49 | } |
| 50 | |
| 51 | } |