Jump to content
  • Advertisement
Sign in to follow this  
Velvet Leopard

OpenGL OpenGL and C++, C++ Vs. VC++

This topic is 4094 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 there. I mentioned in another thread that I knew some C++ and planned to use that or Java. I looked at the LWJGL site and didn't seem too impressed with the functionality, although the demos did show me that it works. I still would like to try C++. Do I HAVE to use Visual C++? I have found that most tutorials demand I use Visual C++ 6.0 from Microsoft. I would like to not have to buy that particular program if I can avoid it. I have a console based C++ book and compiler sets, Sam's Teach Yourself C++ in 21 Days 4th Edition. Are there by any chance any free Visual C++ compiler sets out there? Thanks for your time.

Share this post


Link to post
Share on other sites
Advertisement
You can use Visual C++ Express Edition and then you'll need to download the Platform SDK from microsoft's website.

Or you can use Bloodshed's DevC++ Compiler, which includes auto-generated OpenGL code when creating a new project.

Although, I would have to somewhat disagree with you on OpenGL functionality in Java, especially if you're a beginner. The Java bindings won't be missing anything you'll be wanting in the near future. If you're just looking to mess around and learn OpenGL, go with either language. If you're looking to make a cross-platform demo/app/tool, then go with Java.

Share this post


Link to post
Share on other sites
Hmmmm. You make a good point, a noob like me shouldn't throw LWJGL to the ground so quickly.

I will try both out and see what best suits me. You mentioned cross-platform design. Does that mean that C++ isn't good for cross-platform work? What if I wished to make games/apps for both Windows AND Linux distros?

You mentioned Bloodshed's DevC++. Sam's has that compiler with it, but I don't think it shows how to utilize OpenGL. How would I go about using the Blodshed version with OpenGL? Maybe a site I could go to?

Share this post


Link to post
Share on other sites
Bloodshed is an IDE, like Visual Studio. The compiler it uses is MingW (gcc's windows port).

Using OpenGL with MingW is as easy as including <gl.h>. I suggest you take a look at GLFW if you go the C/C++ route, it will help you get up and running.

As for cross-platform development, as long as you don't use platform-specific functions, or do something dumb as casting a pointer to an int32, your program will compile and run on most platforms. Frameworks like GLFW help with this, too.

EDIT: Bloodshed's Dev-C++ is very outdated and buggy. Look at Code::Blocks for a modern IDE.

EDIT2: If you are just starting out, or you are not strong in C, it will be easier to learn OpenGL through Java or C#.

Share this post


Link to post
Share on other sites
Quote:
Original post by Velvet Leopard
I looked at the LWJGL site and didn't seem too impressed with the functionality, although the demos did show me that it works.

Uh, it gives you functionality to create a window, then call OpenGL functions. What functionality were you expecting? You're not going to get anything extra by using OpenGL through C++.

If you want something higher level (ie. dealing with models, lights and effects rather than raw OpenGL calls) then you would be after a graphics engine, for Java the populare ones are jme and Xith.

Share this post


Link to post
Share on other sites
Yes, I am a noob when it comes to OpenGL. I am trying to learn. My main focus is to possibly build at least a simple MMORPG and I also wanted to see if I could use OpenGL as the basis for GUI creation in an OS so I can create my own 3D Operating System GUI instead of a flat desktop style.

Share this post


Link to post
Share on other sites
Quote:

My main focus is to possibly build at least a simple MMORPG

If you are new to OpenGL, this is not the best way to learn it. Espically an MMORPG of any kind.

Quote:

I also wanted to see if I could use OpenGL as the basis for GUI creation in an OS so I can create my own 3D Operating System GUI instead of a flat desktop style.

Nope.

You can use the same interface that OpenGL uses for your library, but you will need to re implement OpenGL, or use your own 2d or 3d software renderer's.

Share this post


Link to post
Share on other sites
Quote:
Original post by Velvet LeopardI still would like to try C++. Do I HAVE to use Visual C++? I have found that most tutorials demand I use Visual C++ 6.0 from Microsoft.
No, you don't have to use Visual C++. The "GNU Compiler Collection" (gcc) is free for anyone, and it's just as good as (if not better than) MSVC. If you are on Windows, a gcc port called "MinGW" is available, as others already mentioned.

I think it's very sad that most tutorials are so "Visual Studio" centric. The way I see it: For most things, an IDE of any sort is more or less unnecessary. I really don't see the need for some over-bloated piece of software to stand between the source code and the compiler. Just use the compiler to compile the source code. If you need to have a specific compiler configuration or link to several libraries, a makefile will usually do just fine.

I also agree with Crypter. Starting out with something as deviously complex as an MMORPG (even a "simple" one) is not a very good idea. Set out to make a pong/break-out clone first. You'll be surprised at how much work it takes.

Share this post


Link to post
Share on other sites
Ok, so a Pong or Breakout clone. I guess I can start out with that. I do like both of those games. Does this site have tutorials on the "basics" of these games or should I just wiki search them?

Oh yeah. As for the OS stuffs I want to do. I would love to find someone else interested in a fully 3 Dimensionally built Operating System. I do wish to do this one day.

Share this post


Link to post
Share on other sites
I didn't see it mentioned but ANYTHING that says its for Visual C++ 6.0 or recommends/needs it is something to be avoided. VC6 was released before C++ was completely standardized and therefore actually fails to compile valid C++ code. The compiler and IDE had issues too that have been (as much as anything can be from MS) fixed in the latest version, which is free.

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!