Welcome, Guest. Please login or register.

Author Topic: lame problem with warp3d devel  (Read 2437 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kas1eTopic starter

lame problem with warp3d devel
« on: December 24, 2004, 03:57:09 PM »
hi 2 all.
i have very funny problem in warp3d develop. i can't draw a line :)
So:

1. W3D_RequestModeTags for Mode it
2. OpenScreenTags for open screen
3. init bitmap for w3d_context (bm=screen->RastPort.BitMap)
4. create context by W3D_CreateContextTags
well, i check on error result from this func, and
i have W3D_Success.
5. Problem here :) I try:

line.v1.x = 0;
line.v1.y = 0;
line.v2.x = 100;
line.v2.y = 400;

res = W3D_DrawLine(context,&line);
if(res==W3D_SUCCESS){printf("we draww a line\n");};


I do not W3D_LockHardware, becouse use W3D_CC_FAST, TRUE in context.
So, if i run it, i have:
"create context succesul"
"we draw a line"
and nothink happening on my screen. I try use W3D_SetDrawRegion, W3D_SetCurrentColor, W3D_SetState(indirect) .. any case - i do not view my line :( Why ? (But W3D_DrawLine said "ok" as you can see).

thanks fro answers
 

Offline kas1eTopic starter

Re: lame problem with warp3d devel
« Reply #1 on: December 25, 2004, 01:17:49 PM »
I do not using LockHardware now, becouse it HALT my system. It strange, look at this:

context=W3D_CreateContext(&CError,
   W3D_CC_MODEID,      MODEID,
   W3D_CC_BITMAP,      bm,
   W3D_CC_YOFFSET,     0,
   W3D_CC_DRIVERTYPE,  W3D_DRIVER_BEST,
TAG_DONE);

line.v1.x=0;line.v1.y=0;
line.v2.x=100;line.v2.y=300;

res=W3D_LockHardware(context);
if(res==W3D_SUCCESS){printf("success\n");};
if(res==W3D_NOTVISIBLE){printf("bitmap problem\n");};

W3D_DrawLine(context,&line);

W3D_UnLockHardware(context);

Delay(100);
W3D_DestroyContext(context);

if i running it, i do not view my line, system HALT and only reboot can help :) I do somethinks wrong ?

So, i using indirect mode now .. And can draw a line, but problem with W3D_Query. I mean i can draw line, but W3D_Query(context,W3D_Q_DRAW_LINE,W3D_FMT_CLUT); said me "w3d_not_supported". But next string is a W3D_DrawLine and it work :)


I am use Voodoo3 in my mediator on a1200. All samples from Warp4.2 working.

 

Offline kas1eTopic starter

Re: lame problem with warp3d devel
« Reply #2 on: December 25, 2004, 10:55:04 PM »
thanks for answers :)
ok, printf get out, and lockhardware was ok.

I have check by W3D_Query on all possibly variants, and is strange (?), but my voodoo3 said 'can't supported draw a line, can't supported draw a point". But i can draw a line in indirect and direct mode :) where is true ?:)
 

Offline kas1eTopic starter

Re: lame problem with warp3d devel
« Reply #3 on: December 26, 2004, 12:17:20 PM »
"Later on, we implemented" - "we" mean we the Elbox ?:)

btw, where is the best way for create 640x480x16bit bitmap ?
i have 040/33 and want fast fading/scrolling/etc. can i do it
with warp3d ? For example, load picture as texture, upload to
memory, lockhardware and put picture to screen (as texture).
I hope it can be fast ? I tryed this by cybergraphics.library
(by WritePixelArray) and have slow speed with scrolling these screen and fading too..