How to increase size of an Image

Hi,

I created Cylinder(Using Primitives) and places four images on it surface.

My question is :
while rotating the cylinder,The image closer to the viewer looks in a bigger Size compared to other images side to it.

please Help me…

I am Thankful for your Answer.

You haven’t clearly stated what you’re doing, much less what your problem is. Post a little GLUT test program illustrating your problem.

Isn’t it normal that the image closer to the viewer is bigger ? :confused:

Hi,

Thank you for replying.

No, The picture which is closer is not looking big one.

   What i mean to say is, consider there are more images on the cylinder surface.
consider  On the front face of the cylinder which is closer to the viewer as Three images.

I need to make the size bigger for image which is located at the center.

I hope you understood my question ?

Please help me from this …

I am thankful for your reply …

How do you map your textures ?

Are the images among each other ?

Hi,

Thank You for replying,

I didn’t get what you asked ?

The below Link will show you the cylinder with images on the surface of it.
please check it.

There are three bird images are visible(on the front side). What i want to do is the image which is in the middle will look big one.

How to do it ?

Please help me from this…

I am thankful for your reply.

Hi,
for what do you need that ?

Would it help to zoom on the cylinder ?
Therefore you should use

glMatrixMode(GL_MODELVIEW);
glTranslatef(0,0,x); // x bigger than 0, for example 3

Or should the cylinder remain as it is ?

Can the cylinder be rotated ?

You could map the image in the middle other…

I don’t know how you map your Texture :eek:

Hi,

Thank you for your idea,

I already used the above two lines in my code. but there is no change.

Yes the cylinder is rotating and the rotation is controlled by mouse button. by clicking the mouse button it will rotate around 10 degree.

The size of the cylinder Shouldn’t vary, but the image which is closer to the viewer should be scaled to bigger image.

How it is possible to scale an image on the surface of the rotating Cylinder ?

Please Help me…

I am thankful for your reply.

glMatrixMode(GL_TEXTURE);
glScalef(some,numbers,here);

There MUST be a change with “glTranslatef()” :stuck_out_tongue:

Hi,

Thank you so much for your replies.

In my code i used “glTranslatef()” ,
But Translation allows you to move an object from one location to another within a 3D environment.

By using the above function how i will get the image with bigger size ?

and even i tried two lines of code which is in above post :

glMatrixMode(GL_TEXTURE);
glScalef(some,numbers,here);
    

After using this i am getting blank screen.

please Help me from this . .

I am Thankful for your reply.

glMatrixMode(GL_TEXTURE);
glLoadIdentity(); //Very important

//Manipulating in Y-Axis
glScalef(1,x,1); //0 < x < 1 bigger texture
                 //x > 1 (for example 1.5) smaller texture

Hope that helps you :wink:

Hi,

Thank you so much for your reply,

After trying many times, i am not getting where exactly i have to place the above lines of code.

My code is MULTTEX

The above code will places single texture(image) on the cylinder.

Here is the OUTPUT

Now i tried to place different images(Multitexture) on cylinder Surface.
Here is the code which i tried to do multitexturing
MULT

But this code showing segmentation fault and displaying only width and heigth of all the three images.
please help me to do multi-texturing.

I am kindly requesting you to solve my above problems.

I am thankful for the reply.

You load you texture each frame ??? :eek:

 LoadGLTextures(image1,0);

shouldn’t be in cylinder()…

Where exactly do you map your “middle” image ?

Sorry, but I don’t understand your Modelview/Projection Settings :frowning:

Hi,

Thank you so much for replying,

The program(MULT) in above post is what i tried to do multi texturing in that i have not used LoadGLTextures(image1,0); in the cylinder function.

actually the cylinder is made up of polygons where the nvalue is 32. i am not mapped the image in the middle. i am trying to place different images in each consecutive polygons.

i dont know what i am trying is right or not …

Please help me with snippet of code for doing multi texturing.

I am thankful for your reply.