PaganX

Members
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

128 Neutral

About PaganX

  • Rank
    Member
  1. Come on guys! Let's rally for NeHe!

    Everywhere there is a forum there will be flames. Doesn't matter what the contents are. I personaly bypass them since they always seem to offer nothing good. I've been comming to NeHe for a couple of months now. If it wasn't for this site I wouldn't have been able to pick up opengl as easily as I did. I own about 5 think books on opengl and would still be lost. The tutorials were great stepping stones for anyone new. And the forums alone provided contacts to a giant and helpful comunity that I read over on a daily bases. I figure once I am good enough to answer the questions of other's, I will repay the comunity with the knowledge I have gained. As I believe is the right thing to do. Beyond that... if I am able to finish anything of decents. NeHe and the whole comunity deserves credit. On that note I want to thank everyone for thier help and knowledge, since I have been comming to this site. It definitly means alot to me to have somewhere to go when all else fails or I want to just read through the posts of others and pass time. Writing code is definitly the most challenging yet rewarding hobby I have ever come across.
  2. Lesson 16, Alpha Color

    glFogfv(GL_FOG_COLOR, COLOR); Is able to take a 4th value, RGB(A). I was just woundering if the alpha value has any effect on fog or if its just a dead value. I have messed around with it but havent discovered any purpose for it.
  3. Lesson 16, Alpha Color

    Yeah, I still dont see any difference.
  4. Large Terrain maps?

    I know you can use doubles instead of floats to create larger maps, but this will not improve speed issues. I am pretty new to 3D code with just a few months under my belt. When dealing with overall speed of terrains, improving code is where I gained most my improvments. Culling, not computing verts more then once, reduction of triangles read over distance... I am currently working on a map editor for large worlds if I come across anything I will keep you posted.
  5. Lesson 16, Alpha Color

    Does the Alpha color have any effect on the fog? I created a dialog box to control RGBA and distancing of the environments fogging. When I change the alpha I see no apparent visual effect. Is my conclusion correct? After reading through a few books and sites I haven't come across any answers.
  6. Sweet, got it up and running... still not quite sure what I was doing wrong. code looks alot like what I had. Thanks
  7. I guess what I am going for is the most basic and easiest fog to set up. Rather new to OpenGl, I am not even sure of what options I have. What method would you suggest?
  8. I threw this together quickly to test out fog in my scene. I get no errors but I also get no effect. Its my understanding that when I CFOG Fog, it should automaticly set defaults and add the fog. Any ideas what I am doing wrong? PFNGLFOGCOORDFEXTPROC glFogCoordfEXT; class CFOG { public: float Density; float Range[2]; float Color[4]; int Type; bool bOn; CFOG(void) { glFogCoordfEXT= ( PFNGLFOGCOORDFEXTPROC )wglGetProcAddress( "glFogCoordfEXT" ); glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT); Color[0] = 0.0f; Color[1] = 0.0f; Color[2] = 0.0f; Color[3] = 1.0f; Range[0] = 0.001f; Range[1] = 100.0f; Density = 1.0f; Type = GL_EXP2; glEnable(GL_FOG); glFogi(GL_FOG_MODE , Type); glFogfv(GL_FOG_COLOR, Color); glFogf(GL_FOG_DENSITY, Density); glFogf(GL_FOG_START , Range[0]); glFogf(GL_FOG_END , Range[1]); glHint(GL_FOG_HINT , GL_NICEST); MessageBox(NULL, "SetUp", "FOG", MB_OK); } ~CFOG(void){} };
  9. I threw this together quickly to test out fog in my scene. I get no errors but I also get no effect. Its my understanding that when I CFOG Fog, it should automaticly set defaults and add the fog. Any ideas what I am doing wrong? PFNGLFOGCOORDFEXTPROC glFogCoordfEXT; class CFOG { public: float Density; float Range[2]; float Color[4]; int Type; bool bOn; CFOG(void) { glFogCoordfEXT= ( PFNGLFOGCOORDFEXTPROC )wglGetProcAddress( "glFogCoordfEXT" ); glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT); Color[0] = 0.0f; Color[1] = 0.0f; Color[2] = 0.0f; Color[3] = 1.0f; Range[0] = 0.001f; Range[1] = 100.0f; Density = 1.0f; Type = GL_EXP2; glEnable(GL_FOG); glFogi(GL_FOG_MODE , Type); glFogfv(GL_FOG_COLOR, Color); glFogf(GL_FOG_DENSITY, Density); glFogf(GL_FOG_START , Range[0]); glFogf(GL_FOG_END , Range[1]); glHint(GL_FOG_HINT , GL_NICEST); MessageBox(NULL, "SetUp", "FOG", MB_OK); } ~CFOG(void){} };
  10. Center of 4 Points

    You rock. I had the right idea, but I was going about it incorrectly. Thank you
  11. Center of 4 Points

    How do I got about finding the center of 4 points?
  12. Worked great. Even when I ran the exe. I guess GetWindowRect after creating a maximized window fills the rect array with the correct info when tested. But NULL when the exe was run. Once again, thanks for the help
  13. Returns TRUE, when run in both manners
  14. There isn't much to the code that would effect it. My real confusion lies with why it works in the compiler and when the exe is run. this is the run at the top of the Main just outside the main loop with other initialization code. SetupCameraWindow(hInstance); Window.Window.Create(true, false); GetWindowRect(Window.Window.hWnd, &Window.Window.Rect); rFullScreen = Window.Window.Rect; SetupCameraWindow goes through and fills out the windowclass. Pretty basic but sloppy when cut and pasted : ) void SetupCameraWindow(HINSTANCE hInstance) { CameraWindow.Window.WC.cbClsExtra = 0; CameraWindow.Window.WC.cbWndExtra = 0; CameraWindow.Window.WC.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH); CameraWindow.Window.WC.hCursor = LoadCursor(NULL, IDC_ARROW); CameraWindow.Window.WC.hIcon = LoadIcon (NULL, IDI_APPLICATION); CameraWindow.Window.WC.hInstance = hInstance; CameraWindow.Window.WC.lpfnWndProc = MainProc; CameraWindow.Window.WC.lpszClassName = "CameraWindow"; CameraWindow.Window.WC.lpszMenuName = NULL; CameraWindow.Window.WC.style = CS_OWNDC|CS_HREDRAW|CS_VREDRAW; CameraWindow.Window.style = WS_MAXIMIZEBOX|WS_MINIMIZEBOX|WS_SYSMENU|WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_MAXIMIZE; //CameraWindow.Window.Parent = Menu.Window.hWnd; CameraWindow.Window.WindowName = "Camera Window"; } void Create(bool bShow, bool bLoadMenu) { if(!RegisterClass(&WC)) { MessageBox(hWnd, "Error Registering Class", "ERROR!", MB_OK); } hWnd = CreateWindow(WC.lpszClassName, WindowName, style, Rect.left, Rect.top, Rect.right, Rect.bottom, Parent, NULL, WC.hInstance, NULL); if(bShow) {ShowWindow(hWnd, SW_SHOW);} if(bLoadMenu) {SetMenu (hWnd, Menu);} } hopefuly this clears up a few things, I removed the pixformat code the simplify things. It contains no code that would change the window RECT.
  15. Window styles Used: WS_MAXIMIZEBOX WS_MINIMIZEBOX WS_SYSMENU WS_CLIPCHILDREN WS_CLIPSIBLINGS WS_MAXIMIZE Method used to find and store screen resolution: GetWindowRect(Window.hWnd, &Window.Rect) rFullScreen = Window.Rect I figure, if I make the window maximized I should be able to get and store the window rect after the window is created. When I run the program without debugging, it works perfectly. Createing a full screen window and storing it as an RECT. BUT... When I run it as an exe, the window is minimized in the top left corner of the screen and doesnt capture the RECT correctly.