Archived

This topic is now archived and is closed to further replies.

Lighint, Texture Ok, but not going together

This topic is 5752 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m a beginner working on displaying an object using OGL. I got the object lit just fine and it looks good. I added a texture thats looking good too. However i put them together on the same object and the object disappeared. when just lit or just textured you can see the object, but not when both are enabled and apllying to the object. What could be wrong here? He who said money was the root of all evil knew little of the nature of money and less about the nature of man.

Share this post


Link to post
Share on other sites
ok i''ll try to get whats relevent


glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
glLoadIdentity(); // Reset The Current Modelview Matrix
// light 1 is a struct read in from a file, its fine
light1.ActivateLight(GL_LIGHT1);

// this sets up the camera, u don''t need to worry about it
Tree.GetCamera().ActivateCamera();

glTranslatef(0,0,-15);
// mat1 is again a simple struct with values read in, its fine
mat1->SetAsMaterial();

// make the texture in here
unsigned int id = TEXTUREMANAGER.Load("Textures/Wall.bmp");

// use the texture
glBindTexture(id, GL_TEXTURE_2D);

// draw a teapot
glutSolidTeapot(5);


any hints?



He who said money was the root of all evil knew little of the nature of money and less about the nature of man.

Share this post


Link to post
Share on other sites
Alright i got this problem my self, sorry for any inconvinience.

He who said money was the root of all evil knew little of the nature of money and less about the nature of man.

Share this post


Link to post
Share on other sites