Now that even Excelsior Jet has been made extinct, how would you feel about making a c# version of jpct? At least the OpenGL bits would be better.
Well, I'm not interested in C# at all. As long as I don't have to use it (and I don't see why that would happen), I won't touch it.
Even with the Mono project (and, thus, being multi-platform)? How come? Now that there's no way to make machine code out of Java, I think that I may go with C#.
I looked into it briefly, I found it like Java with some additional clutter on top, that doesn't really make it any better and it's Microsoft. I have nothing against Microsoft, but the community is strange. Whenever I had to deal with the community of a Microsoft product (the scripting language in Powershell is an example where I had to rely on it, VBA for Access another), it's somehow disappointing...I've noticed a pattern:
- Java community: You usually get a solution or at least an idea pretty quickly. Sometimes is overly complicated, because Java people tend add layers of libs on top of each other, but you can ignore that most of the time.
- Javascript community: Similar to Java, actually. Just more unorganized and more focused on the latest hot shit (i.e. not older than 2 weeks).
- PHP community: You usually get a soution, but it often feels awkward and clunky, just like the language itself.
- Microsoft community: One question, multiple solutions but none refers to the actual quesiton. But obviously that doesn't matter, because the poster of the question thanks them anyway.
I have found every question I've ever had already asked and answered. I hope to be able to show something in the next few days.
I'm stuck in the FrameBuffer pixels thing. I found a way to do pretty much the same thing (https://stackoverflow.com/questions/1563038/fast-work-with-bitmaps-in-c-sharp (https://stackoverflow.com/questions/1563038/fast-work-with-bitmaps-in-c-sharp)), but pixels[] is too entrenched in the code.
Software renderer is compiled and running (not drawing anything yet, though).
I even ported the loader. Everything's working except for the actual rendering (when I don't assign random colors to the polygons in SoftGLRenderer). In clearSoftware(Color col), I'm printing this: Logger.log("Coloring. Color: "+color +", Col: "+col.ToArgb());
And the result is: Coloring. Color: 16711680, Col: -65536
Could this be a byte order thing or is it just because the first integer doesn't hold the alpha?
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?
It's certainly slower. I'm not sure from where exactly this code snippet comes!? Is it inside the rendering loop or some loader/setup code. In case of the former, it might be critical.
It's in clearSoftware(Color).
I see. In that case, just move the call to col.ToArgb() out of the loop and assign the result, so that you don't have to do it thousands of times for frame.
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?
In the SoftGLRenderer.
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)?
g=(((col>>8)&255)*(sgI>>10))>>16;
No, it's fine. It's some fixed point magix. You should be able to port that just at it is. Apart from that, your assumptions about the colors is correct. It's plain ARGB format.
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.
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;
}
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 (https://www.dropbox.com/s/638qg16adshb77d/screenFromSoftGLRenderer.png?dl=0)
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.
Note: the following line produces, "Texture of polyID 1: DarthVader.png." And the texture was added to the TextureManager.
Logger.log("Texture of polyID 1: "+TextureManager.getInstance().getNameByID(sphere.getPolygonManager().getPolygonTexture(1)));
I'm not sure about C#, but in Java, you have to handle the fact that the most significant bit of an int actually is the sign. So when shifting value & 0xff000000 down by 24, you have to remove the sign bit afterwards, because if not, you'll end up with some very different number from what you expect. See this test case:
public class ShiftTest
{
public static void main(String[] args)
{
int value = 0xabcdef12;
int cw = (value & 0x000000ff) << 24 | (value & 0x0000ff00) << 8 | (value & 0x00ff0000) >> 8 | (value & 0xff000000) >> 24;
int cr = (value & 0x000000ff) << 24 | (value & 0x0000ff00) << 8 | (value & 0x00ff0000) >> 8 | ((value & 0xff000000) >> 24 & 0xff);
System.out.println("wrong: "+Integer.toHexString(cw));
System.out.println("correct: "+Integer.toHexString(cr));
}
}
Maybe that's an issue here?
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?
No, the are always positive.
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?
I'm not sure...personally, I would create a set of uni-colored textures (one red, one green and one blue), set the ambient light to all white and see which color value a rendered pixel gets then. Maybe that helps to find the root cause.
I wish that it were a mere matter of placement, but I'm not getting any texturing whatsoever.
Then something in your loading/conversion is wrong. jPCT always uses a texture of some kind. It can't do without. What happens, if you don't set a texture at all? You should get a white texture then. If you don't, your reading from the texture's array is wrong. If you do, then your loading is wrong.
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 (https://www.dropbox.com/s/638qg16adshb77d/screenFromSoftGLRenderer.png?dl=0)
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).
I somehow doubt that it's a coordinate issue...have you tried to use a less complex model for testing? Like a cube from http://www.jpct.net/doc/com/threed/jpct/util/ExtendedPrimitives.html#createCube(float) (http://www.jpct.net/doc/com/threed/jpct/util/ExtendedPrimitives.html#createCube(float))? If that displays a texture (maybe use some simple RGB colored one like one stripe or each compontent) with with wrong colors, your conversion or rendering is wrong. If it doesn't render a texture at all or it looks distorted, your coordinate handling is wrong. Albeit I don't know how you should habe managed to do that, because the data types used for these should be the same between Java and C#.
I haven't ported ExtendedPrimitives, but my second model was sphere from Primitives (first one was an OBJ sphere). Same problem.
Yeah, but Primitives don't really have proper texture coordinates. That's the point of ExtendedPrimitives. I suggest to port that too to have something that helps to limit the possible problem sources.
OK, done. Same thing: single-colored textures work, images don't (and the images aren't null, either).
Then either your loading/conversion of the texture is wrong or your texture coordinates are. I tend to the former, because that's more likely to get broken in porting then some simple floats that should behave the same in both languages.
Loading an image is a simple call to Image.FromFile(filename). Which leaves us the texture coordinates. Would that be in Object3D?
Quote from: AGP 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?
Are you sure? Loading is one thing, but you have to make an int[]-array out of the loaded image. I would rather think that this step is wrong.
I applied my ReverseBytes to the texels and still got black. Actually, at first I got fully-transparent, then I switched the bitwise OR for a bitwise AND for alpha as follows and I was back to black.
private static System.UInt32 ReverseBytes(System.UInt32 value) {
value = (value & 255);//MAKE OPAQUE IT's AN OR IN SoftGLRenderer. WHY?
return (value & 0x000000FFU) << 24 | (value & 0x0000FF00U) << 8 | (value & 0x00FF0000U) >> 8 | (value & 0xFF000000U) >> 24;
}
}
You're a good man, Egon. You were right, the texels[] were black. I'm forced to use the following rather slow nested loop, but voilá, it works.
I think that I'm going to tackle a skeletal structure for it before I try my hand at a hardware renderer, but the eventual C# hardware renderer will benefit from direct access to OpenGL.
int i = 0;
for (int y = 0; y < image.Height; y++)
for (int x = 0; x < image.Width; x++)
texels[i++] = (uint) image.GetPixel(x, y).ToArgb();
Skybox.render() is making my forest pink (not calling SkyBox.render, naturally, sees my forest green although the sky looks appropriately blue--and it doesn't escape me that blue+green=pink), for some reason. Have you any direction you might give me?
Do you have a screen shot?
Without SkyBox:
https://www.dropbox.com/s/dy5aird4uw22a3p/Forest_NoSkyBox.jpg?dl=0 (https://www.dropbox.com/s/dy5aird4uw22a3p/Forest_NoSkyBox.jpg?dl=0)
With SkyBox:
https://www.dropbox.com/s/y8wqt06phx73ol1/Forest_SkyBox.jpg?dl=0 (https://www.dropbox.com/s/y8wqt06phx73ol1/Forest_SkyBox.jpg?dl=0)
What the hell...is that actually using the software or the hardware renderer?
I only ported the software. I haven't decided which way to go with hardware yet.
I'm not sure what I'm seeing there then. If somehow looks as if you are rendering parts that should be hidden by the alpha channel. Like as if the texel sampled to deal with alpha doesn't match the one of the actual color value. But I don't see how that could happen nor do I understand what this has to do with the skybox. Inwould create a simpler test scene and try to narrow it down to what actually triggers this behaviour. In this complex scene, it's a little hard to tell.
What calls init(boolean ok, int x, int y)?
In which class?
AWTGLRenderer. init((int, int, int, int, int) is being called, but not the real one.
I'm not quite sure what you mean. There is no such method in thre AWTGLRenderer itself. There is one GLBase though (which is extended by AWTGLRenderer) and that one is being called by init() in AWTGLRenderer.
I moved it to AWTGLRenderer! init((int, int, int, int, int) doesn't call it, init() does and I can't see what calls init().
These three references do...(see attachment).
Thank you. I manually called init(...), but now I'm getting a black screen.
The following code
System.Console.WriteLine("execute(int, object[]): Parameters null? "+(parameters==null) +" Init? "+isInit +" Mode: "+mode);
prints the following:
Quote
execute(int, object[]): Parameters null? False Init? True Mode: 2
execute(int, object[]): Parameters null? False Init? True Mode: 0
execute(int, object[]): Parameters null? True Init? True Mode: 8
execute(int, object[]): Parameters null? True Init? True Mode: 1
execute(int, object[]): Parameters null? False Init? True Mode: 2
execute(int, object[]): Parameters null? False Init? True Mode: 0
Expanding command queue to 3000 entries!
execute(int, object[]): Parameters null? True Init? True Mode: 8
execute(int, object[]): Parameters null? True Init? True Mode: 1
execute(int, object[]): Parameters null? False Init? True Mode: 2
execute(int, object[]): Parameters null? False Init? True Mode: 0
and so on.
Do you have any useful insight here?
I don't know how much you've changed (obviously something, because otherwise, there would be no need to call init() by hand), so it's really hard to tell.
This line:
Expanding command queue to 3000 entries!
Indicates that your port never flushes the command queue, which usually happens, if no actual rendering happens for some reason. The queue fills with render commands, usually until you invoke the display() method AND your display implementation actually gets called (with normal LWJGL and software renderer, this happens instanstantly). With AWTGL and JOGL, it happens when the next iteration of the UI thread happens. I've no idea how C# handles this, though.
Anyway, if the queue never gets flushed, buffered commands will pile up like you see in this log output.
The problem there was that it's not paintGL in OpenTK, it's OnPaint. I solved that one. I'm happy that it now clears to the right color. drawWireframe() tells me the right color for the wireframe, but draws nothing, and draw() makes a mess. Still, I'm very happy to be achieving any kind of drawing. Any insight here would be greatly appreciated (see below video).
https://youtu.be/Pfuo77vKUbo (https://youtu.be/Pfuo77vKUbo)
No idea what it's drawing there. What it is supposed to be?
Hahah, it's supposed to be Vader (at exactly this lighting and distance):
https://www.dropbox.com/s/2ch8ajcin5ukdm3/SupposedToBe.png?dl=0 (https://www.dropbox.com/s/2ch8ajcin5ukdm3/SupposedToBe.png?dl=0)
Have you tried something simple, like a box or a sphere? Do those render correctly?
Yes, everything looks exactly the same (that screenshot was from the C-sharp software renderer, so there's no question that the loading is done right).
It that a compiled object or not? Either way, have to tried the opposite?
I hadn't had need of compiled objects because I was using the software renderer, so I don't have them yet.
What does it mean that only drawVertexArray() is being called (drawStrip() and drawPolygon() aren't)?
That's default behaviour, because it's usually the fastest way to do it (apart from compiling objects). You can disable it by setting:
Config.glVertexArrays=false;
Apparently this caused the following error:
Quote
Unhandled Exception: System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Texture.setMarker(Int32 renderer, Int32 mark)
at Texture.setMarker(Int32 mark)
at AWTGLRenderer.drawStrip(VisList visList, Int32 ind, Int32 length, FrameBuffer buffer, World world)
Note that I've changed nothing about the setMarker method (though wouldn't the Hashtable class complain about the same problem?).
No, Hashtable and HashMap don't care about this. And why would they? I consider it to be rather...not stupid...but, well let's go with stupid anyway...behaviour to throw an exception in this case. You would have to modify the code to check for the key and remove/add it or replace it, if that's supported.
I added the test. And then I think I fixed another issue. Now I'm only getting the appropriate background color, and convertTexture(Texture) is printing [ 12/30/2020 3:57:37 AM ] - ERROR: Failed to upload texture! texID, unhelpfully (helplessly?) is always 0.
That's before the actual upload happens. All it does, is to make the GL driver generate an ID. If that fails, it's most likely that something with your handling of the native buffers is wrong...or whatever C# uses in this place.
About that, I made a GenericBuffer<T> class to mimic Java's xBuffer classes. But there's a chunk in convertTexture() where you do IntBuffer (GenericBuffer<int> in mine) buf = getSmallBuffer(); GL11.GenTextures(buf) and then you claim that the texture refence is now in buf. But buf is a local variable that's never called again.
The GenTexture call puts it there.
Happy 95% of what remains of this year, pal.
What's with WorldProcessor.createWSNormals()? It seems to me to be both a waste of processing time and a waste of memory.
And what is supposed to be in visList.vobj[0]? It's become null as I tinkered with the World class.
WorldProcessor.createWSNormals() is needed for the software renderer when using environment mapping in world space. In every other case, it's not even called. All it does is to create 3 float[]-arrays (per WorldProcessor thread) to store the world space normals in, if needed and only once. So as long as you don't use this feature, it won't be called and if you do, then you have to live with the additional memory overhead.
vobj[0] is like any other index of vobj[]. When using the software render, it stores the reference to either the object itself (in that case, it's the same as vorg) or, if the polygon that belongs at this index is being clipped, a reference to the object that contains the clipped polygons.
Can you think of a reason why it might be null? It doesn't happen with the 1.03 World instance, but does with the 1.31.
vobj and vorg are either populated with the same instance (the actual object itself) or vorg is the object and vobj is the clipped polygon object. If vorg isn't null, but vobj is, then the clipped polygon object is null for some reason.
I'm not getting any lights, I think, since I ported World to 1.31. Everything I render with the software renderer is fully, flatly, black.
And by the way, software rendering on 1.31 is SO MUCH slower than on 1.03 (possibly the transparency additions but I would think it's because of the overall bloating of the code).
On my side, the software rendering code hasn't changed in ages. If something has been added, it has been added in a new method and leaves the old methods untouched, so having transparency added does nothing to the existing methods. It might be the runtime that for some reason decides not to just-in-time compile some methods or something like that.
I'm not even where I was when I started porting this thing: now even when I don't call setTexture I get a solid black, unshaded model. Same models that were working before. I had SoftGLRenderer print System.Console.WriteLine("Pixel color: "+r +", "+g +", "+b +" Pixel: "+pixels[tx]) and I get for uint[] pixels the interesting value of 4,278,190,335 (binary 11111111000000000000000011111111) in drawShadedZbufferedFilteredScanline(). If you have any insights, please share them because I need them.
Update: I had the epiphany of blitting the texture and calling setShadingMode(Object3D.SHADING_FAKED_FLAT). The texture blit looks perfect and SHADING_FAKED_FLAT made the model shade by the ambient light color (and still not by an added light), but fully and properly textured. I guess the problem would be in the gouraud shading block. Again, any direction would be greatly appreciated.
The thing is that faked flat actually means exactly that: It's fake. It's still using gouraud shading (there are no other rendering modes in jPCT's software renderer) but with the same color used on every vertex. If that fixes something, I can only imagine that somehow, your light intensity calculation on the vertices is off.
I'd say no lights are being calculated at all, because left untextured and gouraud all models appear black.
Then there should be at least the ambient lighting.
Found the issue, just don't get it. If it's not flatshaded, the following test will be false and even ambient lighting won't be calculated.
if (arrays[0][pos3] == 12345671 || isFlatShaded) { // Point already in the cache? Well then...
That's a placeholder value that indicates "not yet filled". Do ask why it has the value it has...I can't remember. Anyway, there should be code like this somewhere to clear this cache:
transformFlags[i] = 12345671;
Maybe you've ported that "away"...?
No, I knew that that was in transformVertices. It came down to another C# difference (Dictionary throwing an exception for not finding a key prompted me to catch it and create a new array in WorldProcessor.getArrays but I wasn't calling thread2Arrays.Add(tc, arrays) in the catch block). Voilá. Now to figure out why I'm only getting the ambient lighting. ; )
In the gouraud shading block of Object3D.render(), I had to set colMul to 1 as follows. I hate that, but at least the lights are being calculated.
if (!discard) {
colMul += spec;
colMul = 1.00f;
...
gx and gy are both 0. When I print the values of objVectorsnxTr[pos3] and invScaleFactor, as follows, I get the following output (at some point objVectorsnxTr[pos3] becomes 0).
Logger.log("objVectorsnxTr[pos3]: "+objVectorsnxTr[pos3] +", invScaleFactor: "+invScaleFactor);
Quote
objVectorsnxTr[pos3]: -0.02754658, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.3224086, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.001717074, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.5763285, invScaleFactor: 1
...
objVectorsnxTr[pos3]: 0.8757023, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.8600356, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.8600356, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.8709888, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.9966896, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.4980774, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.3910597, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.9446523, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.937071, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.07667674, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.8456958, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.1937691, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.5268521, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.2584651, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.7911943, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.1983738, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.5489044, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.7925232, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.716369, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.2036022, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.721458, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.9182732, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.7018681, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.794013, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.5646043, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.6472638, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.1838191, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.4464325, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.9402843, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.7470285, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.1453849, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.4424484, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.06958889, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.5219796, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.6994461, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.4723827, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.2131859, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.5358245, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.9231659, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.802191, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.2096631, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.9533308, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.9807692, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.9998421, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.766471, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.3366379, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.1630535, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.8853046, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.2297132, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.08216921, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.970468, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.7117062, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.4429376, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.3802269, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.2681608, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.923718, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.9345775, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.8293254, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.6339014, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.2209611, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.9219743, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.2492384, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.7921321, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.9277812, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.995459, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.9785283, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.7009124, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.084934, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.2503513, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.3185651, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.9098715, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.02948599, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.9640496, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.4850884, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.5507149, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.2249548, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.2465971, invScaleFactor: 1
objVectorsnxTr[pos3]: 0.8845565, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.9476686, invScaleFactor: 1
objVectorsnxTr[pos3]: -0.8730187, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
objVectorsnxTr[pos3]: 0, invScaleFactor: 1
These are the transformed normal vectors' coordinates. It might be possible, that the x coordinate is 0 for some polygons in your object (albeit unlikely). But that wouldn't affect the polygons where it isn't. I would assume that there's still something wrong with your check for "has been processed already"...that this wierd magic number, like here:
if (arrays[0][pos3] == 12345671 || isFlatShaded) {
Just change these occurences into something like
if (arrays[0][pos3] == 12345671 || isFlatShaded || true) {
If that helps, your handling/setting of this magic number is wrong.
For now my little cheat is working (as did yours), so I moved this annoyance to the backburner. I'm getting interesting blitting behavior, which is to say that all blitting methods work sometimes, and all fail others (work on simple demos, fail on stress-test ones). Alas, it is also in the backburner.
So I'm back with the AWTGLRenderer, where I'm getting StackOverflowExceptions. Logger.log("AWTDisplayList.switchBuffers(): count: "+count +", Is vl[1] null? "+(vl[1]==null)) prints AWTDisplayList.switchBuffers(): count: 346, Is vl[1] null? True. And for more detail, execute prints the following block of commands and, when finished calling FrameBuffer.display() my test program prints "Rendered once." AWTDisplayList.vl[0] and vl[1] have both shown themselves to be null.
Quote
execute(int, object[]): Parameters null? False Init? TrueMODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? TrueMODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? False Init? TrueMODE_SET_FRUSTUM: 0
execute(int, object[]): Parameters null? False Init? TrueMODE_REINIT: 23
execute(int, object[]): Parameters null? False Init? TrueMODE_GRAB_SCREEN: 6
execute(int, object[]): Parameters null? True Init? TrueMODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 346, Is vl[1] null? True
Canvas.switchList() completing.
Rendered once.
I'm stuck here, Egon. I assume that that's a recursion problem, but I can't see where the recursion happens.
vl(x) is non null only for added VisList instances. All other elements of that array are supposed to be null. And count being 346 doesn't seem unreasonable to me either. That's just the number of buffered commands in the list.
None of these value looks like a recursion/stack issue to me.
Is reset() ever called and how does the actual StackOverflowException looks like?
I don't know where to catch it and all I get is the following ("switchList completing" is printed right after reset() is called).
Quote
switchList() completing.
Process is terminated due to StackOverflowException.
So the C#-Runtime doesn't feel obliged to print the actual location of the exception? That's strange.
In that case...I don't know. Maybe using a debugger helps to find it or, which would be what I would do, adding some log output to each and every method that might cause this...
It seems that C# is just not good with StackOverflowExceptions. I installed WinDbg and, not usefully, got the following output. I really don't know how to use debuggers. LOL
Quote
Microsoft (R) Windows Debugger Version 10.0.20153.1000 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: D:\MyPrograms\3D\Demo3D\DemoGL.exe
************* Path validation summary **************
Response Time (ms) Location
Deferred srv*
Symbol search path is: srv*
Executable search path is:
ModLoad: 00000000`00b20000 00000000`00b28000 image00000000`00b20000
ModLoad: 00007ffe`bfce0000 00007ffe`bfed0000 ntdll.dll
ModLoad: 00007ffe`aabe0000 00007ffe`aac44000 C:\windows\SYSTEM32\MSCOREE.DLL
ModLoad: 00007ffe`be8d0000 00007ffe`be982000 C:\windows\System32\KERNEL32.dll
ModLoad: 00007ffe`bda40000 00007ffe`bdce5000 C:\windows\System32\KERNELBASE.dll
(601c.3670): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00007ffe`bfdb0fac cc int 3
0:000> sxe ld clr
0:000> .loadby SOS.dll clr
Unable to find module 'clr'
0:000> sxe ld clr
CommandLine: D:\MyPrograms\3D\Demo3D\DemoGL.exe
************* Path validation summary **************
Response Time (ms) Location
Deferred srv*
Symbol search path is: srv*
Executable search path is:
ModLoad: 00000000`00390000 00000000`00398000 image00000000`00390000
ModLoad: 00007ffe`bde30000 00007ffe`bded3000 C:\windows\System32\ADVAPI32.dll
ModLoad: 00007ffe`bfce0000 00007ffe`bfed0000 ntdll.dll
ModLoad: 00007ffe`be500000 00007ffe`be59e000 C:\windows\System32\msvcrt.dll
ModLoad: 00007ffe`bdd90000 00007ffe`bde27000 C:\windows\System32\sechost.dll
ModLoad: 00007ffe`be0a0000 00007ffe`be1bf000 C:\windows\System32\RPCRT4.dll
ModLoad: 00007ffe`aabe0000 00007ffe`aac44000 C:\windows\SYSTEM32\MSCOREE.DLL
ModLoad: 00007ffe`be8d0000 00007ffe`be982000 C:\windows\System32\KERNEL32.dll
ModLoad: 00007ffe`bda40000 00007ffe`bdce5000 C:\windows\System32\KERNELBASE.dll
ModLoad: 00007ffe`aab30000 00007ffe`aabda000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
ModLoad: 00007ffe`be040000 00007ffe`be092000 C:\windows\System32\SHLWAPI.dll
ModLoad: 00007ffe`be1c0000 00007ffe`be4f7000 C:\windows\System32\combase.dll
ModLoad: 00007ffe`bd8e0000 00007ffe`bd9da000 C:\windows\System32\ucrtbase.dll
ModLoad: 00007ffe`bcd00000 00007ffe`bcd81000 C:\windows\System32\bcryptPrimitives.dll
ModLoad: 00007ffe`bdf10000 00007ffe`bdf36000 C:\windows\System32\GDI32.dll
ModLoad: 00007ffe`bcc60000 00007ffe`bcc81000 C:\windows\System32\win32u.dll
ModLoad: 00007ffe`bcf10000 00007ffe`bd0a8000 C:\windows\System32\gdi32full.dll
ModLoad: 00007ffe`bdcf0000 00007ffe`bdd8e000 C:\windows\System32\msvcp_win.dll
ModLoad: 00007ffe`beb30000 00007ffe`becc4000 C:\windows\System32\USER32.dll
ModLoad: 00007ffe`bdee0000 00007ffe`bdf0e000 C:\windows\System32\IMM32.DLL
ModLoad: 00007ffe`bcc40000 00007ffe`bcc51000 C:\windows\System32\kernel.appcore.dll
ModLoad: 00007ffe`b7660000 00007ffe`b766a000 C:\windows\SYSTEM32\VERSION.dll
ModLoad: 00007ffe`693b0000 00007ffe`69e72000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
ntdll!NtMapViewOfSection+0x14:
00007ffe`bfd7d294 c3 ret
0:000> sxe ld clr
0:000> .loadby SOS.dll clr
0:000> !stoponexception -create System.StackOverflowException
Breakpoint set
0:000> g
ModLoad: 00007ffe`aa460000 00007ffe`aa51d000 C:\windows\SYSTEM32\ucrtbase_clr0400.dll
(2de4.1258): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00007ffe`bfdb0fac cc int 3
1:001> g
ModLoad: 00007ffe`b6400000 00007ffe`b6416000 C:\windows\SYSTEM32\VCRUNTIME140_CLR0400.dll
ModLoad: 00007ffe`bde30000 00007ffe`bded3000 C:\windows\System32\ADVAPI32.dll
ModLoad: 00007ffe`be500000 00007ffe`be59e000 C:\windows\System32\msvcrt.dll
ModLoad: 00007ffe`bdd90000 00007ffe`bde27000 C:\windows\System32\sechost.dll
ModLoad: 00007ffe`be0a0000 00007ffe`be1bf000 C:\windows\System32\RPCRT4.dll
ModLoad: 00007ffe`aab30000 00007ffe`aabda000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
(601c.3670): Unknown exception - code 04242420 (first chance)
ModLoad: 00007ffe`be040000 00007ffe`be092000 C:\windows\System32\SHLWAPI.dll
ModLoad: 00007ffe`be1c0000 00007ffe`be4f7000 C:\windows\System32\combase.dll
ModLoad: 00007ffe`bd8e0000 00007ffe`bd9da000 C:\windows\System32\ucrtbase.dll
ModLoad: 00007ffe`bcd00000 00007ffe`bcd81000 C:\windows\System32\bcryptPrimitives.dll
ModLoad: 00007ffe`bdf10000 00007ffe`bdf36000 C:\windows\System32\GDI32.dll
ModLoad: 00007ffe`bcc60000 00007ffe`bcc81000 C:\windows\System32\win32u.dll
ModLoad: 00007ffe`bcf10000 00007ffe`bd0a8000 C:\windows\System32\gdi32full.dll
ModLoad: 00007ffe`bdcf0000 00007ffe`bdd8e000 C:\windows\System32\msvcp_win.dll
ModLoad: 00007ffe`beb30000 00007ffe`becc4000 C:\windows\System32\USER32.dll
ModLoad: 00007ffe`67db0000 00007ffe`693b0000 C:\windows\assembly\NativeImages_v4.0.30319_64\mscorlib\ed4777cae83e1fc9087ac3dc82cf23ab\mscorlib.ni.dll
ModLoad: 00007ffe`bdee0000 00007ffe`bdf0e000 C:\windows\System32\IMM32.DLL
ModLoad: 00007ffe`bf2b0000 00007ffe`bf407000 C:\windows\System32\ole32.dll
ModLoad: 00007ffe`bcc40000 00007ffe`bcc51000 C:\windows\System32\kernel.appcore.dll
ModLoad: 00007ffe`b7660000 00007ffe`b766a000 C:\windows\SYSTEM32\VERSION.dll
ModLoad: 00007ffe`693b0000 00007ffe`69e72000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
ntdll!NtMapViewOfSection+0x14:
00007ffe`bfd7d294 c3 ret
1:001> g
ModLoad: 00007ffe`b6400000 00007ffe`b6416000 C:\windows\SYSTEM32\VCRUNTIME140_CLR0400.dll
ModLoad: 00007ffe`aa460000 00007ffe`aa51d000 C:\windows\SYSTEM32\ucrtbase_clr0400.dll
ModLoad: 00007ffe`5fa10000 00007ffe`60680000 C:\windows\assembly\NativeImages_v4.0.30319_64\System\76c2318d9c3680627b8a4a680bb84f48\System.ni.dll
(2de4.1258): Unknown exception - code 04242420 (first chance)
ModLoad: 00007ffe`71f10000 00007ffe`72104000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Drawing\ae4ddca078478b32a190cdf2c48e80f9\System.Drawing.ni.dll
ModLoad: 00007ffe`6ef60000 00007ffe`70008000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Windows.Forms\81767a18ed963e3a442c2c73684b4b28\System.Windows.Forms.ni.dll
ModLoad: 00007ffe`67db0000 00007ffe`693b0000 C:\windows\assembly\NativeImages_v4.0.30319_64\mscorlib\ed4777cae83e1fc9087ac3dc82cf23ab\mscorlib.ni.dll
ModLoad: 00007ffe`80c30000 00007ffe`80d7f000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
ntdll!NtMapViewOfSection+0x14:
00007ffe`bfd7d294 c3 ret
0:000> g
ModLoad: 00007ffe`bf2b0000 00007ffe`bf407000 C:\windows\System32\ole32.dll
ModLoad: 00000000`02d40000 00000000`02dc4000 image00000000`02d40000
ModLoad: 00000000`1b7b0000 00000000`1b834000 image00000000`1b7b0000
ModLoad: 00007ffe`5fa10000 00007ffe`60680000 C:\windows\assembly\NativeImages_v4.0.30319_64\System\76c2318d9c3680627b8a4a680bb84f48\System.ni.dll
ModLoad: 00000000`01110000 00000000`0111e000 OpenTK.GLControl.dll
ModLoad: 00000000`01120000 00000000`0112e000 OpenTK.GLControl.dll
ModLoad: 00007ffe`bcc90000 00007ffe`bcca7000 C:\windows\System32\CRYPTSP.dll
ModLoad: 00007ffe`71f10000 00007ffe`72104000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Drawing\ae4ddca078478b32a190cdf2c48e80f9\System.Drawing.ni.dll
ModLoad: 00007ffe`bbf50000 00007ffe`bbf83000 C:\windows\system32\rsaenh.dll
ModLoad: 00007ffe`bcd90000 00007ffe`bcdb6000 C:\windows\System32\bcrypt.dll
ModLoad: 00007ffe`bc5a0000 00007ffe`bc5ac000 C:\windows\SYSTEM32\CRYPTBASE.dll
ModLoad: 00007ffe`6ef60000 00007ffe`70008000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Windows.Forms\81767a18ed963e3a442c2c73684b4b28\System.Windows.Forms.ni.dll
ModLoad: 00000000`1b840000 00000000`1bdc0000 OpenTK.dll
ModLoad: 00000000`1bdc0000 00000000`1c340000 OpenTK.dll
ModLoad: 00007ffe`80c30000 00007ffe`80d7f000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
ntdll!NtMapViewOfSection+0x14:
00007ffe`bfd7d294 c3 ret
1:001> g
ModLoad: 00000000`1af50000 00000000`1afd4000 image00000000`1af50000
ModLoad: 00000000`1afe0000 00000000`1b064000 image00000000`1afe0000
ModLoad: 00000000`02640000 00000000`0264e000 OpenTK.GLControl.dll
ModLoad: 00000000`02650000 00000000`0265e000 OpenTK.GLControl.dll
ModLoad: 00007ffe`bcc90000 00007ffe`bcca7000 C:\windows\System32\CRYPTSP.dll
ModLoad: 00007ffe`bbf50000 00007ffe`bbf83000 C:\windows\system32\rsaenh.dll
ModLoad: 00007ffe`bcd90000 00007ffe`bcdb6000 C:\windows\System32\bcrypt.dll
ModLoad: 00007ffe`5ef90000 00007ffe`5fa05000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Core\8e03f9afd831af61f8413ed5a6b394cd\System.Core.ni.dll
ModLoad: 00007ffe`bc5a0000 00007ffe`bc5ac000 C:\windows\SYSTEM32\CRYPTBASE.dll
ModLoad: 00007ffe`679f0000 00007ffe`67b23000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Configuration\0230074871fa66a53c18cf61aa79cb38\System.Configuration.ni.dll
ModLoad: 00000000`1b070000 00000000`1b5f0000 OpenTK.dll
ModLoad: 00000000`1b5f0000 00000000`1bb70000 OpenTK.dll
ModLoad: 00007ffe`5c160000 00007ffe`5ca0b000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Xml\dc6e982e28f321870f322f1b3af2d83e\System.Xml.ni.dll
ModLoad: 00007ffe`bf5b0000 00007ffe`bfc98000 C:\windows\System32\shell32.dll
ModLoad: 00007ffe`bccb0000 00007ffe`bccfa000 C:\windows\System32\cfgmgr32.dll
ModLoad: 00007ffe`becd0000 00007ffe`bed77000 C:\windows\System32\shcore.dll
ModLoad: 00007ffe`bd160000 00007ffe`bd8db000 C:\windows\System32\windows.storage.dll
ModLoad: 00007ffe`bcbf0000 00007ffe`bcc13000 C:\windows\System32\profapi.dll
ModLoad: 00007ffe`bcba0000 00007ffe`bcbea000 C:\windows\System32\powrprof.dll
ModLoad: 00007ffe`bcb90000 00007ffe`bcba0000 C:\windows\System32\UMPDC.dll
ModLoad: 00007ffe`5ef90000 00007ffe`5fa05000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Core\8e03f9afd831af61f8413ed5a6b394cd\System.Core.ni.dll
ModLoad: 00007ffe`679f0000 00007ffe`67b23000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Configuration\0230074871fa66a53c18cf61aa79cb38\System.Configuration.ni.dll
ModLoad: 00007ffe`ba840000 00007ffe`ba8d9000 C:\windows\system32\uxtheme.dll
ModLoad: 00007ffe`b2290000 00007ffe`b2339000 C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.18362.1379_none_73b5a52ad813d2b1\comctl32.dll
ModLoad: 00007ffe`5c160000 00007ffe`5ca0b000 C:\windows\assembly\NativeImages_v4.0.30319_64\System.Xml\dc6e982e28f321870f322f1b3af2d83e\System.Xml.ni.dll
ModLoad: 00007ffe`bf5b0000 00007ffe`bfc98000 C:\windows\System32\shell32.dll
ModLoad: 00007ffe`bccb0000 00007ffe`bccfa000 C:\windows\System32\cfgmgr32.dll
ModLoad: 00007ffe`becd0000 00007ffe`bed77000 C:\windows\System32\shcore.dll
ModLoad: 00007ffe`bd160000 00007ffe`bd8db000 C:\windows\System32\windows.storage.dll
ModLoad: 00007ffe`bcbf0000 00007ffe`bcc13000 C:\windows\System32\profapi.dll
ModLoad: 00007ffe`bcba0000 00007ffe`bcbea000 C:\windows\System32\powrprof.dll
ModLoad: 00007ffe`bcb90000 00007ffe`bcba0000 C:\windows\System32\UMPDC.dll
ModLoad: 00007ffe`ba840000 00007ffe`ba8d9000 C:\windows\system32\uxtheme.dll
ModLoad: 00007ffe`b2290000 00007ffe`b2339000 C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.18362.1379_none_73b5a52ad813d2b1\comctl32.dll
ModLoad: 00007ffe`b14f0000 00007ffe`b1696000 C:\windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.1379_none_cf6ae6993eef3a92\gdiplus.dll
ModLoad: 00007ffe`be9f0000 00007ffe`beb25000 C:\windows\System32\MSCTF.dll
ModLoad: 00007ffe`bf4e0000 00007ffe`bf5a5000 C:\windows\System32\OLEAUT32.dll
ModLoad: 00007ffe`b14f0000 00007ffe`b1696000 C:\windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.1379_none_cf6ae6993eef3a92\gdiplus.dll
ModLoad: 00007ffe`be9f0000 00007ffe`beb25000 C:\windows\System32\MSCTF.dll
ModLoad: 00007ffe`bf4e0000 00007ffe`bf5a5000 C:\windows\System32\OLEAUT32.dll
ModLoad: 00007ffe`a1f70000 00007ffe`a20c6000 C:\windows\SYSTEM32\OPENGL32.DLL
ModLoad: 00007ffe`b7350000 00007ffe`b737c000 C:\windows\SYSTEM32\GLU32.dll
ModLoad: 00007ffe`bb6f0000 00007ffe`bb710000 C:\windows\SYSTEM32\dxcore.dll
(601c.3670): C++ EH exception - code e06d7363 (first chance)
(601c.3670): CLR exception - code e0434352 (first chance)
ModLoad: 00007ffe`a3980000 00007ffe`a3c7e000 C:\windows\SYSTEM32\DWrite.dll
ModLoad: 00007ffe`a1f70000 00007ffe`a20c6000 C:\windows\SYSTEM32\OPENGL32.DLL
ModLoad: 00007ffe`b7350000 00007ffe`b737c000 C:\windows\SYSTEM32\GLU32.dll
ModLoad: 00007ffe`bb6f0000 00007ffe`bb710000 C:\windows\SYSTEM32\dxcore.dll
(2de4.1258): C++ EH exception - code e06d7363 (first chance)
(2de4.1258): CLR exception - code e0434352 (first chance)
ModLoad: 00007ffe`a3980000 00007ffe`a3c7e000 C:\windows\SYSTEM32\DWrite.dll
ModLoad: 00007ffe`3f230000 00007ffe`41908000 C:\windows\System32\DriverStore\FileRepository\nvsm.inf_amd64_4f45c68d3a75c0b1\nvoglv64.dll
ModLoad: 00007ffe`bee00000 00007ffe`bf270000 C:\windows\System32\SETUPAPI.dll
ModLoad: 00007ffe`b8340000 00007ffe`b8353000 C:\windows\SYSTEM32\WTSAPI32.dll
ModLoad: 00007ffe`3f230000 00007ffe`41908000 C:\windows\System32\DriverStore\FileRepository\nvsm.inf_amd64_4f45c68d3a75c0b1\nvoglv64.dll
ModLoad: 00007ffe`bee00000 00007ffe`bf270000 C:\windows\System32\SETUPAPI.dll
ModLoad: 00007ffe`b8340000 00007ffe`b8353000 C:\windows\SYSTEM32\WTSAPI32.dll
ModLoad: 00007ffe`bc970000 00007ffe`bc99a000 C:\windows\SYSTEM32\DEVOBJ.dll
ModLoad: 00007ffe`bd9e0000 00007ffe`bda3c000 C:\windows\System32\WINTRUST.dll
ModLoad: 00007ffe`bcc20000 00007ffe`bcc32000 C:\windows\System32\MSASN1.dll
ModLoad: 00007ffe`bcdc0000 00007ffe`bcf0a000 C:\windows\System32\CRYPT32.dll
ModLoad: 00007ffe`bbbd0000 00007ffe`bbc01000 C:\windows\SYSTEM32\ntmarta.dll
ModLoad: 00007ffe`bc970000 00007ffe`bc99a000 C:\windows\SYSTEM32\DEVOBJ.dll
ModLoad: 00007ffe`bd9e0000 00007ffe`bda3c000 C:\windows\System32\WINTRUST.dll
ModLoad: 00007ffe`bcc20000 00007ffe`bcc32000 C:\windows\System32\MSASN1.dll
ModLoad: 00007ffe`bcdc0000 00007ffe`bcf0a000 C:\windows\System32\CRYPT32.dll
ModLoad: 00007ffe`bbbd0000 00007ffe`bbc01000 C:\windows\SYSTEM32\ntmarta.dll
ModLoad: 00007ffe`bae80000 00007ffe`baead000 C:\windows\SYSTEM32\dwmapi.dll
ModLoad: 00007ffe`bae80000 00007ffe`baead000 C:\windows\SYSTEM32\dwmapi.dll
ModLoad: 00007ffe`91a90000 00007ffe`91d3e000 C:\windows\system32\nvspcap64.dll
ModLoad: 00007ffe`91a90000 00007ffe`91d3e000 C:\windows\system32\nvspcap64.dll
ModLoad: 00007ffe`bbc70000 00007ffe`bbcc6000 C:\windows\SYSTEM32\WINSTA.dll
ModLoad: 00007ffe`bbc70000 00007ffe`bbcc6000 C:\windows\SYSTEM32\WINSTA.dll
(2de4.1258): CLR exception - code e0434352 (first chance)
(601c.3670): CLR exception - code e0434352 (first chance)
(2de4.1258): CLR exception - code e0434352 (first chance)
(601c.3670): CLR exception - code e0434352 (first chance)
(2de4.1258): CLR exception - code e0434352 (first chance)
(601c.3670): CLR exception - code e0434352 (first chance)
ModLoad: 00007ffe`a9390000 00007ffe`a942d000 C:\windows\System32\TextInputFramework.dll
ModLoad: 00007ffe`ba110000 00007ffe`ba1e4000 C:\windows\System32\CoreMessaging.dll
ModLoad: 00007ffe`a8840000 00007ffe`a8b6a000 C:\windows\System32\CoreUIComponents.dll
ModLoad: 00007ffe`b8890000 00007ffe`b89e2000 C:\windows\SYSTEM32\wintypes.dll
ModLoad: 00000000`25b50000 00000000`25ca2000 C:\windows\SYSTEM32\wintypes.dll
ModLoad: 00000000`22a10000 00000000`22b62000 C:\windows\SYSTEM32\wintypes.dll
ModLoad: 00007ffe`ae360000 00007ffe`ae607000 C:\windows\System32\iertutil.dll
(601c.3670): Stack overflow - code c00000fd (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
00007ffe`09eb373d f3ab rep stos dword ptr [rdi]
For whatever they're worth, the console printouts:
Quote
-> using BufferedImage
BufferedImageBuffer.getPixels()
Software renderer (OpenGL mode) initialized
Using LWJGL's AWTGLCanvas
execute(int, object[]): Parameters null? False Init? False MODE_RETURN_CANVAS: 11
Software renderer disposed
Loading Texture...numbers.jpg
Texture.loadTexture(string filename, FileStream inStream, Image img, bool alpha): Parameter is not valid.
[ 2/22/2021 3:56:59 AM ] - ERROR: File not found - replacement texture used instead!
Loading Texture...EarthTexture.png
Texture.loadTexture(string filename, FileStream inStream, Image img, bool alpha): Parameter is not valid.
[ 2/22/2021 3:56:59 AM ] - ERROR: File not found - replacement texture used instead!
Loading Texture...DarthVader.png
Texture.loadTexture(string filename, FileStream inStream, Image img, bool alpha): Parameter is not valid.
[ 2/22/2021 3:56:59 AM ] - ERROR: File not found - replacement texture used instead!
Adding Lightsource: 0
Vader texture ID: 2
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
GL_ARB_texture_env_combine supported and used!
FBO not supported or disabled!
VBO not supported or disabled!
OpenGL renderer initialized (using 4 texture stages)
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
execute(int, object[]): Parameters null? True Init? False MODE_SWAP_BUFFERS: 1
AWTDisplayList.switchBuffers(): count: 2, Is vl[1] null? True
ThreeDCanvas.switchList() completing.
execute(int, object[]): Parameters null? False Init? False MODE_CLEAR: 2
execute(int, object[]): Parameters null? False Init? False MODE_BLIT_TEXTURE: 4
How can Microsoft still be so bad with giving proper error messages? That doesn't help at all. The log output looks fine as well, as far as I can tell. I'm not sure, what's going on there. Does this problem occur immediately or after some time or do you have to trigger it somehow?
It happens immediately. No rendering, or even clearing, gets done.
So maybe it's just something that you are calling recursively by accident? Something like
callMe() {
// callMe(null); // What you are supposed to call
callMe(); // What you actually call by accident
}
callMe(SomeStuff stf) {
......
}
I tend to do these things when refactoring code, hence the idea.
I'm not doing recursion in my code. I thought maybe you had it somewhere I missed.
At any rate, I'm now porting the Worker class in an effort to fix the lighting annoyance in the SoftGLRenderer, and I came across a Thread.MAX_PRIORITY-1 assignment. MAX_PRIORITY is 10, NORM_PRIORITY is 5, and MIN_PRIORITY IS 1. So what's 9 about?
I wanted to give it a quite high priority, but not 10. If you use 10, older machines tended to execute nothing else anymore but this thread. 9 was a good compromise at the time. Today, it might not be even be needed and it might be a better idea to leave thread priorities alone anyway.
OK, now AWTGLRenderer is stuck on MODE_GRAB_SCREEN. Note that at the very beginning the frame's OnPaint() gets called and completes once. Then we get a lot of drawWireframe calls, followed by infinite MODE_GRAB_SCREENs.
Quote
ThreedCanvas.OnPaint()
ThreedCanvas.OnPaint(): Finished painting. Swapping buffers. onceList.count: 0
ThreedCanvas.OnPaint()
AWTGLRenderer.executeGL(): MODE_CLEAR: 2
AWTGLRenderer.executeGL(): MODE_SET_CAMERA: 21
AWTGLRenderer.executeGL(): MODE_SET_FRUSTUM: 0
AWTGLRenderer.executeGL(): MODE_REINIT: 23
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
drawWireframe(AWTDisplayList list, int ind): drawing with color: 255, 255, 0
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
Expanding command queue to 2000 entries!
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
AWTGLRenderer.executeGL(): MODE_GRAB_SCREEN: 6
Grabbing the screen rendered by the AWTGLRenderer is a bit of a pain anyway, because the calling thread (the one that want to grab the image) has to trigger a repaint and then wait for the paint thread to do that. I'm not sure how this should result in an endless list of calls though. Check what happens in the AWTGLRenderer's waitForPainting() method. Maybe canvas.isVisible() returns always false in your implementation or something like that.
I'm drawing again, albeit very weird shapes (even when I created an Object3D made up of a single triangle) with AWTGLRenderer. I've noticed that you call GL.VertexPointer(), as opposed to something like GL.GenBuffer() and GL.BindVertexArray(). Is there a reason for this or is that an OpenGL version thing? Should I try the latter or is that somehow wrong in the context of the engine?
Glvertexpointer just defines the format of the vertices in the array, not the array itself. This has to be done somehow, I don't see why it should be an issue here.
GL.VertexPointer must be called, you mean? Because createVertexArrays() doesn't call GL.BufferData(BufferTarget.ArrayBuffer, vertices.Length * sizeof(float), vertices, BufferUsageHint.StaticDraw). Should that not also be done? Put differently: where do you tell OpenGL to use the vertices object if not with VertexPointer()?
My bad. It also sets the pointer to the array in use. But there are no calls to bind any buffers in this case, because there are no buffers. You have to distinguish between the "normal" render pipeline and the compiled one. The compiled one uses buffers and such but the "normal" one just fills the arrays and renders them directly via glDrawArrays.
You can try to set Config.glVertexArrays to false and revert drawing to individual draw calls for each polygon. If this changes something, your vertex array handling is off. If it doesn't, something else is wrong.
Look at how strange this is: renderVertexArray(), before one of its many vertPos = 0 calls, prints this even as the very wrong shapes are drawn on the screen. Model being tested here is a simple Primitives.getSphere(20f) (I'm not even sure the 9 vertices is right for a sphere).
Logger.log("renderVertexArray(): number of vertices to draw: "+vertPos +", curPos: "+curPos);
Quote
renderVertexArray(): number of vertices to draw: 9, curPos: 3
renderVertexArray(): number of vertices to draw: 0, curPos: 0
renderVertexArray(): number of vertices to draw: 0, curPos: 0
renderVertexArray(): number of vertices to draw: 0, curPos: 0
renderVertexArray(): number of vertices to draw: 0, curPos: 0
...
By the way, a guy at the Android board says he's using version 1.32. Do you have different versions for PC and Android (because I thought we were at 1.31)?
9 vertices isn't right for a sphere. In uncompiled rendering mode, the number of vertices in one batch is dynamic but 9 for a uniformly textured sphere seems off.
I've released 1.32 yesterday. It has been available for quite some time as a beta release linked to from several threads. The version number is the same between desktop and android.
Seemed way too small a number to me as well. Do you understand that printout (note that what I interpreted as number of vertices was vertPos)?
vertPos is only used for blitting, IIRC. Its value shouldn't matter here. The drawing actually happens from 0 to curPos.
How do I get the number of vertices from inside the AWTGLRenderer, then? I know how to do it with World, Mesh, etc. but I really want to see what AWTGLRenderer has to identify the current problem.
It's curPos. The normal rendering mode (i.e. not for compiled objects) fill a given vertex array from 0 to <some vertex count> and renders that in one batch. How much it fills, depends on the object. If the object is uniformly textured (i.e. it uses the same texture(s) for each polygon), this value should be somewhere near the maximum size of that vertex array.
Have you tried what happens if you disable vertex arrays in the config? If that still renders junk, your problem isn't in the rendering but somewhere before.
It renders junk with vertex arrays, and it renders nothing if glVertexArrays is set to false.
It really looks like as if your geometry is wrong in the first place. Either that, or the conversion into GL format is faulty. In that case, it should at least render fine when using the software renderer. Does it?
Yes, I had to do that lighting hack on the 1.31 port (one or two of the light multipliers were always 0) but otherwise the SoftGLRenderer renders perfectly. And as I said, the current model being tested is from Primitives.
I'm sure the model is fine, if it renders in software. But maybe your conversion into GL coordinate system is buggy?
The reason that I don't think that that's it, other than the fact that I didn't change what you did, is that no matter what model I test this is what I get:
https://www.youtube.com/watch?v=Pfuo77vKUbo (https://www.youtube.com/watch?v=Pfuo77vKUbo)
No, that doesn't look like a problem in the model's setup...at least not as the sole reason of the problem. But it's actually impossible to tell what's going on there. Maybe some other GL setup going wrong, but it will be quite hard to find out. I would add a log output to every GL call in the Java version and then compare the trace that this produces with the same thing taken from the C# version while rendering the exact same scene. And then see, if there is a difference between the calls that these versions do. It will be quite a lot of work, I suppose, but you need some kind of reference to track this down and currently, you have none.
The GLRenderer (not yet the AWT) is working! Yay.
Good to hear that!
My big stress test case is only clearing the screen. The same forest model renders on a model tester if and only if glVertexArrays is set to false. On the stress test, with a player, two skyboxes and some NPCs even without vertex arrays nothing gets drawn. But wireframe always works, on both the loader and the stress test, whether or not vertex arrays are being used. I'm not sure how helpful the following printout will be, but I feel like renderVertexArray(int) should be printing contiguous numbers.
renderVertexArray(int): 3
renderVertexArray(int): 3
renderVertexArray(int): 3
renderVertexArray(int): 9
renderVertexArray(int): 51
renderVertexArray(int): 30
renderVertexArray(int): 120
renderVertexArray(int): 18
renderVertexArray(int): 120
renderVertexArray(int): 12
renderVertexArray(int): 120
renderVertexArray(int): 12
renderVertexArray(int): 6
renderVertexArray(int): 6
renderVertexArray(int): 3
renderVertexArray(int): 6
renderVertexArray(int): 6
renderVertexArray(int): 6
renderVertexArray(int): 6
renderVertexArray(int): 15
renderVertexArray(int): 3
renderVertexArray(int): 9
renderVertexArray(int): 3
renderVertexArray(int): 435
renderVertexArray(int): 51
renderVertexArray(int): 48
renderVertexArray(int): 3
renderVertexArray(int): 12
renderVertexArray(int): 3
renderVertexArray(int): 6
renderVertexArray(int): 3
renderVertexArray(int): 30
renderVertexArray(int): 3
renderVertexArray(int): 159
renderVertexArray(int): 3
renderVertexArray(int): 9
renderVertexArray(int): 3
renderVertexArray(int): 18
renderVertexArray(int): 3
renderVertexArray(int): 279
renderVertexArray(int): 18
renderVertexArray(int): 24
renderVertexArray(int): 12
renderVertexArray(int): 18
renderVertexArray(int): 3
renderVertexArray(int): 36
renderVertexArray(int): 18
renderVertexArray(int): 36
renderVertexArray(int): 18
renderVertexArray(int): 24
renderVertexArray(int): 81
renderVertexArray(int): 3
renderVertexArray(int): 3
renderVertexArray(int): 9
renderVertexArray(int): 15
renderVertexArray(int): 6
renderVertexArray(int): 6
renderVertexArray(int): 6
renderVertexArray(int): 3
renderVertexArray(int): 6
renderVertexArray(int): 12
renderVertexArray(int): 12
renderVertexArray(int): 18
renderVertexArray(int): 225
renderVertexArray(int): 3
renderVertexArray(int): 186
renderVertexArray(int): 3
renderVertexArray(int): 12
renderVertexArray(int): 6
renderVertexArray(int): 69
renderVertexArray(int): 168
renderVertexArray(int): 18
renderVertexArray(int): 444
renderVertexArray(int): 6
renderVertexArray(int): 15
renderVertexArray(int): 3
renderVertexArray(int): 3
renderVertexArray(int): 36
renderVertexArray(int): 240
renderVertexArray(int): 3
renderVertexArray(int): 6
renderVertexArray(int): 3
renderVertexArray(int): 3
renderVertexArray(int): 6
renderVertexArray(int): 12
renderVertexArray(int): 456
renderVertexArray(int): 21
I'm not sure what this number represents, but if it's the size, it might not be unreasonable, if you have many smaller models and/or smaller parts of the model that are using different textures.
But what does it tell you that when this complex forest model gets drawn it is only when vertex arrays are disabled? Also, why do wireframes always work?
Most likely that something is wrong with your vertex array setup and/or rendering code. Wireframe rendering are just simple call to glVertex3f, which draw one line at a time. Everything else is more complex, so there is an increased chance of getting it wrong at some stage.
But is it possible to have a mistake in the code and still have it sometimes work (a single bush from that forest will render without hitch with vertex arrays)?
Yes. OpenGL is a state machine. Maybe the state is correct for this one bush and gets screwed up afterwards.
I'm porting GLSLShader and ShadowHelper right now. Around line 382, ShadowHelper does world.setAmbientLight(col.getRed(), col.getRed(), col.getBlue()). Is that a bug or did you use red twice on purpose?
Opps, no....that's supposed to be col.getGreen(). The Android version does is correctly though.
This is what my renderVertexArray(int) method looks like, because I couldn't find OpenTK equivalents for the ARBMultitexture stuff. Could that be the problem?
private void renderVertexArray(int curPos) {
if (curPos != 0) {
bool dissed = false;
// For Projective the texture coordinates from ...
for (int i = 0; i < projective.Length; i++) {
if (projective[i] && buffersEnabled[i]) {
// ARBMultitexture.glClientActiveTextureARB(stageMap[i]);
GL.DisableClientState(ArrayCap.TextureCoordArray);
dissed = true;
}
}
GL.DrawArrays(PrimitiveType.Triangles, 0, curPos);
if (dissed) {
// And on again if required. Actually, this should be dead, but you are not in the driver.
for (int i = 0; i < projective.Length; i++) {
if (projective[i] && buffersEnabled[i]) {
// ARBMultitexture.glClientActiveTextureARB(stageMap[i]);
GL.EnableClientState(ArrayCap.TextureCoordArray);
}
}
}
}
}
I'm not sure what you mean, because there is ARBMultitexture-stuff in your code anyway. However, it might be worth a try and see if your constants are the same as they are in normal OpenGL. These should just be integers and if your toolkit isn't doing something really strange with them, something like PrimitiveType.Triangles should have the same value as OpenGL's GL_TRIANGLES.
The ARBMultitexture lines are commented out in the above code. But I found GL.ActiveTexture((TextureUnit)stageMap), which I hope is the same. Still, no progress on the vertex array problem. As for PrimtiveType.Triangles, I'm confident about it.
I see...it shouldn't matter much though, because it's only used for projective texturing, which in most cases, you don't need unless you are using shadow mapping and, well, projective textures.
Our little engine has a very specific approach to OpenGL, so online examples aren't always very helpful. I have found the following answer (https://stackoverflow.com/questions/61030683/opengl-opentk-drawing-with-indices-attempted-to-read-or-write-protected-memo (https://stackoverflow.com/questions/61030683/opengl-opentk-drawing-with-indices-attempted-to-read-or-write-protected-memo)) to a similar problem, but I can't fit it into the pipeline. GLRenderer.renderVertexArray(int) is currently throwing:
Quote
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OpenTK.Graphics.OpenGL.GL.DrawArrays(PrimitiveType mode, Int32 first, Int32 count)
at co.ratto.threed.GLRenderer.renderVertexArray(Int32 curPos)
at co.ratto.threed.GLRenderer.drawVertexArray(VisList visList, Int32 start, Int32 end, FrameBuffer buffer, World world)
at co.ratto.threed.World.draw(FrameBuffer buffer, Boolean wireframe, UInt32 frameColor, Int32 start, Int32 end)
at co.ratto.threed.World.draw(FrameBuffer buffer, Boolean wireframe, UInt32 frameColor)
at co.ratto.threed.World.draw(FrameBuffer buffer)
at co.ratto.threed.SkyBox.render(World world, FrameBuffer buffer)
at LivingForest.draw()
at LivingForest.gameLoop()
at LivingForest.OnUpdateFrame(FrameEventArgs e)
at OpenTK.GameWindow.RaiseUpdateFrame(Stopwatch watch, Double elapsed, Double& timestamp)
at OpenTK.GameWindow.DispatchUpdateFrame(Stopwatch watch)
at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
at LivingForest..ctor()
at LivingForest.Main(String[] args)
And this is my port (almost identical to yours):
private void createVertexArrays(int max) {
GL.EnableClientState(ArrayCap.TextureCoordArray);
for (int i = 0; i < max; i++) {
multiTextures[i] = new FloatBuffer(VertexArraySize * 2);
GL.ActiveTexture((TextureUnit)stageMap[i]);
GL.TexCoordPointer(2, TexCoordPointerType.Float, 8, multiTextures[i].array);
if (i == 0) {
textures = multiTextures[0];
buffersEnabled[0] = true;
}
}
}
private void renderVertexArray(int curPos) {
if (curPos != 0) {
bool dissed = false;
// For Projective the Texture Coordinates from ...
for (int i = 0; i < projective.Length; i++) {
if (projective[i] && buffersEnabled[i]) {
GL.ActiveTexture((TextureUnit)stageMap[i]);
GL.DisableClientState(ArrayCap.TextureCoordArray);
dissed = true;
}
}
GL.DrawArrays(PrimitiveType.Triangles, 0, curPos);
if (dissed) {
// And on again if necessary. Actually, that should be dead, but you are not in it in the driver.
for (int i = 0; i < projective.Length; i++) {
if (projective[i] && buffersEnabled[i]) {
GL.ActiveTexture((TextureUnit)stageMap[i]);
GL.EnableClientState(ArrayCap.TextureCoordArray);
}
}
}
}
}
If you have any insights I would greatly appreciate them.
Never mind that. After too long with no success, I've started rendering things beautifully. A lot of different problems at the moment, like the fact that no compiled object is working. Only so many blitting methods work at all, for that matter, maxPolysVisible can't be much more than 512k for some reason, and a few other mysteries.
Oh, and C# can't catch exceptions across threads, which is a nuisance. I may have to switch to Tasks, if that's doable.
I think that I've figured out my problem with CompiledInstance memory errors: I had to delete the reflection (I really wish you would forget Java 1.1 ever existed), and I can't see how your code ever calls Object3DCompiler.compile(...) (or Versionhelper5.compile(...) for that matter). Help me out?
It's called from within World.compile(), which you can most likely ignore, because it's only relevant if you call World.compileAllObjects() and from within WorldProcessor.processInternal(), which is the "normal" way.
I put in a bizarre wait of 2.5 seconds and cleared that block as far is this bit. Now, no matter what I try indices is null. What I'm trying is hacky, anyway, so I'd rather ask you when indices in CompiledInstance.renderVBO() might be null. The C# runtime operates very differently from the JVM.
do {
if (indexed) {
GL.BindBuffer(BufferTarget.ElementArrayBuffer, indicesId);
System.Console.WriteLine("CompiledInstance.renderVBO(): Is indices null? "+(indices==null));
if (indices==null){
indices = new IntBuffer(tris.Count * 3);
//return;
while (indices == null)
continue;}
GL.DrawElements(primitiveType, indexCount, DrawElementsType.UnsignedInt, indices.array);
System.Console.WriteLine("CompiledInstance.renderVBO(): BindBuffer()?");
GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0);
} else {
System.Console.WriteLine("\n\nCompiledInstance.renderVBO(): GL.DrawArrays(...).\n");
GL.DrawArrays(primitiveType, 0, cnt);
}
}
Indices can be null, if the object in question hasn't been compiled with indexed geometry. This should only be the case if the object is a dynamic one (i.e. animated or has an attribute list attached to it or a vertex controller). Or you can force non-indexed compilation by using the corresponding build() call.
However, if the indexed flag in a compiled instance is true, indices can't be null unless you did something wrong when compiling the object.
It's infuriating that although I don't know why the indexed flag is true, the following block produces the following output. I don't suppose anyone would have any insights here?
do {
if (indexed) {
GL.BindBuffer(BufferTarget.ElementArrayBuffer, indicesId);
System.Console.WriteLine("CompiledInstance.renderVBO(): Is indices null? "+(indices==null));
if (indices==null){
indexed = false;//A HACK
System.Console.WriteLine("HACKHACKHACKHACKHACKHACK");
indices = new IntBuffer(tris.Count * 3);
return;}
if (indexed){//A HACK
GL.DrawElements(primitiveType, indexCount, DrawElementsType.UnsignedInt, indices.array);
System.Console.WriteLine("CompiledInstance.renderVBO(): BindBuffer()?");
GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0);}
} else {
System.Console.WriteLine("\n\nCompiledInstance.renderVBO(): GL.DrawArrays(...).\n");
GL.DrawArrays(primitiveType, 0, cnt);
}
}
Quote
CompiledInstance.renderVBO(): Is indices null? True
HACKHACKHACKHACKHACKHACK
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at co.ratto.threed.CompiledInstance.renderVBO(Boolean vertexAlpha, IRenderHook hook)
at co.ratto.threed.CompiledInstance.render(Int32 myID, IRenderer renderer, Single[] ambient, Single[] cols, Boolean intoDepthMap, Camera cam, Single[][] lights, Boolean wireFrame, Object[] data)
at co.ratto.threed.GLRenderer.drawVertexArray(VisList visList, Int32 start, Int32 end, FrameBuffer buffer, World world)
at co.ratto.threed.World.draw(FrameBuffer buffer, Boolean wireframe, UInt32 frameColor, Int32 start, Int32 end)
at co.ratto.threed.World.draw(FrameBuffer buffer, Boolean wireframe, UInt32 frameColor)
at co.ratto.threed.World.draw(FrameBuffer buffer)
at co.ratto.threed.SkyBox.render(World world, FrameBuffer buffer)
at LivingForest.draw()
at LivingForest.gameLoop()
at LivingForest.OnUpdateFrame(FrameEventArgs e)
at OpenTK.GameWindow.RaiseUpdateFrame(Stopwatch watch, Double elapsed, Double& timestamp)
at OpenTK.GameWindow.DispatchUpdateFrame(Stopwatch watch)
at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
at LivingForest..ctor()
at LivingForest.Main(String[] args)
What's the actual line that throws this exception? The stack trace doesn't tell... ???
It has to be GL.DrawElements(primitiveType, indexCount, DrawElementsType.UnsignedInt, indices.array) because there's a printout right after it that doesn't get printed.
Ok. Have you tried to output everything that goes into that method? Maybe something other is null than the indices themselves.
Yeah, I added a try-catch to the entire method. It gets me through initialization, then it stops happening. Still, I'm not getting anything drawn when compiling the objects.
On occasions whose particularities I've yet to identify, I can't get rid of the following message.
Quote
WARNING: World.renderScene(): There's a problem with the object list not being consistent during rendering. This is often caused by concurrent modification of BR3D objects on a thread different from the rendering thread! Is camera null? False Is visList? False
Also, only the Skybox renders when compiled...
That message is printed out in the assumption that a null pointer is mainly caused by the situation mentioned in the message. I don't think that this applies here. Just check what the actual exception is (my code should log it afterwards, I don't know what your port does) or at least, in which line is happens. Still, there's something fishy with the way in which is setup things. There should be no need to catch some exceptions that happen during init. It doesn't really help, it just postpones the problem.
The NullPointerException only says, "Object reference not set to an instance of an object." Very useful, so I printed both the stack and the following messages:
Quote
NullReference: at Object3D.render(Boolean software, Single mx, Single my, Single scalex, Single scaley, Single divx, Single divy, Boolean mayOptimize, Int32 tc, FrameBuffer buffer)
at WorldProcessor.processInternal(FrameBuffer buffer, List`1 objectList, Portals portals, Camera camera, Boolean software, Single mx, Single my, Boolean mayOptimize, Boolean hasToSort, Int32 start, Int32 end, Single camScaleX, Single camScaleY, Boolean gl)
at WorldProcessor.process(FrameBuffer buffer, List`1 objectList, Portals portals, Camera camera, Boolean software, Single mx, Single my, Boolean mayOptimize, Boolean hasToSort, Int32 start, Int32 end, Single camScaleX, Single camScaleY, Boolean gl)
at World.renderScene(FrameBuffer buffer)
Object3D.render(): compiled. Is visList null? False
Object3D.render(): compiled. Is visList null? False
[ 8/4/2021 3:25:24 AM ] - WARNING: World.renderScene(): There's a problem with the object list not being consistent during rendering. This is often caused by concurrent modification of BR3D objects on a thread different from the rendering thread! Is camera null? False Is visList? False
No line number of any kind?
It's compiled code, man, it's not a bytecode. No line numbers in C# stack traces.
C# compiles into CIL, which is bytecode as well. It's very similar to what Java does, hence the similar performance characteristics. It should be possible for it to print out a line number. With this error message alone, it's almost impossible to find out, what is null here. Maybe you can configure the compiler to include line numbers? Some debug mode or similar?
Actually, I knew that. I also now know that the -debug option is not supported on Windows (or at least not Windows x64) for whatever reason. And every solution to line-number printing I find fails (one of them always prints line 0, another doesn't even compile on Mono). Fun.
See, that's why people should talk to each other. I could have been stuck on this forever if you hadn't mentioned line numbers. By making the debug call "debug:embedded" I got the line numbers in. The problem had been that my Lights class was not initializing the distanceOverride array. Compiled objects are still not rendering, though, so off to find that issue (now aided by the line numbers).
Update: the line thing (running my game by calling mono before the .exe) sometimes crashes the application and still fails to give you numbers. Here's where I am: I can compile(true) my main character. The Skybox, too, but it becomes semi-transparent. Nearly everything else disappears when compiled. Maybe the Skybox transparency is a hint, but I don't think so because the disappearing objects also don't show up as wireframes. It's as if jpct is either translating them far out of view or otherwise clipping them.
Or the rendering itself is faulty. Hard to tell. You can get the returned center of the objects. If that lies within reasonable bounds, the object should be visible. I think there is also a method similar to wasVisibleInLastFrame() or something like this in Object3D that you can call to see if the object was, well, visible (geometry wise, it doesn't mean that it has been rendered).
I put a WriteLine on the following block inside CompiledInstance.render() and for every model, including the ones that didn't render, I get "...about to render."
if (!wireFrame) {
if (vertexAlpha) {
// Actually, this doesn't matter but anyway...
cols[3] = 1;
}
System.Console.WriteLine("CompiledInstance.render(): "+obj.getName() +" about to render.");
I'm getting, I think, to a crucial place. I believe that it's one of the following three variables. If you have any insight about what might be wrong that around line 544 in CompiledInstance the rendering block never clears the if (!useDL || (listID == 0 && !buffersCreated)) test (and, thus, never renders most objects) I would appreciate it. The following is the state of most every object in this forest scene.
if (useDL || (listID != 0 && buffersCreated))
System.Console.WriteLine("Not rendering "+obj.getName() +" because useDL: "+useDL +", listID: "+listID +", buffersCreated: "+buffersCreated);
Quote
Not rendering grassB628_jPCT438 because useDL: True, listID: 0, buffersCreated: True
That actually doesn't look wrong to me at first glance. Does any object has a listID other than 0? If not, it might help to check where it gets assigned.
The character (which is skinned and stored in a JSON-serialized format that mimics the original Java one) and the Skybox get rendered.
What do you think that it says that the objects that don't get rendered are always calling CompiledInstance.compileToVBO()?