WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
video.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#ifdef _WIN32
5#include <windows.h>
6#endif
7#include <glad/gl.h>
8#include <GL/glu.h>
9#ifdef _WIN32
10#include <glad/wgl.h>
11#endif
12
15{
16 int colour;
17 int alpha;
18 int zBuffer;
19 int accum;
20 int stencil;
22 int hwAcc;
23 GLboolean sampleBuffer;
24 GLboolean doubleBuffer;
25};
26
33{
34public:
37
38 // Functions
39 bool Init();
40 void InitGL();
41 void EnumDisplayModes();
42
44 bool GetAvailableMode();
45 void ResizeGLScene(int width, int height);
46 void SetMode();
47 void SetCurrent();
48 void SwapBuffers();
49 void Release();
50
51#ifdef _WINDOWS
52 HWND GetHandle() { return hWnd; }
53 void SetHandle(HWND hwnd, int bpp);
54
55 // Resources
56 HDC hDC = nullptr;
57 HWND hWnd = nullptr;
58 HGLRC hRC = nullptr;
59#endif
60
61 bool init = false;
62 bool render = false;
63 bool refresh = false;
64
65 // OpenGL Settings
66 int xRes = 0;
67 int yRes = 0;
68 int pixelFormat = 0;
69 float fov = 45.0f;
70 int desktopBPP = 0;
71
72 // Card capabilities
73 std::vector<VideoCaps> capsList;
75 int capIndex = 0;
76
79
80 // Card Info
81 char* vendor = nullptr;
82 char* version = nullptr;
83 char* renderer = nullptr;
84
85 // Is there hardware support?
86 bool hasHardware = false;
87 bool secondPass = false;
88
89 // Video card support for OGL Extensions
90 bool supportFragProg = false;
91 bool supportVertexProg = false;
92 bool supportGLSL = false;
93 bool supportCompression = false;
94 bool supportMultiTex = false;
96 bool supportPointSprites = false;
97 bool supportShaders = false;
98 bool supportAntiAlias = false;
99 bool supportVBO = false;
100 bool supportPBO = false;
101 bool supportFBO = false;
102 bool supportNPOT = false;
103 bool supportOGL20 = false;
105 bool supportTexRects = false;
106
107 bool useMasking = false;
108 bool useEnvMapping = true;
109};
110
111extern VideoSettings video;
Legacy OpenGL video-settings manager.
Definition video.h:33
bool supportShaders
Definition video.h:97
bool supportVBO
Definition video.h:99
void InitGL()
Definition video.cpp:187
int pixelFormat
Definition video.h:68
int desktopBPP
Definition video.h:70
float fov
Definition video.h:69
bool supportCompression
Definition video.h:93
bool GetAvailableMode()
Definition video.cpp:369
std::vector< VideoCaps > capsList
Definition video.h:73
bool refresh
Definition video.h:63
bool useEnvMapping
Definition video.h:108
int AnisofilterLevel
Definition video.h:77
bool supportWGLPixelFormat
Definition video.h:104
bool supportAntiAlias
Definition video.h:98
bool supportDrawRangeElements
Definition video.h:95
bool supportGLSL
Definition video.h:92
bool init
Definition video.h:61
bool useMasking
Definition video.h:107
int numTextureUnits
Definition video.h:78
void SetCurrent()
Definition video.cpp:713
void EnumDisplayModes()
Definition video.cpp:270
bool supportFBO
Definition video.h:101
void SwapBuffers()
Definition video.cpp:705
bool supportTexRects
Definition video.h:105
VideoCaps curCap
Definition video.h:74
char * renderer
Definition video.h:83
void Release()
Definition video.cpp:567
void ResizeGLScene(int width, int height)
Definition video.cpp:687
char * version
Definition video.h:82
bool supportPBO
Definition video.h:100
char * vendor
Definition video.h:81
int capIndex
Definition video.h:75
bool supportFragProg
Definition video.h:90
bool supportVertexProg
Definition video.h:91
bool render
Definition video.h:62
void SetMode()
Definition video.cpp:587
bool supportNPOT
Definition video.h:102
bool supportOGL20
Definition video.h:103
bool GetCompatibleWinMode(VideoCaps caps)
Definition video.cpp:437
bool hasHardware
Definition video.h:86
bool supportPointSprites
Definition video.h:96
bool supportMultiTex
Definition video.h:94
bool secondPass
Definition video.h:87
bool Init()
Definition video.cpp:62
Describes a single video mode's capabilities (colour depth, AA, etc.).
Definition video.h:15
int zBuffer
Depth buffer bit depth.
Definition video.h:18
int stencil
Stencil buffer bit depth.
Definition video.h:20
int hwAcc
Hardware acceleration mode.
Definition video.h:22
int alpha
Alpha buffer bit depth.
Definition video.h:17
GLboolean doubleBuffer
True if double-buffered.
Definition video.h:24
GLboolean sampleBuffer
True if an AA sample buffer is available.
Definition video.h:23
int colour
Colour buffer bit depth.
Definition video.h:16
int accum
Accumulation buffer bit depth.
Definition video.h:19
int aaSamples
Number of anti-aliasing samples.
Definition video.h:21
VideoSettings video
Definition video.cpp:38