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

Author Topic: SFML's client/server model; fine spheres and cubes  (Read 1699 times)

0 Members and 1 Guest are viewing this topic.

Shaping

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
SFML's client/server model; fine spheres and cubes
« on: May 05, 2012, 05:11:03 am »
Hi everyone.

I'm reading through the documentation and tutorials on SFML.  It looks promising.

Before I go much further into the material, would someone please answer the following two questions:

1) Can the C version of SFML be used in a truly modular client/server way?  Specifically, can SFML render on a window that I create in my development environ, by passing the window's handle to an SFML function?  I'm using the VisualWorks Smalltalk (VW) environment as my dev environ.  It has a mature C-based FFI.  I want to interface to the SFML DLLs.  I can do that easily by having VW parse the header files for the DLLs, to create an interface class.  However, I need to be sure that DLLs are just collections of functions and that there are no wndprocs, for example, taking mouse and keyboard events from my dev environ windows (this was a problem with Oddity Engine).  I need SFML to be a real server of graphical services, so that my client can build the needed 3D engine and the simulation on that engine.  The client has the message loop.  The client creates and opens the window(s).  The client tells SFML how and when to render to those windows by passing the windows' handles to appropriate functions.  This is my current concept.  Please feel free to amend it.

2) I'm developing a simulation and need to render very fine spheres, modeled as 60 slices by 60 stacks--about 7000 rectangles (14000 triangles for the GPU) or as a finely subdivided icosahedron (haven't yet determined the number of recursive subdivisions required to get a smooth effect).  Has anyone already render very finely structured spheres such these?  If so, I would appreciate some links or code snippets.  I'm also rendering very smoother cubes.  There can be no jaggies in this simulation.  I'll be using at least 32x AA on a 24" DreamColor monitor running at 19200x1200.  I may go for 64x AA, but I think only the Quadro does this, and I haven't decided to pull the trigger on one yet ($2000, half-price, on eBay).  (On a related note, if anyone has advice-on/experience-with high-end graphics cards, like the FirePro 9800 and Quadro 6000, please let me know.  I'm having some trouble find AA specs for the FirePro 9800, and am interested in the card for its multi-monitor abilities.)  The simulation needs to create smooth movements at normal frame rates, around 30 FPS.  I don't need the crazy-fast FPS of a typical game.  Geometry edges must be flawlessly smooth.  Geometry movements must be smooth (not fast).  I also need to display some simple flat text, with a fade-to-black effect.
« Last Edit: May 05, 2012, 09:39:30 pm by Shaping »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML's client/server model; fine spheres and cubes
« Reply #1 on: May 05, 2012, 09:49:27 am »
Hi

1) SFML has its own event callback, but it shouldn't be a problem. Your concept should work with SFML.

2) I don't know exactly what this question has to do with SFML. You define your own geometry, you enable AA if you want; SFML just does what you tell it to do.
Laurent Gomila - SFML developer

Shaping

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: SFML's client/server model; fine spheres and cubes
« Reply #2 on: May 05, 2012, 09:33:31 pm »
1) Does my client register a callback method with a DLL function, to cause the OS to send mouse and keyboard events to that callback method?  The C++ tutorial showing "Hello SFML" does not use a client window.  It has SFML make an instance of an sf::RenderWindow.  I suppose that will work, but I was hoping to use my own dev environ window, and pass its handle.  Is this possble?

2) Yes, I know I can define my own geometry.  The previous engine (Dx9- and Dx11-based) I used had a function for producing the stack-and-slice sphere model.  Does SFML have one?  Also, we get more symmetry per polygon rendered by using icosahedral subdivision.  I've an algorithm for doing this.  I'm currently translating it from C++ to Smalltalk.  If someone has already done this in SFML, I would like to know.  That would save me some time. 

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML's client/server model; fine spheres and cubes
« Reply #3 on: May 05, 2012, 10:30:30 pm »
1) You can either create a SFML window from scratch, or from the handle of an already existing window.

2) If you're talking about 3D stuff, SFML has nothing at all :)
Laurent Gomila - SFML developer