Archived

This topic is now archived and is closed to further replies.

martinboehme

Vector Graphics

Recommended Posts

Ok... has anyone figured a method of using vector graphics like GDI+ without having to call the SET_OFF_SCREEN macro?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Not me... though I'd certainly be interested! From comments that Jean-Luc has made in the past, it seems that he may have found something... but I guess he's not telling.There are some references to DirectX in the header files, but as usual, they're not documented...I guess what you're after is performance? Or is there another reason you want to avoid SET_OFF_SCREEN?If you want to bypass the HDC, then that, at least, is possible... but I guess you're aware of this. You can write directly to the image (in "1555" format), as discussed in a thread a while ago... but you still have to do a SET_OFF_SCREEN to tell FS you've changed the image. If you all you need the HDC for is to blit an image to the screen that you've rendered yourself, then this can give a nice performance improvement. Don't know if this is also true for GDI+, though (you'd have to let it draw to an offscreen HDC).This is a topic I'm quite interested in myself because I'm currently working on making vasFMC (vas-project.org) run as a gauge. Since vasFMC uses OpenGL for drawing, my original approach was to draw the gauge to a backbuffer on the graphics card, use glReadPixels to read that back into system memory, and then blit that to the gauge. However, performance on older graphics cards wasn't acceptable (the bottleneck is reading the gauge contents back from the graphics card).I've now implemented an OpenGL emulation layer that uses a software renderer as the back end. This works much better, and I guess all of the payware addons out there use some form of software rendering, too. It's a shame, though, that FS won't allow use to use the capabilities of the graphics cards for vector graphics...

Share this post


Link to post
Share on other sites