Jump to content
  • Advertisement
Sign in to follow this  
Jedimace

OpenGL OpenGL Input

This topic is 3704 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

I noticed when I was about to learn SDL ONLY for input, that it did the pretty much the same thing for input as they did in Video Turorials Rock with OpenGL and GLUT. So will I lose speed if I use OpenGL for input? When I was reading a book I had on DirectX 10, it said Windows Programming ran too slow to have input for our game, which is why we use DirectInput 8. I would rather use OpenGL, with OpenAL for sound, because I can't get SDL to work with VC++ 2008 Express Edition. I haven't tried OpenAL yet, but it installed and worked right. If I do have to use SDL, can I have a tutorial to get SDL to work with with VC++ 2008? [Edited by - Jedimace on May 27, 2008 9:05:39 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
So will I lose speed if I use OpenGL for input?
No answer. OpenGL is purely a graphics API, so you cannot use it for input.
Quote:
I would rather use OpenGL, with OpenAL for sound, because I can't get SDL to work with VC++ 2008 Express Edition.
Then, your focus should be on getting SDL to work.
Quote:
If I do have to use SDL, can I have a tutorial to get SDL to work with with VC++ 2008?
Because SDL itself has (what I believe) sufficiently clear instructions on compiling and using it with VC++, it would help if you told us where you were facing difficulty.

Share this post


Link to post
Share on other sites
If you don't want to spend the time to get SDL working with Visual Studio Express, then why not switch to something like GLUT? It works pretty much the same and it has decent windowing support.

NOTE: SDL and GLUT both use the Win32 calls for input. Neither of these libraries use DirectInput 8. Also, Win32 input is not slow, rather is quite fast.

Share this post


Link to post
Share on other sites
DirectInput is pretty much (if not yet) deprecated, even Microsoft recommends *not* using DirectInput for Keyboard and Mouse input, suggesting instead that your game simply monitor WM_KEYDOWN/WM_KEYUP messages. In short, your DirectX 10 book is incorrect, according to Microsoft.

So it looks to me like you want OpenGL, OpenAL and a little Windows message processing code to capture input.

certainly though, SDL can be made to work with VC++ 2008 with a little effort.

Share this post


Link to post
Share on other sites
GLUT is what I meant. RealMarkP told me what I wanted. Thanks on the DX 10 information, it might just have been trying to make me use DirectInput 8.

"No answer. OpenGL is purely a graphics API, so you cannot use it for input."
I meant GLUT. Sorry

If that is true about GLUT, first, is it still multi-platform, and second, if that's a yes, I should have everything installed now. Thanks everyone.

Share this post


Link to post
Share on other sites
There is not much needed to get SDL working with VC Express. I use SDL with VC 2005 Express all the time. All you need to do is set the global include path for the .lib files.

I *belive* that is under tools/options/projects and solutions/VC directories. From there choose "Library Files" from the drop-down and add the path to your SDL libs there. You may need to do the same for your include header files under "header files" or whatever it's called.

For each project you need to include the relevant SDL libs in your project under Project/Properties/Configuration Properties/Linker/Input. In the field labeled "Additional Dependencies" add the name of the SDL libraries (separated by a space) you need there and that should be it.

One final note and take this as a constructive criticism other than a flame:

If something *should* work and if others have gotten to work and you can't, don't just give up. Figure out what's wrong. You may learn something in the process.

I personally use OpenGL for graphics and SDL for everything else (using SDL for audio isn't that hard for my projects)

Share this post


Link to post
Share on other sites
Glut is not really well suited for large scale games. If you want a cross-platform way to initialize a window and catch input, go for either SDL or GLFW.

SDL does not have 3D sound, no. But there is nothing stopping you from using SDL for windowing and input, OpenGL for graphics and OpenAL for sound.

Share this post


Link to post
Share on other sites
And that's what I was going to do. If I learn SDL, I have to learn other parts of SDL too. That's another thing I want to avoid. And I don't want to have to set the project settings for every project, either. I will check out GLFW. Also, why is GLUT not for big projects? Thanks for the responses.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!