blob: 57657c40b4201acfe37ef2225fceaa062d195141 [file] [log] [blame]
Jamie Madill1e9ae072014-11-06 15:27:21 -05001//
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
Geoff Lang2b5420c2014-11-19 14:20:15 -05009#include "libANGLE/Data.h"
10#include "libANGLE/ResourceManager.h"
Jamie Madill1e9ae072014-11-06 15:27:21 -050011
12namespace gl
13{
14
Geoff Langf0aa8422015-09-29 15:08:34 -040015Data::Data(uintptr_t contextIn,
16 GLint clientVersionIn,
17 const State &stateIn,
18 const Caps &capsIn,
19 const TextureCapsMap &textureCapsIn,
20 const Extensions &extensionsIn,
Jamie Madillf25855c2015-11-03 11:06:18 -050021 const ResourceManager *resourceManagerIn,
22 const Limitations &limitationsIn)
Geoff Langf0aa8422015-09-29 15:08:34 -040023 : context(contextIn),
24 clientVersion(clientVersionIn),
Jamie Madill1e9ae072014-11-06 15:27:21 -050025 state(&stateIn),
26 caps(&capsIn),
27 textureCaps(&textureCapsIn),
28 extensions(&extensionsIn),
Jamie Madillf25855c2015-11-03 11:06:18 -050029 resourceManager(resourceManagerIn),
30 limitations(&limitationsIn)
Jamie Madill1e9ae072014-11-06 15:27:21 -050031{}
32
33Data::~Data()
34{
35}
36
Jamie Madillf25855c2015-11-03 11:06:18 -050037ValidationContext::ValidationContext(GLint clientVersion,
38 const State &state,
39 const Caps &caps,
40 const TextureCapsMap &textureCaps,
41 const Extensions &extensions,
42 const ResourceManager *resourceManager,
43 const Limitations &limitations)
44 : mData(reinterpret_cast<uintptr_t>(this),
45 clientVersion,
46 state,
47 caps,
48 textureCaps,
49 extensions,
50 resourceManager,
51 limitations)
52{
53}
Jamie Madill1e9ae072014-11-06 15:27:21 -050054}