OpenCPN Partial API docs
Loading...
Searching...
No Matches
glTextureDescriptor.h
1/******************************************************************************
2 *
3 * Project: OpenCPN
4 *
5 ***************************************************************************
6 * Copyright (C) 2013 by David S. Register *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the *
20 * Free Software Foundation, Inc., *
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22 ***************************************************************************
23 */
24
25#ifndef __GLTEXTUREDESCRIPTOR_H__
26#define __GLTEXTUREDESCRIPTOR_H__
27
28#include <wx/wxprec.h>
29
30#ifndef WX_PRECOMP
31#include <wx/wx.h>
32#endif // precompiled headers
33
34#if defined(__OCPN__ANDROID__)
35#include <GLES2/gl2.h>
36#elif defined(__WXQT__) || defined(__WXGTK__)
37#include <GL/glew.h>
38#endif
39
40#include "dychart.h"
41#include "ocpn_types.h"
42#include "color_types.h"
43
44#define CA_READ 0
45#define CA_WRITE 1
46
47#define GPU_TEXTURE_UNKNOWN 0
48#define GPU_TEXTURE_UNCOMPRESSED 1
49#define GPU_TEXTURE_COMPRESSED 2
50
51class glTexFactory;
53public:
56 void FreeAll();
57 void FreeMap();
58 void FreeComp();
59 void FreeCompComp();
60
61 size_t GetMapArrayAlloc(void);
62 size_t GetCompArrayAlloc(void);
63 size_t GetCompCompArrayAlloc(void);
64
65 bool IsCompCompArrayComplete(int base_level);
66
67 GLuint tex_name;
68 int level_min;
69 int x;
70 int y;
71 int nGPU_compressed;
72 ColorScheme m_colorscheme;
73
74 int tex_mem_used;
75
76 unsigned char *map_array[10];
77 unsigned char *comp_array[10];
78 unsigned char *compcomp_array[10];
79 int compcomp_size[10];
80
81 int compdata_ticks;
82};
83
84#endif