daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2002-2010 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 | // angleutils.h: Common ANGLE utilities. |
| 8 | |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 9 | #ifndef COMMON_ANGLEUTILS_H_ |
| 10 | #define COMMON_ANGLEUTILS_H_ |
| 11 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 12 | // A macro to disallow the copy constructor and operator= functions |
| 13 | // This must be used in the private: declarations for a class |
| 14 | #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
| 15 | TypeName(const TypeName&); \ |
| 16 | void operator=(const TypeName&) |
| 17 | |
shannon.woods@transgaming.com | 6d79257 | 2013-02-28 23:07:25 +0000 | [diff] [blame^] | 18 | template <typename T, unsigned int N> |
| 19 | inline unsigned int ArraySize(T(&)[N]) |
| 20 | { |
| 21 | return N; |
| 22 | } |
| 23 | |
alokp@chromium.org | 79fb101 | 2012-04-26 21:07:39 +0000 | [diff] [blame] | 24 | #if defined(_MSC_VER) |
| 25 | #define snprintf _snprintf |
| 26 | #endif |
| 27 | |
apatrick@chromium.org | 85e4419 | 2012-08-17 20:58:01 +0000 | [diff] [blame] | 28 | #define VENDOR_ID_AMD 0x1002 |
| 29 | #define VENDOR_ID_INTEL 0x8086 |
| 30 | #define VENDOR_ID_NVIDIA 0x10DE |
| 31 | |
daniel@transgaming.com | 106e1f7 | 2012-10-31 18:38:36 +0000 | [diff] [blame] | 32 | #define GL_BGRA4_ANGLEX 0x6ABC |
| 33 | #define GL_BGR5_A1_ANGLEX 0x6ABD |
| 34 | |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 35 | #endif // COMMON_ANGLEUTILS_H_ |