ReactOS  0.4.15-dev-5112-g22d8c0f
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 }
#define ANTIALIASED_QUALITY
Definition: wingdi.h:440
FLOAT x
Definition: wingdi.h:2722
#define FF_DONTCARE
Definition: wingdi.h:448
FLOAT gmfBlackBoxY
Definition: wingdi.h:2727
GLAPI GLuint GLAPIENTRY glGenLists(GLsizei range)
Definition: mk_font.cpp:20
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define FALSE
Definition: types.h:117
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
#define CreateFont
Definition: wingdi.h:4443
size_t __cdecl _tcslen(const _TCHAR *str)
Definition: tcslen.h:9
#define wglUseFontOutlines
Definition: wingdi.h:4486
TCHAR m_Text[MAX_PATH]
Definition: settings.c:25
#define WGL_FONT_POLYGONS
Definition: wingdi.h:1325
char TCHAR
Definition: xmlstorage.h:189
GLfloat f
Definition: glext.h:7540
#define _T(x)
Definition: vfdio.h:22
#define DEFAULT_PITCH
Definition: wingdi.h:443
const GLubyte * c
Definition: glext.h:8905
GLfloat extentX
Definition: 3dtext.c:37
static HDC hDC
Definition: 3dtext.c:33
POINTFLOAT gmfptGlyphOrigin
Definition: wingdi.h:2728
GLfloat extentY
Definition: 3dtext.c:38
FLOAT gmfBlackBoxX
Definition: wingdi.h:2726
#define FW_BOLD
Definition: wingdi.h:378
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
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
float GLfloat
Definition: gl.h:161
#define c
Definition: ke_i.h:80
#define OUT_TT_PRECIS
Definition: wingdi.h:419

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
222  glLoadIdentity();
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
247  glPrint(m_Text);
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 }
#define GL_COLOR_BUFFER_BIT
Definition: gl.h:716
GLAPI void GLAPIENTRY glClear(GLbitfield mask)
GLAPI void GLAPIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z)
#define GL_DEPTH_BUFFER_BIT
Definition: gl.h:710
GLAPI void GLAPIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
GLfloat rot
Definition: 3dtext.c:36
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
TCHAR m_Text[MAX_PATH]
Definition: settings.c:25
GLfloat f
Definition: glext.h:7540
unsigned long DWORD
Definition: ntddk_ex.h:95
GLfloat extentX
Definition: 3dtext.c:37
GLfloat extentY
Definition: 3dtext.c:38
GLAPI void GLAPIENTRY glLoadIdentity(void)
float GLfloat
Definition: gl.h:161
GLAPI void GLAPIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
GLvoid glPrint(LPTSTR text)
Definition: 3dtext.c:118

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
128  glListBase(base);
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 GL_UNSIGNED_SHORT
Definition: gl.h:180
wchar_t UNICODE
Definition: ms-dtyp.idl:111
const WCHAR * text
Definition: package.c:1799
#define GL_UNSIGNED_BYTE
Definition: gl.h:178
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
size_t __cdecl _tcslen(const _TCHAR *str)
Definition: tcslen.h:9
GLAPI void GLAPIENTRY glListBase(GLuint base)
GLAPI void GLAPIENTRY glCallLists(GLsizei n, GLenum type, const GLvoid *lists)
#define GL_LIST_BIT
Definition: gl.h:719
#define NULL
Definition: types.h:112
GLAPI void GLAPIENTRY glPopAttrib(void)

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
165  glLoadIdentity();
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 }
GLAPI void GLAPIENTRY glMatrixMode(GLenum mode)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:124
_In_ HFONT _Out_ PUINT Height
Definition: font.h:124
#define GL_SMOOTH
Definition: gl.h:339
GLAPI void GLAPIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
#define GL_LESS
Definition: gl.h:294
GLvoid BuildFont(GLvoid)
Definition: 3dtext.c:49
#define gluPerspective
Definition: glu_mangle.h:28
#define GL_LIGHT0
Definition: gl.h:311
GLAPI void GLAPIENTRY glShadeModel(GLenum mode)
GLfloat f
Definition: glext.h:7540
#define GL_COLOR_MATERIAL
Definition: gl.h:340
#define GL_LIGHTING
Definition: gl.h:310
#define GL_PROJECTION
Definition: gl.h:246
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define GL_DEPTH_TEST
Definition: gl.h:301
GLAPI void GLAPIENTRY glLoadIdentity(void)
#define GL_MODELVIEW
Definition: gl.h:245
float GLfloat
Definition: gl.h:161
GLAPI void GLAPIENTRY glClearDepth(GLclampd depth)
GLAPI void GLAPIENTRY glDepthFunc(GLenum func)

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
203  glLoadIdentity();
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 glMatrixMode(GLenum mode)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:124
_In_ HFONT _Out_ PUINT Height
Definition: font.h:124
#define gluPerspective
Definition: glu_mangle.h:28
GLfloat f
Definition: glext.h:7540
#define GL_PROJECTION
Definition: gl.h:246
GLAPI void GLAPIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
GLAPI void GLAPIENTRY glLoadIdentity(void)
#define GL_MODELVIEW
Definition: gl.h:245
float GLfloat
Definition: gl.h:161

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 }
#define IDOK
Definition: winuser.h:824
#define TRUE
Definition: types.h:120
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
void SaveSettings(void)
Definition: settings.c:115
void LoadSettings(void)
Definition: settings.c:53
#define FALSE
Definition: types.h:117
TCHAR m_Text[MAX_PATH]
Definition: settings.c:25
#define IDC_MESSAGE_TEXT
Definition: resource.h:5
#define GetDlgItemText
Definition: winuser.h:5775
#define WM_CLOSE
Definition: winuser.h:1611
#define MAX_PATH
Definition: compat.h:34
#define SetDlgItemText
Definition: winuser.h:5839
#define WM_COMMAND
Definition: winuser.h:1730
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1729
#define LOWORD(l)
Definition: pedump.c:82

◆ 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
302  PostQuitMessage(0);
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
312  PostQuitMessage(0);
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
325  PostQuitMessage(0);
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
335  PostQuitMessage(0);
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
366  ReleaseDC(hWnd, hDC);
367  break;
368 
369  case WM_PAINT:
370  DrawGLScene();
371  SwapBuffers(hDC);
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 }
static HGLRC hRC
Definition: 3dtext.c:32
UINT uTimerID
Definition: 3dtext.c:44
GLvoid DrawGLScene(GLvoid)
Definition: 3dtext.c:213
Definition: tftpd.h:59
BOOL WINAPI wglDeleteContext(HGLRC hglrc)
Definition: wgl.c:514
#define PFD_MAIN_PLANE
Definition: wingdi.h:298
HDC WINAPI GetDC(_In_opt_ HWND)
#define TRUE
Definition: types.h:120
GLvoid ReSizeGLScene(GLsizei Width, GLsizei Height)
Definition: 3dtext.c:187
HWND hWnd
Definition: settings.c:17
GLvoid KillFont(GLvoid)
Definition: 3dtext.c:111
WPARAM wParam
Definition: combotst.c:138
BOOL WINAPI SetPixelFormat(_In_ HDC, _In_ int, _In_ const PIXELFORMATDESCRIPTOR *)
#define PFD_DOUBLEBUFFER
Definition: wingdi.h:301
void LoadSettings(void)
Definition: settings.c:53
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define _TEXT(x)
Definition: tchar.h:1535
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_DESTROY
Definition: winuser.h:1599
BOOL WINAPI SwapBuffers(HDC)
Definition: wingl.c:187
#define APP_TIMER_INTERVAL
Definition: 3dtext.c:46
#define WM_SIZE
Definition: winuser.h:1601
#define WM_TIMER
Definition: winuser.h:1732
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
int WINAPI ChoosePixelFormat(_In_ HDC hdc, _In_ const PIXELFORMATDESCRIPTOR *ppfd)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define WM_PAINT
Definition: winuser.h:1610
#define PFD_TYPE_RGBA
Definition: wingdi.h:296
static PIXELFORMATDESCRIPTOR pfd
Definition: ssstars.c:67
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
INT PixelFormat
#define MB_ICONERROR
Definition: winuser.h:781
#define MessageBox
Definition: winuser.h:5812
#define APP_TIMER
Definition: 3dtext.c:45
BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
Definition: wgl.c:650
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
unsigned int GLuint
Definition: gl.h:159
#define NULL
Definition: types.h:112
GLvoid InitGL(GLsizei Width, GLsizei Height)
Definition: 3dtext.c:144
#define MB_OK
Definition: winuser.h:784
#define WM_CREATE
Definition: winuser.h:1598
struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR
#define HIWORD(l)
Definition: typedefs.h:247
LRESULT WINAPI DefScreenSaverProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: scrnsave.c:95
Definition: console.h:34
#define PFD_SUPPORT_OPENGL
Definition: wingdi.h:306
#define PFD_DRAW_TO_WINDOW
Definition: wingdi.h:303
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
HGLRC WINAPI wglCreateContext(HDC hdc)
Definition: wgl.c:383

Variable Documentation

◆ base

Definition at line 35 of file 3dtext.c.

Referenced by _dosmaperr(), _lsearch(), _vsnprintf(), add_module(), afm_parser_init(), align_the_pointer(), apc_deadlock_thread(), asciiToUTF8(), astollb(), basename(), bezier_deviation_squared(), ccf_sortlist(), cf2_doBlend(), cff_blend_doBlend(), cid_parse_dict(), CoInternetCombineIUri(), CoInternetCombineUrlEx(), combine_uri(), context_bind_shader_resources(), context_create(), convert_text2number_2(), createenumpins(), CreateOffloadInfo5Internal(), CRYPT_OpenParentStore(), CRYPT_SysRegOpenStoreW(), DECLARE_INTERFACE(), DECLARE_INTERFACE_(), decode_base85_guid(), detect_dsp(), dup_basename(), dwarf2_parse_augmentation_ptr(), dwarfaddrtounit(), elf_lookup_symtab(), EnumPins_Construct(), expr_common_type(), FDI_read_string(), findfde(), format_float(), FT_GlyphLoader_Add(), FT_GlyphLoader_Rewind(), ft_validator_init(), gen_bitlen(), get_iframe_doc(), get_manifest_in_manifest_file(), get_manifest_in_pe_file(), get_nt_header(), gl_GenLists(), gl_ListBase(), gl_save_ListBase(), hook_WaitForInputIdle(), IMAGEHLP_ReportImportSection(), inet_addr(), inflate_table(), ipaddr_aton(), isolat1ToUTF8(), l_to_a(), merge_paths(), minidump_add_memory64_block(), minidump_add_memory_block(), MiniDumpReadDumpStream(), OP_E(), otv_validate(), para_num_get_str(), parse_charstrings(), parse_dict(), parse_subrs(), parseAndPrintFile(), ParseV4Address(), PathIsURLA(), PathIsURLW(), pfr_face_get_kerning(), PICE_vsprintf(), PS_Conv_Strtol(), ps_parser_init(), QISearch(), read_msft_importlib(), ReadQWordNode(), RtlIntegerToChar(), RtlUnicodeStringToInteger(), shader_glsl_init_uniform_block_bindings(), shader_glsl_load_samplers(), shader_glsl_map_tex_unit(), sort_linked_list(), state_cb(), streamout(), strtol(), strtolW(), strtoull(), strtoulW(), SymEnumLines(), symt_new_array(), t42_parse_dict(), td_lfind(), test_CoInternetCombineIUri(), test_CoInternetCombineUrlEx(), test_create_adjustable_cap(), test_create_effect_and_pool(), test_create_effect_compiler(), test_CreateFileMapping_protection(), test_filesourcefilter(), test_GetMappedFileName(), test_mapping(), test_PdhGetCounterTimeBase(), test_VirtualAlloc_protection(), test_VirtualProtect(), test_write_watch(), ArcTessellator::trim_power_coeffs(), TRIO_ARGS2(), TRIO_ARGS3(), TRIO_ARGS5(), TRIO_ARGS6(), UDFUnPackMapping(), UniataAhciResume(), update_radio(), UrlCombineA(), UrlCombineW(), UrlGetLocationA(), UrlGetLocationW(), UrlIsA(), UrlIsW(), wcstol(), wcstoul(), wine_ldt_set_base(), wined3d_buffer_map(), WMSFT_fixup_typeinfos(), WPRINTF_GetLen(), xmlBufGetInputBase(), xmlBufSetInputBaseCur(), xmlBufWriteQuotedString(), xmlHTMLPrintFileContext(), xmlParserPrintFileContextInternal(), xsltLoadStylesheetPI(), xsltReleaseLocalRVTs(), xsltSaveResultTo(), ZSTD_compressBlock_doubleFast_extDict_generic(), ZSTD_compressBlock_doubleFast_generic(), ZSTD_compressBlock_fast_dictMatchState_generic(), ZSTD_compressBlock_fast_extDict_generic(), ZSTD_compressBlock_fast_generic(), ZSTD_compressBlock_lazy_extDict_generic(), ZSTD_ipow(), and ZSTD_ldm_generateSequences_internal().

◆ 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(), BitmapFromIcon(), BuildFont(), CancelDC(), CB_Paint(), CB_ThemedPaint(), CBGetTextAreaHeight(), CC_PaintColorGraph(), CC_PaintCross(), CC_PaintLumBar(), CC_PaintTriangle(), co_IntPaintWindows(), co_UserExcludeUpdateRgn(), COMBO_Init(), COMBO_Paint(), COMBO_PrepareColors(), COMBOEX_ComboWndProc(), COMBOEX_EditWndProc(), COMCTL32_DrawInsertMark(), ATL::CPathT< StringType >::CompactPath(), ConvertBitmapTo32Bpp(), ConWndProc(), Create24BppBitmap(), 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(), DoEntry(), CTextEditWindow::DoFillBack(), DoLoadNames(), DoTestEntry(), Draw3dRect(), Draw3dRect2(), DrawBackgroundPreview(), DrawCaption(), DrawCaptionTempW(), DrawEdge(), DrawEscape(), DrawFrameControl(), CTextEditWindow::DrawGrip(), DrawIcon(), DrawLines(), DrawNCPreview(), DrawPrimitive(), DrawStateA(), DrawStateW(), DrawTextFromResource(), DrawTileBitmap(), DumpFont(), DxDdCreateDirectDrawObject(), DxDdReenableDirectDrawObject(), DxEngGetDCState(), DxEngLockDC(), DxEngSetDCState(), EditDlg_OnInitDialog(), EditTypeDlg_OnMeasureItem(), EnumFontsA(), EnumFontsW(), ExcludeUpdateRgn(), export_welcome_dlg_proc(), ExtEscape(), FaceNameList_Initialize(), FillRect(), FillSolidRect(), FillSolidRect2(), 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(), GetKerningPairsA(), GetPossibleSettings(), GetSystemPaletteEntries(), GetTabbedTextExtentA(), GetTabbedTextExtentW(), 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(), init_system_font_height(), InitBitmap(), CFontsDialog::InitFontNames(), InitFonts(), InitLogo(), InitOGLWindow(), IntAnimatePalette(), IntDefWindowProc(), IntDrawMenuBarTemp(), IntDrawScrollArrows(), IntDrawScrollInterior(), IntFillWindow(), IntGdiCleanDC(), IntGdiCreateDisplayDC(), IntGdiDeleteDC(), IntGdiPolyPatBlt(), IntGdiRealizePalette(), IntGdiSetBkColor(), IntGdiSetBkMode(), IntGdiSetHookFlags(), IntGdiSetTextAlign(), IntGdiSetTextColor(), IntGetSystemPaletteEntries(), IntGrayString(), IntPaintDesktop(), IntScrollWindowEx(), IntTMWFixUp(), IntUpdateScrollArrows(), 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(), CPaletteWindow::OnPaint(), CFullscreenWindow::OnPaint(), CSelectionWindow::OnPaint(), CTextEditWindow::OnPaint(), CTrayClockWnd::OnPaint(), CACSizeBox::OnPaint(), CDownloaderProgress::OnPaint(), CDefView::OnPrintClient(), PaintControl(), PaintSuspendedWindow(), PathCompactPathA(), PathCompactPathW(), ATL::CPathT< StringType >::PathCompactPathX(), PB_Paint(), PB_ThemedPaint(), PlotCharacter(), PointSizeFromHeight(), PointSizeToLogicalSize(), ATL::CWindow::Print(), ATL::CWindow::PrintClient(), ProcessListWndProc(), ReadBits(), RealDrawFrameControl(), RealUserDrawCaption(), ReleaseDC(), ATL::CWindow::ReleaseDC(), RichEditWndProc_common(), RosImageProc(), ScreenSaverProc(), ScrollDC(), serializeBMP(), serializeIcon(), SetColorSpace(), SetDIBColorTable(), SetDIBits(), CACListView::SetFont(), SetMapperFlags(), SetMetaRgn(), CACSizeBox::SetStatus(), SetupControls(), SetupDiGetClassImageListExW(), ShellBrowser::ShellBrowser(), SHFillRectClr(), ShowColorSpectrum(), SIC_Initialize(), SoftModalMessageBox(), START_TEST(), system_font_height(), 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(), ViewDlg_CreateTreeImageList(), WindowFromDC(), and WinPrev_OnDraw().

◆ 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().