|
A5 Textured quads? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Are there any plans to create textured quad drawing functions in Allegro 5? If there aren't any so far, how much work would it be to make them using OpenGL / DirectX? And how hard would it be to make them respect all the different blending modes? Do non-axis aligned trapezoids count as a quad? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Thomas Fjellstrom
Member #476
June 2000
|
Have you tried using the al_draw_prim function in the primitives addon? -- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Erp. Didn't think of that. It might be nice to have ALLERO_PRIM_QUAD_LIST as a ALLEGRO_PRIM_TYPE though... I've never done this before, so how would I specify the triangles, and what direction should the vertices of the triangles wind in?
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Evert
Member #794
November 2000
|
Edgar Reynaldo said: It might be nice to have ALLERO_PRIM_QUAD_LIST as a ALLEGRO_PRIM_TYPE though... If I recall correctly, the problem with that is backend support... |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Well, quads don't have to be supported natively if they can be supported with two nested calls to al_draw_prim using triangles. I just don't know how to do that yet. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Arthur Kalliokoski
Second in Command
February 2005
|
I don't know about Direct X, but OpenGL can do quads (they need to have all four vertices on the same plane to avoid distortion in unpredictable ways), the vertex order doesn't matter if glDisable(GL_CULL_FACE) is in effect, if it is in effect you can choose between glFrontFace(GL_CW) (clockwise) or glFrontFace(GL_CCW) (the default counterclockwise order). I believe most 3d editors use counterclockwise. They all watch too much MSNBC... they get ideas. |
Evert
Member #794
November 2000
|
Arthur Kalliokoski said: OpenGL can do quads
But their performance is worse than triangle strips, and I think they've been removed from OpenGL ES (could look that up to be certain). |
Thomas Fjellstrom
Member #476
June 2000
|
Evert said: But their performance is worse than triangle strips, and I think they've been removed from OpenGL ES (could look that up to be certain). Nope, not in OpenGL ES. As well, OpenGL 3 and 4 both lack the glBegin/glEnd/glVertex* style api, as well as any type of QUAD primitive for glDrawArrays. The docs only list these for OpenGl 3: GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY and GL_TRIANGLES_ADJACENCY. OpenGL 4 supports those, and GL_PATCHES. -- |
altalena
Member #13,639
October 2011
|
I'm wondering how hard it would be to do something like half-life software rendering, or even wolfenstein 3d in Allegro 5. ...At the briefest instant following creation all the matter of the universe was concentrated in a very small place, no larger than a grain of mustard. The matter at this time was very thin, so intangible, that it did not have real substance. It did have, however, a potential to gain substance and form and to become tangible matter. From the initial concentration of this intangible substance in its minute location, the substance expanded, expanding the universe as it did so. As the expansion progressed, a change in the substance occurred. This initially thin noncorporeal substance took on the tangible aspects of matter as we know it. From this initial act of creation, from this ethereally thin pseudosubstance, everything that has existed, or will ever exist, was, is, and will be formed. - the RaMBaN, 1194 - 1270 ג וּשְׁאַבְתֶּם-מַיִם, בְּשָׂשׂוֹן, מִמַּעַיְנֵי, הַיְשׁוּעָה. - Yeshayahu 12:3 |
|