| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| DrawTexEx() won't draw anything!; huh? | |
|---|---|
| Tweet Topic Started: Aug 1 2006, 01:21 PM (316 Views) | |
| joshua | Aug 1 2006, 01:21 PM Post #1 |
|
Unregistered
|
it's kinda strange, but I have copied the code from the help file: DrawTexEx (number, left, top, width, height, x, y, scalex, scaley, rotation, r, g, b, a) and filled in the stuff that has to be there, but nothing shows up! maybe I did something wrong... DrawTexEx (8, 0, 0, width, height, x, y, 1, 1, 0, 255, 255, 255, 1) Nothing is drawn at all! Please help! |
|
|
| Dr. Best | Aug 1 2006, 04:36 PM Post #2 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Did you call it in the draw event? BTW probably this won't be necessary anymore in the next U3D version. |
![]() |
|
| Evolver | Aug 1 2006, 04:36 PM Post #3 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
There are possible reasons of your problem: 1. DrawTexEx() must be placed in Draw event and object must be visible. 2. You must assign variables... width=your picture width height=your picture height ...or DrawTexEx (8, 0, 0, your picture width, your picture height, x, y, 1, 1, 0, 255, 255, 255, 1) 3. x and y coordinates must be assigned as screen coordinates, where texture will be drawn, otherwise it will be drawn in top left corner (x=0 y=0). You must use texture sized as power of two, for example 128x64 or 256x256. Otherwise texture will be scaled. |
![]() |
|
| joshua | Aug 1 2006, 05:02 PM Post #4 |
|
Unregistered
|
No, all of that isn't the problem. Maybe it's something with the arguments, 'cause DrawTex does work, but DrawTexEx with the same arguments doesn't. Strange eh ?
Anyway, thanks in advance!
|
|
|
| Evolver | Aug 1 2006, 05:23 PM Post #5 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
Now I get it, you must use alpha 0-255, not 0-1, 255 fully visible. |
![]() |
|
| Dr. Best | Aug 1 2006, 05:26 PM Post #6 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Found the mistake. Alpha is also given in the range from 0 to 255. So if you pass one the result is that the texture gets drawed with a very low alpha. P.S. width and height are given in the range from 0 to 1. I will explain all these things more detailed in the next version of the help file. |
![]() |
|
| joshua | Aug 1 2006, 05:41 PM Post #7 |
|
Unregistered
|
Thanks a hundred times! It works!
|
|
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |







![]](http://z1.ifrm.com/static/1/pip_r.png)

10:34 AM Jul 11