Changeset 3083 for trunk/src/opengl/glut
- Timestamp:
- Mar 11, 2000, 4:07:48 PM (25 years ago)
- Location:
- trunk/src/opengl/glut
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/glut/Makefile
r3040 r3083 1 # $Id: Makefile,v 1.1 3 2000-03-08 09:07:24 birdExp $1 # $Id: Makefile,v 1.14 2000-03-11 15:07:43 sandervl Exp $ 2 2 3 3 # … … 21 21 CLEANEXTRAS = 32rsrc.asm 22 22 23 CFLAGS = - Tdp -I..\mesa\GL -I..\glu $(CFLAGS) -I..\mesa24 CXXFLAGS = - Tdp -I..\mesa\GL -I..\glu $(CXXFLAGS) -I..\mesa23 CFLAGS = -I..\mesa\GL -I..\glu $(CFLAGS_WIN32APP) -I..\mesa 24 CXXFLAGS = -I..\mesa\GL -I..\glu $(CXXFLAGS_WIN32APP) -I..\mesa 25 25 26 26 -
trunk/src/opengl/glut/glut_bitmap.c
r2689 r3083 1 /* $Id: glut_bitmap.c,v 1. 2 2000-02-09 08:46:08 jeroenExp $ */1 /* $Id: glut_bitmap.c,v 1.3 2000-03-11 15:07:44 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994. */ 3 3 … … 5 5 and is provided without guarantee or warrantee expressed or 6 6 implied. This program is -not- in the public domain. */ 7 8 #include <os2win.h>9 7 10 8 #include "glutint.h" -
trunk/src/opengl/glut/glut_cursor.c
r2689 r3083 1 /* $Id: glut_cursor.c,v 1. 2 2000-02-09 08:46:08 jeroenExp $ */1 /* $Id: glut_cursor.c,v 1.3 2000-03-11 15:07:44 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1995, 1998. */ 3 3 … … 147 147 xcursor = 148 148 cursorTable[0].cursor = 149 #if defined(__WIN32OS2__)150 LoadCursorA(NULL, cursorTable[0].glyph);151 #else152 149 LoadCursor(NULL, cursorTable[0].glyph); 153 #endif154 150 } 155 151 #else … … 168 164 break; 169 165 case GLUT_CURSOR_FULL_CROSSHAIR: 170 #if defined(_WIN32) 166 #if defined(_WIN32) || defined(__WIN32OS2__) 171 167 xcursor = IDC_CROSS; 172 #else173 #if defined(__WIN32OS2__)174 xcursor = (unsigned long)IDC_CROSSA;175 168 #else 176 169 if (fullCrosshairCusor == None) { … … 178 171 } 179 172 xcursor = fullCrosshairCusor; 180 #endif181 173 #endif 182 174 break; -
trunk/src/opengl/glut/glut_dials.c
r2689 r3083 1 /* $Id: glut_dials.c,v 1. 2 2000-02-09 08:46:09 jeroenExp $ */1 /* $Id: glut_dials.c,v 1.3 2000-03-11 15:07:44 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994. */ 3 3 … … 8 8 #include "glutint.h" 9 9 10 void APIENTRY10 void GLAPIENTRY 11 11 glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc) 12 12 { … … 17 17 } 18 18 19 void APIENTRY19 void GLAPIENTRY 20 20 glutDialsFunc(GLUTdialsCB dialsFunc) 21 21 { -
trunk/src/opengl/glut/glut_event.c
r3080 r3083 1 /* $Id: glut_event.c,v 1. 7 2000-03-11 09:07:12 jeroenExp $ */1 /* $Id: glut_event.c,v 1.8 2000-03-11 15:07:44 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 1998. */ 3 3 … … 325 325 MSG event; 326 326 327 #if defined(__WIN32OS2__)328 if(!GetMessageA(&event, NULL, 0, 0)) /* bail if no more messages*/329 #else330 327 if(!GetMessage(&event, NULL, 0, 0)) /* bail if no more messages*/ 331 #endif332 328 exit(0); 333 329 TranslateMessage(&event); /* translate virtual-key messages*/ 334 #if defined(__WIN32OS2__)335 DispatchMessageA(&event); /* call the window proc*/336 #else337 330 DispatchMessage(&event); /* call the window proc*/ 338 #endif339 331 /* see win32_event.c for event (message) processing procedures */ 340 332 #else -
trunk/src/opengl/glut/glut_gamemode.c
r2689 r3083 1 /* $Id: glut_gamemode.c,v 1. 2 2000-02-09 08:46:11 jeroenExp $ */1 /* $Id: glut_gamemode.c,v 1.3 2000-03-11 15:07:44 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1998. */ 3 3 … … 11 11 #include <string.h> 12 12 13 #if def _WIN3213 #if defined(_WIN32) || defined(__WIN32OS2__) 14 14 #include <windows.h> 15 #endif16 17 #ifdef __WIN32OS2__18 #include <os2win.h>19 15 #endif 20 16 -
trunk/src/opengl/glut/glut_init.c
r2996 r3083 1 /* $Id: glut_init.c,v 1. 3 2000-03-04 19:10:15 jeroenExp $ */1 /* $Id: glut_init.c,v 1.4 2000-03-11 15:07:45 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994, 1997. */ 3 3 … … 17 17 #if defined(__WIN32OS2__) 18 18 #include <windows.h> 19 #include "winconst.h"20 19 #include "GL\gl.h" 21 20 #undef WH_NB_HOOKS /* Get rid of copiler warning... */ … … 69 68 { 70 69 static char *classname; 71 #if defined(__WIN32OS2__)72 WNDCLASSA wc;73 HINSTANCE hInstance = GetModuleHandleA(NULL);74 #else75 70 WNDCLASS wc; 76 71 HINSTANCE hInstance = GetModuleHandle(NULL); 77 #endif78 72 79 73 /* Make sure we register the window only once. */ … … 95 89 96 90 /* Clear (important!) and then fill in the window class structure. */ 97 #if defined(__WIN32OS2__)98 memset(&wc, 0, sizeof(WNDCLASSA));99 wc.hIcon = LoadIconA(hInstance, "GLUT_ICON");100 wc.hCursor = LoadCursorA(hInstance, IDC_ARROWA);101 #else102 91 memset(&wc, 0, sizeof(WNDCLASS)); 103 92 wc.hIcon = LoadIcon(hInstance, "GLUT_ICON"); 104 93 wc.hCursor = LoadCursor(hInstance, IDC_ARROW); 105 #endif106 94 107 95 wc.lpfnWndProc = (WNDPROC)__glutWindowProc; … … 114 102 /* Fill in a default icon if one isn't specified as a resource. */ 115 103 if(!wc.hIcon) 116 #if defined(__WIN32OS2__)117 wc.hIcon = LoadIconA(NULL, MAKEINTRESOURCEA(IDI_WINLOGO_W));118 #else119 104 wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); 120 #endif 121 122 #if defined(__WIN32OS2__) 123 if(!RegisterClassA(&wc)) { 124 #else 105 125 106 if(!RegisterClass(&wc)) { 126 #endif127 107 __glutFatalError("RegisterClass() failed:" 128 108 "Cannot register GLUT window class."); … … 198 178 } 199 179 200 void APIENTRY180 void GLAPIENTRY 201 181 glutInit(int *argcp, char **argv) 202 182 { 203 dprintf(("GLUT32: glutInit()\n"));204 205 183 char *display = NULL; 206 184 char *str, *geometry = NULL; … … 346 324 347 325 /* CENTRY */ 348 void APIENTRY326 void GLAPIENTRY 349 327 glutInitWindowPosition(int x, int y) 350 328 { … … 360 338 } 361 339 362 void APIENTRY340 void GLAPIENTRY 363 341 glutInitWindowSize(int width, int height) 364 342 { … … 374 352 } 375 353 376 void APIENTRY354 void GLAPIENTRY 377 355 glutInitDisplayMode(unsigned int mask) 378 356 { -
trunk/src/opengl/glut/glut_term.c
r3079 r3083 1 /* $Id: glut_term.c,v 1. 3 2000-03-11 09:05:05 jeroenExp $ */1 /* $Id: glut_term.c,v 1.4 2000-03-11 15:07:45 sandervl Exp $ */ 2 2 /* 3 3 * GLUT Termination - on exit cleanup any open windows … … 5 5 */ 6 6 7 #include <odinwrap.h>8 7 #include "glut.h" 9 8 #include "glu.h" 10 9 #include "glutint.h" 11 10 #ifdef __WIN32OS2__ 11 #include <misc.h> 12 #endif 12 13 13 14 void CDECL Glut32Terminate(void) 14 15 { 16 int i; 17 15 18 /* Our app has ended - close all the open windows! */ 16 19 dprintf(("GLUT internal cleanup - numwins %d\n",__glutWindowListSize)); 17 20 18 for (i nt i= 0; i < __glutWindowListSize; i++) {21 for (i = 0; i < __glutWindowListSize; i++) { 19 22 if (__glutWindowList[i]) 20 23 { -
trunk/src/opengl/glut/glut_util.c
r2689 r3083 1 /* $Id: glut_util.c,v 1. 2 2000-02-09 08:46:19 jeroenExp $ */1 /* $Id: glut_util.c,v 1.3 2000-03-11 15:07:45 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994. */ 3 3 … … 37 37 38 38 #if defined(__WIN32OS2__) 39 dprintf(("GLUT32: Warning %s: \n", 39 { 40 char errmsg[1024]; 40 41 41 __glutProgramName ? __glutProgramName : "(unamed)")); 42 CHAR errmsg[1024]; 42 dprintf(("GLUT32: Warning %s: \n", __glutProgramName ? __glutProgramName : "(unnamed)")); 43 43 sprintf(errmsg, format, args); 44 44 dprintf(("GLUT32: %s\n",errmsg)); 45 } 45 46 #endif 46 47 fprintf(stderr, "GLUT: Warning in %s: ", … … 69 70 va_start(args, format); 70 71 #if defined(__WIN32OS2__) 72 { 71 73 CHAR errmsg[1024]; 72 74 … … 77 79 78 80 dprintf(("GLUT32: %s\n",errmsg)); 81 } 79 82 #endif 80 83 … … 96 99 97 100 #if defined(__WIN32OS2__) 101 { 102 char errmsg[1024]; 98 103 dprintf(("GLUT: Fatal API Usage in %s:\n", 99 104 __glutProgramName ? __glutProgramName : "(unamed)")); 100 char errmsg[1024];101 105 sprintf(errmsg, format, args); 102 106 dprintf(("GLUT32: %s",errmsg)); 103 107 putc('\n', stderr); 108 } 104 109 #endif 105 110 -
trunk/src/opengl/glut/glut_win.c
r3079 r3083 1 /* $Id: glut_win.c,v 1. 6 2000-03-11 09:05:05 jeroenExp $ */1 /* $Id: glut_win.c,v 1.7 2000-03-11 15:07:46 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994, 1997. */ 3 3 … … 16 16 17 17 #include "glutint.h" 18 19 //#if defined(__WIN32OS2__)20 //#include "wgl.h"21 //#endif22 18 23 19 GLUTwindow *__glutCurrentWindow = NULL; … … 479 475 480 476 #if defined(_WIN32) || defined(__WIN32OS2__) 481 #if defined(__WIN32OS2__)482 WNDCLASSA wc;483 #else484 477 WNDCLASS wc; 485 #endif486 478 int style; 487 479 488 #if defined(__WIN32OS2__)489 if (!GetClassInfoA(GetModuleHandleA(NULL), "GLUT", &wc)) {490 #else491 480 if (!GetClassInfo(GetModuleHandle(NULL), "GLUT", &wc)) { 492 #endif493 481 __glutOpenWin32Connection(NULL); 494 482 } … … 556 544 } 557 545 } 558 #if defined(__WIN32OS2__)559 window->win = CreateWindowA("GLUT", "GLUT",560 WS_CLIPSIBLINGS | WS_CLIPCHILDREN | style,561 x, y, width, height, parent ? parent->win : __glutRoot,562 NULL, GetModuleHandleA(NULL), 0);563 #else564 546 window->win = CreateWindow("GLUT", "GLUT", 565 547 WS_CLIPSIBLINGS | WS_CLIPCHILDREN | style, 566 548 x, y, width, height, parent ? parent->win : __glutRoot, 567 549 NULL, GetModuleHandle(NULL), 0); 568 #endif569 550 570 551 window->hdc = GetDC(window->win); … … 587 568 /* Make sure subwindows get a windowStatus callback. */ 588 569 if (parent) { 589 #if defined(__WIN32OS2__)590 PostMessageA(parent->win, WM_ACTIVATE, 0, 0);591 #else592 570 PostMessage(parent->win, WM_ACTIVATE, 0, 0); 593 #endif594 571 } 595 572 window->renderDc = window->hdc; … … 743 720 textprop.nitems = strlen(title); 744 721 #if defined(_WIN32) || defined(__WIN32OS2__) 745 #if defined(__WIN32OS2__)746 SetWindowTextA(win, title);747 #else748 722 SetWindowText(win, title); 749 #endif750 723 if (__glutIconic) { 751 724 window->desiredMapState = IconicState; -
trunk/src/opengl/glut/glutint.h
r3079 r3083 1 /* $Id: glutint.h,v 1. 5 2000-03-11 09:05:05 jeroenExp $ */1 /* $Id: glutint.h,v 1.6 2000-03-11 15:07:47 sandervl Exp $ */ 2 2 #ifndef __glutint_h__ 3 3 #define __glutint_h__ … … 235 235 236 236 typedef struct _DisplayMode { 237 #if defined(_WIN32) 237 #if defined(_WIN32) || defined(__WIN32OS2__) 238 238 DEVMODE devmode; 239 #else240 #if defined(__WIN32OS2__)241 DEVMODEA devmode;242 239 #else 243 240 /* XXX The X Window System does not have a standard … … 246 243 control extension). Perhaps this can be done in 247 244 a future release of GLUT. */ 248 #endif249 245 #endif 250 246 int valid; -
trunk/src/opengl/glut/glutos2.h
r2689 r3083 1 /* $Id: glutos2.h,v 1. 2 2000-02-09 08:46:20 jeroenExp $ */1 /* $Id: glutos2.h,v 1.3 2000-03-11 15:07:47 sandervl Exp $ */ 2 2 #ifndef __glutos2_h__ 3 3 #define __glutos2_h__ … … 11 11 #include "os2_x11.h" 12 12 #include "os2_glx.h" 13 #include <misc.h> 14 #include <sys\time.h> 13 15 14 16 /* We have to undef some things because Microsoft likes to pollute the -
trunk/src/opengl/glut/os2_glx.h
r2689 r3083 1 /* $Id: os2_glx.h,v 1. 2 2000-02-09 08:46:21 jeroenExp $ */1 /* $Id: os2_glx.h,v 1.3 2000-03-11 15:07:47 sandervl Exp $ */ 2 2 #ifndef __os2_glx_h__ 3 3 #define __os2_glx_h__ … … 14 14 15 15 /* Type definitions (conversions). */ 16 typedef ULONG HGLRC;17 16 typedef HGLRC GLXContext; 18 17 -
trunk/src/opengl/glut/os2_x11.h
r2689 r3083 1 /* $Id: os2_x11.h,v 1. 2 2000-02-09 08:46:21 jeroenExp $ */1 /* $Id: os2_x11.h,v 1.3 2000-03-11 15:07:47 sandervl Exp $ */ 2 2 #ifndef __os2_x11_h__ 3 3 #define __os2_x11_h__ … … 12 12 13 13 #include <stdlib.h> 14 #include < os2win.h>14 #include <windows.h> 15 15 16 16 /* Type definitions (conversions) */ -
trunk/src/opengl/glut/win32_menu.c
r3079 r3083 1 /* $Id: win32_menu.c,v 1. 4 2000-03-11 09:05:05 jeroenExp $ */1 /* $Id: win32_menu.c,v 1.5 2000-03-11 15:07:48 sandervl Exp $ */ 2 2 /* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */ 3 3 /* Copyright (c) Nate Robins, 1997. */ … … 30 30 31 31 /* DEPRICATED, use glutMenuStatusFunc instead. */ 32 void APIENTRY32 void GLAPIENTRY 33 33 glutMenuStateFunc(GLUTmenuStateCB menuStateFunc) 34 34 { … … 36 36 } 37 37 38 void APIENTRY38 void GLAPIENTRY 39 39 glutMenuStatusFunc(GLUTmenuStatusCB menuStatusFunc) 40 40 { … … 233 233 } 234 234 235 int APIENTRY235 int GLAPIENTRY 236 236 glutCreateMenu(GLUTselectCB selectFunc) 237 237 { … … 261 261 } 262 262 263 void APIENTRY263 void GLAPIENTRY 264 264 glutDestroyMenu(int menunum) 265 265 { … … 288 288 } 289 289 290 int APIENTRY290 int GLAPIENTRY 291 291 glutGetMenu(void) 292 292 { … … 298 298 } 299 299 300 void APIENTRY300 void GLAPIENTRY 301 301 glutSetMenu(int menuid) 302 302 { … … 330 330 item->value = value; 331 331 item->unique = uniqueMenuHandler++; 332 #if defined(__WIN32OS2__)333 if (isTrigger) {334 AppendMenuA(menu->win, MF_POPUP, (UINT)item->win, label);335 } else {336 AppendMenuA(menu->win, MF_STRING, item->unique, label);337 }338 #else339 332 if (isTrigger) { 340 333 AppendMenu(menu->win, MF_POPUP, (UINT)item->win, label); … … 342 335 AppendMenu(menu->win, MF_STRING, item->unique, label); 343 336 } 344 #endif 345 } 346 347 void APIENTRY 337 } 338 339 void GLAPIENTRY 348 340 glutAddMenuEntry(const char *label, int value) 349 341 { … … 364 356 } 365 357 366 void APIENTRY358 void GLAPIENTRY 367 359 glutAddSubMenu(const char *label, int menu) 368 360 { … … 389 381 } 390 382 391 void APIENTRY383 void GLAPIENTRY 392 384 glutChangeToMenuEntry(int num, const char *label, int value) 393 385 { … … 418 410 item->value = value; 419 411 item->unique = uniqueMenuHandler++; 420 #if defined(__WIN32OS2__)421 ModifyMenuA(__glutCurrentMenu->win, (UINT) i - 1,422 MF_BYPOSITION | MFT_STRING, item->unique, label);423 #else424 412 ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1, 425 413 MF_BYPOSITION | MFT_STRING, item->unique, label); 426 #endif427 414 return; 428 415 } … … 433 420 } 434 421 435 void APIENTRY422 void GLAPIENTRY 436 423 glutChangeToSubMenu(int num, const char *label, int menu) 437 424 { … … 465 452 if (popupmenu) 466 453 item->win = popupmenu->win; 467 #if defined(__WIN32OS2__)468 ModifyMenuA(__glutCurrentMenu->win, (UINT) i - 1,469 MF_BYPOSITION | MF_POPUP, (UINT) item->win, label);470 #else471 454 ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1, 472 455 MF_BYPOSITION | MF_POPUP, (UINT) item->win, label); 473 #endif474 456 return; 475 457 } … … 480 462 } 481 463 482 void APIENTRY464 void GLAPIENTRY 483 465 glutRemoveMenuItem(int num) 484 466 { … … 513 495 } 514 496 515 void APIENTRY497 void GLAPIENTRY 516 498 glutAttachMenu(int button) 517 499 { … … 529 511 } 530 512 531 void APIENTRY513 void GLAPIENTRY 532 514 glutDetachMenu(int button) 533 515 { -
trunk/src/opengl/glut/win32_winproc.c
r3022 r3083 1 /* $Id: win32_winproc.c,v 1. 4 2000-03-05 10:19:39 jeroenExp $ */1 /* $Id: win32_winproc.c,v 1.5 2000-03-11 15:07:48 sandervl Exp $ */ 2 2 /* Copyright (c) Nate Robins, 1997. */ 3 3 /* portions Copyright (c) Mark Kilgard, 1997, 1998. */ … … 19 19 #endif 20 20 21 #if def _WIN3221 #if defined(_WIN32) || defined(__WIN32OS2__) 22 22 #include <mmsystem.h> /* Win32 Multimedia API header. */ 23 23 #endif … … 163 163 default: 164 164 if (window->keyboardUp) { 165 #if defined(__WIN32OS2__)166 key = MapVirtualKeyA(wParam, 2); /* Map to ASCII.*/167 #else168 165 key = MapVirtualKey(wParam, 2); /* Map to ASCII.*/ 169 #endif170 166 if (isascii(key) && (key != 0)) { 171 167 … … 705 701 /* Make sure we re-select the correct palette if needed. */ 706 702 if (LOWORD(wParam)) { 707 #if defined(__WIN32OS2__)708 PostMessageA(hwnd, WM_PALETTECHANGED, 0, 0);709 #else710 703 PostMessage(hwnd, WM_PALETTECHANGED, 0, 0); 711 #endif712 704 } 713 705 if (window) { … … 839 831 840 832 defproc: 841 #if defined(__WIN32OS2__)842 return DefWindowProcA(hwnd, msg, wParam, lParam);843 #else844 833 return DefWindowProc(hwnd, msg, wParam, lParam); 845 #endif846 834 } -
trunk/src/opengl/glut/win32_x11.c
r2689 r3083 1 /* $Id: win32_x11.c,v 1. 2 2000-02-09 08:46:23 jeroenExp $ */1 /* $Id: win32_x11.c,v 1.3 2000-03-11 15:07:48 sandervl Exp $ */ 2 2 /* Copyright (c) Nate Robins, 1997. */ 3 3 /* portions Copyright (c) Mark Kilgard, 1998. */ … … 265 265 MSG msg; 266 266 267 #if defined(__WIN32OS2__)268 return PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE);269 #else270 267 return PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE); 271 #endif272 268 } 273 269
Note:
See TracChangeset
for help on using the changeset viewer.