OpenGL Window and Texture Errors (SOIL)

I've been getting a really strange bug in my project ever since I ported it from XP to 7. What happens is that it'll execute, but only display a black box if run in fullscreen mode that is unresponsive to anything, ctl+alt+del included, forcing me to cut power to my PC, and if run in windowed mode, textures fail to be loaded. Here's some relevant code (the comments I make about the functions apply only to when the program is run with fullscreen = false, if it is true, it just goes black box):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
{
	GLuint      PixelFormat;
	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
	fullscreen=fullscreenflag;                      // Set The Global Fullscreen Flag
	hInstance       = GetModuleHandle(NULL);            // Grab An Instance For Our Window
	wc.style        = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;       // Redraw On Move, And Own DC For Window
	wc.lpfnWndProc      = (WNDPROC) WndProc;                // WndProc Handles Messages
	wc.cbClsExtra       = 0;                        // No Extra Window Data
	wc.cbWndExtra       = 0;                        // No Extra Window Data
	wc.hInstance        = hInstance;                    // Set The Instance
	wc.hIcon        = LoadIcon(NULL, IDI_WINLOGO);          // Load The Default Icon
	wc.hCursor      = LoadCursor(NULL, IDC_ARROW);          // Load The Arrow Pointer
	wc.hbrBackground    = NULL;                     // No Background Required For GL
	wc.lpszMenuName     = NULL;                     // We Don't Want A Menu
	wc.lpszClassName    =  "OpenGL";                 // Set The Class Name
	if (!RegisterClass(&wc))            //suck it            // Attempt To Register The Window Class
	{
		MessageBox(NULL, "Failed To Register The Window Class.", "ERROR",MB_OK|MB_ICONEXCLAMATION);
		return FALSE;                           // Exit And 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;
		if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL)
		{
			if (MessageBox(NULL, "The Requested Fullscreen Mode Is Not Supported By\nYour Video Card.
				Use Windowed Mode Instead?", "Project",MB_YESNO|MB_ICONEXCLAMATION)==IDYES)
			{
				    fullscreen=FALSE;               // Select Windowed Mode (Fullscreen=FALSE)
			}
			else
			{
				MessageBox(NULL, "Program Will Now Close.", "ERROR",MB_OK|MB_ICONSTOP);
				return FALSE;
			}
		}
	}
}

The above function continues, but the fullscreen support message is tripped (if running in windowed mode), so I'll stop it there.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
int LoadGLTextures()                        // Load Bitmaps And Convert To Textures
{
	//Load an image file directly as a new OpenGL texture
	Lists::texture[0] = SOIL_load_OGL_texture
		(
		"Data/Textures/Beusch.bmp",
		SOIL_LOAD_AUTO,
		SOIL_CREATE_NEW_ID,
		SOIL_FLAG_INVERT_Y
		);
	if(Lists::texture[0] == 0)
        return false;
    // Typical Texture Generation Using Data From The Bitmap
    glBindTexture(GL_TEXTURE_2D, Lists::texture[0]);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
    return true;
}

This function returns false.

It should also be noted that I'm getting these warnings:

warning LNK4076: invalid incremental status file <path>\Project.ilk' (which will be deleted); linking nonincrementally

warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

warning LNK4099: PDB 'vc100.pdb' was not found with 'SOIL.lib(image_DXT.obj)' or at '<path>\vc100.pdb'; linking object as if no debug info <path>\SOIL.lib(image_DXT.obj)

The last warning is repeated with three different .pdb's


Thanks for any insight.
Topic archived. No new replies allowed.