Noob Question about GLTexFromPixmap
BlitzMax Forums/OpenGL Module/Noob Question about GLTexFromPixmap
| ||
Main Question: Above is the LoadGLTexture code from Nehe 6. This is the simplest code I have to load a texture. (Its sitting in a zip file with all the nehe, but tonyg said somewhere that it was the relevent one) I want to just replace "everything" that can be replaced with GLTexFromPixmap(LoadPixmap("tile1.bmp"))But everywhere I can think to do it, I get a Int/int Ptr Problem. Question Two: Whats the "Smallest" code that nehe6 could really be? That is do I really need (For example), glClearColor(0.0, 0.0, 0.0, 0.0). I assume lots of Nehe6 is there as an educational method, but If I just went for default, what could I cut it down to? Question Three: Ok this might sound like a dumb question, but do I really have to re-allocate the verticies each frame Cannot I do this just once in init, and then rotate the thing each frame? Cavat: I dont understand GL, and as I have continualy failed to understand GL. I have picked my programing level, and It is not in the depths of either DX or GL. I can see the technical skill needed, and I simply havent gained such skills. So if you could explain what I need to do, please assume I know nothing about GL, and try to have as few gl commands as possible. |
| ||
Errrr... I said what? |
| ||
Somewhere in the depths of forum search you, (well I think it was you), are talking about Textured polyies, and say that this code is relevent NeHe tut. If Im miss-quoting you, then sorry. But when I then looked at the NeHe Tuts, you seemed right. |
| ||
below is a better way of doing things: And even corrects the colour errors. GLTexFromPixmap(LoadPixmap("tile1.bmp")) This gives you a GLTexture name and thus you do not need to generate the texture you only need to bind it. Whats the "Smallest" code that nehe6 could really be? That is do I really need (For example), glClearColor(0.0, 0.0, 0.0, 0.0). I assume lots of Nehe6 is there as an educational method, but If I just went for default, what could I cut it down to? No it defualts to black. Ok this might sound like a dumb question, but do I really have to re-allocate the verticies each frame If you dont intend on change vertex positions then you can just use display list - they are realy simple.Edit: You should be able to figure out how todo texture poly's from this. |