   Texture Problems in Particle Engine
  Hello,I am currently working on a 2D particle engine and am trying* to implement textured quads for my particles (As before I was using gl_poly loops).I have taken a look at NeHe's texture code and have converted it into a class, so every Particle_Emitter will hold a Particle_Texture which is then used to render the particles (All particles from the same emitter will have the same texture).I have used this code in NeHe's program and it works fine, however when I use it in my own it doesnt work, I just get a white quad :PHere is the Particle_Texture class.//--Header File--//class Particle_Texture{public:Particle_Texture(); //Default Constructor~Particle_Texture(); //Default DestructorGLuint Texture; //Storage for a textureint loadTexture(char* fileName);AUX_RGBImageRec *LoadBMP(char *fileName);//Loads a bmp, req. for loadTexture()};//--CPP File--//#include "StdAfx.h"#include "Particle_Texture.h"Particle_Texture::Particle_Texture(){//DO Nothing}Particle_Texture::~Particle_Texture(){//Do Nothing}AUX_RGBImageRec* Particle_Texture::LoadBMP(char *fileName)// Loads A Bitmap Image{FILE *bmpFileHandle = NULL; //File handle//Check to make sure fileName != ""if( !fileName )return NULL;bmpFileHandle = fopen( fileName, "r" );//Open the .bmp file in read-only //mode (I assume thats what the "r" means) //Check to make sure the file actually existsif( bmpFileHandle){//Close the Handle then Load the BitMapfclose( bmpFileHandle );cout << "Bitmap Loading Succeeded\n";return auxDIBImageLoadA(fileName); //'A' Version...}else{//Return NULL;cout << "Error Loading Bitmap\n";return NULL;}}int Particle_Texture::loadTexture( char* fileName) {AUX_RGBImageRec *textureImage[1]; //Create Storage space for the Texturememset(textureImage,0,sizeof(void *)*1); //Clear the Storage Space//Load the BitMap,if (textureImage[0]=LoadBMP(fileName)){glGenTextures(1, &Texture);// Create The Texture// Typical Texture Generation Using Data From The BitmapglBindTexture(GL_TEXTURE_2D, Texture);glTexImage2D(GL_TEXTURE_2D, 0, 3, textureImage[0]->sizeX, textureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, textureImage[0]->data);glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);}if (textureImage[0])// If Texture Exists{if (textureImage[0]->data)// If Texture Image Exists{free(textureImage[0]->data);// Free The Texture Image Memory}free(textureImage[0]);// Free The Image Structure}return 0;}And here is my render fucntion (Yes, I have enabled 2D textures)://Render all the particles to the screenvoid Particle_Emitter::renderParticles(){float fAlpha; for(std::list<Particle_Particle>::iterator updater = ParticleList.begin(); updater != ParticleList.end(); updater++){glPushMatrix();fAlpha =  1 -(  (float)(*updater).getAge() / (float)(*updater).getLifeTime());glColor4f( (*updater).Color.R , (*updater).Color.G, (*updater).Color.B, fAlpha );glTranslatef( (*updater).Position.X  , (*updater).Position.Y, 0  );//drawPolygon(iSides, (*updater).getSize() );glBindTexture( GL_TEXTURE_2D, Texture.Texture );glBegin(GL_QUADS);//Texture, then VertexglTexCoord2f(0.0f, 0.0f);glVertex2f( -(*updater).getSize(),  -(*updater).getSize() );// Bottom Left Of The Texture and QuadglTexCoord2f((*updater).getSize(), 0.0f);glVertex2f(  (*updater).getSize(),  -(*updater).getSize() );// Bottom Right Of The Texture and QuadglTexCoord2f((*updater).getSize(), (*updater).getSize() );glVertex2f( (*updater).getSize(),   (*updater).getSize() );// Top Left Of The Texture and QuadglTexCoord2f(0.0f, (*updater).getSize());glVertex2f( -(*updater).getSize(),   (*updater).getSize() );// Top Left Of The Texture and QuadglEnd();glPopMatrix();}}And Yes, I have called Texture.loadTexture("Data/particleSpark.bmp") in the constructor.Wft am I doing wrong?Thanks for your help :)   
  First check to make sure that the value of 'Texture.Texture' is not zero.  Then try putting glGetError in a few key places to see if you are causing an error somewhere.  I Quickly skimmed your code but didn't see anything wrong.;  No clue's there, glGetError returns GL_NO_ERROR, and the Texture.Texture's are 1, 2 and 3 respectively.WTF?This is getting weird, I think my computer is against me...Just incase, here is my Glut Initialization code.//--Init GLut--//glutInit( &argc, argv );glutInitDisplayMode( GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH );glutInitWindowSize( 600, 600 );glutInitWindowPosition( 250, 100 );win = glutCreateWindow( "PXE v0.7" ); //Create the WindowglClearColor( 0.0, 0.0, 0.0, 0.0 ); //CLS COlor is Black//--glEnables--//glEnable(GL_TEXTURE_2D);glShadeModel(GL_SMOOTH);// Enable Smooth ShadingglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);// Really Nice Perspective CalculationsAnything else I need to glEnable that I'm not aware of?   ;  Ok, it turned out the Quad I was drawing was too small for the bitmap I was trying to put onto it, or something like that, :PI ended up looking at NeHe's Particle Engine tutorial and converting the use of Quads to Triangle_Strips.   