Using cardmaker to texture a DirectFrame

Hi guys,

I would really appreciate some help on this topic.
I am new to panda3D. I am trying to make a class of Frames that can be custom textured. What i want to do is to allow the user to specify different textures for each side of the frame and one for each corner of the frame.
The idea is to preserve the detail of the corners even if the frame size becomes too large.
i could make a texture with a finished frame (all borders and corners arranged) and apply it to my DirectFrame, but if the frame is resized to a bigger size, the texture will lose its detail no?

I was hoping to use CardMaker to build the custom frame texture allowing the sides to stretch with bigger frames but keeping the corner at the same size to avoid losing the details. Does that make sense?

My question is how can arrange many texture images on one Card specifying the width/height/and position?
I have tried setTexScale() and setTexOffset() but it seems that each texture gets repeated many times to fill the whole frame while i just want it to remain as a border.
Am i on the right track there? is there an easier way?
Any help will be appreciated/

Lebdev

I take it that you want the corners to be static and the sides to tile their textures to produce a detailed border without stretching?

If so, then why not simply use eight cards: one for each corner and border?

When you resize the frame you then move the corners to their new locations, move the sides similarly, then scale the sides as appropriate and update their texture scale to tile their textures.

It is an option, i was wondering though if it would be feasible to put everything on one card.
Thank you for the answer, i will give it a try.

LebDev