Bug in GUI: HasBorder = true causes exception
by Jason Cahill · in Torque X 2D · 07/12/2009 (4:08 pm) · 3 replies
This is for Torque X Core 3.0.0.0
GUIUtil.cs lines 267-269 seem to be the culprits. The correct solution is almost there:
Was:
Should be:
Note that the commented out line also has the bug of 9 vs. 8. After this fix, outlines seem to render fine.
GUIUtil.cs lines 267-269 seem to be the culprits. The correct solution is almost there:
Was:
// draw the vertices
while (_defaultMaterial.SetupPass())
gfx.Device.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 8);
// GFXDevice.Instance.Device.DrawUserPrimitives<GFXVertexFormat.PCTTBN>(PrimitiveType.TriangleStrip, verts, 0, 9);Should be:
// draw the vertices
//while (_defaultMaterial.SetupPass())
// gfx.Device.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 8);
GFXDevice.Instance.Device.DrawUserPrimitives<GFXVertexFormat.PCTTBN>(PrimitiveType.TriangleStrip, verts, 0, 8);Note that the commented out line also has the bug of 9 vs. 8. After this fix, outlines seem to render fine.
About the author
#2
The main thing is: I do not have enough spare time to build the amount of code that they wrote for some spare time fun projects.
However, I was a bit disappointed to find that the documentation on many parts of the system is just non-existent. The GUI system in particular. I spent all day kicking the thing around and think I've got my head around it. Having a working GUI system is really important, and they have one, but it's something you basically have to learn by looking at the sources. I don't know how someone without source code access would ever figure some of this stuff out.
The other complaint I've got is that they went in a different direction with TX than TGB and they are not feature identical. I was really hoping for a port of TGB to XNA. Torque X is not really that, or if it is, it's based on some version prior to 1.7.4. It's missing the A* stuff, it doesn't have swept circles (just swept polygons), and the components system (object aggregation / composition) is so very different from just a mega base class (object inheritance) that I felt like TX was more of a "learn the new engine" than it was a "leverage what you knew about TGB and get on the Xbox."
The thing that had me really cranky at first, but I have come to HIGHLY appreciate is the XML system in TX. Only when you have source code access do you realize how cool their XML system is for the elegance of getting you working quickly. At first I thought it was just a way to force you to use TXB. It's not. It's an amazingly short-hand way of "newing up" everything you are going to need for a level. I was being a bit of a purest, wanting to create every aspect of my game in code... now that I understand the system and see the power of it, it's clear than my txscene files are code... and can be just as easily built in VS as in TXB.
07/12/2009 (7:49 pm)
Yes and no. The amount of code that they've written is pretty impressive. I don't know how many developers are on TX, but there's a lot of code and it works pretty well. There are bugs, but there will always be bugs in any project of almost any size.The main thing is: I do not have enough spare time to build the amount of code that they wrote for some spare time fun projects.
However, I was a bit disappointed to find that the documentation on many parts of the system is just non-existent. The GUI system in particular. I spent all day kicking the thing around and think I've got my head around it. Having a working GUI system is really important, and they have one, but it's something you basically have to learn by looking at the sources. I don't know how someone without source code access would ever figure some of this stuff out.
The other complaint I've got is that they went in a different direction with TX than TGB and they are not feature identical. I was really hoping for a port of TGB to XNA. Torque X is not really that, or if it is, it's based on some version prior to 1.7.4. It's missing the A* stuff, it doesn't have swept circles (just swept polygons), and the components system (object aggregation / composition) is so very different from just a mega base class (object inheritance) that I felt like TX was more of a "learn the new engine" than it was a "leverage what you knew about TGB and get on the Xbox."
The thing that had me really cranky at first, but I have come to HIGHLY appreciate is the XML system in TX. Only when you have source code access do you realize how cool their XML system is for the elegance of getting you working quickly. At first I thought it was just a way to force you to use TXB. It's not. It's an amazingly short-hand way of "newing up" everything you are going to need for a level. I was being a bit of a purest, wanting to create every aspect of my game in code... now that I understand the system and see the power of it, it's clear than my txscene files are code... and can be just as easily built in VS as in TXB.
#3
Brian
07/14/2009 (11:41 am)
@Jason - If you get a chance, think you can write some quick and dirty tutorials on how to do some basic GUI things on TDN? They can always be cleaned up later but we really need to get info out there.Brian
Torque Owner Scott Zarnke
Unfortunately another sign that TorqueX was put out before really being ready :(