LMMS
Loading...
Searching...
No Matches
win_gl.c File Reference
#include "stub.h"
#include "types.h"
#include "win.h"
#include "pugl/gl.h"
#include <windows.h>
#include <GL/gl.h>
#include <stdbool.h>
#include <stdlib.h>

Classes

struct  PuglWinGlProcs
struct  PuglWinGlSurface
struct  PuglFakeWindow

Macros

#define WGL_DRAW_TO_WINDOW_ARB   0x2001
#define WGL_ACCELERATION_ARB   0x2003
#define WGL_SUPPORT_OPENGL_ARB   0x2010
#define WGL_DOUBLE_BUFFER_ARB   0x2011
#define WGL_PIXEL_TYPE_ARB   0x2013
#define WGL_RED_BITS_ARB   0x2015
#define WGL_GREEN_BITS_ARB   0x2017
#define WGL_BLUE_BITS_ARB   0x2019
#define WGL_ALPHA_BITS_ARB   0x201b
#define WGL_DEPTH_BITS_ARB   0x2022
#define WGL_STENCIL_BITS_ARB   0x2023
#define WGL_FULL_ACCELERATION_ARB   0x2027
#define WGL_TYPE_RGBA_ARB   0x202b
#define WGL_SAMPLE_BUFFERS_ARB   0x2041
#define WGL_SAMPLES_ARB   0x2042
#define WGL_CONTEXT_MAJOR_VERSION_ARB   0x2091
#define WGL_CONTEXT_MINOR_VERSION_ARB   0x2092
#define WGL_CONTEXT_FLAGS_ARB   0x2094
#define WGL_CONTEXT_PROFILE_MASK_ARB   0x9126
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB   0x00000001
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB   0x00000002
#define WGL_CONTEXT_DEBUG_BIT_ARB   0x00000001

Typedefs

typedef HGLRC(WINAPIWglCreateContextAttribs) (HDC, HGLRC, const int *)
typedef BOOL(WINAPIWglSwapInterval) (int)
typedef BOOL(WINAPIWglChoosePixelFormat) (HDC, const int *, const FLOAT *, UINT, int *, UINT *)

Functions

static PuglStatus puglWinError (PuglFakeWindow *fakeWin, const PuglStatus status)
static PuglWinGlProcs puglWinGlGetProcs (void)
static PuglStatus puglWinGlConfigure (PuglView *view)
static PuglStatus puglWinGlCreate (PuglView *view)
static void puglWinGlDestroy (PuglView *view)
static PuglStatus puglWinGlEnter (PuglView *view, const PuglExposeEvent *expose)
static PuglStatus puglWinGlLeave (PuglView *view, const PuglExposeEvent *expose)
PuglGlFunc puglGetProcAddress (const char *name)
PuglStatus puglEnterContext (PuglView *view)
PuglStatus puglLeaveContext (PuglView *view)
const PuglBackendpuglGlBackend (void)

Macro Definition Documentation

◆ WGL_ACCELERATION_ARB

#define WGL_ACCELERATION_ARB   0x2003

◆ WGL_ALPHA_BITS_ARB

#define WGL_ALPHA_BITS_ARB   0x201b

◆ WGL_BLUE_BITS_ARB

#define WGL_BLUE_BITS_ARB   0x2019

◆ WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB

#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB   0x00000002

◆ WGL_CONTEXT_CORE_PROFILE_BIT_ARB

#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB   0x00000001

◆ WGL_CONTEXT_DEBUG_BIT_ARB

#define WGL_CONTEXT_DEBUG_BIT_ARB   0x00000001

◆ WGL_CONTEXT_FLAGS_ARB

#define WGL_CONTEXT_FLAGS_ARB   0x2094

◆ WGL_CONTEXT_MAJOR_VERSION_ARB

#define WGL_CONTEXT_MAJOR_VERSION_ARB   0x2091

◆ WGL_CONTEXT_MINOR_VERSION_ARB

#define WGL_CONTEXT_MINOR_VERSION_ARB   0x2092

◆ WGL_CONTEXT_PROFILE_MASK_ARB

#define WGL_CONTEXT_PROFILE_MASK_ARB   0x9126

◆ WGL_DEPTH_BITS_ARB

#define WGL_DEPTH_BITS_ARB   0x2022

◆ WGL_DOUBLE_BUFFER_ARB

#define WGL_DOUBLE_BUFFER_ARB   0x2011

◆ WGL_DRAW_TO_WINDOW_ARB

#define WGL_DRAW_TO_WINDOW_ARB   0x2001

◆ WGL_FULL_ACCELERATION_ARB

#define WGL_FULL_ACCELERATION_ARB   0x2027

◆ WGL_GREEN_BITS_ARB

#define WGL_GREEN_BITS_ARB   0x2017

◆ WGL_PIXEL_TYPE_ARB

#define WGL_PIXEL_TYPE_ARB   0x2013

◆ WGL_RED_BITS_ARB

#define WGL_RED_BITS_ARB   0x2015

◆ WGL_SAMPLE_BUFFERS_ARB

#define WGL_SAMPLE_BUFFERS_ARB   0x2041

◆ WGL_SAMPLES_ARB

#define WGL_SAMPLES_ARB   0x2042

◆ WGL_STENCIL_BITS_ARB

#define WGL_STENCIL_BITS_ARB   0x2023

◆ WGL_SUPPORT_OPENGL_ARB

#define WGL_SUPPORT_OPENGL_ARB   0x2010

◆ WGL_TYPE_RGBA_ARB

#define WGL_TYPE_RGBA_ARB   0x202b

Typedef Documentation

◆ WglChoosePixelFormat

typedef BOOL(WINAPI * WglChoosePixelFormat) (HDC, const int *, const FLOAT *, UINT, int *, UINT *)

◆ WglCreateContextAttribs

typedef HGLRC(WINAPI * WglCreateContextAttribs) (HDC, HGLRC, const int *)

◆ WglSwapInterval

typedef BOOL(WINAPI * WglSwapInterval) (int)

Function Documentation

◆ puglWinError()

PuglStatus puglWinError ( PuglFakeWindow * fakeWin,
const PuglStatus status )
static

◆ puglWinGlConfigure()

PuglStatus puglWinGlConfigure ( PuglView * view)
static

◆ puglWinGlCreate()

PuglStatus puglWinGlCreate ( PuglView * view)
static

◆ puglWinGlDestroy()

void puglWinGlDestroy ( PuglView * view)
static

◆ puglWinGlEnter()

PuglStatus puglWinGlEnter ( PuglView * view,
const PuglExposeEvent * expose )
static

◆ puglWinGlGetProcs()

PuglWinGlProcs puglWinGlGetProcs ( void )
static

◆ puglWinGlLeave()

PuglStatus puglWinGlLeave ( PuglView * view,
const PuglExposeEvent * expose )
static