I'm just learning C++ and thought I'd program a simple screensaver in
VC++ as my first assignment. I've found some tutorials showing how to
create a screenasver using OpenGL, but I found it very confusing and
perhaps uunnecessarily complex for my needs. What I would like to do is
1) know the dimensions of the screen (eg. 1024x768x32bit)
2) be able to use some sort of framebuffering, i.e. drawing to one frame
while showing the other to avoid flickering
3) perhaps have some timer that would be able to trigger a drawing
method at a frequency matching the refresh rate of the monitor
A reference to a good tutorial or some simple stump of code that draws a
white pixel in the center of the screen would be just perfect. I already
have the rest of the code done, i.e. I am able to produce a vector with
x and y values I'd like to plot on the screen.
Thanks a lot,
Ville 4 6316
you need to use wingdi access ie swapbuffer function to do that.
Another way of doing it easy is by just using gdi instead of opengl
because windows hookup to opengl could complicate things.
Edernity
---------
if it help
please help me provide better school supplies for childrenof indonesia.
it may be a donation but I merely ask you to letme send email to you
from one of the product of I'm affiliated and please register there on
mechant account free. If you even want you refund back on your dollar
of i-kard, its ok, I'll send you just use regular delivery on shipping
please. Please note this is very safe since this is a bonafid company.
remember your credit card company will confirm you on your purchase.
Still have doubts, sign on a personal account and let me contact you
again on it.
also
I'm also affiliated to this site: www.getaportal.com/portals/eddy_ruslim
Ville Ahonen wrote: I'm just learning C++ and thought I'd program a simple screensaver in
VC++ as my first assignment. I've found some tutorials showing how to
create a screenasver using OpenGL, but I found it very confusing and perhaps uunnecessarily complex for my needs. What I would like to do
is 1) know the dimensions of the screen (eg. 1024x768x32bit) 2) be able to use some sort of framebuffering, i.e. drawing to one
frame while showing the other to avoid flickering 3) perhaps have some timer that would be able to trigger a drawing method at a frequency matching the refresh rate of the monitor
A reference to a good tutorial or some simple stump of code that
draws a white pixel in the center of the screen would be just perfect. I
already have the rest of the code done, i.e. I am able to produce a vector
with x and y values I'd like to plot on the screen.
Thanks a lot,
Ville
Ville Ahonen wrote: I'm just learning C++ and thought I'd program a simple screensaver in VC++ as my first assignment. I've found some tutorials showing how to create a screenasver using OpenGL, but I found it very confusing and perhaps uunnecessarily complex for my needs. What I would like to do is
1) know the dimensions of the screen (eg. 1024x768x32bit) 2) be able to use some sort of framebuffering, i.e. drawing to one frame while showing the other to avoid flickering
You mean double buffering.
3) perhaps have some timer that would be able to trigger a drawing method at a frequency matching the refresh rate of the monitor
It's better to synchronize the buffer swap with the refresh of the monitor
itself.
A reference to a good tutorial or some simple stump of code that draws a white pixel in the center of the screen would be just perfect. I already have the rest of the code done, i.e. I am able to produce a vector with x and y values I'd like to plot on the screen.
You could have a look at SDL ( http://www.libsdl.org)
hi,
agrees with rolf, all those matrix of vectors in opengl could make a
beginner mad.
Bid the best prayer too u all for the continuity of god given world of
computing (this forum :-D)
Best to all
hi rolf, ok to call u that?
What about those donation ? just 1 email, just 1 pls! it could help one
kid 4 1 month
Rolf Magnus wrote: Ville Ahonen wrote:
I'm just learning C++ and thought I'd program a simple screensaver
in VC++ as my first assignment. I've found some tutorials showing how
to create a screenasver using OpenGL, but I found it very confusing
and perhaps uunnecessarily complex for my needs. What I would like to
do is 1) know the dimensions of the screen (eg. 1024x768x32bit) 2) be able to use some sort of framebuffering, i.e. drawing to one
frame while showing the other to avoid flickering You mean double buffering.
3) perhaps have some timer that would be able to trigger a drawing method at a frequency matching the refresh rate of the monitor
It's better to synchronize the buffer swap with the refresh of the
monitor itself.
A reference to a good tutorial or some simple stump of code that
draws a white pixel in the center of the screen would be just perfect. I
already have the rest of the code done, i.e. I am able to produce a vector
with x and y values I'd like to plot on the screen.
You could have a look at SDL (http://www.libsdl.org)
Thanks for the pointers, the SDL tutorials are just what I need.
- Ville
Rolf Magnus wrote: Ville Ahonen wrote:
I'm just learning C++ and thought I'd program a simple screensaver in VC++ as my first assignment. I've found some tutorials showing how to create a screenasver using OpenGL, but I found it very confusing and perhaps uunnecessarily complex for my needs. What I would like to do is
1) know the dimensions of the screen (eg. 1024x768x32bit) 2) be able to use some sort of framebuffering, i.e. drawing to one frame while showing the other to avoid flickering
You mean double buffering.
3) perhaps have some timer that would be able to trigger a drawing method at a frequency matching the refresh rate of the monitor
It's better to synchronize the buffer swap with the refresh of the monitor itself.
A reference to a good tutorial or some simple stump of code that draws a white pixel in the center of the screen would be just perfect. I already have the rest of the code done, i.e. I am able to produce a vector with x and y values I'd like to plot on the screen.
You could have a look at SDL (http://www.libsdl.org) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: klappnase |
last post by:
Hello everyone,
does anyone know a way to stop the screensaver under linux from
starting up while a certain process is running?
I need this because I experience a memory leak while recording
wav-files every time the screensaver starts.
It is a Tkinter application, btw.
Any help would be very appreciated.
Thanks
|
by: Luke |
last post by:
I am trying to capture an event when the screensaver starts. I have code
working on Windows XP etc when the Password/Welcome Screen is enabled
. Using the Fast User Switching Notifications.
However I am unable to detect the screensaver starting when the screensaver
password option is disabled. When using the WndProc Overrides I am unable to
capture the screensaver event unless the application is active .
Thank you in advance for any...
|
by: DanielB |
last post by:
Does anyone know what the command line argumentto launch a
screensaver's options/configuration dialog is on Windows XP Pro?
From most of the example source code I can find on the web, it would
seem to be '/c' but that does not seem to work for the screensaver I
have written. I've tested my code and if '/c' is the first argument
then the options dialog is launched but Windows XP does not seem to be
supplying the '/c' argument when I...
|
by: Paul Smith |
last post by:
I have been given an unusual task to create a Windows Service to do something
periodically to make the screensaver timer reset. We have a general policy
of locking computers automatically after 10 minutes of inactivity. This
windows service would be used on some machines to prevent the lock from
occurring every 10 minutes.
I have tried to reposition the mouse pointer with the Cursor class in a
service, but it does not work -- always...
|
by: Paul Smith |
last post by:
I have been given an unusual task to create a Windows Service to do something
periodically to make the screensaver timer reset. We have a general policy
of locking computers automatically after 10 minutes of inactivity. This
windows service would be used on some machines to prevent the lock from
occurring every 10 minutes.
I have tried to reposition the mouse pointer with the Cursor class in a
service, but it does not work -- always...
| |
by: Angel |
last post by:
Hello everyone,
How can I build a simple screensaver that only displays images?
Are there any pages that display some examples?
I posted this question a few months ago but the examples were way too
complex for what I needed (floating images, complex backgrounds, etc...).
I just need an example that displays images in a sequential order.
Thanks.
|
by: Vaughn |
last post by:
I'm working on a simple screensaver (it just displays a different image
every 5 seconds) but I'm having trouble displaying an image in my form using
the BackGroundImage property. I was trying to use an ImageList with 4 items
so my code in the ScreenSaverForm_Load event handler looked like this:
int iImageShown = 0;
int iImageCount = imageList_saver.Images.Count-1;
Cursor.Hide();
TopMost = true;
while (n != 1) //my infinite loop ; is...
|
by: DanielB |
last post by:
Does anyone know what the command line argumentto launch a
screensaver's options/configuration dialog is on Windows XP Pro?
From most of the example source code I can find on the web, it would
seem to be '/c' but that does not seem to work for the screensaver I
have written. I've tested my code and if '/c' is the first argument
then the options dialog is launched but Windows XP does not seem to be
supplying the '/c' argument when I...
|
by: VMI |
last post by:
How difficult is it to develop a screensaver in C#? The screensaver would be
composed of several images and each image would be displayed on the screen
for a few seconds. The only difficult part would be that there should a
smooth transition between images.
Thanks.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |