Game Development Community

Questions regarding rendering of primitives and textures

by Lethal Concept · in Torque 3D Professional · 09/22/2009 (11:50 am) · 21 replies

Hey folks,

I'm not a programmer in a graphics context at all, so my issue might just be me being dense.
My problem is, that i cant get T3D to draw custom stuff like primitives or textures (for stuff like rotated guibitmaps or "radar" stuff).

I guess the way Rendering is handled did chance a lot since TGEA, since stuff that got drawn in TGEA wont draw in T3D. The drawing code gets executed, but i dont see anything being drawn. E.g. did i add this:

int num = 12;
    for(int i = 0; i < num; i++)
    {
        for(int u = 0; u < num; u++)
        {
            for(int v = 0; v < num; v++)
            {
                GFX->getDrawUtil()->drawLine(Point3F(0,0,0), Point3F(i,u,v), ColorI(255,0,255));
            }
        }
    }

inside the onRender() of the gameTSCtrl. No Effect. I expected this to draw primites into the world, like i've seen it with a TGEA resource. Neither did a version with the PrimBuilder::begin() / ::end() yield any results.
Also, i tried to implement this http://www.garagegames.com/community/forums/viewthread/46855 to rotate a GuiBitmapCtrl derivative ... again, without result, even though the code gets executed without errors. The bitmap is either not drawn or the rotation is simply not happening, depending on where i put
GFX->popWorldMatrix();



I'm rather clueless and couldnt find any documentation, howto or resource that would explain this to someone that isnt familiar with graphics related programming. So i hope someone can supply me with a simple howto or just gimme a pointer to where i can look for a tutorial or any sort of explanation on what i need to do and in which context i need to do it to draw something to the screen/into the world.

Big thanks in advance!
Page«First 1 2 Next»
#21
10/19/2009 (5:39 pm)
The NavMeshes are actually rendered by some editor similar to the RiverEditor (which does something similar for the rivers controlnodes, sides and stuff). Also, placing the navmesh there as an object is something i want to avoid for the sake of leightweight information storage.


By Z-Testing, you mean zReadWrite or is this unrelated?
Page«First 1 2 Next»