#define fails! Why?

Started by
14 comments, last by jwblair 23 years, 1 month ago
quote:Original post by Null and Void

The way I set it up, I load the textures in to the linked list, and each object has a pointer to the texture that it is using. After all of the objects that are to be rendered are determined, I quicksort them (so that the least amount of state changes are required) and then render them.

It is very fast, and I doubt there is more than a millisecond lost of speed per frame. How do you think professional games store textures? The certainly don''t do it with an array.

Since OpenGL stores textures as integers, i doubt they even bother, and just include it(the int) as a field with the primative they are rendering.
Advertisement
i mean with the pointer.
i mean with the pointer.
i mean with the pointer.
Thanks for the code... If I gave you an email address could you please mail me the complete code that you have for loading textures?

That would be greatly appreciated!

for Now I will look over what is currently here...

Thanks Again!

Thanks!

John William Blair
Thanks!John William Blair "The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of the darkness. For he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee."
http://members.home.com/chucklez/wtc/index.html
You''re probably write about storing a TexID for each object, I think I could implement that fairly easily actually. It would make unloading textures (using my reference system at least) slower though, I''ll have to think about that.

Jwblair, I''d rather not release my engine''s source code until it is completed, and I would have to release a good portion of it for that texturing code to work since the engine is so blended in to itself. If you go to Nehe''s you can find example code for loading textures (if you already know OpenGL, just skip to the TGA Loading tutorial, that''s what I based my above code off of).

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/

This topic is closed to new replies.

Advertisement