Old computer opengl is not accelerated at all!

Started by
41 comments, last by aewarnick 19 years, 1 month ago
Quote:Original post by Ainokea
Quote:Original post by aewarnick
Thanks for your time but I don't think the question was answered yet:
Is normal opengl code compatable with linux?

Yes. Just install cards drivers for Linux and it should work.

EDIT: In fact it's easier then programming with OpenGL for Windows (Provided you arn't using a extension wrapper such as Glee (though anyone sensible uses an extension wrapper)).

EDIT 2: If OpenGL didn't work for the Windows machine your talking about then OpenGL won't work with Linux on that same machine.


Actually you need to make changes. The "wgl" are Windows only. If you use SDL or GLUT, then they will make the appropriate calls for you.

I think that on Linux too, you have to load extensions or use a 3rd party lib.
GLEE and GLEW can load function pointers for you, so it's easy no matter what OS you use. Core GL code is always portable.
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);
Advertisement
Quote:Original post by aewarnick
Thanks for your time but I don't think the question was answered yet:
Is normal opengl code compatable with linux?


Yes, but it may be rendered using mesa, which is a software implementation of opengl, unless you have hardware specific opengl drivers installed.

Quote:Original post by aewarnick
Glee?? Don't know anything about it. How does it compare to SDL?


GLee is a library for using opengl extensions. Such things are needed on windows because microsoft haven't updated their gl.h for years. While linux generally has up to date gl headers, most people still use an extension handling lib so that their code will compile on multiple platforms. I believe SDL has some opengl extension handling functionality, but as a whole it isn't directly comparable with something like GLee or GLEW - they just handle opengl extensions, SDL is a general multimedia library.
[size="1"]
Thanks, that clears things up.
*C++*->

This topic is closed to new replies.

Advertisement