You are not logged in or registered. Please login or register to use the full functionality of this board...
The QB64 Edition
TRIANGLE COLORS - Printable Version

+- The QB64 Edition (http://www.thejoyfulprogrammer.com/qb64/forum)
+ Thread: TRIANGLE COLORS (/showthread.php?tid=132)



TRIANGLE COLORS - Waltersmind - 08-16-2014 02:43 AM

While chatting with a few QB64 programmers on the QB64 chat room, someone had asked if anyone could draw a tri-colored triangle in QB64. They shared a link to a picture of such triangle. I told them that it would be easy to do so, so I sat out to create a demo for it.

Several people suggested that the easiest and most efficient way to do so is with OPEN-GL (or Direct X), which is true since it would hardware accelerated and drawn by the hardware. But, I took the question as if they wanted to know if someone could do it as a software rendering.

Below are some screenshots of the attached demo.

[attachment=206]
[attachment=207][attachment=208]

Please note, this demo demonstrates how to draw a colored triangle and is not optimized in any way. The triangle drawing parts are not in FUNCTIONs or SUBs.



Thanks,
Walter Whitman
The Joyful Programmer