Show Posts

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


Messages - AGP

Pages: [1] 2 3 ... 115
1
Support / Re: Cpct?
« on: August 18, 2021, 10:56:30 pm »
What do you think that it says that the objects that don't get rendered are always calling CompiledInstance.compileToVBO()?

2
Support / Re: Cpct?
« on: August 13, 2021, 10:39:00 pm »
The character (which is skinned and stored in a JSON-serialized format that mimics the original Java one) and the Skybox get rendered.

3
Support / Re: Cpct?
« on: August 12, 2021, 12:08:11 am »
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.

Code: [Select]
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

4
Support / Re: Cpct?
« on: August 10, 2021, 07:48:37 pm »
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."

Code: [Select]
                     if (!wireFrame) {
                            if (vertexAlpha) {
                                   // Actually, this doesn't matter but anyway...
                                   cols[3] = 1;
                            }
                            System.Console.WriteLine("CompiledInstance.render(): "+obj.getName() +" about to render.");

5
Support / Re: Cpct?
« on: August 09, 2021, 07:59:10 pm »
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.

6
Support / Re: Cpct?
« on: August 07, 2021, 08:02:36 pm »
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).

7
Support / Re: Cpct?
« on: August 06, 2021, 08:00:07 am »
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.

8
Support / Re: Cpct?
« on: August 04, 2021, 08:34:47 pm »
It's compiled code, man, it's not a bytecode. No line numbers in C# stack traces.

9
Support / Re: Cpct?
« on: August 03, 2021, 07:57:47 pm »
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

10
Support / Re: Cpct?
« on: August 02, 2021, 10:12:49 pm »
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...

11
Support / Re: Cpct?
« on: July 07, 2021, 09:19:51 am »
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.

12
Support / Re: Cpct?
« on: July 04, 2021, 07:33:33 pm »
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.

13
Support / Re: Cpct?
« on: July 04, 2021, 07:54:37 am »
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?

Code: [Select]
              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)

14
Support / Re: Cpct?
« on: June 28, 2021, 07:44:50 pm »
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.

Code: [Select]
              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);
                     }
              }

15
Support / Re: Cpct?
« on: June 25, 2021, 09:24:33 am »
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?

Pages: [1] 2 3 ... 115