Results 1 to 4 of 4

Thread: Drawing rectangles

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1

    Drawing rectangles

    I need to plot a diagram with more than 30,000 rectangles with embedded text and inter-linked by lines. There are also zoom and pan operations to be implemented on this diagram. Is OpenGL the right package to use? How would it compare with GDI?
    Thanks

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Drawing rectangles

    In someway's openGL would be more flexible, when doing a zome and scale operation.
    You should look at some openGL applications and tutors to help you make up your mind


    Originally posted by electricate:
    I need to plot a diagram with more than 30,000 rectangles with embedded text and inter-linked by lines. There are also zoom and pan operations to be implemented on this diagram. Is OpenGL the right package to use? How would it compare with GDI?
    Thanks

  3. #3
    Senior Member Regular Contributor
    Join Date
    Feb 2002
    Location
    Hamburg, Germany
    Posts
    413

    Re: Drawing rectangles

    With OpenGL u can:
    - draw antialiased lines/rectangles
    - draw textured-triangles
    - do fancy lighting effects
    - do shadows (ok, this is a "little bit" more advanced)

    ...but you can't do any textoutput.


    With GDI yuo are happy, when you get some colored lines on the screen (of course only with one color). But the textoutput if (of course) much more better (or let me say: "is there")

    my suggestion:
    use openGL for geometry mixed with GDI for textoutput (you should create an offscreen DIB and draw your text into it, and then copy it into a texture... there are several tutorials on the web, describing how to do it)

  4. #4
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Re: Drawing rectangles

    Actually, if you use wglUseFontBitmaps, you can easily implement text in your OpenGL code. OpenGL wins

Similar Threads

  1. My Rectangles drawing at wrong position?
    By ByDreaM in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-10-2013, 06:17 AM
  2. need help in drawing rectangles nd triangles
    By Need_Help in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 04-20-2011, 09:10 AM
  3. Drawing Rectangles using mouse input
    By pete1983 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-12-2004, 10:18 AM
  4. Drawing rectangles
    By gator in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-08-2003, 08:27 PM
  5. 3d rectangles
    By aap9 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 10-22-2001, 12:49 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