Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Allegro/NVDiA bug

This thread is locked; no one can reply to it. rss feed Print
Allegro/NVDiA bug
type568
Member #8,381
March 2007
avatar

I ain't sure if it's a bug, since I blamed some feature before, and it appeared that I'm wrong. In certain cases function triangle(), doesn't do anything.. One of the cases, is while all three coordinates, are on 1 line, which is collateral to the X axis. I have a cube, made of polygon triangles, and on it's start of twisting, I don't see the top and upper lines..

Is this a bug?
How can i make rid of it? Also the problem is that it doesn't ave to be EXACTLY collateral, it might be just pretty close, to disappear. If I add a line, from coord to coord, it somehow mismatches the polygon, and while both are drawn, it is visible, that there is more than 1 line, and it is ugly..

Thanks a lot..

EDiT:

http://allegro.cc/files/attachment/592319

Albin Engström
Member #8,110
December 2006
avatar

I'm quite sure it has nothing to do with Nvidia.. Isn't allegro software rendered?
also are you using perspective? that might be the mismatch problem with line from cord to cord.. but i'm no expert.. but i'm quite sure the guys who will answer your question would want some code :). good luck

type568
Member #8,381
March 2007
avatar

The code is big and complex, thanks.(not really big and complex, but I believe u will have to be real expert to understand it fast) Allegro, in my case has nothing to do with rendering.. the only allegro function for output used, in this case is triangle. Also as I know, allegro gets info of supported functions, and if some aren't supported, they are replaced by software with the use of what is supported. I believe that Ge-Force 6600, has some kind of triangle, or polygon hardware accelerated. :)

Also, if I add a line, (actually two lines, from coord[0] to coord[1], and from coord[0] to coord[2]. It fixes the disappearance but adds the effect of more than one line.. Which is visible, and ugly.

gillius
Member #119
April 2000

Standard Allegro has no acceleration for 3D rendering, so if you are using the 3D functions in Allegro, you're doing everything in software and your video card doesn't have anything to do in this process (beyond just displaying images sent to it as normal). You need to use something like AllegroGL if you want 3D hardware acceleration in Allegro.

Gillius
Gillius's Programming -- http://gillius.org/

type568
Member #8,381
March 2007
avatar

I really don't.. but function polygon (which draws a 3d polygon) is hardware accelerated..

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

I really don't.. but function polygon (which draws a 3d polygon) is hardware accelerated..

Allegro's 3d API does not use hardware acceleration. Its pure software.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

type568
Member #8,381
March 2007
avatar

Quote:

Allegro's 3d API does not use hardware acceleration. Its pure software.

NOT 3d, it's 2d! Simple 2d triangle.

triangle(BITMAP*,int x,int y,int x1,int y1,int x2,int y2,int color);

Really 3d right? well this triangle IS made by hardware.. (2d fill.. hardware accelerated)

Matt Smith
Member #783
November 2000

I think you'll have better results with triangle3d() or triangle3d_f() which take fixed or floats.

Even if you pass them ints, the subpixel precision internally will help them to render a very thin triangle. IIRC, Allegro makes no effort to render colinear points as a line.

type568
Member #8,381
March 2007
avatar

Can i handle without triangle3d? I want to do all the calculations myself.. And just get a triangle. Or a line, whatever my triangle happens to be..

Go to: