I don't mean to piss everyone off..........
This is a discussion about I don't mean to piss everyone off.......... in the Slack Space category; Haven't you noticed that all of the questions asked here are all about Windows 2000 and the errors it has or is given out to people. Some games don't work, hardware doesn't work, BSOD, illegal operations, sudden changes in the OS.
Haven't you noticed that all of the questions asked here are all about Windows 2000 and the errors it has or is given out to people. Some games don't work, hardware doesn't work, BSOD, illegal operations, sudden changes in the OS. Just goes to show that the OS isn't very good. I "was" using Windows 2000 awhile ago and got rid of it because it simply stinks. I rather have better compatibility in return for the odd error or two, then have a stable OS and nothing working right. That's why it's stable, cause they made sure next to nothing works on it, they "babied" it to get it working right. Crappy apps, games and hardware support, but it's stable. Now i like Windows 2000 because of it's features, but if w2k is not going to run programs well then forget it. There was only 1 program, one that i use a lot, called RPGMaker 95. I was done testing all of my games and apps with windows 2000 and discovered they all ran, last proggy on the list was RPG Maker, go to start it, doesn't work. Because of 1 program not running, which happened to be the one i use a lot, i had to uninstall windows 2000.
edit!!
although I don't believe this anymore, it's still funny to see this post. I shouldn't have edited it, oh well...lol
[This message has been edited by jdulmage (edited 20 December 2000).]
edit!!
although I don't believe this anymore, it's still funny to see this post. I shouldn't have edited it, oh well...lol
[This message has been edited by jdulmage (edited 20 December 2000).]
Participate in our website and join the conversation
This subject has been archived. New comments and votes cannot be submitted.
Mar 31
May 2
0
6 hours
Responses to this topic
Here is my new sig I think I finally got just about all the details in there now
------------------
My System
Dell Demension XPS T500 (SE440BX-2 Chipset)
Triple Boot
Windows Millennium Final Retail (c: FAT32)
Windows 2000 Advanced Server SP1 (d: NTFS w/ 4K Clusters)
Windows Whistler Pro Beta 2 2462a (e: NTFS w/ 4K Clusters)
PIII 500 @ 512.8 Mhz (with after market heatsink and dual fan)
512 Megs PC100 SDRAM
Guillemot Maxi Gammer Cougar (TNT2 M64 w/ 32 Megs of RAM / Core & Mem Overclocked by 20 mhz)
Matrox Millennium PCI (w/ 4 Megs of RAM for second monitor)
3Com Etherlink XL 10/100 Ethernet Card
Yamaha DS1 Integrated Audio
2 x Abit Hot Rod Pro ATA-100 RAID Controlers
2 x 12.6 Gig Maxtor Hard Disks RAID 0 W/ 8K block size (for system)
1 76.3 Gig Maxtor Hard Disk (for storage 1 NTFS partion w/ 4K Clusters)
40X LG CD Rom Drive
100 Mb Iomega Internal Zip Drive
MS Explorer Mouse USB
MS Natural Keyboard Pro USB
Dell M770 17 inch CRT
Dell E550 15 inch CRT
------------------
My System
Dell Demension XPS T500 (SE440BX-2 Chipset)
Triple Boot
Windows Millennium Final Retail (c: FAT32)
Windows 2000 Advanced Server SP1 (d: NTFS w/ 4K Clusters)
Windows Whistler Pro Beta 2 2462a (e: NTFS w/ 4K Clusters)
PIII 500 @ 512.8 Mhz (with after market heatsink and dual fan)
512 Megs PC100 SDRAM
Guillemot Maxi Gammer Cougar (TNT2 M64 w/ 32 Megs of RAM / Core & Mem Overclocked by 20 mhz)
Matrox Millennium PCI (w/ 4 Megs of RAM for second monitor)
3Com Etherlink XL 10/100 Ethernet Card
Yamaha DS1 Integrated Audio
2 x Abit Hot Rod Pro ATA-100 RAID Controlers
2 x 12.6 Gig Maxtor Hard Disks RAID 0 W/ 8K block size (for system)
1 76.3 Gig Maxtor Hard Disk (for storage 1 NTFS partion w/ 4K Clusters)
40X LG CD Rom Drive
100 Mb Iomega Internal Zip Drive
MS Explorer Mouse USB
MS Natural Keyboard Pro USB
Dell M770 17 inch CRT
Dell E550 15 inch CRT
Wellp, might as well post mine for the heck of it.
------------------
Whaazzzupppppppppp!
Asus A7V
Duron 800@904MHz
384MB SDRAM PC133
Samsung 48x CD-ROM
Toshiba 12x DVD-ROM
Zip CD650 USB 4/4/6
Zip 100 USB
Maxtor 20.4 GB ATA100 5400RPM
Hercules Prophet II MX (core:207MHz ram:210MHz)
Guillemot Maxi Sound Fortissimo
SIIG 3 port 1394 PCI Adapter
D-Link DFE-530 10/100 NIC
Creative Cambridge Soundworks FPS1000
MS Intellimouse Optical
Kleer 17-inch @ 85Hz 1152x864x32 desktop
Kiwi Orb Fan
HDD cooler pulling air in
Dual slot fan to suck air out
Case fan to suck air out
Dual 80mm fans to blow on cards.
Win2k Pro
Pentium III 667
Tyan Trinity 400
320MB SDRAM PC100/133 (mixed)
Toshiba 6x DVD-ROM
Western Digital 17.2GB ATA66 5400RPM hdd
WD 2.5GB ATA33 4500RPM hdd
Voodoo3 3000AGP w/TV-Out
SB 16 OEM PCI
SB compatibleISA sound card
Realtek 10/100 NIC
HP 1280 17" monitor
MS Intellimouse optical
PC Concepts wave keyboard
3-way speakers
Win2k Pro/WinME
"To be or not to be, that is the question."
------------------
Whaazzzupppppppppp!
Asus A7V
Duron 800@904MHz
384MB SDRAM PC133
Samsung 48x CD-ROM
Toshiba 12x DVD-ROM
Zip CD650 USB 4/4/6
Zip 100 USB
Maxtor 20.4 GB ATA100 5400RPM
Hercules Prophet II MX (core:207MHz ram:210MHz)
Guillemot Maxi Sound Fortissimo
SIIG 3 port 1394 PCI Adapter
D-Link DFE-530 10/100 NIC
Creative Cambridge Soundworks FPS1000
MS Intellimouse Optical
Kleer 17-inch @ 85Hz 1152x864x32 desktop
Kiwi Orb Fan
HDD cooler pulling air in
Dual slot fan to suck air out
Case fan to suck air out
Dual 80mm fans to blow on cards.
Win2k Pro
Pentium III 667
Tyan Trinity 400
320MB SDRAM PC100/133 (mixed)
Toshiba 6x DVD-ROM
Western Digital 17.2GB ATA66 5400RPM hdd
WD 2.5GB ATA33 4500RPM hdd
Voodoo3 3000AGP w/TV-Out
SB 16 OEM PCI
SB compatibleISA sound card
Realtek 10/100 NIC
HP 1280 17" monitor
MS Intellimouse optical
PC Concepts wave keyboard
3-way speakers
Win2k Pro/WinME
"To be or not to be, that is the question."
To be that is the answer.
Give Me 58!
------------------
Dream what you want to dream; go where you want to go; be what you want to be, because you have only one life and one chance to do all the things you want to do!
------------------
Dream what you want to dream; go where you want to go; be what you want to be, because you have only one life and one chance to do all the things you want to do!

OP
give me 58
we need 8 more posts after this one to get to 58
keep em comin
keep em comin
OK, here's a link of interest:
http://somethingawful.efront.com/guides/forums/index.htm
Now, we can categorize everybody here. How handy.
------------------
Regards,
clutch
http://somethingawful.efront.com/guides/forums/index.htm
Now, we can categorize everybody here. How handy.
------------------
Regards,
clutch
yeah man.
In the words of Keanu Reeves "Whoa, dude."
58?
i guess not
Also...will ich dem 58 machen!
a ver...hemos llegado al 58 de una vez?
Well, Since I haven't reached 58 yet, I'll post some pointless C Code_
Code:
[This message has been edited by Son_Gohan (edited 31 March 2001).]
Code:
#include <stdlib.h>#include <malloc.h>#include <memory.h>#include <tchar.h>#include <stdio.h>#include <windows.h> // Header File For Windows#include <commctrl.h>#include <gl\gl.h> // Header File For The OpenGL32 Library#include <gl\glu.h> // Header File For The GLu32 Library#include <gl\glaux.h> // Header File For The Glaux Library#include "resource.h"#include <fstream.h>#define NUMBUTTONS 5HDC hDC=NULL; // Private GDI Device ContextHGLRC hRC=NULL; // Permanent Rendering ContextHWND hWnd=NULL; // Holds Our Window HandleHWND hTBWnd;HINSTANCE hInstance; // Holds The Instance Of The ApplicationTBBUTTON TBButtons[5]; //The toolbar we're going to useTBBUTTON another;HBITMAP hBitmap;char szBMPName[]="DEFAULT_TEXTURE";bool keys[256]; // Array Used For The Keyboard Routinebool active=TRUE; // Window Active Flag Set To TRUE By Defaultbool fullscreen=TRUE;bool light; // Lighting ON / OFFbool lp; // L Pressed?bool fp; // F Pressed?BOOL OpenDialog(HWND hwndOwner, LPSTR filter, LPSTR fil, UINT iFilLen, LPSTR dlgtitle, LPSTR filtitle, UINT iFilTitleLen);GLuint texture[3]; // Storage For One Texture ( NEW )GLfloat xrot; // X RotationGLfloat yrot; // Y RotationGLfloat xspeed; // X Rotation SpeedGLfloat yspeed; // Y Rotation SpeedGLfloat z=-5.0f; // Depth Into The ScreenGLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f };GLfloat LightDiffuse[]= { 1.0f, 1.0f, 1.0f, 1.0f };GLfloat LightPosition[]= { 0.0f, 0.0f, 2.0f, 1.0f };GLuint filter; // Which Filter To Usevoid DefToolBar(); //Toolbar initialationbool CreateMyWindow(char* title, int width, int height, int bits, bool fullscreenflag); //My Window InitialationLRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); // Declaration For WndProcLRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); //Declaration For Abot Dialog boxBOOL OpenDialog(HWND hwndOwner, LPSTR filter, LPSTR fil, UINT iFilLen, LPSTR dlgtitle, LPSTR filtitle, UINT iFilTitleLen){ OPENFILENAME opfil; memset((LPOPENFILENAME)&opfil,0,sizeof(opfil)); opfil.lStructSize = sizeof(opfil); opfil.hInstance = (HINSTANCE)GetWindowLong(hwndOwner,GWL_HINSTANCE); //application instance opfil.lpstrFilter = filter; //filter of files separated by \0 opfil.lpstrFile = fil; //absolute path of filename opfil.nMaxFile = iFilLen; //length of filename buffer opfil.lpstrFileTitle = filtitle; //filename with no path opfil.nMaxFileTitle = iFilTitleLen; //length of filename buffer opfil.lpstrTitle = dlgtitle; //title of dialog box opfil.Flags = OFN_HIDEREADONLY; //optional flags return GetOpenFileName(&opfil); }AUX_RGBImageRec *LoadBMP(char *Filename) // Loads A Bitmap Image{ FILE *File=NULL; // File Handle if (!Filename) // Make Sure A Filename Was Given { return NULL; // If Not Return NULL } File=fopen(Filename,"r"); // Check To See If The File Exists if (File) // Does The File Exist? { fclose(File); // Close The Handle return auxDIBImageLoad(Filename); // Load The Bitmap And Return A Pointer } return NULL; // If Load Failed Return NULL}int LoadGLTextures() // Load Bitmaps And Convert To Textures{ int Status=FALSE; AUX_RGBImageRec *TextureImage[1]; memset(TextureImage,0,sizeof(void *)*1); // Set The Pointer To NULL /*int Status=FALSE; // Status Indicator char filname[MAX_PATH]; //buffer to hold the filename (with path) char filtitle[MAX_PATH]; //buffer to hold the filename (without path) char filter[] = "Texture Files (*.bmp)\0*.bmp\0All files (*.*)\0*.*"; //filename filter strcpy(filname,""); //make sure that the filename buffer is an empty string //if it's not, you will get a CDERR_INVALIDFILENAME HWND hwnd; //handle of parent window (i.e. main window) OpenDialog(hwnd,filter,filname,MAX_PATH,"Open file",filtitle,MAX_PATH);*///hBitmap=LoadBitmap(NULL, szBMPName); TextureImage[0] =auxDIBImageLoad(szBMPName); Status=TRUE; // Set The Status To TRUE // Create Storage Space For The Texture glGenTextures(3, &texture[0]); // Create Three Textures // Create Nearest Filtered Texture glBindTexture(GL_TEXTURE_2D, texture[0]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); // Create Linear Filtered Texture (bilinear filter) glBindTexture(GL_TEXTURE_2D, texture[1]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); // Create MipMapped Texture (AWESOME, SUPER CPU EATER, NINTENDO64 LIKE MIP-MAPPING glBindTexture(GL_TEXTURE_2D, texture[2]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); if (TextureImage[0]) // If Texture Exists { if (TextureImage[0]->data) // If Texture Image Exists { free(TextureImage[0]->data); // Free The Texture Image Memory } free(TextureImage[0]); // Free The Image Structure } return Status; // Return The Status}GLvoid ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window{ if (height==0) // Prevent A Divide By Zero By { height=1; // Making Height Equal One } glViewport(0,0,width,height); // Reset The Current Viewport glMatrixMode(GL_PROJECTION); // Select The Projection Matrix glLoadIdentity(); // Reset The Projection Matrix // Calculate The Aspect Ratio Of The Window gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f); glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix glLoadIdentity(); // Reset The Modelview Matrix}int InitGL(GLvoid) // All Setup For OpenGL Goes Here{ if (!LoadGLTextures()) // Jump To Texture Loading Routine { return FALSE; // If Texture Didn't Load Return FALSE } glEnable(GL_TEXTURE_2D); // Enable Texture Mapping glShadeModel(GL_SMOOTH); // Enable Smooth Shading glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background glClearDepth(1.0f); // Depth Buffer Setup glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient); // Setup The Ambient Light glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient); // Setup The Ambient Light glLightfv(GL_LIGHT1, GL_POSITION,LightPosition); // Position The Light glEnable(GL_LIGHT1); // Enable Light One return TRUE; // Initialization Went OK}int DrawGLScene(GLvoid) // Here's Where We Do All The Drawing{ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer glLoadIdentity(); // Reset The View glTranslatef(0.0f,0.0f,z); // Translate Into/Out Of The Screen By z glRotatef(xrot,1.0f,0.0f,0.0f); // Rotate On The X Axis By xrot glRotatef(yrot,0.0f,1.0f,0.0f); // Rotate On The Y Axis By yrot glBindTexture(GL_TEXTURE_2D, texture[filter]); // Select A Texture Based On filter glBegin(GL_QUADS); // Front Face glNormal3f( 0.0f, 0.0f, 1.0f); // Normal Pointing Towards Viewer glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); // Point 1 (Front) glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f); // Point 2 (Front) glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f); // Point 3 (Front) glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f); // Point 4 (Front) // Back Face glNormal3f( 0.0f, 0.0f,-1.0f); // Normal Pointing Away From Viewer glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f); // Point 1 (Back) glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); // Point 2 (Back) glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f); // Point 3 (Back) glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f); // Point 4 (Back) // Top Face glNormal3f( 0.0f, 1.0f, 0.0f); // Normal Pointing Up glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); // Point 1 (Top) glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f); // Point 2 (Top) glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 1.0f); // Point 3 (Top) glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f); // Point 4 (Top) // Bottom Face glNormal3f( 0.0f,-1.0f, 0.0f); // Normal Pointing Down glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f); // Point 1 (Bottom) glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, -1.0f); // Point 2 (Bottom) glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f); // Point 3 (Bottom) glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); // Point 4 (Bottom) // Right face glNormal3f( 1.0f, 0.0f, 0.0f); // Normal Pointing Right glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f); // Point 1 (Right) glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f); // Point 2 (Right) glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f); // Point 3 (Right) glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f); // Point 4 (Right) // Left Face glNormal3f(-1.0f, 0.0f, 0.0f); // Normal Pointing Left glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f); // Point 1 (Left) glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); // Point 2 (Left) glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f); // Point 3 (Left) glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); // Point 4 (Left) glEnd(); // Start Drawing Quads xrot+=xspeed; // Add xspeed To xrot yrot+=yspeed; // Add yspeed To yrot return TRUE; // Keep Going}GLvoid KillGLWindow(GLvoid) // Properly Kill The Window{ if (fullscreen) // Are We In Fullscreen Mode? { ChangeDisplaySettings(NULL,0); // If So Switch Back To The Desktop ShowCursor(TRUE); // Show Mouse Pointer } if (hRC) // Do We Have A Rendering Context? { if (!wglMakeCurrent(NULL,NULL)) // Are We Able To Release The DC And RC Contexts? { MessageBox(NULL,"Release Of DC And RC Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION); } if (!wglDeleteContext(hRC)) // Are We Able To Delete The RC? { MessageBox(NULL,"Release Rendering Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION); } hRC=NULL; // Set RC To NULL } if (hDC && !ReleaseDC(hWnd,hDC)) // Are We Able To Release The DC { MessageBox(NULL,"Release Device Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION); hDC=NULL; // Set DC To NULL } if (hWnd && !DestroyWindow(hWnd)) // Are We Able To Destroy The Window? { MessageBox(NULL,"Could Not Release hWnd.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION); hWnd=NULL; // Set hWnd To NULL } if (!UnregisterClass("OpenGL",hInstance)) // Are We Able To Unregister Class { MessageBox(NULL,"Could Not Unregister Class.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION); hInstance=NULL; // Set hInstance To NULL }}/* This Code Creates Our OpenGL Window. Parameters Are: * * title - Title To Appear At The Top Of The Window * * width - Width Of The GL Window Or Fullscreen Mode * * height - Height Of The GL Window Or Fullscreen Mode * * bits - Number Of Bits To Use For Color (8/16/24/32) * * fullscreenflag - Use Fullscreen Mode (TRUE) Or Windowed Mode (FALSE) */ BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag){ GLuint PixelFormat; // Holds The Results After Searching For A Match fullscreen=fullscreenflag; // Set The Global Fullscreen Flag if (!CreateMyWindow(title,width,height,bits,fullscreen) ) { KillGLWindow(); // Reset The Display MessageBox(NULL,"Window Creation Error.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } static PIXELFORMATDESCRIPTOR pfd= // pfd Tells Windows How We Want Things To Be { sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor 1, // Version Number PFD_DRAW_TO_WINDOW | // Format Must Support Window PFD_SUPPORT_OPENGL | // Format Must Support OpenGL PFD_DOUBLEBUFFER, // Must Support Double Buffering PFD_TYPE_RGBA, // Request An RGBA Format bits, // Select Our Color Depth 0, 0, 0, 0, 0, 0, // Color Bits Ignored 0, // No Alpha Buffer 0, // Shift Bit Ignored 0, // No Accumulation Buffer 0, 0, 0, 0, // Accumulation Bits Ignored 16, // 16Bit Z-Buffer (Depth Buffer) 0, // No Stencil Buffer 0, // No Auxiliary Buffer PFD_MAIN_PLANE, // Main Drawing Layer 0, // Reserved 0, 0, 0 // Layer Masks Ignored }; if (!(hDC=GetDC(hWnd))) // Did We Get A Device Context? { KillGLWindow(); // Reset The Display MessageBox(NULL,"Can't Create A GL Device Context.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } if (!(PixelFormat=ChoosePixelFormat(hDC,&pfd))) // Did Windows Find A Matching Pixel Format? { KillGLWindow(); // Reset The Display MessageBox(NULL,"Can't Find A Suitable PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } if(!SetPixelFormat(hDC,PixelFormat,&pfd)) // Are We Able To Set The Pixel Format? { KillGLWindow(); // Reset The Display MessageBox(NULL,"Can't Set The PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } if (!(hRC=wglCreateContext(hDC))) // Are We Able To Get A Rendering Context? { KillGLWindow(); // Reset The Display MessageBox(NULL,"Can't Create A GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } if(!wglMakeCurrent(hDC,hRC)) // Try To Activate The Rendering Context { KillGLWindow(); // Reset The Display MessageBox(NULL,"Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } ShowWindow(hWnd,SW_SHOW); // Show The Window SetForegroundWindow(hWnd); // Slightly Higher Priority SetFocus(hWnd); // Sets Keyboard Focus To The Window ReSizeGLScene(width, height); // Set Up Our Perspective GL Screen if (!InitGL()) // Initialize Our Newly Created GL Window { KillGLWindow(); // Reset The Display MessageBox(NULL,"OpenGL Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } return TRUE; // Success}LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window UINT uMsg, // Message For This Window WPARAM wParam, // Additional Message Information LPARAM lParam) // Additional Message Information{int wmId, wmEvent; switch (uMsg) // Check For Windows Messages { case WM_ACTIVATE: // Watch For Window Activate Message { if (!HIWORD(wParam)) // Check Minimization State { active=TRUE; // Program Is Active } else { active=FALSE; // Program Is No Longer Active } return 0; // Return To The Message Loop } case WM_COMMAND: { wmId = LOWORD(wParam); //we create a menu Handler wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) //Switch to menu mesage dispatch { case ID_FILE_EXIT: PostQuitMessage(0); break; case ID_GLOPTIONS_TEXTUREFILTER_NOFILTER: CheckMenuRadioItem( (HMENU)GetMenu(hWnd), ID_GLOPTIONS_TEXTUREFILTER_NOFILTER, ID_GLOPTIONS_TEXTUREFILTER_MIPMAPMETHOD, ID_GLOPTIONS_TEXTUREFILTER_LINEARFILTERING, MF_BYPOSITION); //CheckMenuItem( (HMENU)GetMenu(hWnd), ID_GLOPTIONS_TEXTUREFILTER_NOFILTER, MF_CHECKED); filter=0; // filter set to 0 (no filtering) break; case ID_GLOPTIONS_TEXTUREFILTER_LINEARFILTERING: filter=1; break; case ID_GLOPTIONS_TEXTUREFILTER_MIPMAPMETHOD: filter=2; break; case ID_HELP_ABOUTGLWIN: DialogBox(hInstance, (LPCTSTR)LOGO_BOX, hWnd, (DLGPROC)About); break; case ID_GLOPTIONS_LIGHTS: { light=!light; // Toggle Light TRUE/FALSE if (!light) // If Not Light { glDisable(GL_LIGHTING); // Disable Lighting CheckMenuItem( (HMENU)GetMenu(hWnd), ID_GLOPTIONS_LIGHTS, MF_CHECKED); } else // Otherwise { glEnable(GL_LIGHTING); // Enable Lighting CheckMenuItem( (HMENU)GetMenu(hWnd), ID_GLOPTIONS_LIGHTS, MF_UNCHECKED); } break; } } } case WM_SYSCOMMAND: // Intercept System Commands { switch (wParam) // Check System Calls { case SC_SCREENSAVE: // Screensaver Trying To Start? case SC_MONITORPOWER: // Monitor Trying To Enter Powersave? return 0; // Prevent From Happening } break; // Exit } case WM_CLOSE: // Did We Receive A Close Message? { PostQuitMessage(0); // Send A Quit Message return 0; // Jump Back } case WM_KEYDOWN: // Is A Key Being Held Down? { keys[wParam] = TRUE; // If So, Mark It As TRUE return 0; // Jump Back } case WM_KEYUP: // Has A Key Been Released? { keys[wParam] = FALSE; // If So, Mark It As FALSE return 0; // Jump Back } case WM_SIZE: // Resize The OpenGL Window { ReSizeGLScene(LOWORD(lParam),HIWORD(lParam)); // LoWord=Width, HiWord=Height return 0; // Jump Back } } // Pass All Unhandled Messages To DefWindowProc return DefWindowProc(hWnd,uMsg,wParam,lParam);}int APIENTRY WinMain( HINSTANCE hInstance, // Instance HINSTANCE hPrevInstance, // Previous Instance LPSTR lpCmdLine, // Command Line Parameters int nCmdShow) // Window Show State{ MSG msg; // Windows Message Structure BOOL done=FALSE; // Bool Variable To Exit Loop // Ask The User Which Screen Mode They Prefer DialogBox(hInstance, (LPCTSTR)LOGO_BOX, hWnd, (DLGPROC)About); if (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?", "Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO) { fullscreen=FALSE; // Windowed Mode } // Create Our OpenGL Window if (!CreateGLWindow("OpenGL Test v 7.0",640,480,16,fullscreen)) { return 0; // Quit If Window Was Not Created } while(!done) // Loop That Runs While done=FALSE { if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) // Is There A Message Waiting? { if (msg.message==WM_QUIT) // Have We Received A Quit Message? { done=TRUE; // If So done=TRUE } else // If Not, Deal With Window Messages { TranslateMessage(&msg); // Translate The Message DispatchMessage(&msg); // Dispatch The Message } } else // If There Are No Messages { // Draw The Scene. Watch For ESC Key And Quit Messages From DrawGLScene() if (active && keys[VK_ESCAPE]) // Active? Was There A Quit Received? { done=TRUE; // ESC or DrawGLScene Signalled A Quit } else // Not Time To Quit, Update Screen { DrawGLScene(); // Reduce Wasted Cycles While Minimized (Draw Scene) SwapBuffers(hDC); // Swap Buffers (Double Buffering) } // Swap Buffers (Double Buffering) if (keys['L'] && !lp) // L Key Being Pressed Not Held? { lp=TRUE; // lp Becomes TRUE light=!light; // Toggle Light TRUE/FALSE if (!light) // If Not Light { glDisable(GL_LIGHTING); // Disable Lighting } else // Otherwise { glEnable(GL_LIGHTING); // Enable Lighting } } if (!keys['L']) // Has L Key Been Released? { lp=FALSE; // If So, lp Becomes FALSE } if (keys['F']) // Is F1 Being Pressed? { fp=TRUE; // fp Becomes TRUE filter+=1; // filter Value Increases By One if (filter>2) // Is Value Greater Than 2? { filter=0; // If So, Set filter To 0 } } } if (!keys['F']) // Has F Key Been Released? { fp=FALSE; // If So, fp Becomes FALSE } if (keys[VK_F1]) // Is F1 Being Pressed? { keys[VK_F1]=FALSE; // If So Make Key FALSE KillGLWindow(); // Kill Our Current Window fullscreen=!fullscreen; // Toggle Fullscreen / Windowed Mode // Recreate Our OpenGL Window ( Modified ) if (!CreateGLWindow("NEHE's OPENGL Test v 7.3. Aditional code by Son Gohan (son_gohan@hotmail.com)",640,480,16,fullscreen)) { return 0; // Quit If Window Was Not Created } } if (keys[VK_PRIOR]) // Is Page Up Being Pressed? { z-=0.02f; // If So, Move Into The Screen } if (keys[VK_NEXT]) // Is Page Down Being Pressed? { z+=0.02f; // If So, Move Towards The Viewer } if (keys[VK_UP]) // Is Up Arrow Being Pressed? { xspeed-=0.01f; // If So, Decrease xspeed } if (keys[VK_DOWN]) // Is Down Arrow Being Pressed? { xspeed+=0.01f; // If So, Increase xspeed } if (keys[VK_RIGHT]) // Is Right Arrow Being Pressed? { yspeed+=0.01f; // If So, Increase yspeed } if (keys[VK_LEFT]) // Is Left Arrow Being Pressed? { yspeed-=0.01f; // If So, Decrease yspeed } } // Shutdown KillGLWindow(); // Kill The Window return (msg.wParam); // Exit The Program}LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){ switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } if (LOWORD(wParam) == IDB_EXIT) { PostQuitMessage(0); } break; } return FALSE;}void DefToolBar(){ TBButtons[0].iBitmap=0; TBButtons[0].idCommand=ID_GLOPTIONS_LIGHTS; TBButtons[0].fsState=TBSTATE_ENABLED; TBButtons[0].fsStyle=TBSTYLE_BUTTON; TBButtons[0].dwData=0L; TBButtons[0].iString=0; TBButtons[1].iBitmap=1; TBButtons[1].idCommand=ID_GLOPTIONS_TEXTUREFILTER_NOFILTER; TBButtons[1].fsState=TBSTATE_ENABLED; TBButtons[1].fsStyle=TBSTYLE_BUTTON; TBButtons[1].dwData=0L; TBButtons[1].iString=0; TBButtons[2].iBitmap=2; TBButtons[2].idCommand=ID_GLOPTIONS_TEXTUREFILTER_MIPMAPMETHOD; TBButtons[2].fsState=TBSTATE_ENABLED; TBButtons[2].fsStyle=TBSTYLE_BUTTON; TBButtons[2].dwData=0L; TBButtons[2].iString=2; TBButtons[3].iBitmap=3; TBButtons[3].idCommand=ID_GLOPTIONS_TEXTUREFILTER_LINEARFILTERING; TBButtons[3].fsState=TBSTATE_ENABLED; TBButtons[3].fsStyle=TBSTYLE_BUTTON; TBButtons[3].dwData=0L; TBButtons[3].iString=3; TBButtons[4].iBitmap=4; TBButtons[4].idCommand=ID_FILE_EXIT; TBButtons[4].fsState=TBSTATE_ENABLED; TBButtons[4].fsStyle=TBSTYLE_BUTTON; TBButtons[4].dwData=0L; TBButtons[4].iString=3; }bool CreateMyWindow(char* title, int width, int height, int bits, bool fullscreenflag){ WNDCLASS wc; // Windows Class Structure DWORD dwExStyle; // Window Extended Style DWORD dwStyle; // Window Style RECT WindowRect; // Grabs Rectangle Upper Left / Lower Right Values WindowRect.left=(long)0; // Set Left Value To 0 WindowRect.right=(long)width; // Set Right Value To Requested Width WindowRect.top=(long)0; // Set Top Value To 0 WindowRect.bottom=(long)height; // Set Bottom Value To Requested Height hInstance = GetModuleHandle(NULL); // Grab An Instance For Our Window wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; // Redraw On Size, And Own DC For Window. wc.lpfnWndProc = (WNDPROC) WndProc; // WndProc Handles Messages wc.cbCl***tra = 0; // No Extra Window Data wc.cbWndExtra = 0; // No Extra Window Data wc.hInstance = hInstance; wc.hIcon = LoadIcon(hInstance, (LPCTSTR)ID_MAIN_ICON); // Load The Default Icon wc.hCursor = LoadCursor(NULL, IDC_ARROW); // Load The Arrow Pointer wc.hbrBackground = NULL; // No Background Required For GL wc.lpszMenuName = (LPCSTR)MAIN_MENU; // We Don't Want A Menu wc.lpszClassName = "OpenGL"; // Set The Class Name if (!RegisterClass(&wc)) // Attempt To Register The Window Class { MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } if (fullscreen) // Attempt Fullscreen Mode? { DEVMODE dmScreenSettings; // Device Mode memset(&dmScreenSettings,0,sizeof(dmScreenSettings)); // Makes Sure Memory's Cleared dmScreenSettings.dmSize=sizeof(dmScreenSettings); // Size Of The Devmode Structure dmScreenSettings.dmPelsWidth = width; // Selected Screen Width dmScreenSettings.dmPelsHeight = height; // Selected Screen Height dmScreenSettings.dmBitsPerPel = bits; // Selected Bits Per Pixel dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT; // Try To Set Selected Mode And Get Results. NOTE: CDS_FULLSCREEN Gets Rid Of Start Bar. if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL) { // If The Mode Fails, Offer Two Options. Quit Or Use Windowed Mode. if (MessageBox(NULL,"The Requested Fullscreen Mode Is Not Supported By\nYour Video Card. Use Windowed Mode Instead?","NeHe GL",MB_YESNO|MB_ICONEXCLAMATION)==IDYES) { fullscreen=FALSE; // Windowed Mode Selected. Fullscreen = FALSE } else { // Pop Up A Message Box Letting User Know The Program Is Closing. MessageBox(NULL,"Program Will Now Close.","ERROR",MB_OK|MB_ICONSTOP); return FALSE; // Return FALSE } } } if (fullscreen) // Are We Still In Fullscreen Mode? { dwExStyle=WS_EX_APPWINDOW; // Window Extended Style dwStyle=WS_POPUP; // Windows Style ShowCursor(FALSE); // Hide Mouse Pointer } else { dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; // Window Extended Style dwStyle=WS_OVERLAPPEDWINDOW; // Windows Style } AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle); // Adjust Window To True Requested Size hWnd=CreateWindowEx(dwExStyle, // Extended Style For The Window "OpenGL", // Class Name title, // Window Title dwStyle | // Defined Window Style WS_CLIPSIBLINGS | // Required Window Style WS_CLIPCHILDREN, // Required Window Style 0, 0, // Window Position WindowRect.right-WindowRect.left, // Calculate Window Width WindowRect.bottom-WindowRect.top, // Calculate Window Height NULL, // No Parent Window NULL, // No Menu hInstance, // Instance NULL ); // Create The Window DefToolBar(); //we initialize toolbar so that we can call createtoolbarex later... hTBWnd=CreateToolbarEx(hWnd,WS_VISIBLE|WS_CHILD|WS_BORDER |TBSTYLE_TOOLTIPS,IDTB_TOOLBAR, 5,hInstance,IDTB_BITMAP, TBButtons,NUMBUTTONS,0,0,16,16, sizeof(TBBUTTON));// Dont Pass Anything To WM_CREATE return TRUE; }
[This message has been edited by Son_Gohan (edited 31 March 2001).]
Page 58
*snicker* *snicker* Wow, now I dont feel like such a nerd anymore after seening some code put up. Well, Id probably put some code up if I knew any other than d:\setup ;d=cdrom. Havent used dos since I switched to Win2k.
BTW I know thats not real code anyway. IM interested in the hardware man.
Sayanora, suckers!
BTW I know thats not real code anyway. IM interested in the hardware man.
Sayanora, suckers!
Sorry fellows the comp was down for a coup[le days,whats does {btw} mean i don't get it
I was just being a moron right then. And Im not even stoned on anything. Just imagine how bad Id be if I was.
BTW-by the way...
Ya...Umm...Ba...Fa...La La La
Sashimi...Good Stuff...
Give me the Asahi...
Mugen C
------------------
Dream what you want to dream; go where you want to go; be what you want to be, because you have only one life and one chance to do all the things you want to do!
Sashimi...Good Stuff...
Give me the Asahi...
Mugen C
------------------
Dream what you want to dream; go where you want to go; be what you want to be, because you have only one life and one chance to do all the things you want to do!