Problem with texture mapping

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
AndreL
Posts: 7
Joined: Sun Aug 12, 2012 4:16 pm

Problem with texture mapping

Post by AndreL »

I'm currently working on a method that can be used to find de exact reflection point in a spheric mirror, but i'm having some problems:

-the method is working fine, with the position of 4 vertices (a square), it calculates and draws 4 points in the sphere.

-but now, when i try to get the color value of the square vertices, their values are always 255,255,255

Image

Code: Select all

 
 
    irr::scene::IMeshBuffer* mb=mesh->getMeshBuffer(i); 
 
    video::S3DVertex* vertices = (video::S3DVertex*)mb->getVertices();
 
        for(int f=0; f<5; f++)
            {
                int red = vertices[f].Color.getRed();
                int green = vertices[f].Color.getGreen();
                int blue = vertices[f].Color.getBlue();
                red, green, blue = 255,255,255
            }
 
- and do i really need the vertex color or is there a way i can map the square reflection between the 4 sphere vertices?
Post Reply