ReactOS 0.4.15-dev-7934-g1dc8d80
3dtext.c File Reference
#include "3dtext.h"
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <scrnsave.h>
#include <math.h>
#include <GL/glu.h>
#include "resource.h"
Include dependency graph for 3dtext.c:

Go to the source code of this file.

Macros

#define APPNAME   _T("3DText")
 
#define APP_TIMER   1
 
#define APP_TIMER_INTERVAL   (USER_TIMER_MINIMUM * 5)
 

Functions

GLvoid BuildFont (GLvoid)
 
GLvoid KillFont (GLvoid)
 
GLvoid glPrint (LPTSTR text)
 
GLvoid InitGL (GLsizei Width, GLsizei Height)
 
GLvoid ReSizeGLScene (GLsizei Width, GLsizei Height)
 
GLvoid DrawGLScene (GLvoid)
 
LRESULT CALLBACK ScreenSaverProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
BOOL CALLBACK ScreenSaverConfigureDialog (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL WINAPI RegisterDialogClasses (HANDLE hInst)
 

Variables

static HGLRC hRC
 
static HDC hDC
 
GLuint base
 
GLfloat rot
 
GLfloat extentX = 0.0f
 
GLfloat extentY = 0.0f
 
HINSTANCE hInstance
 
BOOL fullscreen = FALSE
 
UINT uTimerID
 

Macro Definition Documentation

◆ APP_TIMER

#define APP_TIMER   1

Definition at line 45 of file 3dtext.c.

◆ APP_TIMER_INTERVAL

#define APP_TIMER_INTERVAL   (USER_TIMER_MINIMUM * 5)

Definition at line 46 of file 3dtext.c.

◆ APPNAME

#define APPNAME   _T("3DText")

Definition at line 40 of file 3dtext.c.

Function Documentation

◆ BuildFont()

GLvoid BuildFont ( GLvoid  )

Definition at line 49 of file 3dtext.c.

50{
51 // Address Buffer For Font Storage
52 GLYPHMETRICSFLOAT gmf[256];
53 // Windows Font Handle
54 HFONT font;
55 size_t i;
56 TCHAR c;
57 GLfloat cellOriginX = 0.0f;
58 GLfloat stringOriginX;
59 GLfloat stringExtentX = 0.0f;
60 GLfloat stringExtentY = 0.0f;
61
62 // Storage For 256 Characters
63 base = glGenLists(256);
64
65 font = CreateFont(-12,
66 0, // Width Of Font
67 0, // Angle Of Escapement
68 0, // Orientation Angle
69 FW_BOLD, // Font Weight
70 FALSE, // Italic
71 FALSE, // Underline
72 FALSE, // Strikeout
73 DEFAULT_CHARSET, // Character Set Identifier
74 OUT_TT_PRECIS, // Output Precision
75 CLIP_DEFAULT_PRECIS, // Clipping Precision
76 ANTIALIASED_QUALITY, // Output Quality
77 FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
78 _T("Tahoma")); // Font Name
79
80 // Selects The Font We Created
82
83 wglUseFontOutlines(hDC, // Select The Current DC
84 0, // Starting Character
85 255, // Number Of Display Lists To Build
86 base, // Starting Display Lists
87 0.0f, // Deviation From The True Outlines
88 0.2f, // Font Thickness In The Z Direction
89 WGL_FONT_POLYGONS, // Use Polygons, Not Lines
90 gmf); // Address Of Buffer To Receive Data
91
92 // Calculate the string extent
93 for (i = 0; i < _tcslen(m_Text); i++)
94 {
95 c = m_Text[i];
96
97 stringOriginX = cellOriginX + gmf[c].gmfptGlyphOrigin.x;
98
99 stringExtentX = stringOriginX + gmf[c].gmfBlackBoxX;
100 if (gmf[c].gmfBlackBoxY > stringExtentY)
101 stringExtentY = gmf[c].gmfBlackBoxY;
102
103 cellOriginX = cellOriginX + gmf[c].gmfCellIncX;
104 }
105
106 extentX = stringExtentX;
107 extentY = stringExtentY;
108}
GLfloat extentX
Definition: 3dtext.c:37
static HDC hDC
Definition: 3dtext.c:33
GLfloat extentY
Definition: 3dtext.c:38
TCHAR m_Text[MAX_PATH]
Definition: settings.c:25
#define FALSE
Definition: types.h:117
float GLfloat
Definition: gl.h:161
GLAPI GLuint GLAPIENTRY glGenLists(GLsizei range)
const GLubyte * c
Definition: glext.h:8905
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
Definition: glfuncs.h:248
#define c
Definition: ke_i.h:80
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
Definition: mk_font.cpp:20
FLOAT gmfBlackBoxX
Definition: wingdi.h:2726
POINTFLOAT gmfptGlyphOrigin
Definition: wingdi.h:2728
FLOAT gmfBlackBoxY
Definition: wingdi.h:2727
FLOAT x
Definition: wingdi.h:2722
#define _T(x)
Definition: vfdio.h:22
#define DEFAULT_PITCH
Definition: wingdi.h:443
#define ANTIALIASED_QUALITY
Definition: wingdi.h:440
#define WGL_FONT_POLYGONS
Definition: wingdi.h:1325
#define FW_BOLD
Definition: wingdi.h:378
#define FF_DONTCARE
Definition: wingdi.h:448
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define wglUseFontOutlines
Definition: wingdi.h:4486
#define CreateFont
Definition: wingdi.h:4443
#define OUT_TT_PRECIS
Definition: wingdi.h:419
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
char TCHAR
Definition: xmlstorage.h:189
#define _tcslen
Definition: xmlstorage.h:198

Referenced by InitGL().

◆ DrawGLScene()

GLvoid DrawGLScene ( GLvoid  )

Definition at line 213 of file 3dtext.c.

214{
215 // Save ticks count of previous frame here
216 static DWORD dwTicks = 0;
217
218 // Clear The Screen And The Depth Buffer
220
221 // Reset The View
223
224 // Move One Unit Into The Screen
225 glTranslatef(0.0f, 0.0f, -10.0f);
226
227 // Rotate On The X Axis
228 glRotatef(rot, 1.0f, 0.0f, 0.0f);
229
230 // Rotate On The Y Axis
231 glRotatef(rot * 1.2f, 0.0f, 1.0f, 0.0f);
232
233 // Rotate On The Z Axis
234 glRotatef(rot * 1.4f, 0.0f, 0.0f, 1.0f);
235
236 // Move to the Left and Down before drawing
237 glTranslatef(-(extentX / 2.0f),
238 -(extentY / 2.0f),
239 0.0f);
240
241 // Pulsing Colors Based On The Rotation
242 glColor3f((1.0f * (GLfloat)(cos(rot / 20.0f))),
243 (1.0f * (GLfloat)(sin(rot / 25.0f))),
244 (1.0f - 0.5f * (GLfloat)(cos(rot / 17.0f))));
245
246 // Print GL Text To The Screen
248
249 // Make The Text Blue
250 glColor3f(0.0f, 0.0f, 1.0f);
251
252 // Increase The Rotation Variable
253 if(dwTicks)
254 rot += (GetTickCount() - dwTicks) / 20.0f;
255 dwTicks = GetTickCount();
256}
GLvoid glPrint(LPTSTR text)
Definition: 3dtext.c:118
GLfloat rot
Definition: 3dtext.c:36
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
unsigned long DWORD
Definition: ntddk_ex.h:95
GLAPI void GLAPIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glLoadIdentity(void)
#define GL_COLOR_BUFFER_BIT
Definition: gl.h:716
GLAPI void GLAPIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue)
#define GL_DEPTH_BUFFER_BIT
Definition: gl.h:710
GLAPI void GLAPIENTRY glClear(GLbitfield mask)

Referenced by ScreenSaverProc().

◆ glPrint()

GLvoid glPrint ( LPTSTR  text)

Definition at line 118 of file 3dtext.c.

119{
120 // If there's no text, do nothing
121 if (text == NULL)
122 return;
123
124 // Pushes The Display List Bits
126
127 // Sets The Base Character to 32
129
130 // Draws The Display List Text
132#ifdef UNICODE
134#else
136#endif
137 text);
138
139 // Pops The Display List Bits
140 glPopAttrib();
141}
#define NULL
Definition: types.h:112
const WCHAR * text
Definition: package.c:1799
#define GL_LIST_BIT
Definition: gl.h:719
#define GL_UNSIGNED_SHORT
Definition: gl.h:180
#define GL_UNSIGNED_BYTE
Definition: gl.h:178
GLAPI void GLAPIENTRY glCallLists(GLsizei n, GLenum type, const GLvoid *lists)
GLAPI void GLAPIENTRY glPopAttrib(void)
GLAPI void GLAPIENTRY glListBase(GLuint base)
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
wchar_t UNICODE
Definition: ms-dtyp.idl:111

Referenced by DrawGLScene().

◆ InitGL()

GLvoid InitGL ( GLsizei  Width,
GLsizei  Height 
)

Definition at line 144 of file 3dtext.c.

145{
146 // Clear The Background Color To Black
147 glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
148
149 // Enables Clearing Of The Depth Buffer
150 glClearDepth(1.0);
151
152 // The Type Of Depth Test To Do
154
155 // Enables Depth Testing
157
158 // Enables Smooth Color Shading
160
161 // Select The Projection Matrix
163
164 // Reset The Projection Matrix
166
167 // Calculate The Aspect Ratio Of The Window
168 gluPerspective(45.0f, (GLfloat)Width / (GLfloat)Height, 0.1f, 100.0f);
169
170 // Select The Modelview Matrix
172
173 // Build The Font
174 BuildFont();
175
176 // Enable Default Light (Quick And Dirty)
178
179 // Enable Lighting
181
182 // Enable Coloring Of Material
184}
GLvoid BuildFont(GLvoid)
Definition: 3dtext.c:49
GLAPI void GLAPIENTRY glClearDepth(GLclampd depth)
GLAPI void GLAPIENTRY glDepthFunc(GLenum func)
#define GL_LESS
Definition: gl.h:294
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define GL_DEPTH_TEST
Definition: gl.h:301
#define GL_SMOOTH
Definition: gl.h:339
#define GL_PROJECTION
Definition: gl.h:246
#define GL_MODELVIEW
Definition: gl.h:245
#define GL_COLOR_MATERIAL
Definition: gl.h:340
GLAPI void GLAPIENTRY glMatrixMode(GLenum mode)
GLAPI void GLAPIENTRY glShadeModel(GLenum mode)
GLAPI void GLAPIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
#define GL_LIGHT0
Definition: gl.h:311
#define GL_LIGHTING
Definition: gl.h:310
#define gluPerspective
Definition: glu_mangle.h:28
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88

Referenced by ScreenSaverProc().

◆ KillFont()

GLvoid KillFont ( GLvoid  )

Definition at line 111 of file 3dtext.c.

112{
113 // Delete all 256 characters
114 glDeleteLists(base, 256);
115}
GLAPI void GLAPIENTRY glDeleteLists(GLuint list, GLsizei range)

Referenced by ScreenSaverProc().

◆ RegisterDialogClasses()

BOOL WINAPI RegisterDialogClasses ( HANDLE  hInst)

Definition at line 432 of file 3dtext.c.

433{
434 return TRUE;
435}
#define TRUE
Definition: types.h:120

◆ ReSizeGLScene()

GLvoid ReSizeGLScene ( GLsizei  Width,
GLsizei  Height 
)

Definition at line 187 of file 3dtext.c.

188{
189 // Is Window Too Small (Divide By Zero Error)
190 if (Height == 0)
191 {
192 // If So Make It One Pixel Tall
193 Height = 1;
194 }
195
196 // Reset The Current Viewport And Perspective Transformation
197 glViewport(0, 0, Width, Height);
198
199 // Select The Projection Matrix
201
202 // Reset The Projection Matrix
204
205 // Calculate The Aspect Ratio Of The Window
206 gluPerspective(45.0f, (GLfloat)Width / (GLfloat)Height, 0.1f, 100.0f);
207
208 // Select The Modelview Matrix
210}
GLAPI void GLAPIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)

Referenced by ScreenSaverProc().

◆ ScreenSaverConfigureDialog()

BOOL CALLBACK ScreenSaverConfigureDialog ( HWND  hDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 397 of file 3dtext.c.

398{
399 switch (uMsg)
400 {
401 case WM_INITDIALOG:
402 LoadSettings();
404 return TRUE;
405
406 case WM_COMMAND:
407 switch (LOWORD(wParam))
408 {
409 case IDOK:
411 SaveSettings();
412
413 /* Fall through */
414
415 case IDCANCEL:
416 EndDialog(hDlg, IDCANCEL);
417 break;
418 }
419 return FALSE;
420
421 case WM_CLOSE:
422 EndDialog(hDlg, 0);
423 break;
424
425 default:
426 return FALSE;
427 }
428
429 return TRUE;
430}
void SaveSettings(void)
Definition: settings.c:115
void LoadSettings(void)
Definition: settings.c:53
#define IDC_MESSAGE_TEXT
Definition: resource.h:5
WPARAM wParam
Definition: combotst.c:138
#define MAX_PATH
Definition: compat.h:34
#define LOWORD(l)
Definition: pedump.c:82
#define WM_CLOSE
Definition: winuser.h:1621
#define IDCANCEL
Definition: winuser.h:831
#define GetDlgItemText
Definition: winuser.h:5785
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
#define IDOK
Definition: winuser.h:830
#define SetDlgItemText
Definition: winuser.h:5849
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

◆ ScreenSaverProc()

LRESULT CALLBACK ScreenSaverProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 259 of file 3dtext.c.

260{
261 RECT Screen; // Used Later On To Get The Size Of The Window
262 GLuint PixelFormat; // Pixel Format Storage
263 static PIXELFORMATDESCRIPTOR pfd= // Pixel Format Descriptor
264 {
265 sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
266 1, // Version Number (?)
267 PFD_DRAW_TO_WINDOW | // Format Must Support Window
268 PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
269 PFD_DOUBLEBUFFER, // Must Support Double Buffering
270 PFD_TYPE_RGBA, // Request An RGBA Format
271 16, // Select A 16Bit Color Depth
272 0, 0, 0, 0, 0, 0, // Color Bits Ignored (?)
273 0, // No Alpha Buffer
274 0, // Shift Bit Ignored (?)
275 0, // No Accumulation Buffer
276 0, 0, 0, 0, // Accumulation Bits Ignored (?)
277 16, // 16Bit Z-Buffer (Depth Buffer)
278 0, // No Stencil Buffer
279 0, // No Auxiliary Buffer (?)
280 PFD_MAIN_PLANE, // Main Drawing Layer
281 0, // Reserved (?)
282 0, 0, 0 // Layer Masks Ignored (?)
283 };
284
285 switch (message)
286 {
287 case WM_CREATE:
288 LoadSettings();
289
290 // Gets A Device Context For The Window
291 hDC = GetDC(hWnd);
292
293 // Finds The Closest Match To The Pixel Format We Set Above
295
296 // No Matching Pixel Format?
297 if (!PixelFormat)
298 {
299 MessageBox(0, _TEXT("Can't Find A Suitable PixelFormat."), _TEXT("Error"),MB_OK | MB_ICONERROR);
300
301 // This Sends A 'Message' Telling The Program To Quit
303 break;
304 }
305
306 // Can We Set The Pixel Mode?
308 {
309 MessageBox(0, _TEXT("Can't Set The PixelFormat."), _TEXT("Error"), MB_OK | MB_ICONERROR);
310
311 // This Sends A 'Message' Telling The Program To Quit
313 break;
314 }
315
316 // Grab A Rendering Context
318
319 // Did We Get One?
320 if (!hRC)
321 {
322 MessageBox(0, _TEXT("Can't Create A GL Rendering Context."), _TEXT("Error"), MB_OK | MB_ICONERROR);
323
324 // This Sends A 'Message' Telling The Program To Quit
326 break;
327 }
328
329 // Can We Make The RC Active?
330 if (!wglMakeCurrent(hDC, hRC))
331 {
332 MessageBox(0, _TEXT("Can't Activate GLRC."), _TEXT("Error"), MB_OK | MB_ICONERROR);
333
334 // This Sends A 'Message' Telling The Program To Quit
336 break;
337 }
338
339 // Grab Screen Info For The Current Window
341
342 // Initialize The GL Screen Using Screen Info
343 InitGL(Screen.right, Screen.bottom);
344
345 // Create Graphics update timer
347 break;
348
349 case WM_DESTROY:
350 // Disable Fullscreen Mode
351 ChangeDisplaySettings(NULL, 0);
352
353 // Delete the Update Timer
355
356 // Deletes The Font Display List
357 KillFont();
358
359 // Make The DC Current
361
362 // Kill The RC
364
365 // Free The DC
367 break;
368
369 case WM_PAINT:
370 DrawGLScene();
372 // Mark this window as updated, so the OS won't ask us to update it again.
374 break;
375
376 case WM_SIZE: // Resizing The Screen
377 // Resize To The New Window Size
379 break;
380
381 case WM_TIMER:
382 // Used to update graphic based on timer udpate interval
384 break;
385
386 default:
387 // Pass Windows Messages to the default screensaver window procedure
389 }
390
391 return 0;
392}
GLvoid InitGL(GLsizei Width, GLsizei Height)
Definition: 3dtext.c:144
GLvoid ReSizeGLScene(GLsizei Width, GLsizei Height)
Definition: 3dtext.c:187
GLvoid KillFont(GLvoid)
Definition: 3dtext.c:111
#define APP_TIMER_INTERVAL
Definition: 3dtext.c:46
static HGLRC hRC
Definition: 3dtext.c:32
GLvoid DrawGLScene(GLvoid)
Definition: 3dtext.c:213
#define APP_TIMER
Definition: 3dtext.c:45
UINT uTimerID
Definition: 3dtext.c:44
HWND hWnd
Definition: settings.c:17
LPARAM lParam
Definition: combotst.c:139
@ Screen
Definition: console.h:34
INT PixelFormat
unsigned int GLuint
Definition: gl.h:159
#define _TEXT(x)
Definition: tchar.h:1535
LRESULT WINAPI DefScreenSaverProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: scrnsave.c:92
static PIXELFORMATDESCRIPTOR pfd
Definition: ssstars.c:67
Definition: tftpd.h:60
#define HIWORD(l)
Definition: typedefs.h:247
BOOL WINAPI wglDeleteContext(HGLRC hglrc)
Definition: wgl.c:514
HGLRC WINAPI wglCreateContext(HDC hdc)
Definition: wgl.c:383
BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
Definition: wgl.c:650
int WINAPI ChoosePixelFormat(_In_ HDC hdc, _In_ const PIXELFORMATDESCRIPTOR *ppfd)
BOOL WINAPI SetPixelFormat(_In_ HDC, _In_ int, _In_ const PIXELFORMATDESCRIPTOR *)
#define PFD_SUPPORT_OPENGL
Definition: wingdi.h:306
struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR
BOOL WINAPI SwapBuffers(HDC)
Definition: wingl.c:187
#define PFD_DRAW_TO_WINDOW
Definition: wingdi.h:303
#define PFD_MAIN_PLANE
Definition: wingdi.h:298
#define PFD_TYPE_RGBA
Definition: wingdi.h:296
#define PFD_DOUBLEBUFFER
Definition: wingdi.h:301
#define WM_PAINT
Definition: winuser.h:1620
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_CREATE
Definition: winuser.h:1608
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1611
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define MB_ICONERROR
Definition: winuser.h:787
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WM_TIMER
Definition: winuser.h:1742
HDC WINAPI GetDC(_In_opt_ HWND)
#define MB_OK
Definition: winuser.h:790
#define MessageBox
Definition: winuser.h:5822
#define WM_DESTROY
Definition: winuser.h:1609
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

Variable Documentation

◆ base

Definition at line 35 of file 3dtext.c.

◆ extentX

GLfloat extentX = 0.0f

Definition at line 37 of file 3dtext.c.

Referenced by BuildFont(), and DrawGLScene().

◆ extentY

GLfloat extentY = 0.0f

Definition at line 38 of file 3dtext.c.

Referenced by BuildFont(), and DrawGLScene().

◆ fullscreen

BOOL fullscreen = FALSE

Definition at line 43 of file 3dtext.c.

◆ hDC

HDC hDC
static

Definition at line 33 of file 3dtext.c.

Referenced by _Success_(), AddDlg_OnInitDialog(), ANIMATE_AnimationThread(), ANIMATE_DrawFrame(), ANIMATE_PaintFrame(), ANIMATE_Play(), ANIMATE_Timer(), ANIMATE_WindowProc(), BIDI_Reorder(), BitmapFromClipboardDIB(), BitmapFromHEMF(), BitmapFromIcon(), BitmapToClipboardDIB(), BuildFont(), C1_DrawConvexRect(), C1_DrawLabel(), C1_InitBitmap(), C1_InvertButton(), C1_OnButtonDown(), C1_OnButtonUp(), C1_OnCreate(), C1_OnDraw(), C1_OnImeControl(), C1_OnMouseMove(), C1_SetData(), C1_WindowProc(), CancelDC(), CB_Paint(), CB_ThemedPaint(), CBGetTextAreaHeight(), CC_PaintColorGraph(), CC_PaintCross(), CC_PaintLumBar(), CC_PaintTriangle(), CheckEAFonts(), cicDrawMaskBmpOnDC(), co_IntPaintWindows(), co_UserExcludeUpdateRgn(), COMBO_Init(), COMBO_Paint(), COMBO_PrepareColors(), COMBOEX_ComboWndProc(), COMCTL32_DrawInsertMark(), ATL::CPathT< StringType >::CompactPath(), ConvertBitmapTo32Bpp(), ConWndProc(), Create24BppBitmap(), CCicLibMenuItem::CreateBitmap(), CreateCheckImage(), CreateCheckMask(), CreateCompatibleBitmap(), CreateD3D9DeviceData(), CreateDIBitmap(), CreateDIBSection(), CreateDiscardableBitmap(), CreateFrameBufferBitmap(), ATL::CImage::CreateInternal(), CreateInternalDeviceData(), CreateMonospaceFont(), CreateRadioImage(), CreateRadioMask(), CShellLink::CreateShortcutIcon(), DceSetDrawable(), DCU_SetDcUndeletable(), DefWndControlColor(), dialog_choose_font(), Display_DrawText(), Display_SetTypeFace(), DisplayPageProc(), DoBlt(), CCanvasWindow::DoDraw(), DoEntry(), CTextEditWindow::DoFillBack(), DoLoadImageFile(), DoLoadNames(), DoTestEntry(), CUIFMenuItem::DrawArrow(), DrawBackgroundPreview(), CUIFMenuItem::DrawBitmapProc(), CUIFButton::DrawBitmapProc(), DrawCaption(), DrawCaptionTempW(), CUIFMenuItem::DrawCheck(), drawColorBox(), DrawEdge(), CUIFButton::DrawEdgeProc(), DrawEscape(), DrawFrameControl(), CTextEditWindow::DrawGrip(), DrawHeaderOrFooter(), DrawIcon(), CUIFButton::DrawIconProc(), DrawLines(), DrawNCPreview(), DrawPrimitive(), DrawStateA(), DrawStateW(), DrawTextFromResource(), CUIFButton::DrawTextProc(), CUIFBalloonButton::DrawTextProc(), CUIFTheme::DrawThemeBackground(), CUIFTheme::DrawThemeEdge(), CUIFTheme::DrawThemeIcon(), CUIFTheme::DrawThemeParentBackground(), CUIFTheme::DrawThemeText(), DrawTileBitmap(), CUIFMenuItem::DrawUnderline(), DrawWindowForNCPreview(), DumpFont(), DxDdCreateDirectDrawObject(), DxDdReenableDirectDrawObject(), DxEngGetDCState(), DxEngLockDC(), DxEngSetDCState(), EditDlg_OnInitDialog(), EditTypeDlg_OnMeasureItem(), EnumFontsA(), EnumFontsW(), ExcludeUpdateRgn(), export_welcome_dlg_proc(), ExtEscape(), FaceNameList_Initialize(), FillRect(), FillSolidRect(), FindSuitableFont(), CTextEditWindow::FixEditPos(), fnIMLangFontLink2_GetFontUnicodeRanges(), fnIMLangFontLink2_MapFont(), fnIMLangFontLink_MapFont(), font_height(), FontTypeChange(), ForceNCPaintErase(), FrameRect(), ftGdiGetTextMetricsW(), GB_Paint(), GB_ThemedPaint(), GdiCreateLocalMetaFilePict(), GdiSelectPalette(), Get16BitD3DFormat(), GetButtonHeight(), GetClipboardDataDimensions(), GetColorSpace(), GetDIBColorTable(), GetDIBits(), GetFontMetrics(), GetFontSig(), CDefCompFrameWindow::GetGripperWidth(), CTipbarWnd::GetGripperWidth(), GetKerningPairsA(), GetPhysicalFontHeight(), GetPossibleSettings(), CUIFSystemInfo::GetSystemMetrics(), GetSystemPaletteEntries(), GetTabbedTextExtentA(), GetTabbedTextExtentW(), CTipbarThread::GetTextSize(), CUIFButton::GetTextSize(), CUIFTheme::GetThemeBackgroundContentRect(), CUIFTheme::GetThemeBackgroundExtent(), CUIFTheme::GetThemeFont(), CUIFTheme::GetThemeMargins(), CUIFTheme::GetThemePartSize(), CUIFTheme::GetThemeTextExtent(), CUIFToolTip::GetTipWindowSize(), Graph_DrawCpuUsageGraph(), Graph_DrawMemUsageGraph(), Graph_DrawMemUsageHistoryGraph(), GrayStringA(), GrayStringW(), GreExtTextOutW(), GreGetDCPoint(), GreGetDIBitsInternal(), GreGetKerningPairs(), GreGetTextExtentExW(), GreGetTextExtentW(), GreSetStretchBltMode(), GreSetViewportOrgEx(), HeightFromPointSize(), HelDdSurfLock(), HelDdSurfUnlock(), HEXEDIT_PaintLines(), HEXEDIT_WM_SETFONT(), ICONTITLE_Paint(), ICONTITLE_SetTitlePos(), Imm32StoreBitmapToBytes(), import_welcome_dlg_proc(), InatCreateIconBySize(), init_system_font_height(), InitBitmap(), CFontsDialog::InitFontNames(), InitFonts(), InitLogo(), InitOGLWindow(), IntAnimatePalette(), IntDefWindowProc(), IntDrawMenuBarTemp(), IntDrawScrollArrows(), IntDrawScrollInterior(), InternalSelectEx(), IntFillWindow(), IntGdiCleanDC(), IntGdiCreateDisplayDC(), IntGdiDeleteDC(), IntGdiPolyPatBlt(), IntGdiRealizePalette(), IntGdiSetBkColor(), IntGdiSetBkMode(), IntGdiSetHookFlags(), IntGdiSetTextAlign(), IntGdiSetTextColor(), IntGetSystemPaletteEntries(), IntGrayString(), IntPaintDesktop(), IntScrollWindowEx(), IntTMWFixUp(), IntUpdateScrollArrows(), CicCaret::InvertCaret(), InvertRect(), is_charset_font_installed(), is_fixed_charset_font_installed(), is_truetype_font_installed(), IsDirectDrawSupported(), IsGDIDriver(), IsValidConsoleFont(), KeyboardSpeedProc(), LoadDialog(), LoadIniFile(), LogicalSizeToPointSize(), Main_DDrawSurface_ReleaseDC(), MainFrameBase::MainFrameBase(), MainWnd_OnDrawItem(), MainWnd_OnMeasureItem(), MainWnd_OnPaint(), MainWndProc(), MCIAVI_OpenVideo(), MCIAVI_PaintFrame(), MCIAVI_player(), MD_OnPrint(), MD_OnPrintClient(), ME_CharFormatFromLogFont(), ME_DebugWrite(), ME_DrawTextWithStyle(), ME_HandleMessage(), ME_InitContext(), ME_PaintContent(), CTrayClockWnd::MeasureLines(), MENU_DrawMenuBar(), MonitorSelWndProc(), MonSelGetMonitorFont(), MonSelMoveDragRect(), MonSelPaint(), MonSelPaintMonitor(), MonthCalPaint(), MonthCalWndProc(), MultiWndProc(), MyDrawEdge(), MyDrawFrameControl(), NC_DoNCPaint(), NC_DrawFrame(), NC_HandleNCActivate(), NC_HandleNCCalcSize(), NC_HandleNCLButtonDown(), NewEnumFontFamiliesExW(), NtGdiAbortPath(), NtGdiAngleArc(), NtGdiArcInternal(), NtGdiBeginPath(), NtGdiCloseFigure(), NtGdiCreateCompatibleBitmap(), NtGdiCreateDIBSection(), NtGdiCreateHalftonePalette(), NtGdiDdDDICreateDCFromMemory(), NtGdiEllipse(), NtGdiEndPath(), NtGdiEscape(), NtGdiExtEscape(), NtGdiExtFloodFill(), NtGdiExtSelectClipRgn(), NtGdiExtTextOutW(), NtGdiFillPath(), NtGdiFlattenPath(), NtGdiFlushUserBatch(), NtGdiGetCharABCWidthsW(), NtGdiGetCharSet(), NtGdiGetCharWidthW(), NtGdiGetDCDword(), NtGdiGetDCObject(), NtGdiGetDCPoint(), NtGdiGetDeviceGammaRamp(), NtGdiGetFontData(), NtGdiGetKerningPairs(), NtGdiGetNearestColor(), NtGdiGetOutlineTextMetricsInternalW(), NtGdiGetPath(), NtGdiGetTextExtentExW(), NtGdiGetTextFaceW(), NtGdiGetTextMetricsW(), NtGdiLineTo(), NtGdiOffsetViewportOrgEx(), NtGdiOffsetWindowOrgEx(), NtGdiPathToRegion(), NtGdiPolyPatBlt(), NtGdiPolyPolyDraw(), NtGdiPtVisible(), NtGdiRectangle(), NtGdiRectVisible(), NtGdiRoundRect(), NtGdiSaveDC(), NtGdiScaleViewportExtEx(), NtGdiScaleWindowExtEx(), NtGdiSelectBrush(), NtGdiSelectClipPath(), NtGdiSelectPen(), NtGdiSetDeviceGammaRamp(), NtGdiSetDIBitsToDeviceInternal(), NtGdiSetMetaRgn(), NtGdiSetSystemPaletteUse(), NtGdiSetTextJustification(), NtGdiSetViewportOrgEx(), NtGdiSetWindowOrgEx(), NtGdiStrokeAndFillPath(), NtGdiStrokePath(), NtGdiTransformPoints(), NtGdiUpdateColors(), NtGdiWidenPath(), NtUserBeginPaint(), NtUserDrawCaption(), NtUserDrawCaptionTemp(), NtUserDrawMenuBarTemp(), NtUserEnumDisplayMonitors1(), NtUserExcludeUpdateRgn(), NtUserFillWindow(), NtUserPaintDesktop(), NtUserPaintMenuBar(), NtUserScrollDC(), NtUserSelectPalette(), NtUserxRealizePalette(), NtUserxReleaseDC(), NtUserxWindowFromDC(), OB_Paint(), CAutoComplete::OnDrawItem(), CTextEditWindow::OnEraseBkGnd(), CTextEditWindow::OnNCPaint(), CCanvasWindow::OnPaint(), CFullscreenWindow::OnPaint(), CMiniatureWindow::OnPaint(), CPaletteWindow::OnPaint(), CTextEditWindow::OnPaint(), CDownloaderProgress::OnPaint(), CTrayClockWnd::OnPaint(), CACSizeBox::OnPaint(), CDefView::OnPrintClient(), PaintControl(), CUIFBalloonWindow::PaintFrameProc(), CTrayClockWnd::PaintLine(), CUIFBalloonWindow::PaintMessageProc(), PaintSuspendedWindow(), PathCompactPathA(), PathCompactPathW(), ATL::CPathT< StringType >::PathCompactPathX(), PB_Paint(), PB_ThemedPaint(), PlotCharacter(), PointSizeFromHeight(), PointSizeToLogicalSize(), ATL::CWindow::Print(), ATL::CWindow::PrintClient(), ProcessListWndProc(), ReadBits(), RealDrawFrameControl(), RealUserDrawCaption(), ATL::CWindow::ReleaseDC(), ReleaseDC(), RichEditWndProc_common(), RosImageProc(), ScreenSaverProc(), ScrollDC(), serializeBMP(), serializeIcon(), SetColorSpace(), SetDIBColorTable(), SetDIBits(), CACListView::SetFont(), SetMapperFlags(), SetMetaRgn(), CACSizeBox::SetStatus(), SetupControls(), SetupDiGetClassImageListExW(), ShellBrowser::ShellBrowser(), SHFillRectClr(), SHGetPerScreenResName(), SHIsTempDisplayMode(), ShowColorSpectrum(), ShowResolutionPreview(), ShowScreenSaverPreview(), SHPropertyBag_PerScreenRes(), SIC_Initialize(), SoftModalMessageBox(), START_TEST(), STDMETHODIMP_(), SelectionModel::StretchSkew(), system_font_height(), T1_DrawConvexRect(), T1_DrawLabels(), T1_GetTextMetric(), T1_InitBitmap(), T1_InvertButton(), T1_OnDraw(), T1_SetData(), T1_WindowProc(), TabbedTextOutA(), TabbedTextOutW(), Test_Dibsection(), test_edit_control_3(), Test_FontPresence(), Test_FontSelection(), Test_FontSelectionEntry(), test_fontsize(), Test_GetClipRgn(), Test_GetCurrentObject(), Test_GetSystemMetrics(), Test_GetTextFace(), Test_GetTextFaceAliasW(), Test_NtGdiDoPalette_GdiPalSetEntries(), Test_OneParamRoutine_WindowFromDC(), test_pack_DRAWITEMSTRUCT(), test_pack_MCI_ANIM_UPDATE_PARMS(), test_pack_MCI_DGV_UPDATE_PARMS(), Test_Params(), Test_ScrollDC(), Test_SetDCPenColor(), Test_SetMapMode(), Test_SetWindowExtEx(), Thunk_DDrawSurface3_ReleaseDC(), ToolTipProc(), TOOLTIPS_Paint(), TrayIcon_GetProcessorUsageIcon(), TREEVIEW_ComputeTextWidth(), TTEmbedFont(), TTGetEmbeddingType(), TTIsEmbeddingEnabled(), UB_Paint(), UpdateCaretPos(), UserDrawCaptionBar(), UserDrawCaptionButton(), UserDrawCaptionButtonWnd(), UserDrawSysMenuButton(), UserGetDCEx(), UserPaintCaption(), UserRealizePalette(), UserScrollDC(), WindowFromDC(), WinPrev_OnDraw(), and ZoomWnd_OnPaint().

◆ hInstance

HINSTANCE hInstance

Definition at line 42 of file 3dtext.c.

◆ hRC

HGLRC hRC
static

Definition at line 32 of file 3dtext.c.

Referenced by InitOGLWindow(), and ScreenSaverProc().

◆ rot

◆ uTimerID

UINT uTimerID

Definition at line 44 of file 3dtext.c.

Referenced by ScreenSaverProc().