Glide Plugin GLES2 port from mupen64plus-ae, but with special FrameSkip code
[mupen64plus-pandora.git] / source / gles2glide64 / src / GlideHQ / TxDbg.h
CommitLineData
98e75f2d 1/*
2 * Texture Filtering
3 * Version: 1.0
4 *
5 * Copyright (C) 2007 Hiroshi Morii All Rights Reserved.
6 * Email koolsmoky(at)users.sourceforge.net
7 * Web http://www.3dfxzone.it/koolsmoky
8 *
9 * this is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * this is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with GNU Make; see the file COPYING. If not, write to
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24#ifndef __TXDBG_H__
25#define __TXDBG_H__
26
27#include <stdio.h>
28#include "TxInternal.h"
29
30class TxDbg
31{
32private:
33 FILE* _dbgfile;
34 int _level;
35 TxDbg();
36public:
37 static TxDbg* getInstance() {
38 static TxDbg txDbg;
39 return &txDbg;
40 }
41 ~TxDbg();
42 void output(const int level, const wchar_t *format, ...);
43};
44
45#ifdef DEBUG
46#define DBG_INFO(...) TxDbg::getInstance()->output(__VA_ARGS__)
47#define INFO(...) DBG_INFO(__VA_ARGS__)
48#else
49#define DBG_INFO(...)
50#ifdef GHQCHK
51#define INFO(...) TxDbg::getInstance()->output(__VA_ARGS__)
52#else
53#if 0 /* XXX enable this to log basic hires texture checks */
54#define INFO(...) TxDbg::getInstance()->output(__VA_ARGS__)
55#else
56#define INFO(...) DBG_INFO(__VA_ARGS__)
57#endif
58#endif
59#endif
60
61#endif /* __TXDBG_H__ */