Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with GL object placement
Forum Updated to NodeBB v4.3 + New Features

Problem with GL object placement

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VeenaIjari
    wrote on last edited by
    #1

    Hello,

    I'm finding a problem in placing an object in the viewing volume created with gluperspective(60.0,w/h,0.1,50.0); It has a glwidget full size. If glTranslatef(0.0,0.0,-1.0); is provided, shows the object. Whereas if glTranslatef(0.0,0.0,-2.0); doesnt shows the object.
    Please anyone help me out.

    [I split this question into its own thread, as it was not directly related to the old thread. Please open new threads for new questions -- mlong]

    1 Reply Last reply
    0
    • SeishinS Offline
      SeishinS Offline
      Seishin
      wrote on last edited by
      #2

      Hi,
      In gluperspective, the last 2 parameters you set is the near plane and far plane. Without looking at your code, I guess your object is located somewhere near the far plane. So when you translate it on z axis, it is clipped by the far plane.
      Try to increase the last parameter to 1000 and see if it works.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VeenaIjari
        wrote on last edited by
        #3

        thanks for the reply.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VeenaIjari
          wrote on last edited by
          #4

          Hi,
          I'm trying to place gluSphere in the viewing volume created inside gluperspective. But its coming in an elongated form. So, May i know what is the reason?

          1 Reply Last reply
          0
          • V Offline
            V Offline
            VeenaIjari
            wrote on last edited by
            #5

            Created volume with gluperspective(60.0,w/h,1.0,1000);

            1 Reply Last reply
            0
            • SeishinS Offline
              SeishinS Offline
              Seishin
              wrote on last edited by
              #6

              I met this problem before because I didn't implement the resizeGL() function. The reason should be drawing with wrong perspective.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved