On Radeon9250 (and maybe on some other Warp3d Radeon drivers), on aos4.1u2 (and u1, and plain 4.1) W3D_DrawElements function just does not works. Programms which use that function works itself (no crash, no freeze), everything looks ok, but visually just black screen, and no any rendering happenes.
Function back that everything ok, but just do not works.
But we got it to work with mA1 + Radeon 7000 with W3D_Radeon.library *52.x*. (the same source), so, i think that something broken in drivers.
I upload the code example (and aos4 binary) to reproduce the problem here.
The same example works on any 68k warp3d drivers (elbox ones with voodoo3, and hyperion ones, with bvision and cvision), and on morphos too (i know that make no big since, but, it can show that code are works ). But do not works on aos4 with radeon9250 and maybe on others.
@All
Will be good, if users can just download example, and try on their machines, and write - did it works, or black screen, and on which configs/gfx cards.
FPSE is using DrawElements and is working with 4.1 update 1 and the Radeon 9250. I'm guessing something isn't setup correctly and just happends to work on the Radeon 7000 (and "lesser") but not on the 9250.
(I wouldn't use the FPSE Warp3D plugin with a Radeon 9250 though, as all textures will be rendered at half intensity (too dark), as there's something wrong with the colorscaling in the R200 driver.)
@kas1e Tried your test on OS4.1 Update 2 on my Sam440 Mini-ITX (built-in Radeon M9 chip), and it does *not* display any Cow. I tried disabling compositing, 32-bit screen, 16-bit screen, no difference.
If you can, take a look at code plz, and fix it if you can. I (and not only i), tryed to fix it many times with no luck. We read all that crappy warp3d documentation, check many states, but still, nothing. What make me think that there is a bug (or , some kind of undocumented stuff, which we do not know).
Maybe you also can just create an example, where you draw on screen 1 texture by w3d_DrawElements function (not W3D_DrawArray (maybe you miss it ?) , but exactly W3D_DrawElements.
Had a quick look at the sources and started by searching for the setting of w, as I had issues with that myself in the past. Anyway, if I remember correctly it should basically be set to 1.0-z, but you are setting it to 1.0/z. Don't know if that's the issue here though (not in front of my A1 right now)...
" In Warp3D, the W coordinate is used as the inverse of the z coordinate, i.e. w = 1/z. The reason for this is that for texture mapping, the z value is not linear, but 1/z is(1). Note that the z value we are talking about here is the z value in camera or eye space, that is, before the perspective transformation took place."
==> if we do perspective x2=perspectiveformula(x); y2=perspectiveformula(y); z2=perspectiveformula(z);
Then w=1/z not 1/z2
But there is no perspective in our code-example ..
@ChrisH I know how its boring to found bugs (if there is code bug) in code done not by yourself :) But hope AmiDog or Hans can just make it works => it can be used as example for all the others later.
I've had a look, and this is a bug in the driver. You're not doing anything wrong, and the fact that it works with Radon 7000 series confirms that. MiniGL uses W3D_InterleavedArrays(), not W3D_VertexPointer() when it uses W3D_DrawElements().
Can you somehow traced it, or, maybe just add to aos4 bugs database that with attached my example, so, Rogue (or who fix w3d bugs) can easyly check and reproduce it.
Can you somehow traced it, or, maybe just add to aos4 bugs database that with attached my example, so, Rogue (or who fix w3d bugs) can easyly check and reproduce it.