Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Simple form with pixel manipulation

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    3

    Simple form with pixel manipulation

    Hi guys,
    i'm a c programmer and have not work with opengl at all!
    i want to create a 800X600 window that just show some circle and be able to manipulate pixels of the form every milisecond and show the result to the user. there is no interaction between user and form(no click, no dblclick,…) it just shows some circles with one color and lines with different pixel colors(each line may have different pixel colors)
    also i want to be able to change the coordination system, i mean change it from top-left to the center of the window. could anyone help me do that with some sample code? links? tutorial?
    all replies are greatly appreciated.
    thanks.

  2. #2
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    303

    Re: Simple form with pixel manipulation

    Beside OpenGL you will need a window toolkit to open an OpenGL context, check if your preferred toolkit (win32, GTK, QT, Cocoa) for your OS has OpenGL samples to begin with.

    I guess changing the image every millisecond isn't meant literally? Because you would need a very fast display for that, 60Hz TFTs are more common (70Hz TFTs exist, CRTs can often go to 120Hz).


    Tutorials:

    http://www.arcsynthesis.org/gltut/
    http://duriansoftware.com/joe/An-int...-Contents.html

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    3

    Re: Simple form with pixel manipulation

    Quote Originally Posted by menzel
    Beside OpenGL you will need a window toolkit to open an OpenGL context, check if your preferred toolkit (win32, GTK, QT, Cocoa) for your OS has OpenGL samples to begin with.
    don't these toolkits reduce the performance?

    Quote Originally Posted by menzel
    I guess changing the image every millisecond isn't meant literally? Because you would need a very fast display for that, 60Hz TFTs are more common (70Hz TFTs exist, CRTs can often go to 120Hz).
    i mean every milisecond some pixels change, a line for example, about 300 pixels

    good tutorials, thanks.

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Simple form with pixel manipulation

    Quote Originally Posted by Mohsen Jamali
    Quote Originally Posted by menzel
    I guess changing the image every millisecond isn't meant literally? Because you would need a very fast display for that, 60Hz TFTs are more common (70Hz TFTs exist, CRTs can often go to 120Hz).
    i mean every milisecond some pixels change, a line for example, about 300 pixels
    Every millisecond is not possible.
    Current LCD screen are 60hz (16.667 ms per frame), 120hz ("3D" screens) cost more (8.333ms).

  5. #5
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    303

    Re: Simple form with pixel manipulation

    Quote Originally Posted by Mohsen Jamali
    don't these toolkits reduce the performance?
    Not necessarily. Beside: Cou just can't open an 'raw' OpenGL window with no help of any window toolkit.

    Quote Originally Posted by Mohsen Jamali
    i mean every milisecond some pixels change, a line for example, about 300 pixels
    You might be able to change a buffer every millisecond, but you will only be possible to display 60 different renderings per second.

  6. #6
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    3

    Re: Simple form with pixel manipulation

    Quote Originally Posted by Mohsen Jamali
    i mean every milisecond some pixels change, a line for example, about 300 pixels
    You might be able to change a buffer every millisecond, but you will only be possible to display 60 different renderings per second. [/QUOTE]

    I think you are right, i should change the bauffer, do the window toolkits allow direct acceess to buffer?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •