Jump to content

Recommended Posts

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


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...