aboutsummaryrefslogtreecommitdiffstats
path: root/CNativeCode/OpenGL_Win32_common.h
blob: 9e99aed8f2ad98f9f588752428dc75bd480de88e (plain)
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
40
41
42
43
44
45
46
47
48
49
50
#ifndef _OPENGL_WIN32_COMMON_H
#define _OPENGL_WIN32_COMMON_H

#include "OpenGL_misc.h"

#include <wingdi.h>


LIBAPI void LIBAPIENTRY setPixelFormatByGLCapabilities( 
					PIXELFORMATDESCRIPTOR *pfd,
				        GLCapabilities *glCaps,
					jboolean offScreenRenderer,
					HDC hdc);

// Set Pixel Format function - forward declaration
LIBAPI void LIBAPIENTRY SetDCPixelFormat(HDC hDC, GLCapabilities *glCaps,
		jboolean offScreenRenderer, jboolean verbose);

LIBAPI HPALETTE LIBAPIENTRY GetOpenGLPalette(HDC hDC);

LIBAPI HGLRC LIBAPIENTRY get_GC( HDC *hDC, GLCapabilities *glCaps,
		HGLRC shareWith, jboolean offScreenRenderer,
		int width, int height, HBITMAP *pix,
		jboolean verbose);

LIBAPI int LIBAPIENTRY PixelFormatDescriptorFromDc( HDC Dc, 
		PIXELFORMATDESCRIPTOR *Pfd );

const char * LIBAPIENTRY GetTextualPixelFormatByHDC(HDC hdc);

const char * LIBAPIENTRY GetTextualPixelFormatByPFD(
		PIXELFORMATDESCRIPTOR *ppfd, int format);

/* testX11Java does important implementation plattformspecific checks:
 *
 * o do fit X11-Vars in jint (because GLContext stores 'em like that)
 */
LIBAPI jboolean LIBAPIENTRY testWin32Java(void);

LIBAPI void LIBAPIENTRY setupDIB(HDC hDCOrig, HDC hDC, HBITMAP * hBitmap, 
		int width, int height);

LIBAPI void LIBAPIENTRY resizeDIB(HDC hDC, HBITMAP *hOldBitmap, 
		HBITMAP *hBitmap);

LIBAPI HPALETTE LIBAPIENTRY setupPalette(HDC hDC);

LIBAPI jboolean LIBAPIENTRY setGLCapabilities ( HDC hdc, int nPixelFormat,
					        GLCapabilities *glCaps );
#endif