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

Author Topic: Replacement for GLFW  (Read 3022 times)

0 Members and 1 Guest are viewing this topic.

Scienthsine

  • Newbie
  • *
  • Posts: 1
    • View Profile
Replacement for GLFW
« on: August 07, 2011, 12:26:18 am »
Ok, so I'm on the verge of writing a 2d engine for my games. Looking around last night I stumbled onto SFML. It looks nice, especially since it seems very much alive.

My problem is that I don't fancy the graphics portion of it. I, like alot of others nowdays, would like to be pure opengl 3+ with a great deal of shader support.

Until now, I've been using GLFW, which is great, but very non-oop. When I started this project, I ran into making a 'manager' type class for handling batching of draw calls of different types, along with the misc gl things required here and there. Because GLFW is only made to handle 1 screen, I'm required to implement this class as a singleton. I don't like singletons, and this is why I was crawling the web for alternatives last night. Also, GLFW is moving very slowly.

SO... how easy is it to just use the windowing, input and sound portions of sfml, cutting out the graphics and network pieces? Would it be pretty simple for me to add a gl3 forwards context option? I see that it has glew as a dependency, is glew automatically initialized and all of it's functions provided?

If I do switch btw, I'd be happy to contribute to helping get a forward compat graphics module going. I like the interface of the current one, just want it to be gl3+, have easy custom shader support, etc... For example: I like how the primitives have line thickness, and color separate from the fill color... but I would like texture support for line and fill, and also support for 'glowy' lines. I plan to even have linear and exponential fades for the glow lines, since exponential makes for some cool effects shaders in latter stages.

Anyway, just babbling now. I appreciate any responses.
Thanks,
James Newman

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Replacement for GLFW
« Reply #1 on: August 07, 2011, 03:29:42 am »
As for if you can have the window without the need for networks and graphics, yes. You would only need to link with the window library and the system library (the window library depends on the system one AFAIK)

As for oGL3+ you can specify what context version you want by using the ContextSettings class, however when using 3+ it still loads up the compatibility profile