• Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About NextS

  • Rank
  1. problem

    Hi, I don't know where precisely the problem is, but I think the first thing you should try is use texture coordinates in the range from 0.0 to 1.0. glBegin(GL_QUADS); // Front Face glTexCoord2f(0.0f, 0.0f); glVertex3f(-100.0f, -1.5f, 1.5f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 100.0f, -1.5f, 1.5f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 100.0f, 1.5f, 1.5f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-100.0f, 1.5f, 1.5f); glEnd(); This should display the image the way it is loaded into memory (scaled to the vertex coordinates given) With 30 in the x-direction your texture may be repeaded 30 times in the range from -100 to 100 depending on the settings. ( is this perhaps wanted? ) The next thing... it looks like your texture is painted with wrong vertex coordinates. What projection matrix did you set up ? Are all objects rendered with the same matrix stack ? FYI: When you use glTexImage2D to create the texture, there is a limitation in texture size: The tex coords have to be a potency of 2. But when using gluBuild2DMipMaps, the function automatically scales the texture to the next Level. So this should not be the problem I think.
  2. Oh, sorry. it should only be: g++.exe hello.o -o "GlutTest.exe" -L"C:/Dev-Cpp/lib" -lopengl32 -lglut I don't remember if the .lib is always added automatically... or if you can also write it behind the -l :-) try it. Cheers, NextS
  3. I think the only thing you are missing is linking to the glut.lib Library. According to your g++ call: g++.exe hello.o -o "GlutTest.exe" -L"C:/Dev-Cpp/lib" -lopengl32 there is -lglut.lib missing in the end. So the call should look like this: g++.exe hello.o -o "GlutTest.exe" -L"C:/Dev-Cpp/lib" -lopengl32 -lglut.lib When executing the example you also have to take care of the system finding the dll. You should place the dll in the system folder or copy it to the directory the generated exe file is run or set the PATH variable to point to the dll. Greets, NextS