Generation of 3d mesh using glvertex

I loaded the ‘.tiff’ image and displayed it on the screen.(Using MFC)

Because the coordinate system of OpenGL increases the x-axis from -1 to 1 and the y-axis decreases from 1 to -1 (Total length: 2) I made the x- and y-coordinate by dividing the horizontal value of 2.

For example, if the image was 50x50, then 2/50 was used to obtain each coordinate value.

Then, I drew the image in two dimensions on the screen using glvertex and glcolor.

I want to make this a three-dimensional mesh by adjusting the z-values of the glvertex (x,y,z).

The current x and y values are in the form of GLFLOAT and are extremely small numbers below one.
( ex) x : 0.002198, y : 0.002234)

I have tried adding z-values to the glvertex at random, but 3D mesh does not form. What the hell’s the matter?

I shall appreciate any advice

Thank you

This is the default convention for the NDC coordinate space. You don’t typically provide vertex positions in this coordinate space, but instead in object-space or world-space. Sounds like you need to read the Viewing chapter of the OpenGL Programming Guide.

I have tried adding z-values to the glvertex at random, but 3D mesh does not form. What the hell’s the matter?

Do you have a perspective projection active? Are you providing vertices which are inside the eye-space view frustum for that perspective projection transform?