ChipChamp
semi-N00b
 
Posts: 36
Good Luck. :)
|
 |
« on: August 27, 2007, 02:37:33 AM » |
|
Lol, one more question.  I've seen other people make screensavers using C++ and OpenGL, but I'm not sure how.. nor can I find a tutorial on it. Does anyone know how I can make a screensaver out of OpenGL, using Dev-C++? Or if you know of a tutorial that can show me how to do this, then that works too.  Thanks for all your help! 
|
|
|
|
|
Logged
|
|
|
|
|
C-Man
|
 |
« Reply #1 on: August 27, 2007, 04:08:20 AM » |
|
just make an opengl program , rename the .exe to .scr , also if somone gives your program /c command line option you should give a configure dialog
|
|
|
|
|
Logged
|
|
|
|
zaqufant
Farmer Brown
Dr. of C++ology
   
Posts: 963
Harder, better, faster, stronger.
|
 |
« Reply #2 on: August 27, 2007, 01:43:21 PM » |
|
What, your saying that you can just take any old program, change the .exe to a .scr, and viola, it's a screen saver?
|
|
|
|
|
Logged
|
|
|
|
|
C-Man
|
 |
« Reply #3 on: August 27, 2007, 06:23:15 PM » |
|
yes
|
|
|
|
|
Logged
|
|
|
|
FrozenKnight
Extends without bound
Global Moderator
Dr. of C++ology
    
Posts: 558
Do it yourself it's the only way to learn.
|
 |
« Reply #4 on: August 27, 2007, 09:48:04 PM » |
|
also you should make it so that the screensaver processes screensaver messages and exits on mouse or keyboard messages.
|
|
|
|
|
Logged
|
 Imagine the impossible, then make it happen.
|
|
|
ChipChamp
semi-N00b
 
Posts: 36
Good Luck. :)
|
 |
« Reply #5 on: August 27, 2007, 11:09:19 PM » |
|
Hmm, okay. Thanks! One problem: Probably a really stupid question... but how can I change the file extension, because when I right click and rename, it just lets me rename it to something, but changes the thing back to something like this: ScrnSvr.scr.exe when I rename it to ScrnSvr.scr . - figured that out Now that I've done that, how can I make it appear in the choices to use it as a screen saver, or at least how can I set it so that it uses it as a screensaver (even if it doesn't appear in the list)?
Thanks!
Okay, I got it to work! Thanks! I'm still having a problem that the program works fine with textures when I just open the screen saver from the Dev-C++ folder I built it in, but it won't work with textures in the screensaver folder... but I'm sure I'll figure that out eventually.  Thanks again! Lol, I fixed the texture thing because I forgot to put the picture I was using in the screen saver folder... Lol!
|
|
|
|
« Last Edit: August 28, 2007, 12:09:15 AM by ChipChamp »
|
Logged
|
|
|
|
mleveill
1337 L0LCoder
C++ Freak
  
Posts: 430
IM IN UR PROGRAMZ WRITIN UR CODEZ!
|
 |
« Reply #6 on: August 28, 2007, 06:53:42 AM » |
|
Hmm, okay. Thanks! One problem: Probably a really stupid question... but how can I change the file extension, because when I right click and rename, it just lets me rename it to something, but changes the thing back to something like this: ScrnSvr.scr.exe when I rename it to ScrnSvr.scr . - figured that out oh noes...
|
|
|
|
|
Logged
|
Common interests aren't always the best thing. Especially programming wise. I could just picture a couple fighting over weather to "xor eax by eax" or "and eax by 0"... Then kids'll come home and argue with their parents that readabilty is better than size and that "mov eax, 0" would be best because that's "more readable." (Even if it really isn't...) LOLCode - http://lolcode.com/home
|
|
|
zaqufant
Farmer Brown
Dr. of C++ology
   
Posts: 963
Harder, better, faster, stronger.
|
 |
« Reply #7 on: August 28, 2007, 11:24:54 AM » |
|
also you should make it so that the screensaver processes screensaver messages and exits on mouse or keyboard messages. Sounds like it should be done with the win32API then.
|
|
|
|
|
Logged
|
|
|
|
FrozenKnight
Extends without bound
Global Moderator
Dr. of C++ology
    
Posts: 558
Do it yourself it's the only way to learn.
|
 |
« Reply #8 on: August 28, 2007, 03:58:42 PM » |
|
those are messages passed to the program i know it needs to be done in Win32. you just need to make sure your program handles them correctly.
|
|
|
|
|
Logged
|
 Imagine the impossible, then make it happen.
|
|
|
zaqufant
Farmer Brown
Dr. of C++ology
   
Posts: 963
Harder, better, faster, stronger.
|
 |
« Reply #9 on: August 29, 2007, 01:02:25 AM » |
|
So, I could say, oh, use allegro maybe?
|
|
|
|
|
Logged
|
|
|
|
ih8censorship
Megalomaniac!!!
Administrator
C++ guru
    
Posts: 1241
|
 |
« Reply #10 on: August 31, 2007, 07:43:00 PM » |
|
just make an opengl program , rename the .exe to .scr , also if somone gives your program /c command line option you should give a configure dialog basically yes, though theres a bit more too it, as there are other commandline switches and things. You also have to make it so only one copy can run at a time, be able to handle preview mode... I actually wrote a screensaver class a long time ago that supported this stuff, i could possibly dig it up and post it if anyone wants to work off of it or make improvements or some totally better way.
|
|
|
|
|
Logged
|
PC==perfect_companion Knowledge cannot come packaged and predigested; it must be chewed over carefully before swallowed. What have you tried?
|
|
|
ChipChamp
semi-N00b
 
Posts: 36
Good Luck. :)
|
 |
« Reply #11 on: August 31, 2007, 09:32:56 PM » |
|
Hmm, sure, I could check it out. 
|
|
|
|
|
Logged
|
|
|
|
ih8censorship
Megalomaniac!!!
Administrator
C++ guru
    
Posts: 1241
|
 |
« Reply #12 on: September 01, 2007, 03:12:16 AM » |
|
Allright here it is (attached). Beware, this code was written a few years ago when i hadent learned a few things yet lol... so looking at it now its kinda bad lol... but it works anyway, and maybe can teach you some things about windows screensavers.
|
|
|
|
Logged
|
PC==perfect_companion Knowledge cannot come packaged and predigested; it must be chewed over carefully before swallowed. What have you tried?
|
|
|
ChipChamp
semi-N00b
 
Posts: 36
Good Luck. :)
|
 |
« Reply #13 on: September 01, 2007, 03:33:53 AM » |
|
Thanks, I'll check it out. 
|
|
|
|
|
Logged
|
|
|
|
|