Rotating a 3D object around its own origin



I know this topic has been discussed before, and the solution is usually that rotation comes before translation of the model. However other threads seem to focus on imported models.

My problem is a little different. I have created various objects that draw multiple things at once in the draw event.





If I add a rotation command, the object rotates around the room axis. How can I translate it to its origin? If I use the code d3d_transform_add_translation(x,y,0) or the actual coordinates placed in the room, it just isn't there when the game runs. What am I doing wrong?
Think of transforming and drawing as this: transformations are the new origin, and the actual block drawing is the offset from that origin. If you transform, don't factor in the coordinates into the drawing line, otherwise you'll be stacking. For example, if you translate to 100,100,100, but also draw the block at 100,100,100, the block will draw at 200,200,200. If you're also rotating, it's then like using lengthdir as it will orbit around that 100,100,100 point from 100 units away due to the offset.

So just add in the transformations again but remove the coordinates from the block drawing.


Thanks for clearing that up.
I apologise for sounding very stupid, but I can't see how this would work for things that have been drawn relative to each other. For example
a wall may be drawn at the front of the block, and a floor may be drawn above the block. How would you go about it? Would I need to rotate and translate each individual drawing function?
There is no relativity to each other, only to the origin. Draw everything where they need to be initially, the transformations will handle the rest.