Archived

This topic is now archived and is closed to further replies.

Allebarde

Env Map & Full Screen

Recommended Posts

Hi! When I use environnement mapping, I have a strange problem: When I swith to full Screen, the env map looks bad, but when I run in a window mode, It works fine! So.. I try to modify the code and I see that When I''m in FullScreen I use a flag for creating my window: dwnostyle=WS_POPUP; Now, If I replace this line by this one, The environnement mapping works fine: dwnostyle=WS_OVERLAPPEDWINDOW; It strange that a flag for my window can have an influence on opengl? no? Does Anyone has an idea on this error? Tahnks

Share this post


Link to post
Share on other sites
Here''s the code:

if (fullscreen){ // Are We Still In Fullscreen Mode?

dwExnostyle=WS_EX_APPWINDOW; // Window Extended Style
dwnostyle=WS_POPUP; // Windows Style
ShowCursor(FALSE);} // Hide Mouse Pointer
else{

dwExnostyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; // Window Extended Style
dwnostyle=WS_OVERLAPPEDWINDOW;} // Windows Style

AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle); // Adjust Window To True Requested Size

if (!(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))) // Dont Pass Anything To WM_CREATE

Share this post


Link to post
Share on other sites