GLAUX

Started by
14 comments, last by Deranged 16 years, 4 months ago
I tried wat u said and it shows lighttpd server detected and shows some errors like 301 server returned code nad server temporarily down?

It also tried including -glaux in my linkers but doesnt work...
Advertisement
This is my compile log...I included the GLaux dll in my Windows/System32 folder and also linked it as shown as -glaux but still is not working..I am using an image water.bmp which i have saved in my dev cpp folder.Is der anytin wrong with dat?Bugging the whole day with this...:(

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make clean
rm -f main.o Final.exe

g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"

g++.exe main.o -o "Final.exe" -L"C:/Dev-Cpp/lib" -lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32 -glaux

main.o(.text+0x1ff):main.cpp: undefined reference to `auxDIBImageLoadA@4'

make.exe: *** [Final.exe] Error 1

Execution terminated
Ok you either do

1.the thing with devpaks.org in DevC++.
2.go to devPaks.org and download it yourself, you'll have to go into DevC++ package manager and manually install it.

3. Find all the files (glaux.h, glaux.lib/glaux.a, glaux.dll) and put them in the location of the exe.

I'm not sure why ur having such a hard time here.

The error your getting is that your not properly linking or including this function. Heres an overview of what happens. The .h says that there is a function auxDIBImageLoad() so your main.cpp accepts that this is a function. When you include the glaux.lib, it IS the function. When you get undefined referece it means it doesnt have a reference to that actual function ("glaux.lib").


in glaux.h
--------
auxDIBImageLoad( , ); //declaration


in glaux.lib
-------------
auxDIBImageLoad( , )
{
//definition
}

in your code
------------
auxDIBImageLoad(---,----);

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Hi thanks for all the support I made it out with a GLaux replacement code.
I have got another query...Is it possible to add light source to a 2d image ??so that it appears 3d..

Is it ok only if I enable the Lighting of GL...
GL doesn't care if you are doing 2D or 3D. You can do whatever you want.
Just keep in mind that GL calculates lighting per vertex so if your object is not finally tesselated, the lighting will appear incorrect.
For example, if you have a large triangle and the light is at the center of the triangle, just a little above the surface.
The triangle will appear dark.
If you want, you can study shaders now and learn how to do per pixel lighting.
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);
Ok. Honestly, forget about the GL Auxiliary library (GLAux), It was created by SGI YEARS ago for nothing more than simple demo applications. It is poorly designed and has many known memory leaks. Instead, use NeHe's GLAux replacement code, or a real image loading library like Phantom's Game Texture Loader.

This topic is closed to new replies.

Advertisement