• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

120 Neutral

About Fluffy-Bunny

  • Rank
  1. Quickest way to get some 3d graphics to work with my game...

    Check this out.
  2. I'm New to programming..

    public class ComputeTaxFor5Employees { public static void Main() { double hourlyRate,hours, grosspay; char status; string Employee; // Start of loop for( int i = 0; i < 5; i++ ) { Console.WriteLine("Enter hourly pay rate for employee: "); Console.WriteLine(); Employee= Console.ReadLine(); hours= Convert.ToDouble(Employee); Console.WriteLine("Enter hours worked for employees: "); Console.WriteLine(); Employee = Console.ReadLine(); hours = Convert.ToDouble(Employee); grossPay = GrossPay(hourlyRate, hours); Console.WriteLine("Gross pay earned by employee is {0}", "GrossPay"); Console.WriteLine("Press enter to continue"); Console.ReadLine(); } // End of loop } public static double GrossPay(double hourlyRate, double hours) { double GrossPay; GrossPay = hourlyRate * hours; return GrossPay; } } I only added the loop. Hope it works.
  3. Hopefully Easy Question

    Yes, there is. Try GLUT.
  4. Game developement schools

    My advice to you would be not to attend some specialised games programming course. Instead, go for something more traditional such as Software Engineering or even Mathematics. A combination of those two would be great (e.g. software engineering with a few electives in trigonometry/algebra). After all, game programming is just another sub-category of software engineering. Also, don't be fooled into thinking that these game programming schools will transform you into a game programming guru. You are what you make of yourself. You might even get bored because the 3-month OpenGL 1on1 course drags endlessly on and you find yourself reviewing a single OpenGL function per hourly lesson! P.S.: Have you talked this over with your parents? Your tutors at school? Seek their opinion too.
  5. Setting/resetting window style (Win32)

    Thanks for the reply. WM_ERASEBKGND doesn't seem to have an effect and ShowWindow/SetFocus don't seem to work either. :(
  6. When in windowed mode, I can use the following to cover up my window's title bar and the desktop's taskbar, without the need for ChangeDisplaySettings. SetWindowLong( hWnd, GWL_style, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN ); SetWindowLong( hWnd, GWL_EXstyle, WS_EX_APPWINDOW ); SetWindowPos( hWnd, HWND_TOP,0,0,width,height,SWP_SHOWWINDOW|SWP_FRAMECHANGED ); At this point, if I try to make the window smaller (e.g. 640x480 on a 1280x1024 desktop), the screen area outside my window is not updated. It's as if the last frame of my previously fullscreen window is still drawn on it. I tried to force the desktop window to refresh but it doesn't work. SetWindowLong( hwnd , GWL_style, WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN ); SetWindowLong(hWnd, GWL_EXstyle, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE ); SetWindowPos( hWnd, HWND_TOP,x,y,width,height,SWP_SHOWWINDOW|SWP_FRAMECHANGED ); PostMessage( GetDesktopWindow(), WM_PAINT, 0, 0 ); Anyone know the cause of this?
  7. Changing resolution on Windows

    After the call to ChangeDisplaySettings, I do the following: SetWindowLong( hWnd, GWL_style, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN ); SetWindowLong( hWnd, GWL_EXstyle, WS_EX_APPWINDOW ); SetWindowPos( hWnd, HWND_TOP, 0, 0, width, height, SWP_SHOWWINDOW ); Results are identical to those of my previous implementation, only this time the rendering context remains intact. I'll keep in mind the bit about pixel format that AP told us about. danke und fröhliche Ostern <Babel> ;)
  8. Changing resolution on Windows

    Thanks AP. MoveWindow/SetWindowPos work fine but the window's title bar and the desktop's taskbar are visible. How can I remove them? Is there a function to set the window's style once it's been created?
  9. Changing resolution on Windows

    The following is an excerpt from the initialisation function. I have removed all error checking and renamed variables where appropriate to make it more readable. wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; wc.lpfnWndProc = (WNDPROC) WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon( NULL, IDI_APPLICATION ); wc.hCursor = LoadCursor( NULL, IDC_ARROW ); wc.hbrBackground = NULL; wc.lpszMenuName = NULL; wc.lpszClassName = title; RegisterClass( &wc ); style = WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; exstyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; AdjustWindowRectEx( &windowRect, style, FALSE, exstyle ); hWnd = CreateWindowEx( exstyle, classTitle, title, style, x, y, ... ); // etc SetupOpenGL( ... ); /* here I pass a ptr to a struct */ ShowWindow( hWnd, SW_SHOW ); SetForegroundWindow( hWnd ); SetFocus( hWnd ); If I use ODIN's code as is, I get the problem I described above. The desktop's resolution changes, but my window is unaffected. This is not the only API where I've encountered this problem. GLUT's game mode will destroy the current window (and OGL rendering context) and create a new one with the specified resolution, thus forcing me to reload all my textures. Any help will be appreciated.
  10. Changing resolution on Windows

    Ok, I've been using a very similar code segment in the initialisation function and I did try to isolate it in the same way. Moreover, it did change the resolution of the desktop but my window was unaffected (e.g. the window had same dimensions as before, upper left corner was at the same coordinates, etc.)
  11. Changing resolution on Windows

    Thanks for the reply. What the poster, MrDoomMaster, suggests is a way to make the window cover the desktop, without changing the resolution. What I want is a bit different so I'll be more specific. I want to switch between supported resolutions, regardless of whether in windowed or fullscreen mode, without the need to recreate the rendering context and reload all my textures. Is that possible and how? EDIT: For example, to switch from windowed 800x600 to fullscreen 1024x768, from windowed 800x600 to windowed 1024x768, and so on.
  12. When using win32, is it possible to switch from windowed to fullscreen mode without having to destroy and recreate the window?
  13. I went through the functions in glut.h and didn't find a function for that so it might be impossible.
  14. I think you can use some ready-made images through glutSetCursor.
  15. We are obsolete.

    The key here is middleware. No more system dependant programming. Let's start with a plug-in oriented system and then move to more complicated things. After all, is RenderWare not a commercially successful piece of software? Their promise that my program will run on both the PC and the various game consoles is mighty enticing, and I guess it equally is for companies in their infancy that have little money and time to spare on looking for and acquiring this library and that or even learning how do to something themselves. EDIT: added link [Edited by - Fluffy-Bunny on April 13, 2006 12:10:42 AM]
  • Advertisement