Jump to content
  • Advertisement
Sign in to follow this  
GiantPaul

OpenGL OpenGL = Trying to start

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

1. I'm looking at this page:
http://www.opengl.org/wiki/Getting_started
Do I need the drivers to run the SDK or to run OpenGL programs?

2. I can't figure out how to download the OpenGL SDK. I went to http://www.opengl.org/sdk/ and I don't see a "click here" to download. Is the SDK supposed to start downloading automatically but does not on my computer?

3. On http://www.opengl.org/wiki/Getting_started "Vendor SDKs" lists 3 SDKs? Do I pick one? Do I need all 3?

4. I went to http://en.wikipedia.org/wiki/List_of_compilers

I'm using C++. Which C++ compiler do you recommend besides Visual++? I have Ubuntu and Windows 7.
Since I'm switching from DirectX to OpenGL I also do not want to use a Microsoft compiler.

Share this post


Link to post
Share on other sites
Advertisement
Yes, you need drivers for your graphics card, the same ones you use for Direct3D. A compiler normally comes with the needed header files and library files for compiling and linking OpenGL stuff, but you probably want to use something like GLEW for resolving newer functions, because the files which come with the compiler are for older OpenGL versions.

I think it's just ok to use msvc on Windows and gcc on Linux. Edited by Sponji

Share this post


Link to post
Share on other sites

1. I'm looking at this page:
http://www.opengl.or...Getting_started
Do I need the drivers to run the SDK or to run OpenGL programs?

In theory, you need no drivers. It is all included in the graphics driver you get from Nvida/AMD. There are several helper libraries, though.

2. I can't figure out how to download the OpenGL SDK. I went to http://www.opengl.org/sdk/ and I don't see a "click here" to download. Is the SDK supposed to start downloading automatically but does not on my computer?
[/quote]
Recommended libraries are one to help you setup an OpenGL context (glfw or freeglut), and one to help you get access to hidden OpenGL functionality (glew or gl3w). The OpenGL API is not fully available for direct linking, you have to either ask the drivers what the addresses are to these functions, or you use a helper library that do it for you. There are other examples of helper libraries that do the same, but I prefer the minimalistic ones that do just and only what I want.

3. On http://www.opengl.or...Getting_started "Vendor SDKs" lists 3 SDKs? Do I pick one? Do I need all 3?

4. I went to http://en.wikipedia....st_of_compilers

I'm using C++. Which C++ compiler do you recommend besides Visual++? I have Ubuntu and Windows 7.
Since I'm switching from DirectX to OpenGL I also do not want to use a Microsoft compiler.
[/quote]
If you want to make your program portable between Linux and Windows, I would recommend the MinGW environment (which uses the gcc compiler). That way, you get an environment that is very similar to the Linux environment.

Just a comment: It is very exciting to learn 3D programming, but it takes a lot of effort.

Share this post


Link to post
Share on other sites
1) Just make sure your GPU drivers are up to date and you should be good to go.

2) You don't need an OpenGL SDK like the DirectX SDK. With the latest video drivers and a compiler that has the OpenGL headers, that should be enough to get started with OpenGL. You will probably want to download a few support libraries like DevIL and GLEW.

3) You don't need any of them. Just make sure your drivers are up to date.

4) You can still use Visual Studio to make cross platform OpenGL code. For the alpha test of my OpenGL tutorial I used Visual Studio. Porting it to Code::Blocks on Windows/Linux and XCode on OSX was relatively simple.

All you need to get started is learn how to create an OpenGL window/context and how to send vertices to render.

Share this post


Link to post
Share on other sites
Thank You for your help.

Let's say that I get the DevIL and GLEW libraries. I get the latest drivers for my Graphics processing unit.

And I write a graphical program.

Will people who don't have the latest drivers on their GPU be able to run my program or do all people have to update their drivers to run my program?

Also when I buy a new computer then doesn't it have the latest drivers installed?
I mean how many people know how to update drivers to use an OpenGL program? I never had to install any drivers to use and write DriectX programs. Latest DirectX comes with Windows. How do people cope with making high end graphics programs and the audience not having the correct GPU and drivers?

Finally does anyone know Code Blocks IDE which is supposed to be cross platform too just like GCC (GNU) Compiler? Edited by GiantPaul

Share this post


Link to post
Share on other sites

Thank You for your help.

Let's say that I get the DevIL and GLEW libraries. I get the latest drivers for my Graphics processing unit.

Jus a short comment about Devil: It is of the type "bigger" library that supports many image types. You will also need to install other support libraries. Instead of having an application that depends on many image formats, go for something simple. For example, the bmp format is usually good enough. As you make the program, you can decide. Loading bmp files is simple, you can find source code on the Internet that fits a page. No library needed.

And I write a graphical program.

Will people who don't have the latest drivers on their GPU be able to run my program or do all people have to update their drivers to run my program?
[/quote]
If you address a wide audience, you can take for granted that not everyone will have the latest drivers. From an OpenGL point of view, there are three major levels. version 2.1, 3.3 and 4.3. I would recommend that you go for version 3.x, which will give you access to most modern functionality and performance. Going to version 4 is not needed until they day comes and you find you really need access to something specific. And make sure you do not go for the deprecated legacy API, used in many tutorials on the Internet! If you see the command glBegin(), then you found something too old.
Also when I buy a new computer then doesn't it have the latest drivers installed?
I mean how many people know how to update drivers to use an OpenGL program? I never had to install any drivers to use and write DriectX programs. Latest DirectX comes with Windows. How do people cope with making high end graphics programs and the audience not having the correct GPU and drivers?
[/quote]
On that account, OpenGL is easier than DirectX. There are no separate OpenGL drivers. Notice that the drivers provided by the graphics manufacturers are updated at the same time. If you get an update from Nivida or AMD, you also get an update to the OpenGL drivers.

There are simple ways to ask the driver what OpenGL version is supported, and warn the user that an update is needed. This is no different compared to DirectX. Then, there are updated driver releases targeted for the same OpenGL version. I am not sure if there is any general rule on how to make sure these are up-to-date. If a problem is found during development because of faulty drivers, it is sometimes possible to detect this and warn the user that the probable reason is because drivers aren't updated. In this case, I know nothing better than actually testing the SW on many targets.

Share this post


Link to post
Share on other sites
Thanks!
I like that we can ask the drivers if they are compatible with the program and tell the user to update their drivers.

I was reading about glxext.h and it says it's for GLX.
Is GLX apple operating system? I googled GLX and it says it's for "X Windows". But I have no idea what X Windows is.

Share this post


Link to post
Share on other sites

Will people who don't have the latest drivers on their GPU be able to run my program or do all people have to update their drivers to run my program?

Also when I buy a new computer then doesn't it have the latest drivers installed?
I mean how many people know how to update drivers to use an OpenGL program? I never had to install any drivers to use and write DriectX programs. Latest DirectX comes with Windows. How do people cope with making high end graphics programs and the audience not having the correct GPU and drivers?


If a user has a high end GPU they will have OpenGL drivers aswell (unless the system builder is an idiot).

They need OpenGL drivers that supports the OpenGL version you are using. (There has been a few cases where GPUs have gotten support for a new OpenGL version in a driver update so if you use a newer version there might be some users who can't run it due to outdated drivers even though the hardware supports all features you're using) If you want to support a wide range of hardware you'll probably end up using OpenGL 2.1 or older anyway making it pretty much a non issue (You can still access and use newer features through extensions with an old OpenGL version).


Thanks!
I like that we can ask the drivers if they are compatible with the program and tell the user to update their drivers.
I was reading about glxext.h and it says it's for GLX.
Is GLX apple operating system? I googled GLX and it says it's for "X Windows". But I have no idea what X Windows is.


X11 is the graphical server that is most commonly used on Linux and Unix systems, GLX is the OpenGL extension prefix for X11 , (Windows uses WGL and Apple AGL) (GLX, WGL and AGL extensions are primarily used for OS specific features (things like setting up the render context is done by platform specific functions) (GLEW should sort this out for you) Edited by SimonForsman

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!