• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Question] Is it possible to set the face.normal?

Scheduled Pinned Locked Moved Developers' Forum
23 Posts 5 Posters 2.7k Views 5 Watching
Loading More Posts
  • 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.
  • C Offline
    Chris Fullmer
    last edited by 17 Dec 2009, 21:47

    But I'd still like to understand if you are getting this to interact with SketchUP somehow? Can you change what and how SU renders with this?

    Chris

    Lately you've been tan, suspicious for the winter.
    All my Plugins I've written

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 17 Dec 2009, 22:38

      Is this Windows and OSX compatible?

      Thomas Thomassen โ€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • Q Offline
        qpik
        last edited by 17 Dec 2009, 22:42

        Yes you can! ๐Ÿ˜„
        I've just found the first thing that changed the view of the model.
        I typed in the Ruby console glDisable(GL_DEPTH_TEST).
        To see result try turning the model around.
        Bear in mind that I'm just starting to learn OpenGL ๐Ÿ˜’ .

        ps. You need to run SU with the files from the zip above in Plugins, except the example.

        1 Reply Last reply Reply Quote 0
        • P Offline
          Pixero
          last edited by 18 Dec 2009, 12:10

          SU keep asking for glut32.dll. It's not in the zip you provided?

          1 Reply Last reply Reply Quote 0
          • Q Offline
            qpik
            last edited by 18 Dec 2009, 12:44

            @pixero said:

            SU keep asking for glut32.dll. It's not in the zip you provided?

            It didn't ask me. Maybe because I have it in my Ruby installation.

            1 Reply Last reply Reply Quote 0
            • Q Offline
              qpik
              last edited by 18 Dec 2009, 12:44

              I suppose so, try it on Mac.

              Below is not however, only Windows. This seems to freeze SketchUp OpenGL.

              FindWindow = Win32API.new("user32.dll", "FindWindow", ['P','P'], 'N')
              GetDC = Win32API.new("user32.dll", "GetDC", ['N'], 'N')
              GetCurrentContext = Win32API.new("opengl32.dll", "wglGetCurrentContext", ['V'], 'N')
              CreateContext = Win32API.new("opengl32.dll", "wglCreateContext", ['N'], 'N')
              MakeCurrent = Win32API.new("opengl32.dll", "wglMakeCurrent", ['N','N'], 'V')
              DeleteContext = Win32API.new("opengl32.dll", "wglDeleteContext", ['N'], 'V')
              
              
              hwnd = FindWindow.call(0, "Untitled - SketchUp")
              hdc = GetDC.call(hwnd)
              hglrc = GetCurrentContext.call()
              DeleteContext.call(hglrc)
              

              I wonder if this is good direction?

              1 Reply Last reply Reply Quote 0
              • P Offline
                Pixero
                last edited by 18 Dec 2009, 15:39

                So where can I get a Ruby install that has it?

                1 Reply Last reply Reply Quote 0
                • Q Offline
                  qpik
                  last edited by 18 Dec 2009, 16:10

                  One-click windows installer has it. Here: http://rubyinstaller.org/

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    Pixero
                    last edited by 20 Dec 2009, 16:52

                    Anyone getting more than one line to work?

                    1 Reply Last reply Reply Quote 0
                    • Q Offline
                      qpik
                      last edited by 18 Mar 2010, 19:27

                      I only got to change some OpenGL Server variables like GL_COLOR_MATERIAL or GL_DEPTH_TEST.
                      I don't know the way to hack into drawing context. I wonder how it is done in LightUp (supposing it is done similar way), maybe a window is layered on top of native SketchUp viewport.

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        Chris Fullmer
                        last edited by 18 Mar 2010, 20:36

                        I don't think Lightup does this. I think it renders materials and bakes them into faces in SU. At least that is my (severely limited and naive) understanding.

                        Lately you've been tan, suspicious for the winter.
                        All my Plugins I've written

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 2 / 2
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement