Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Rendering without RenderWindow  (Read 1793 times)

0 Members and 1 Guest are viewing this topic.

nbd

  • Newbie
  • *
  • Posts: 14
    • View Profile
Rendering without RenderWindow
« on: February 26, 2014, 09:57:05 pm »
Hi,

I have some obscure problem with RenderWindow object (http://en.sfml-dev.org/forums/index.php?topic=14468.0). Is it possible to render SFML graphic objects and vertex arrays without using RenderWindow into usual HWND?

MadMartin

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Rendering without RenderWindow
« Reply #1 on: February 26, 2014, 10:09:25 pm »
No, that's not possible..... unless you create a device context and a rendering context for the HWND and setup the correct pixeldescriptor for Windows and OpenGL and use the wgl-functions and all the other platform-dependent stuff.

Which would make SFML useless/obsolete.

Why do you want to mess around with WinAPI internals while using SFML? What kind of problem are you trying to solve?

nbd

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Rendering without RenderWindow
« Reply #2 on: February 26, 2014, 10:33:35 pm »
I have a "general purpose" test application where I test rendering not only using SFML and wanted to render in this application's window without creating a separate SFML window. But I see that it's probably easier to draw in a separate window. Thanks for the reply.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Rendering without RenderWindow
« Reply #3 on: February 26, 2014, 11:02:20 pm »
You can construct sf::Window and sf::RenderWindow from a window handle as well as extract the window handle from them. Please consult the documentation for detailed information.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything