Jump to content

  • Log In with Google      Sign In   
  • Create Account


OpenGL = Trying to start


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 GiantPaul   Members   -  Reputation: 104

Like
0Likes
Like

Posted 24 August 2012 - 02:42 AM

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.

Sponsor:

#2 Sponji   Members   -  Reputation: 1137

Like
0Likes
Like

Posted 24 August 2012 - 03:09 AM

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, 24 August 2012 - 03:11 AM.

Derp

#3 larspensjo   Members   -  Reputation: 1526

Like
2Likes
Like

Posted 24 August 2012 - 03:10 AM

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?

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.

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.
Current project: Ephenation.
Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

#4 Lazy Foo   Members   -  Reputation: 1103

Like
0Likes
Like

Posted 24 August 2012 - 03:19 AM

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.
Learn to make games with my SDL Tutorials.
Transition from OpenGL 2 to modern OpenGL using my OpenGL Tutorial.

#5 GiantPaul   Members   -  Reputation: 104

Like
0Likes
Like

Posted 24 August 2012 - 03:47 AM

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, 24 August 2012 - 04:15 AM.


#6 larspensjo   Members   -  Reputation: 1526

Like
1Likes
Like

Posted 24 August 2012 - 04:22 AM

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?

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?

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.
Current project: Ephenation.
Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

#7 GiantPaul   Members   -  Reputation: 104

Like
0Likes
Like

Posted 24 August 2012 - 04:47 AM

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.

#8 SimonForsman   Crossbones+   -  Reputation: 5765

Like
2Likes
Like

Posted 24 August 2012 - 05:17 AM

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, 24 August 2012 - 05:25 AM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#9 V-man   Members   -  Reputation: 797

Like
1Likes
Like

Posted 24 August 2012 - 07:19 AM

SDK?
http://www.opengl.org/wiki/FAQ#Is_there_an_OpenGL_SDK.3F
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS