Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AGP

Pages: 1 ... 5 6 [7] 8 9 ... 116
91
Support / Re: Cpct?
« on: November 20, 2019, 07:37:24 pm »
Loading an image is a simple call to Image.FromFile(filename). Which leaves us the texture coordinates. Would that be in Object3D?

92
Support / Re: Cpct?
« on: November 20, 2019, 01:33:54 am »
OK, done. Same thing: single-colored textures work, images don't (and the images aren't null, either).

93
Support / Re: Cpct?
« on: November 19, 2019, 08:34:24 am »
I haven't ported ExtendedPrimitives, but my second model was sphere from Primitives (first one was an OBJ sphere). Same problem.

94
Support / Re: Cpct?
« on: November 18, 2019, 12:42:08 am »
And blue looks really blue. The problem, then, has to be in the texture coordinates, don't you think? And where might I fix them? And don't say the Loader class, because the same problem happens with multiple formats (and I have to have gotten at least one right lol).

95
Support / Re: Cpct?
« on: November 18, 2019, 12:28:22 am »
I didn't know it always used a white texture. This is what it looks like with a green texture applied:

https://www.dropbox.com/s/638qg16adshb77d/screenFromSoftGLRenderer.png?dl=0

96
Support / Re: Cpct?
« on: November 15, 2019, 07:31:04 am »
I wish that it were a mere matter of placement, but I'm not getting any texturing whatsoever.

97
Support / Re: Cpct?
« on: November 13, 2019, 08:49:55 pm »
I just spent much longer than anticipated converting pixels to uint[]. It works, now, but I'm getting the same result (shading if untextured, and a black silhouette if textured).

Have you another suggestion?

98
Support / Re: Cpct?
« on: November 11, 2019, 03:58:02 pm »
I know that Java doesn't have them, but should I just make pixels[] uint or is there a scenario when they're supposed to be negative?

99
Support / Re: Cpct?
« on: November 11, 2019, 12:31:05 am »
Note: the following line produces, "Texture of polyID 1: DarthVader.png." And the texture was added to the TextureManager.

Code: [Select]
Logger.log("Texture of polyID 1: "+TextureManager.getInstance().getNameByID(sphere.getPolygonManager().getPolygonTexture(1)));

100
Support / Re: Cpct?
« on: November 10, 2019, 08:47:30 pm »
Update. I'm now getting a pretty fast framerate and rendering solid, shaded but untextured objects. (I was adding to the wrong byte and it was just OR 255):
https://www.dropbox.com/s/638qg16adshb77d/screenFromSoftGLRenderer.png?dl=0

Code: [Select]
private static System.UInt32 ReverseBytes(System.UInt32 value) {
    value = (value | 255);//MAKE OPAQUE
    return (value & 0x000000FFU) << 24 | (value & 0x0000FF00U) << 8 | (value & 0x00FF0000U) >> 8 | (value & 0xFF000000U) >> 24;
}

If I call setTexture on this MD2, Darth Vader becomes unshaded and solid black.

101
Support / Re: Cpct?
« on: November 10, 2019, 08:22:45 pm »
I read somewhere that the bytes are flipped. So before drawing I'm trying to change them the following way. I get only a blank screen, once more.

Code: [Select]
private static System.UInt32 ReverseBytes(System.UInt32 value) {
    value += 4278190080;//MAKE OPAQUE; IS THIS RIGHT? (THAT'S 1111 1111 0000 0000 0000 0000 0000 0000)
    return (value & 0x000000FFU) << 24 | (value & 0x0000FF00U) << 8 | (value & 0x00FF0000U) >> 8 | (value & 0xFF000000U) >> 24;
}

102
Support / Re: Cpct?
« on: November 07, 2019, 06:49:05 am »
It's a bit hairy for me, since I don't really know what you're doing, but from what I gather alpha should be 24 bits shifted LEFT, red shifted 16 left, and so on. Is this line (under OptiZ) wrong (green is shifted by 8, then the whole thing gets shifted by 16)?
Code: [Select]
g=(((col>>8)&255)*(sgI>>10))>>16;

103
Support / Re: Cpct?
« on: November 07, 2019, 03:38:08 am »
Done. But if the clear color was wrong, doesn't it follow that the texture-rendering stuff would be, as well (hence the unshaded sillouettes)? Put differently, where do I find the perspective-correct texture code in which to look for this issue?

104
Support / Re: Cpct?
« on: November 06, 2019, 03:47:44 pm »
It's in clearSoftware(Color).

105
Support / Re: Cpct?
« on: November 06, 2019, 06:08:24 am »
Sure enough replacing pix=color; with pix=col.ToArgb(); started clearing. I'm now getting unshaded, untextured objects rendered against the appropriate color. Is my line much slower than your bit-shifting?

Pages: 1 ... 5 6 [7] 8 9 ... 116