Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whats the fastest..
Joseph Duchesne
Unregistered

 
Post: #1
Whats the fastest..
I want to know the fastest way- whatever it is to draw a pixel on the screen:blink: and be able to specify it's color in C. :bored: Can anyone help me?
2003.02.22 03:31 PM
Quote this message in a reply
macboy
Unregistered

 
Post: #2
Whats the fastest..
OpenGL would be best... or is that what you're asking about? :???:
2003.02.22 04:21 PM
Quote this message in a reply
OneSadCookie Offline
Genius Bar
*****

Posts: 2,154
Joined: Feb 2005
Post: #3
Whats the fastest..
Drawing single pixels is slow. Why would you want to do that?
2003.02.22 05:25 PM
Visit this user's website Find all posts by this user Quote this message in a reply
macboy
Unregistered

 
Post: #4
Whats the fastest..
Quote:Originally posted by OneSadCookie
Drawing single pixels is slow.
It's pretty fast in MetaL Tongue
2003.02.22 05:49 PM
Quote this message in a reply
OneSadCookie Offline
Genius Bar
*****

Posts: 2,154
Joined: Feb 2005
Post: #5
Whats the fastest..
but it's nowhere near as fast to draw a rectangular region by drawing each individual pixel as it is to draw a rectangle.
2003.02.22 05:52 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Joseph Duchesne
Unregistered

 
Post: #6
Whats the fastest..
OK, can anyone give me the code to put a red pixel in the middle of a 3*3 green square in C or C++?
2003.02.22 06:05 PM
Quote this message in a reply
macboy
Unregistered

 
Post: #7
Whats the fastest..
Quote:Originally posted by Joseph Duchesne
OK, can anyone give me the code to put a red pixel in the middle of a 3*3 green square in C or C++?
It depends on what you want to use. QuickDraw and OpenGL and other stuff each have different ways of doing it.
2003.02.22 06:07 PM
Quote this message in a reply
akisha Offline
Junior Member
**

Posts: 33
Joined: May 2005
Post: #8
Whats the fastest..
Quote:Originally posted by Joseph Duchesne
OK, can anyone give me the code to put a red pixel in the middle of a 3*3 green square in C or C++?


Like this?
[SOURCECODE]
Rect theR;
RGBColor theC;
SetRect(&theR,10,10,13,13);
theC.red = 0;
theC.blue = 0;
theC.green = 65535;
RGBForeColor(&theC);
PaintRect(&theR);
theC.green = 0;
theC.red = 65535;
SetCPixel(11,11,&theC);
[/SOURCECODE]

(Probably not the fastest wayƖ)
2003.02.22 06:45 PM
Find all posts by this user Quote this message in a reply
Joseph Duchesne
Unregistered

 
Post: #9
Whats the fastest..
Macboy: I know that, I just want to know what the fastest one isBig Grin
Akisha: Exactly but what is that (excuse my ignorance) OpenGL? Quartz? Quickdraw?!? What do I have to #include <> ? I am sort of a new to the entire C/C++ graphics thingSmile because all the books I have, either don't go into graphics or are windoze specific.
2003.02.22 08:17 PM
Quote this message in a reply
akisha Offline
Junior Member
**

Posts: 33
Joined: May 2005
Post: #10
Whats the fastest..
That's QuickDraw. Just include Carbon.h

Like I said, it's probably not the fastest way of doing it. BTW: What IDE are you using? CodeWarrior?
2003.02.22 08:58 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)