LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Thread Tools
Old 11-23-2008, 02:02 AM   #1
nasr-noor
LQ Newbie
 
Registered: Aug 2005
Posts: 13
Blog Entries: 1
Thanked: 0
Unhappy opegl and serial port


[Log in to get rid of this advertisement]
Hi,all
I'm using glut and read from serial port(RS232) with a thread, when I receive a special frame redraw window with glutPostRedisplay function.
My code work correctly in windows but in linux (fedora core 8) doesn't work correctly.
My code is similar this :
---->main
glutinitialize.
create serial read thread.
glutMainLoop();
---->serial read thread
while(1)
{
readSerial();**1**
if(DataChanged())
glutPostRedisplay();
}

This code work in windows, but in linux redisplay doesn't happen until I press a key or move or click the mouse.

when I replace **1** with sleep(1) and set random data it's similar above but if I remove **1** and set random data the display redraw about evry 300 mili second.

If you know the problem or mistake please help me.
nasr-noor is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 10:32 PM
Parallel Port & Serial Port device identification helpmeforlinux Linux - Hardware 3 01-02-2007 02:15 AM
timedia 4 port serial port i/o card configuration binu_edl Linux - Hardware 0 03-09-2006 10:39 AM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 09:07 PM
OpeGL program freezes RH 9.0 ssd_123 Linux - Newbie 1 06-03-2003 02:52 PM


All times are GMT -5. The time now is 11:42 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration