## Recommended Posts

Hi everyone! I have just started learning OpenGL, and am trying to make a simple solar system work. Earlier, I used ppm files for the textures of the planets, but I changed to BMP, using some of the functions i found in an OpenGL tutorial here on gamedev.net. it can be compiled, but when when trying to execute the program, I just get those two error messages all the time: "--------------------Configuration: solsystem - Win32 Debug-------------------- Linking... solsystem.obj : error LNK2001: unresolved external symbol _auxDIBImageLoadA@4 Debug/solsystem.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. solsystem.exe - 2 error(s), 0 warning(s)" and I have no idea what to do. :/ Therefore, I just wanted to ask if any of you people in here had any suggestions? I think I might be doing something wrong at the beginning of main, at the lines "AUX_RGBImageRec *TextureImage[1]; memset(TextureImage,0,sizeof(void *)*1); TextureImage[0] = LoadBMP("Data/test4.bmp");", but I am not sure. Here is the code of what I´ve done so far (my comments are in swedish, but I hope the code is understandable anyway, since it´s not very complicated): (have removed the code since I changed it completely. :) ). [Edited by - Vindicator on February 8, 2005 8:27:45 AM]

##### Share on other sites
GLaux is depreciated, and buggy as hell, so I wouldn't use it if I were you. Try DevIL for image loading if you want to use a library, or alternatively write your own BMP loader.

##### Share on other sites
... but, since glaux is still part of the Windows SDK, you may want to use it. If you need to correct this error, simply link with the glaux.lib library. If you are using VC++ (looks like) it is simple as hell: add the following line under the #include:

#pragma comment(lib, "glaux.lib")

It should work.

HTH,

##### Share on other sites
I already changed to loading the textures from TGA files instead (which was a lot easier), since I didn´t think there was any way to solve the problem. But thanks for helping me anyway. :)
I think it should be easier to load textures in OpenGL than this... have had a lot of problems with it (both when testing with ppm files and bmp) before it finally worked.

##### Share on other sites
Quote:
 Original post by Vindicator...I think it should be easier to load textures in OpenGL than this...

Well, the actual creation of textures is very simple, you're basically just sending an array to the video card. The "hard" part is the loading of the image, which really has nothing to do with the 3D API. And once you understand the file format, it's very simple to write an image loader anyway if you understand file I/O.

But congrats on the TGA loader, I know your first file loader can be somewhat confusing. Plus, TGAs are more useful than BMPs because they support an alpha channel.

EDIT: Forgot this wasn't the OpenGL forum for a second.

##### Share on other sites
Quote:
 Original post by Vindicatorsince I didn´t think there was any way to solve the problem.

##### Share on other sites
Yup, I did. =) I meant that I thought there wasn´t any way to solve it, before you posted above... not after that.

I had saved an old copy of the code which I added that line to, so then the linking worked. It didn´t crash until I tried running the program that time, instead of when I built it. =) And with the other version where I use TGA pictures, I don´t get any errors or crashes at all. =D

## Create an account

Register a new account

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627653
• Total Posts
2978433
• ### Similar Content

• Both functions are available since 3.0, and I'm currently using glMapBuffer(), which works fine.
But, I was wondering if anyone has experienced advantage in using glMapBufferRange(), which allows to specify the range of the mapped buffer. Could this be only a safety measure or does it improve performance?
Note: I'm not asking about glBufferSubData()/glBufferData. Those two are irrelevant in this case.
• By xhcao
Before using void glBindImageTexture(    GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format), does need to make sure that texture is completeness.
• By cebugdev
hi guys,
are there any books, link online or any other resources that discusses on how to build special effects such as magic, lightning, etc. in OpenGL? i mean, yeah most of them are using particles but im looking for resources specifically on how to manipulate the particles to look like an effect that can be use for games,. i did fire particle before, and I want to learn how to do the other 'magic' as well.
Like are there one book or link(cant find in google) that atleast featured how to make different particle effects in OpenGL (or DirectX)? If there is no one stop shop for it, maybe ill just look for some tips on how to make a particle engine that is flexible enough to enable me to design different effects/magic
let me know if you guys have recommendations.
• By dud3
How do we rotate the camera around x axis 360 degrees, without having the strange effect as in my video below?
Mine behaves exactly the same way spherical coordinates would, I'm using euler angles.
Tried googling, but couldn't find a proper answer, guessing I don't know what exactly to google for, googled 'rotate 360 around x axis', got no proper answers.

References:
Code: https://pastebin.com/Hcshj3FQ
The video shows the difference between blender and my rotation:

• By Defend
I've had a Google around for this but haven't yet found some solid advice. There is a lot of "it depends", but I'm not sure on what.
My question is what's a good rule of thumb to follow when it comes to creating/using VBOs & VAOs? As in, when should I use multiple or when should I not? My understanding so far is that if I need a new VBO, then I need a new VAO. So when it comes to rendering multiple objects I can either:
* make lots of VAO/VBO pairs and flip through them to render different objects, or
* make one big VBO and jump around its memory to render different objects.
I also understand that if I need to render objects with different vertex attributes, then a new VAO is necessary in this case.
If that "it depends" really is quite variable, what's best for a beginner with OpenGL, assuming that better approaches can be learnt later with better understanding?

• 10
• 12
• 22
• 13
• 33