• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Tim Stoddard

Members
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

99 Neutral

About Tim Stoddard

  • Rank
    Newbie
  1. [left]Also changing "#if define(HELLO)" to "#ifdef HELLO" might help.[/left]
  2. Problem has been resolved! Now all those floats are initialised to NULL and I modified the if statement to prevent it passing on the first go. Thanks to both of you! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  3. [quote name='bullfrog' timestamp='1336356045' post='4937932'] Without seeing the code there is only so much other people can do to help you. Such as pointing out common causes to this issue. - not defining default values for variables - putting functions into debug only macros, such as asserts - memory trampling [/quote] OK well since from comparing the images the issue involves loading material files, so for any more help I'll paste the code for loading in the material library file: [CODE] int MultiObjectModel::read_MaterialFile(string fileName) // reads in a textfile containing the relevent material data. { ifstream inFile; inFile.open(fileName.c_str()); if (!inFile.good()) { cerr << "Can't open material file" << endl; return 1; } float ambiant[4]; float diffuse[4]; float specular[4]; float shininess; int matCount = 0; while (!inFile.eof()) { string line; getline(inFile, line); if (line.length() > 2) { if (line.substr(0,6)=="newmtl" && specular[2] >= 0) { material mat = {{ambiant[0],ambiant[1],ambiant[2],ambiant[3]},{diffuse[0],diffuse[1],diffuse[2],diffuse[3]},{specular[0],specular[1],specular[2],specular[3]},shininess}; Mat.push_back(mat); } else if (line.substr(0,3)==" Ka") { int w = 0; stringstream ss(line); string space[5]; for (int i = 0; i < 5; i++) {getline(ss,space[i], ' ');} //This getline function extracts each character from the stringstream up until a space is found. w = sscanf_s(space[1].c_str(), "%f", &ambiant[0]); w = sscanf_s(space[2].c_str(), "%f", &ambiant[1]); w = sscanf_s(space[3].c_str(), "%f", &ambiant[2]); } else if (line.substr(0,3)==" Kd") { int w = 0; stringstream ss(line); string space[5]; for (int i = 0; i < 5; i++) {getline(ss,space[i], ' ');} //This getline function extracts each character from the stringstream up until a space is found. w = sscanf_s(space[1].c_str(), "%f", &diffuse[0]); w = sscanf_s(space[2].c_str(), "%f", &diffuse[1]); w = sscanf_s(space[3].c_str(), "%f", &diffuse[2]); } else if (line.substr(0,3)==" Ks") { int w = 0; stringstream ss(line); string space[5]; for (int i = 0; i < 5; i++) {getline(ss,space[i], ' ');} //This getline function extracts each character from the stringstream up until a space is found. w = sscanf_s(space[1].c_str(), "%f", &specular[0]); w = sscanf_s(space[2].c_str(), "%f", &specular[1]); w = sscanf_s(space[3].c_str(), "%f", &specular[2]); } else if (line.substr(0,3)==" Ns") { int w = 0; stringstream ss(line); string space[2]; for (int i = 0; i < 2; i++) {getline(ss,space[i], ' ');} //This getline function extracts each character from the stringstream up until a space is found. w = sscanf_s(space[1].c_str(), "%f", &shininess); } else if (line.substr(0,2)==" d") { int w = 0; stringstream ss(line); string space[2]; for (int i = 0; i < 2; i++) {getline(ss,space[i], ' ');} //This getline function extracts each character from the stringstream up until a space is found. w = sscanf_s(space[1].c_str(), "%f", &ambiant[3]); w = sscanf_s(space[1].c_str(), "%f", &diffuse[3]); w = sscanf_s(space[1].c_str(), "%f", &specular[3]); } } } material mat = {{ambiant[0],ambiant[1],ambiant[2],ambiant[3]},{diffuse[0],diffuse[1],diffuse[2],diffuse[3]},{specular[0],specular[1],specular[2],specular[3]},shininess}; Mat.push_back(mat); cout << "Material Loaded\n" << endl; inFile.close(); return 0; }[/CODE] What I'll also say is that I had this issue with another program I was working on, except it was the wrong texture being applied to the wrong file, however I was able to resolve this by changing the file names of the texture files. That could mean memory trampling is most likely, but changing the file names of the material files had no effect here.
  4. I'm working on an OpenGL game, but I'm guessing this is mostly a C++ issue. It loads in models in a class from files, storing the values of both the model and the corresponding material for each object in vectors and arrays. When I run the debug version, it runs and displays what I expect to display if I write the code correctly, however when I build a release version, the values of some of the material files get read funny because it displays the wrong colours and shading values. This is the issue below: [img]http://dl.dropbox.com/u/30381754/Game%20Dev/Issue.png[/img] I'm running the professional/ultimate/paid-for version of Visual Studio 2010, I've repeatedly cleaned the solution, project and the release builds, I've also modified the files where the issue is notable and it has no effect. Why does this happen and what can I do to fix it?
  5. Ah I didn't notice that, I'll have a look at SDL then. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  6. So I'm currently working on a project in GLUT using Visual Studio 2010 C++. I want to make it run on freeglut because 1. From what I've read it's similar to GLUT 2. It's better because it's more updated to include features such as control of the main loop and closing windows. So I download the package from TransmissionZero and add the correct header and dll files and changed my class definitions to include freeglut.h, assuming that freeglut will still process glut functions and variables. Obviously I was assuming wrong because as soon as I made the switch, I get 500+ warnings and 10+ errors on my program when I try to build it. Every warning refers to a macro redefinition of GLUT specific variables (most of which aren't used in my program) and each error consist of "'<glut function name>_ATEXIT_HACK' : redefinition, different linkage". Switching the freeglut.h include back to glut.h loses all the errors and the program works normally. So I'm aware that transferring from GLUT to freeglut isn't easy, but I can't find many tutorials specifically for freeglut and those I do find are similar to standard GLUT. Is there anything I should check or do? I've tried both methods of including freeglut (both adding the file locations as additional include and link directories and by adding the files in the project's folder) and I get the same result.
  7. [color=#282828][font=helvetica, arial, sans-serif]For anyone who knows how to use C++, OpenGL and GLUT if possible.[/font][/color] [color=#000000][font=helvetica, arial, sans-serif]I'm having problems trying to load textures in an OpenGL GLUT project using classes. Here's some code that includes the texturing stuff:[/font][/color] [color=#000000][font=helvetica, arial, sans-serif]Declaring a Textured Model from a subclass of a model class.[/font][/color] [color=#000000][font=helvetica, arial, sans-serif]TextureModel * title = new TextureModel("Box.obj", "title.raw");[/font][/color] [color=#000000][font=helvetica, arial, sans-serif]Constructor method of TextureModel subclass:[/font][/color] [size=4][font=arial,helvetica,sans-serif][color=#2B91AF][background=transparent]TextureModel[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]string fName[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] string tName[/background][/color][color=#282828][background=transparent])[/background][/color][color=#282828][background=transparent] [/background][/color][color=#282828][background=transparent]:[/background][/color][color=#282828][background=transparent] [/background][/color][color=#2B91AF][background=transparent]Model[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]fName[/background][/color][color=#282828][background=transparent]),[/background][/color][color=#282828][background=transparent] textureFile[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]tName[/background][/color][color=#282828][background=transparent])[/background][/color] [color=#282828][background=transparent]{[/background][/color] [color=#282828][background=transparent]material newMat [/background][/color][color=#282828][background=transparent]=[/background][/color][color=#282828][background=transparent] [/background][/color][color=#282828][background=transparent]{{[/background][/color][color=#800000][background=transparent]0.63[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]0.52[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]0.1[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]1.0[/background][/color][color=#282828][background=transparent]},{[/background][/color][color=#800000][background=transparent]0.63[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]0.52[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]0.1[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]1.0[/background][/color][color=#282828][background=transparent]},{[/background][/color][color=#800000][background=transparent]0.2[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]0.2[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]0.05[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]0.5[/background][/color][color=#282828][background=transparent]},[/background][/color][color=#800000][background=transparent]10[/background][/color][color=#282828][background=transparent]};[/background][/color] [color=#2B91AF][background=transparent]Material[/background][/color][color=#282828][background=transparent] [/background][/color][color=#282828][background=transparent]=[/background][/color][color=#282828][background=transparent] newMat[/background][/color][color=#282828][background=transparent];[/background][/color] [color=gray][background=transparent]// enable texturing[/background][/color] [color=#282828][background=transparent]glEnable[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]GL_TEXTURE_2D[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]loadcolTexture[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]textureFile[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glGenTextures[/background][/color][color=#282828][background=transparent]([/background][/color][color=#800000][background=transparent]1[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#282828][background=transparent]&[/background][/color][color=#282828][background=transparent]textureRef[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=gray][background=transparent]// specify the filtering method[/background][/color] [color=#282828][background=transparent]glTexParameteri[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]GL_TEXTURE_2D[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_TEXTURE_WRAP_S[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_REPEAT[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glTexParameteri[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]GL_TEXTURE_2D[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_TEXTURE_WRAP_T[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_REPEAT[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glTexParameteri[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]GL_TEXTURE_2D[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_TEXTURE_MAG_FILTER[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_LINEAR[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glTexParameteri[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]GL_TEXTURE_2D[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_TEXTURE_MIN_FILTER[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_LINEAR[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=gray][background=transparent]// associate the image read in to the texture to be applied[/background][/color] [color=#282828][background=transparent]gluBuild2DMipmaps[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]GL_TEXTURE_2D[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#800000][background=transparent]3[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#800000][background=transparent]256[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#800000][background=transparent]256[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_RGB[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] GL_UNSIGNED_BYTE[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] image_array[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]}[/background][/color] [color=#000000]Texture loading function to read in data in RAW file:[/color] [color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] loadcolTexture[/background][/color][color=#282828][background=transparent]([/background][/color][color=#00008B][background=transparent]const[/background][/color][color=#282828][background=transparent] string fileName[/background][/color][color=#282828][background=transparent])[/background][/color][color=#282828][background=transparent] [/background][/color][color=#282828][background=transparent]{[/background][/color] [color=#282828][background=transparent]ifstream inFile[/background][/color][color=#282828][background=transparent];[/background][/color] [color=#282828][background=transparent]inFile[/background][/color][color=#282828][background=transparent].[/background][/color][color=#282828][background=transparent]open[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]fileName[/background][/color][color=#282828][background=transparent].[/background][/color][color=#282828][background=transparent]c_str[/background][/color][color=#282828][background=transparent](),[/background][/color][color=#282828][background=transparent] ios[/background][/color][color=#282828][background=transparent]::[/background][/color][color=#282828][background=transparent]binary [/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#00008B][background=transparent]if[/background][/color][color=#282828][background=transparent] [/background][/color][color=#282828][background=transparent](![/background][/color][color=#282828][background=transparent]inFile[/background][/color][color=#282828][background=transparent].[/background][/color][color=#282828][background=transparent]good[/background][/color][color=#282828][background=transparent]())[/background][/color] [color=#282828][background=transparent]{[/background][/color] [color=#282828][background=transparent]cerr [/background][/color][color=#282828][background=transparent]<<[/background][/color][color=#282828][background=transparent] [/background][/color][color=#800000][background=transparent]"Can't open texture file "[/background][/color][color=#282828][background=transparent] [/background][/color][color=#282828][background=transparent]<<[/background][/color][color=#282828][background=transparent] fileName [/background][/color][color=#282828][background=transparent]<<[/background][/color][color=#282828][background=transparent] endl[/background][/color][color=#282828][background=transparent];[/background][/color] [color=#00008B][background=transparent]return[/background][/color][color=#282828][background=transparent] [/background][/color][color=#800000][background=transparent]1[/background][/color][color=#282828][background=transparent];[/background][/color] [color=#282828][background=transparent]}[/background][/color] [color=#282828][background=transparent]inFile[/background][/color][color=#282828][background=transparent].[/background][/color][color=#282828][background=transparent]seekg [/background][/color][color=#282828][background=transparent]([/background][/color][color=#800000][background=transparent]0[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] ios[/background][/color][color=#282828][background=transparent]::[/background][/color][color=#282828][background=transparent]end[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] size [/background][/color][color=#282828][background=transparent]=[/background][/color][color=#282828][background=transparent] inFile[/background][/color][color=#282828][background=transparent].[/background][/color][color=#282828][background=transparent]tellg[/background][/color][color=#282828][background=transparent]();[/background][/color] [color=#282828][background=transparent]image_array [/background][/color][color=#282828][background=transparent]=[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]new[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]char[/background][/color][color=#282828][background=transparent] [/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]size[/background][/color][color=#282828][background=transparent]];[/background][/color] [color=#282828][background=transparent]inFile[/background][/color][color=#282828][background=transparent].[/background][/color][color=#282828][background=transparent]seekg [/background][/color][color=#282828][background=transparent]([/background][/color][color=#800000][background=transparent]0[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] ios[/background][/color][color=#282828][background=transparent]::[/background][/color][color=#282828][background=transparent]beg[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]inFile[/background][/color][color=#282828][background=transparent].[/background][/color][color=#282828][background=transparent]read [/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]image_array[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] size[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]inFile[/background][/color][color=#282828][background=transparent].[/background][/color][color=#282828][background=transparent]close[/background][/color][color=#282828][background=transparent]();[/background][/color] [color=#00008B][background=transparent]return[/background][/color][color=#282828][background=transparent] [/background][/color][color=#800000][background=transparent]0[/background][/color][color=#282828][background=transparent];}[/background][/color] [color=#000000]Method to draw the triangles:[/color] [color=#00008B][background=transparent]virtual[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]void[/background][/color][color=#282828][background=transparent] drawTriangle[/background][/color][color=#282828][background=transparent]([/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] f1[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] f2[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] f3[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] t1[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] t2[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] t3[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] n1[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] n2[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] [/background][/color][color=#00008B][background=transparent]int[/background][/color][color=#282828][background=transparent] n3[/background][/color][color=#282828][background=transparent])[/background][/color] [color=#282828][background=transparent]{[/background][/color] [color=#282828][background=transparent]glColor3f[/background][/color][color=#282828][background=transparent]([/background][/color][color=#800000][background=transparent]1.0[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]1.0[/background][/color][color=#282828][background=transparent],[/background][/color][color=#800000][background=transparent]1.0[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glBegin[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]GL_TRIANGLES[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glBindTexture[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]GL_TEXTURE_2D[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] textureRef[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glNormal3fv[/background][/color][color=#282828][background=transparent](&[/background][/color][color=#282828][background=transparent]normals[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]n1[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]x[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glTexCoord2f[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]textures[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]t1[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]u[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] textures[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]t1[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]v[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glVertex3fv[/background][/color][color=#282828][background=transparent](&[/background][/color][color=#2B91AF][background=transparent]Model[/background][/color][color=#282828][background=transparent]::[/background][/color][color=#282828][background=transparent]vertices[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]f1[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]x[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glNormal3fv[/background][/color][color=#282828][background=transparent](&[/background][/color][color=#282828][background=transparent]normals[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]n2[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]x[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glTexCoord2f[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]textures[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]t2[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]u[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] textures[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]t2[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]v[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glVertex3fv[/background][/color][color=#282828][background=transparent](&[/background][/color][color=#2B91AF][background=transparent]Model[/background][/color][color=#282828][background=transparent]::[/background][/color][color=#282828][background=transparent]vertices[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]f2[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]x[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glNormal3fv[/background][/color][color=#282828][background=transparent](&[/background][/color][color=#282828][background=transparent]normals[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]n3[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]x[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glTexCoord2f[/background][/color][color=#282828][background=transparent]([/background][/color][color=#282828][background=transparent]textures[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]t3[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]u[/background][/color][color=#282828][background=transparent],[/background][/color][color=#282828][background=transparent] textures[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]t3[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]v[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glVertex3fv[/background][/color][color=#282828][background=transparent](&[/background][/color][color=#2B91AF][background=transparent]Model[/background][/color][color=#282828][background=transparent]::[/background][/color][color=#282828][background=transparent]vertices[/background][/color][color=#282828][background=transparent][[/background][/color][color=#282828][background=transparent]f3[/background][/color][color=#282828][background=transparent]].[/background][/color][color=#282828][background=transparent]x[/background][/color][color=#282828][background=transparent]);[/background][/color] [color=#282828][background=transparent]glEnd[/background][/color][color=#282828][background=transparent]();[/background][/color] [color=#282828][background=transparent]}[/background][/color][/font][/size] [color=#000000][font=helvetica, arial, sans-serif]I also have Lighting, Depth Testing and Double Buffering enabled.[/font][/color] [color=#000000][font=helvetica, arial, sans-serif]Models and Lighting work fine, but the textures don't appear. Any reasons why it won't work will be great.[/font][/color][color=#282828][font=helvetica, arial, sans-serif] [/font][/color]