View Full Version : Texture memory issue
BennUK
03-31-2004, 07:14 AM
When I call the initialise texture function in my game(load bmp & tga), the color of the opengl primitives changes (blue turns black, white turns brown). If i disable the texture loading, the problem is fixed. I am not using the glBind function as this is the only one used.
has anyone had this problem before and if so, how would it be fixed?
Thanks
BennUK
V-man
03-31-2004, 05:16 PM
I'm pretty sure it's not a memory issue.
What's your texture environment state?
For example if you have modulate, then the result will be primary*texture or primary*texture+secondary
BennUK
04-01-2004, 08:25 AM
I don't know what you mean by the 'state'. I am quite new to OpenGl and am trying to implement as simple a texture loader as I can but still keep having this problem.How would I find out what the state is?
Thanks again
BennUK
pkaler
04-01-2004, 08:59 AM
Originally posted by BennUK:
I am quite new to OpenGl and ...Which means you should probably be posting to the beginner's forum.
My guess is that you call a GL function in the constructor of a class. And you have a static or global object that gets instantiated before you have a device context and rendering context.
But that's a shot in the dark without more information.
jwatte
04-01-2004, 02:14 PM
Another possibility is that the data is presented to OpenGL in some other byte format than that which is described to OpenGL (i e, GL_BGRA, GL_RGB, etc).
I agree that the beginner's section is the place for this question.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.