21#define WIN32_LEAN_AND_MEAN
36#define FAR_PLANE -80.0f
37#define NEAR_PLANE 3.0f
39#define FIELD_WIDTH 50.f
40#define FIELD_HEIGHT 45.f
41#define FIELD_DEPTH (NEAR_PLANE - FAR_PLANE + GAP)
45#define STAR_BLUE 0.10f
64 0.0f, 0.0f, 3.0f, 1.0f
149 BitBlt(hTextDC, 0, 0, bm.bmWidth, bm.bmHeight, hFileDC, 0, 0,
SRCCOPY);
163 for (Ptr32=(
DWORD *)lpBits,
i=0;
i < (
UINT)(bm.bmWidth * bm.bmHeight);
i++)
168 Color |= Alpha << 24;
416 ChangeDisplaySettings(
NULL, 0);
523 gluLookAt( 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 2.0, 3.0 );
BOOL CALLBACK ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL WINAPI RegisterDialogClasses(HANDLE hInst)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow)
static HWND InitInstance(HINSTANCE hInst)
static const WCHAR szClassName[]
static BOOL InitApp(_In_ HINSTANCE hInstance, _In_ LPTSTR lpCmdLine)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
GLAPI void GLAPIENTRY glTexCoord2f(GLfloat s, GLfloat t)
#define GL_TEXTURE_MIN_FILTER
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define GL_AMBIENT_AND_DIFFUSE
#define GL_FRONT_AND_BACK
GLAPI void GLAPIENTRY glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
GLAPI void GLAPIENTRY glColorMaterial(GLenum face, GLenum mode)
GLAPI void GLAPIENTRY glHint(GLenum target, GLenum mode)
#define GL_QUADRATIC_ATTENUATION
GLAPI void GLAPIENTRY glPolygonMode(GLenum face, GLenum mode)
GLAPI void GLAPIENTRY glPushMatrix(void)
GLAPI void GLAPIENTRY glLoadIdentity(void)
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
GLAPI void GLAPIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
GLAPI void GLAPIENTRY glBindTexture(GLenum target, GLuint texture)
#define GL_COLOR_BUFFER_BIT
GLAPI void GLAPIENTRY glBegin(GLenum mode)
GLAPI void GLAPIENTRY glGenTextures(GLsizei n, GLuint *textures)
GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
#define GL_COLOR_MATERIAL
GLAPI void GLAPIENTRY glPopMatrix(void)
#define GL_LINEAR_ATTENUATION
#define GL_ONE_MINUS_SRC_ALPHA
GLAPI void GLAPIENTRY glLightModeli(GLenum pname, GLint param)
GLAPI void GLAPIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glEnd(void)
GLAPI void GLAPIENTRY glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
GLAPI void GLAPIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
GLAPI void GLAPIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params)
#define GL_TEXTURE_MAG_FILTER
GLAPI void GLAPIENTRY glDisable(GLenum cap)
#define GL_CONSTANT_ATTENUATION
#define GL_PERSPECTIVE_CORRECTION_HINT
GLAPI void GLAPIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
GLAPI void GLAPIENTRY glMatrixMode(GLenum mode)
GLAPI void GLAPIENTRY glShadeModel(GLenum mode)
GLAPI void GLAPIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
GLAPI void GLAPIENTRY glFlush(void)
GLAPI void GLAPIENTRY glClear(GLbitfield mask)
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define gluBuild2DMipmaps
void __cdecl srand(_In_ unsigned int _Seed)
_Check_return_ int __cdecl rand(void)
TCHAR szTitle[MAX_LOADSTRING]
#define ROTATION_PERIODIC
static float(__cdecl *square_half_float)(float x
static HGLRC(WINAPI *pwglCreateContextAttribsARB)(HDC hDC
#define WS_OVERLAPPEDWINDOW
LRESULT WINAPI DefScreenSaverProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
#define DLG_SCRNSAVECONFIGURE
static LRESULT CALLBACK OnSize(HWND hWnd, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK OnDestroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
static HBITMAP CreateStarBitmap(HWND hWnd, HDC hDC)
LRESULT CALLBACK ScreenSaverProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
static PIXELFORMATDESCRIPTOR pfd
static VERTEX Vertex[MAX_STARS]
static GLfloat g_light_position[4]
static LRESULT CALLBACK OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
static void InitGL(HBITMAP hStarTex)
BITMAPINFOHEADER bmiHeader
TW_UINT32 TW_UINT16 TW_UINT16 MSG
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
BOOL WINAPI wglDeleteContext(HGLRC hglrc)
HGLRC WINAPI wglCreateContext(HDC hdc)
BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
int WINAPI ChoosePixelFormat(_In_ HDC hdc, _In_ const PIXELFORMATDESCRIPTOR *ppfd)
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI SetPixelFormat(_In_ HDC, _In_ int, _In_ const PIXELFORMATDESCRIPTOR *)
#define PFD_SUPPORT_OPENGL
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR
BOOL WINAPI SwapBuffers(HDC)
#define PFD_DRAW_TO_WINDOW
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define LR_CREATEDIBSECTION
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI UpdateWindow(_In_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)