Results 1 to 2 of 2

Thread: 2d opengl application and picking

  1. #1
    Senior Member Regular Contributor
    Join Date
    Aug 2008
    Posts
    183

    2d opengl application and picking

    hello.
    I must do a 2d editor with opengl.
    I must have a panel with a texture that occupy all the screen and over this panel i must draw line and a disk(a filled 2d circle).
    I wish draw the panel at z = 0 and the lines and disk at z = 0.2 or 0.3.
    may be is a good solution?
    or there is a better solution?
    and for the picking ?
    what sense have a ray in a 2d application?
    thanks.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    What you sugest sounds fine.

    For 2D drawing you could disable depth testing (GL_DEPTH_TEST) then set all z-value to 0 - this will then draw like a normal GDI windows.


    What are you picking? If it is the line gluunproject will probably struggle so I would simply use cpu caclulations (if that is allowed - I is assume this is some sort of assignment)

Similar Threads

  1. Copy back buffer from one application and use in another application
    By murrdpirate in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-24-2014, 12:26 PM
  2. Unofficial OpenGL SDK and 64 bit application
    By Triangle in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-29-2013, 06:38 AM
  3. menu bar application using opengl
    By sachin in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-07-2011, 09:28 PM
  4. OpenGL application on x64
    By gourou in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 11-08-2008, 03:54 PM
  5. Z-buffer picking, gluUnProject picking not working
    By Icetigris in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-29-2008, 10:38 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