ReactOS 0.4.17-dev-653-g1d6dae3
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 Build3DCharacters (GLvoid)
 
GLvoid Delete3DCharacters (GLvoid)
 
GLvoid glPrint (GLvoid)
 
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
 
static GLuint base
 
static GLuint text_display_list [MAX_TEXT_LENGTH]
 
static GLfloat rot
 
static GLfloat extentX = 0.0f
 
static GLfloat extentY = 0.0f
 
HINSTANCE hInstance
 
BOOL fullscreen = FALSE
 
UINT uTimerID
 

Macro Definition Documentation

◆ APP_TIMER

#define APP_TIMER   1

Definition at line 46 of file 3dtext.c.

◆ APP_TIMER_INTERVAL

#define APP_TIMER_INTERVAL   (USER_TIMER_MINIMUM * 5)

Definition at line 47 of file 3dtext.c.

◆ APPNAME

#define APPNAME   _T("3DText")

Definition at line 41 of file 3dtext.c.

Function Documentation

◆ Build3DCharacters()

GLvoid Build3DCharacters ( GLvoid  )

Definition at line 49 of file 3dtext.c.

50{
51 // Address Buffer For Character Storage
53 // Windows Font Handle
54 HFONT font;
55 size_t i;
56 GLfloat cellOriginX = 0.0f;
57 GLfloat stringOriginX;
58 GLfloat stringExtentX = 0.0f;
59 GLfloat stringExtentY = 0.0f;
60
61 // Storage for MAX_TEXT_LENGTH number of characters
63
64 font = CreateFont(-12,
65 0, // Width Of Font
66 0, // Angle Of Escapement
67 0, // Orientation Angle
68 FW_BOLD, // Font Weight
69 FALSE, // Italic
70 FALSE, // Underline
71 FALSE, // Strikeout
72 DEFAULT_CHARSET, // Character Set Identifier
73 OUT_TT_PRECIS, // Output Precision
74 CLIP_DEFAULT_PRECIS, // Clipping Precision
75 ANTIALIASED_QUALITY, // Output Quality
76 FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
77 _T("Tahoma")); // Font Name
78
79 // Selects The Font We Created
81
82 size_t text_length = _tcslen(g_Text);
83
84 // Calculate the string extent
85 for (i = 0; i < text_length; i++)
86 {
88
89 wglUseFontOutlines(hDC, // Select The Current DC
90 g_Text[i], // Starting Character
91 1, // Number Of Display Lists To Build
92 base + i, // Starting Display Lists
93 0.0f, // Deviation From The True Outlines
94 0.2f, // Font Thickness In The Z Direction
95 WGL_FONT_POLYGONS, // Use Polygons, Not Lines
96 gmf + i); // Address Of Buffer To Receive Data
97
98 stringOriginX = cellOriginX + gmf[i].gmfptGlyphOrigin.x;
99
100 stringExtentX = stringOriginX + gmf[i].gmfBlackBoxX;
101 if (gmf[i].gmfBlackBoxY > stringExtentY)
102 stringExtentY = gmf[i].gmfBlackBoxY;
103
104 cellOriginX = cellOriginX + gmf[i].gmfCellIncX;
105 }
106
107 extentX = stringExtentX;
108 extentY = stringExtentY;
109}
static GLuint text_display_list[MAX_TEXT_LENGTH]
Definition: 3dtext.c:36
static GLfloat extentX
Definition: 3dtext.c:38
static HDC hDC
Definition: 3dtext.c:33
static GLfloat extentY
Definition: 3dtext.c:39
#define MAX_TEXT_LENGTH
Definition: 3dtext.h:27
TCHAR g_Text[MAX_TEXT_LENGTH+1]
Definition: settings.c:25
#define FALSE
Definition: types.h:117
float GLfloat
Definition: gl.h:161
GLAPI GLuint GLAPIENTRY glGenLists(GLsizei range)
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 _tcslen
Definition: tchar.h:626
Definition: mk_font.cpp:20
FLOAT gmfBlackBoxX
Definition: wingdi.h:3172
POINTFLOAT gmfptGlyphOrigin
Definition: wingdi.h:3174
FLOAT gmfBlackBoxY
Definition: wingdi.h:3173
FLOAT x
Definition: wingdi.h:3168
#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:1546
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define wglUseFontOutlines
Definition: wingdi.h:4932
#define CreateFont
Definition: wingdi.h:4889
#define OUT_TT_PRECIS
Definition: wingdi.h:419
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426

Referenced by InitGL().

◆ Delete3DCharacters()

GLvoid Delete3DCharacters ( GLvoid  )

Definition at line 111 of file 3dtext.c.

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

Referenced by ScreenSaverProc().

◆ DrawGLScene()

GLvoid DrawGLScene ( GLvoid  )

Definition at line 200 of file 3dtext.c.

201{
202 // Save ticks count of previous frame here
203 static DWORD dwTicks = 0;
204
205 // Clear The Screen And The Depth Buffer
207
208 // Reset The View
210
211 // Move One Unit Into The Screen
212 glTranslatef(0.0f, 0.0f, -10.0f);
213
214 // Rotate On The X Axis
215 glRotatef(rot, 1.0f, 0.0f, 0.0f);
216
217 // Rotate On The Y Axis
218 glRotatef(rot * 1.2f, 0.0f, 1.0f, 0.0f);
219
220 // Rotate On The Z Axis
221 glRotatef(rot * 1.4f, 0.0f, 0.0f, 1.0f);
222
223 // Move to the Left and Down before drawing
224 glTranslatef(-(extentX / 2.0f),
225 -(extentY / 2.0f),
226 0.0f);
227
228 // Pulsing Colors Based On The Rotation
229 glColor3f((1.0f * (GLfloat)(cos(rot / 20.0f))),
230 (1.0f * (GLfloat)(sin(rot / 25.0f))),
231 (1.0f - 0.5f * (GLfloat)(cos(rot / 17.0f))));
232
233 // Print GL Text To The Screen
234 glPrint();
235
236 // Make The Text Blue
237 glColor3f(0.0f, 0.0f, 1.0f);
238
239 // Increase The Rotation Variable
240 if(dwTicks)
241 rot += (GetTickCount() - dwTicks) / 20.0f;
242 dwTicks = GetTickCount();
243}
static GLfloat rot
Definition: 3dtext.c:37
GLvoid glPrint(GLvoid)
Definition: 3dtext.c:118
ULONG WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
Definition: sync.c:182
_ACRTIMP double __cdecl sin(double)
Definition: sin.c:21
_ACRTIMP double __cdecl cos(double)
Definition: cos.c:21
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 ( GLvoid  )

Definition at line 118 of file 3dtext.c.

119{
120 // If there's no text, do nothing
121 if (!g_Text[0])
122 return;
123
124 size_t text_length = _tcslen(g_Text);
125
126 // Draws The Display List Text
128}
#define GL_UNSIGNED_INT
Definition: gl.h:182
GLAPI void GLAPIENTRY glCallLists(GLsizei n, GLenum type, const GLvoid *lists)

Referenced by DrawGLScene().

◆ InitGL()

GLvoid InitGL ( GLsizei  Width,
GLsizei  Height 
)

Definition at line 131 of file 3dtext.c.

132{
133 // Clear The Background Color To Black
134 glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
135
136 // Enables Clearing Of The Depth Buffer
137 glClearDepth(1.0);
138
139 // The Type Of Depth Test To Do
141
142 // Enables Depth Testing
144
145 // Enables Smooth Color Shading
147
148 // Select The Projection Matrix
150
151 // Reset The Projection Matrix
153
154 // Calculate The Aspect Ratio Of The Window
155 gluPerspective(45.0f, (GLfloat)Width / (GLfloat)Height, 0.1f, 100.0f);
156
157 // Select The Modelview Matrix
159
160 // Build The 3D Characters
162
163 // Enable Default Light (Quick And Dirty)
165
166 // Enable Lighting
168
169 // Enable Coloring Of Material
171}
GLvoid Build3DCharacters(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().

◆ RegisterDialogClasses()

BOOL WINAPI RegisterDialogClasses ( HANDLE  hInst)

Definition at line 420 of file 3dtext.c.

421{
422 return TRUE;
423}
#define TRUE
Definition: types.h:120

◆ ReSizeGLScene()

GLvoid ReSizeGLScene ( GLsizei  Width,
GLsizei  Height 
)

Definition at line 174 of file 3dtext.c.

175{
176 // Is Window Too Small (Divide By Zero Error)
177 if (Height == 0)
178 {
179 // If So Make It One Pixel Tall
180 Height = 1;
181 }
182
183 // Reset The Current Viewport And Perspective Transformation
184 glViewport(0, 0, Width, Height);
185
186 // Select The Projection Matrix
188
189 // Reset The Projection Matrix
191
192 // Calculate The Aspect Ratio Of The Window
193 gluPerspective(45.0f, (GLfloat)Width / (GLfloat)Height, 0.1f, 100.0f);
194
195 // Select The Modelview Matrix
197}
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 384 of file 3dtext.c.

385{
386 switch (uMsg)
387 {
388 case WM_INITDIALOG:
389 LoadSettings();
392 return TRUE;
393
394 case WM_COMMAND:
395 switch (LOWORD(wParam))
396 {
397 case IDOK:
399 SaveSettings();
400
401 /* Fall through */
402
403 case IDCANCEL:
404 EndDialog(hDlg, IDCANCEL);
405 break;
406 }
407 return FALSE;
408
409 case WM_CLOSE:
410 EndDialog(hDlg, 0);
411 break;
412
413 default:
414 return FALSE;
415 }
416
417 return TRUE;
418}
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 ARRAYSIZE(array)
Definition: filtermapper.c:47
#define LOWORD(l)
Definition: pedump.c:82
#define WM_CLOSE
Definition: winuser.h:1649
#define EM_LIMITTEXT
Definition: winuser.h:2029
#define IDCANCEL
Definition: winuser.h:842
#define GetDlgItemText
Definition: winuser.h:5951
#define WM_COMMAND
Definition: winuser.h:1768
#define WM_INITDIALOG
Definition: winuser.h:1767
#define IDOK
Definition: winuser.h:841
#define SendDlgItemMessage
Definition: winuser.h:6008
#define SetDlgItemText
Definition: winuser.h:6015
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

◆ ScreenSaverProc()

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

Definition at line 246 of file 3dtext.c.

247{
248 RECT Screen; // Used Later On To Get The Size Of The Window
249 GLuint PixelFormat; // Pixel Format Storage
250 static PIXELFORMATDESCRIPTOR pfd= // Pixel Format Descriptor
251 {
252 sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
253 1, // Version Number (?)
254 PFD_DRAW_TO_WINDOW | // Format Must Support Window
255 PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
256 PFD_DOUBLEBUFFER, // Must Support Double Buffering
257 PFD_TYPE_RGBA, // Request An RGBA Format
258 16, // Select A 16Bit Color Depth
259 0, 0, 0, 0, 0, 0, // Color Bits Ignored (?)
260 0, // No Alpha Buffer
261 0, // Shift Bit Ignored (?)
262 0, // No Accumulation Buffer
263 0, 0, 0, 0, // Accumulation Bits Ignored (?)
264 16, // 16Bit Z-Buffer (Depth Buffer)
265 0, // No Stencil Buffer
266 0, // No Auxiliary Buffer (?)
267 PFD_MAIN_PLANE, // Main Drawing Layer
268 0, // Reserved (?)
269 0, 0, 0 // Layer Masks Ignored (?)
270 };
271
272 switch (message)
273 {
274 case WM_CREATE:
275 LoadSettings();
276
277 // Gets A Device Context For The Window
278 hDC = GetDC(hWnd);
279
280 // Finds The Closest Match To The Pixel Format We Set Above
282
283 // No Matching Pixel Format?
284 if (!PixelFormat)
285 {
286 MessageBox(0, _TEXT("Can't Find A Suitable PixelFormat."), _TEXT("Error"),MB_OK | MB_ICONERROR);
287
288 // This Sends A 'Message' Telling The Program To Quit
290 break;
291 }
292
293 // Can We Set The Pixel Mode?
295 {
296 MessageBox(0, _TEXT("Can't Set The PixelFormat."), _TEXT("Error"), MB_OK | MB_ICONERROR);
297
298 // This Sends A 'Message' Telling The Program To Quit
300 break;
301 }
302
303 // Grab A Rendering Context
305
306 // Did We Get One?
307 if (!hRC)
308 {
309 MessageBox(0, _TEXT("Can't Create A GL Rendering Context."), _TEXT("Error"), MB_OK | MB_ICONERROR);
310
311 // This Sends A 'Message' Telling The Program To Quit
313 break;
314 }
315
316 // Can We Make The RC Active?
317 if (!wglMakeCurrent(hDC, hRC))
318 {
319 MessageBox(0, _TEXT("Can't Activate GLRC."), _TEXT("Error"), MB_OK | MB_ICONERROR);
320
321 // This Sends A 'Message' Telling The Program To Quit
323 break;
324 }
325
326 // Grab Screen Info For The Current Window
328
329 // Initialize The GL Screen Using Screen Info
330 InitGL(Screen.right, Screen.bottom);
331
332 // Create Graphics update timer
334 break;
335
336 case WM_DESTROY:
337 // Disable Fullscreen Mode
338 ChangeDisplaySettings(NULL, 0);
339
340 // Delete the Update Timer
342
343 // Deletes The Character Display Lists
345
346 // Make The DC Current
348
349 // Kill The RC
351
352 // Free The DC
354 break;
355
356 case WM_PAINT:
357 DrawGLScene();
359 // Mark this window as updated, so the OS won't ask us to update it again.
361 break;
362
363 case WM_SIZE: // Resizing The Screen
364 // Resize To The New Window Size
366 break;
367
368 case WM_TIMER:
369 // Used to update graphic based on timer udpate interval
371 break;
372
373 default:
374 // Pass Windows Messages to the default screensaver window procedure
376 }
377
378 return 0;
379}
GLvoid InitGL(GLsizei Width, GLsizei Height)
Definition: 3dtext.c:131
GLvoid ReSizeGLScene(GLsizei Width, GLsizei Height)
Definition: 3dtext.c:174
#define APP_TIMER_INTERVAL
Definition: 3dtext.c:47
static HGLRC hRC
Definition: 3dtext.c:32
GLvoid DrawGLScene(GLvoid)
Definition: 3dtext.c:200
#define APP_TIMER
Definition: 3dtext.c:46
UINT uTimerID
Definition: 3dtext.c:45
GLvoid Delete3DCharacters(GLvoid)
Definition: 3dtext.c:111
HWND hWnd
Definition: settings.c:17
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
@ 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:516
HGLRC WINAPI wglCreateContext(HDC hdc)
Definition: wgl.c:383
BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
Definition: wgl.c:652
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:1648
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_CREATE
Definition: winuser.h:1636
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1639
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:798
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WM_TIMER
Definition: winuser.h:1770
HDC WINAPI GetDC(_In_opt_ HWND)
#define MB_OK
Definition: winuser.h:801
#define MessageBox
Definition: winuser.h:5988
#define WM_DESTROY
Definition: winuser.h:1637
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

Variable Documentation

◆ base

GLuint base
static

Definition at line 35 of file 3dtext.c.

◆ extentX

GLfloat extentX = 0.0f
static

Definition at line 38 of file 3dtext.c.

Referenced by Build3DCharacters(), and DrawGLScene().

◆ extentY

GLfloat extentY = 0.0f
static

Definition at line 39 of file 3dtext.c.

Referenced by Build3DCharacters(), and DrawGLScene().

◆ fullscreen

BOOL fullscreen = FALSE

Definition at line 44 of file 3dtext.c.

Referenced by create_foreground_window_().

◆ 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(), Build3DCharacters(), C1_DrawConvexRect(), C1_DrawLabel(), C1_InitBitmap(), C1_InvertButton(), C1_OnButtonDown(), C1_OnButtonUp(), C1_OnCreate(), C1_OnDraw(), C1_OnImeControl(), C1_OnMouseMove(), C1_SetData(), C1_WindowProc(), CalculateCharWidth(), CancelDC(), CB_Paint(), CB_ThemedPaint(), CBGetTextAreaHeight(), CC_PaintColorGraph(), CC_PaintCross(), CC_PaintLumBar(), CC_PaintTriangle(), CheckColor(), CheckEAFonts(), cicDrawMaskBmpOnDC(), co_IntPaintWindows(), co_UserExcludeUpdateRgn(), COMBO_Init(), COMBO_Paint(), COMBO_PrepareColors(), COMBOEX_ComboWndProc(), COMCTL32_DrawInsertMark(), ATL::CPathT< StringType >::CompactPath(), ConvertBitmapTo32Bpp(), ConWndProc(), CreatDibBitmap(), Create24BppBitmap(), CCicLibMenuItem::CreateBitmap(), CreateCompatibleBitmap(), CreateD3D9DeviceData(), CreateDIBitmap(), CreateDIBSection(), CreateDiscardableBitmap(), CreateFrameBufferBitmap(), ATL::CImage::CreateInternal(), CreateInternalDeviceData(), CreateMonospaceFont(), CShellLink::CreateShortcutIcon(), CreateStateImages(), CreateTestImage(), DceSetDrawable(), DCU_SetDcUndeletable(), DefWndControlColor(), dialog_choose_font(), Display_DrawText(), Display_SetTypeFace(), DisplayPageProc(), DoBlt(), CCanvasWindow::DoDraw(), DoEntryW(), CTextEditWindow::DoFillBack(), DoLoadImageFile(), DoLoadNames(), DoTestEntry(), draw_text_with_style(), 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(), editor_draw(), editor_handle_message(), EditTypeDlg_OnMeasureItem(), EnumFontsA(), EnumFontsW(), ExcludeUpdateRgn(), export_welcome_dlg_proc(), ExtEscape(), FaceNameList_Initialize(), FillRect(), FillSolidRect(), FindSuitableFont(), CTextEditWindow::FixEditPos(), fnIMLangFontLink2_GetFontUnicodeRanges(), fnIMLangFontLink2_MapFont(), fnIMLangFontLink_MapFont(), FontTypeChange(), ForceNCPaintErase(), FrameRect(), ftGdiGetTextMetricsW(), GB_Paint(), GB_ThemedPaint(), GdiCreateLocalMetaFilePict(), GdiSelectPalette(), Get16BitD3DFormat(), get_font_height(), GetButtonHeight(), GetClipboardDataDimensions(), GetColorSpace(), GetDIBColorTable(), GetDIBits(), GetDpiForSystem(), 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(), GreGetCharABCWidthsW(), GreGetCharWidthW(), GreGetDCPoint(), GreGetDIBitsInternal(), GreGetKerningPairs(), GreGetTextExtentExW(), GreGetTextExtentW(), GreSetStretchBltMode(), GreSetViewportOrgEx(), HeightFromPointSize(), HelDdSurfLock(), HelDdSurfUnlock(), HEXEDIT_PaintLines(), HEXEDIT_WM_SETFONT(), ICONTITLE_Paint(), ICONTITLE_SetTitlePos(), Imm32DeserializeBitmap(), Imm32SerializeBitmap(), Imm32WriteHBitmapToNode(), 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(), MainWnd_OnDrawItem(), MainWnd_OnMeasureItem(), MainWnd_OnPaint(), MainWndProc(), MCIAVI_OpenVideo(), MCIAVI_PaintFrame(), MCIAVI_player(), MD_OnPrint(), MD_OnPrintClient(), ME_CharFormatFromLogFont(), ME_DebugWrite(), ME_InitContext(), CTrayClockWnd::MeasureLines(), MENU_DrawMenuBar(), CAppBarManager::MonitorEnumProc(), 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(), RosImageProc(), ScreenSaverProc(), ScrollDC(), serializeIcon(), SetColorSpace(), SetDIBColorTable(), SetDIBits(), CACListView::SetFont(), SetMapperFlags(), SetMetaRgn(), CACSizeBox::SetStatus(), SetupControls(), SetupDiGetClassImageListExW(), SHFillRectClr(), SHGetPerScreenResName(), SHIsTempDisplayMode(), ShowColorSpectrum(), ShowResolutionPreview(), ShowScreenSaverPreview(), SHPropertyBag_PerScreenRes(), 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_CharWidth32A(), Test_CharWidth32W(), Test_CharWidthA(), Test_CharWidthFloatA(), Test_CharWidthFloatW(), Test_CharWidthI(), Test_CharWidthW(), Test_Dibsection(), test_edit_control_3(), Test_FontPresence(), Test_FontSelection(), Test_FontSelectionEntry(), test_fontsize(), Test_GetClipRgn(), Test_GetCurrentObject(), TEST_GetGlyphOutlineA(), TEST_GetGlyphOutlineW(), TEST_GetGlyphOutlineWow(), 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 43 of file 3dtext.c.

◆ hRC

HGLRC hRC
static

Definition at line 32 of file 3dtext.c.

Referenced by InitOGLWindow(), and ScreenSaverProc().

◆ rot

◆ text_display_list

GLuint text_display_list[MAX_TEXT_LENGTH]
static

Definition at line 36 of file 3dtext.c.

Referenced by Build3DCharacters(), and glPrint().

◆ uTimerID

UINT uTimerID

Definition at line 45 of file 3dtext.c.

Referenced by ScreenSaverProc().