Displaying graphics on a second monitor

Post: #1
Hey there everyone --

I'm a new poster here, and beginning my foray into Cocoa-based programming. I have quite a lot of experience in other realms of programming, including traditional C++, Pascal, etc... mostly on the PC.

Anyhoo, my situation is this: I want to control the images that appear on a TV screen. I know that the basics for this type of operation include creating a properly-sized view and positioning it off the desktop monitor to the realm where the external TV (Display #2 in my system) is located. The question is simply how to fill that view with bitmap-based graphics of my choosing/synthesis. Is the best way to use NSImage basically as a virtual graphics world, copying it to the view as necessary (30x/sec)? If so, how do I set up the NSImage and NSBitmapImageRep classes properly to receive my desired type of data, that being 3 instances of 8-bit values per pixel (RGB)?

I've found a lot of info on this basic process via my books and the online documentation, but I have yet to really feel this topic "click" in my brain.

Thanks for the help in advance. I hope I can become a useful and beneficial member of this forum.

-- Bert
Quote this message in a reply
Posts: 233
Joined: 2003.05
Post: #2
You may want to post this with a subject that has something to do with the question. Smile I don't have the answer for you and someone who does is probably ignoring the thread because of the generic subject.

Try, "Displaying my graphics on a second monitor" or something similar, then someone who knows something about that will be inclined to check the thread.


"Pay no attention to that man behind the curtain." - Wizard of Oz
Quote this message in a reply
Posts: 3,591
Joined: 2003.06
Post: #3
I don't entirely understand what Bert is trying to do. It seems that he wants to do what we all wanted to do when we started graphics programming -take over a screen and draw some stuff! Well Bert, there are many different ways to go about doing that. I would suggest that the first direction you should take is to just learn how to get graphics working in a regular window on the desktop, and don't focus on getting them to draw in the external "TV" monitor at first. Once you can draw them in a window it's not much more to capture an external display and do it there. TV is usually programmed for at 640 x 480 resolution so that's something to keep in mind. Other than that, I'm taking wild stabs at offering anything useful. Maybe you can be more specific as to what you are trying to accomplish.

Note: if you just wanna draw into a frame buffer and upload that on a repeated basis, using OpenGL and drawing into a texture with a DMA upload is probably something you might want to look at. However, there's still more to that than how it sounds. Wink
Quote this message in a reply
Posts: 260
Joined: 2005.05
Post: #4
I have done a lot of TV real-time graphics programming, commercially, for swedish public service television. To me the subject is correct, because the TV is just any other second monitor (typically with 768x576 pixels, PAL). With Carbon, you should consult the Device Manager, which tells you the bounds of each monitor. Then the first try is to create a window that covers that screen and draw in it using QuickDraw. (Or Cocoa equivalents, but Carbon is just as fine in most respects.)

Performance is highly dependent on the video board being used, and often a lot worse than a standard graphics board. Which one do you use?
Quote this message in a reply
Posts: 198
Joined: 2005.01
Post: #5
Nowadays most of the Apple video cards come with a video-out of some sort, so that's probably the easiest one to use (and has the exact same characteristics of the normal video).

Also to worry about, with NTSC anyway: the borders will get chopped off pretty thoroughly (on a 640x480 resolution, you often lose about 16 pixels on the top and bottom, and 8 on the left and right), and you can't go over about 70% red in your colors or it'll look nuclear. Similarly going above about 80% white for anything that stays on the screen for an extended period of time can cause phosphor burn (and also look washed out).

There's probably more I'm not remembering but those are the basics Smile

Cryptic Allusion Games / Cryptic Allusion, LLC
Quote this message in a reply
Posts: 260
Joined: 2005.05
Post: #6
If you simply want to put graphics on a TV monitor in your home, you should definitely use the video out of a standard graphics board. However, if you want to do it in a TV studio the studio people will probably not accept that but demand higher quality.

And let me second Dan Potter's advice on limiting the red channel. It is a common problem.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  unexpexced jump of graphics and delay displaying sefiroths 4 7,630 Sep 19, 2011 12:27 AM
Last Post: sefiroths