Results 1 to 4 of 4

Thread: Problem with form pixels and open gl

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2009
    Posts
    4

    Problem with form pixels and open gl

    Hello,

    I develop an application in visual basic.net that contains both vb controls and opengl. The problem is that the visual basic in forms uses pixels and opengl does not. I tried to make the conversion :

    x = -1+(2/Form1.width)*x_coord_in_pixels
    y = 1 - +(2/Form1.height)*y_coord_in_pixels

    Gl.glRectf(x, y, x + 0.25, y + 0.25)

    but i see that the coordinates in my form are still different from theese in opengl. It is a litle bit confusing but i hope you understand. If you don't please tell me and I will explain more

    Thank you

  2. #2
    Member Contributor
    Join Date
    Jun 2009
    Posts
    60

    Re: Problem with form pixels and open gl

    Would u explain what exactly are you trying to do..?? I mean why are u converting it..?? what is the problem u r trying to solve.??

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2009
    Posts
    4

    Re: Problem with form pixels and open gl

    Well, my form contains both opengl components that i have created and .net controls. The problem is that I control the object's position dynamicaly, so when I say that the .net button is in position (100,200) the opengl component (for example a rectangle) should have the SAME position.

  4. #4
    Junior Member Newbie
    Join Date
    Oct 2009
    Posts
    4

    Re: Problem with form pixels and open gl

    holly god! It was the border of the form! I should disable it...
    Thanks anyway

Similar Threads

  1. open gl problem w/ moh
    By jimtime in forum OpenGL: User Software
    Replies: 6
    Last Post: 02-19-2005, 04:12 AM
  2. problem with form focus
    By dlswimmer in forum OpenGL: Windows
    Replies: 1
    Last Post: 06-03-2004, 10:23 PM
  3. Serious Open GL Problem
    By in forum OpenGL: User Software
    Replies: 1
    Last Post: 01-05-2003, 06:45 AM
  4. Open Gl problem
    By in forum OpenGL: User Software
    Replies: 0
    Last Post: 02-10-2002, 08:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean