Menu

[r124]: / OpenGLDevice.h  Maximize  Restore  History

Download this file

40 lines (29 with data), 898 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// OpenGLDevice.h: Schnittstelle für die Klasse OpenGLDevice.
//
// Copyright by André Stein
// E-Mail: stonemaster@steinsoft.net, andre_stein@web.de
// http://www.steinsoft.net
//////////////////////////////////////////////////////////////////////
#ifndef OPENGL_DEVICE_H
#define OPENGL_DEVICE_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <windows.h>
class OpenGLDevice
{
public:
OpenGLDevice(HDC& deviceContext,int stencil = 0);
OpenGLDevice(HWND& window,int stencil = 0);
OpenGLDevice();
bool create(HDC& deviceContext,int stencil = 0);
bool create(HWND& window,int stencil = 0);
void destroy();
void makeCurrent(bool disableOther = true);
virtual ~OpenGLDevice();
protected:
bool setDCPixelFormat(HDC& deviceContext,int stencil);
HGLRC renderContext;
HDC deviceContext;
};
#endif // ifndef OPENGL_DEVICE_H