fastest fullscreen image rendering technique?

Started by
4 comments, last by DividedByZero 15 years, 9 months ago
Hi, i couldn't figure out where to post this so i guess i have to consider myself noob and post this in beginners forum ^^ I'm making a porn virus to spice up my friends computer as a birthday present/revenge since he did it first on my birthday... I want my "virus" to render single frames of porn/repulsive images in fullscreen every now and then, like in Fight Club when Tyler inserts porn in a family movie at the cinema :) I started on doing this with DirectX but if i understood correctly i have to create a windows form thing and use it as rendering surface? This cant be very fast i think, i want the image to just flash by in a 1/60th of a second, and i don't want anything to show up in the taskbar... Is there any way to access the graphics buffer directly, so i can insert a single frame without any windows form fuzz? How should i go about rendering these frames?
Advertisement
My eight year old Geforce TI-4200 can do upto 2000 frames per second in full screen directX, so I dont think take 1/60 of a second should be a big problem.

You do need to create a window and tell directX to draw in it though.

There ae plenty of tutorials around though like;

DirectXtutorial.com

Hope this helps.
Quote:Original post by lonewolff
My eight year old Geforce TI-4200 can do upto 2000 frames per second in full screen directX, so I dont think take 1/60 of a second should be a big problem.

You do need to create a window and tell directX to draw in it though.

There ae plenty of tutorials around though like;

DirectXtutorial.com

Hope this helps.


Thx for the reply, yes when everything is set up it can draw fast, but i want the image to just pop up from nowhere and then disappear the next frame.

Let's say my friend is writing some essay in Word or something, then suddently a single frame of porn pops up in fullscreen and then disappears without trace, thats what i want to do.

Can this be done with a window? Isn't there some delay before the window is set up and resized to fullscreen? And then when it closes, there's usually a button in the taskbar for the window that just closed, there's som delay before the taskbar button disappears i think... Correct me if im wrong.
Can this "pop up in one frame and dissapear the next frame" thing be done with a window?
You don't need directx. You only need to create a regular gdi window the same size as your screen, without decorations.

You can start with Raymonds scratch project:
http://blogs.msdn.com/oldnewthing/archive/2003/07/23/54576.aspx

In the paint event you you paint your picture. And you should create a timer event which hides and shows the window.

Hopefully this should work. Might be some problems getting exactly 1/60th second, but otherwise it should work good enough.
This can be done in a window (how else? ;)). No, resizing the window is not slow. Yes, you can hide the taskbar icon.

The slowest part is loading the image from disk (so do that before displaying the window).

Using .Net, you could cook up a Windows.Forms program with your requirements in about 15 minutes:


  1. Install VS2008 express (C#), if you don't already have VS.

  2. Create a new Windows.Forms C# project.

  3. In the designer, click on the main form and check the properties pane (right side of the screen).

  4. Set the WindowState property to Maximized.

  5. Set the Borderstyle property to None.

  6. Set the ShowInTaskbar property to false.

  7. Set the visible property to false.

  8. Drag and drop a Timer object from the Toolkit (left side of the screen) to your main form.

  9. I'll let you figure out the rest for yourself. You'll basically need to hook the Timer.Tick event and use that to load a bitmap (Bitmap bmp = new Bitmap(...)), set it as background to your main form and make the main form visible.


It's a nice little exercise and an excuse to start playing with C#/.Net. Have fun!

[OpenTK: C# OpenGL 4.4, OpenGL ES 3.0 and OpenAL 1.1. Now with Linux/KMS support!]

You could also do this pretty quickly using C++ by creating a new resource and adding a dialog box. Set the dialog box 'Border' to none and play with window size and position. Add a picture control and size it to the same size as your window. And just change the picture source over time.

This should be pretty easy to do and is going to be a better option than directX. As you pointed out there is a delay when setting up the device, window, etc..

Good luck!

This topic is closed to new replies.

Advertisement