Jump to content
  • Advertisement
Sign in to follow this  
mrhodes

Use a Window Lib or not?

This topic is 2603 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone,

I am getting started on a medium size project and I have been using GLFW for now during my initial stages.... But I was wondering if I am better off creating a WinMain and WndPrc function and make a full blown windows app.

Right now I have a console window, which is ok for debugging, but for release I probably wouldn't want it there.

I Am using OpenGL, probably 3.3 as a minimum and OpenAL for audio. I plan to use Direct Input via the WndProc message loop.
Are these good plans ? or are there better ways to do this. It wouldn't take me long to get a base code setup and done, I just don't want to run into problems later on where choices I make now hurt me.

Any advice ?


Thanks

Share this post


Link to post
Share on other sites
Advertisement
Since your using OpenGL another option would be to use SDL for windows/input etc. SDL can handle your input, which would be significantly better than using DirectX's Direct Input with OpenGL. SDL is also cross-platform and goes well with OpenGL.

Share this post


Link to post
Share on other sites

Since your using OpenGL another option would be to use SDL for windows/input etc. SDL can handle your input, which would be significantly better than using DirectX's Direct Input with OpenGL. SDL is also cross-platform and goes well with OpenGL.


Thanks for the reply....
I guess I should have been more clear, by Direct Input I didn't mean Direct X... I meant the Raw Input API. I am just wondering if using something like gflw or SDL or even SFML is just adding a another layer to my code.

I plan for this to be a retail app at some point, and want to make sure I am starting off on the right foot.

As for doing things manually, it's ok... I don't mind doing that. To this point I was using glfw, and I noticed a post here by someone saying that there was a bit of delay before their window was ready, I have noticed the same thing with my code as well, so I thought now would be the time to get some input on game libraries, and how others are making use of them in production projects.

Thanks,

Michael

PS: Is OpenAL still really good for audio? I notice it hasn't been updated in a while.... It's what I planned on using, is there something better ?
PPS: I just did some research, I see openAL has gone [font=sans-serif][size=2]proprietary and there is a software opensource version now. I am looking into FMOD, and it looks very promising. I think I may give that a try.[/font]

Share this post


Link to post
Share on other sites
Well, It really isn't adding another layer. You are just replacing the Windows API with a library that is capable of doing similar things. I don't know a lot about GFLW, but SDL is well known and widely used with OpenGL. There is also a lot of support for it, and you will not have issues finding resources on setting it up. Instead of using Window's raw input you can use SDL to handle all of your input. They work well together, and in my opinion is your best option. OpenAL is still used in many games and works well. One of the games that is on the top of my head that uses it is Minecraft. Another sound option would be to use FMOD, both are nice libraries. Find the one that you like the most and go with it. Just going to the FMOD website and looking at the list of games that use it is all the proof that you should need that it's worth using. However, for a commercial product you have to buy a license so it might not be your best bet.

Share this post


Link to post
Share on other sites
I use GLFW and it is great for games. Code is minimalistic, nice and clean. Due to the minimalism, it has some limitations, but for 3D games, it works like a charm. And it works on Linux too!

P.S.: You do not need DirectInput, there is input processing in probably all libraries suited to this purpose (GLUT, GLFW, SDL etc.).

Share this post


Link to post
Share on other sites
I switched from win32 API to GLFW because of the crossplatform benefits. SDL is nice but I don't know if it supports creating OpenGL3+ contexts? In any case I'd go for either GLFW or SDL.

Share this post


Link to post
Share on other sites
I think that the real answer to this question is going to revolve around more practical/pragmatic concerns than technical ones. Any of the suggestions given are Just Fine, including your original idea (your WinMain and WndProc will be an incredibly small part of your finished product).

The questions you should be asking yourself, and that will inform your decision, are ones like: is being cross-platform going to be important for me? If I use a GPL library, will the restrictions of the GPL affect my release plans? How is this decision going to influence what my version 2 looks like? What kind of dependencies am I creating for my users and support concerns am I creating for myself? Answer those, and the answer to your original question should start becoming more obvious.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!