Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline EntilZha

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 131
    • Show all replies
    • http://www.hyperion-entertainment.com
Re: lame problem with warp3d devel
« on: December 24, 2004, 10:51:26 PM »
Why do you think that you don't need to call W3D_LockHardware because of W3D_CC_FAST ? This wil only allow the driver to modify your vertex structures, and I think only the Virge driver actually makes use of this.

You still need to call W3D_LockHardware. The point of W3D_Lockhardware is to ensure that the bitmaps used for textures and the drawing region are in display memory, and can't move.

I should probably warn you that not all drivers can draw lines. You can use W3D_Query to check if it can draw lines by querying for W3D_Q_DRAW_LINE.

If it can, but you still don't get a line, then it's a bug... If it returns W3D_SUCCESS, then it's definitely a bug since the function should inform you that the context isn't locked...

What graphics card are you using ?
- Thomas
Avatar by Karlos
 

Offline EntilZha

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 131
    • Show all replies
    • http://www.hyperion-entertainment.com
Re: lame problem with warp3d devel
« Reply #1 on: December 25, 2004, 10:05:00 PM »
Quote
I do not using LockHardware now, becouse it HALT my system. It strange, look at this:


Without LockHardware, you can't use 3D graphics. One thing to look out for is anything that would do a graphics operation on the screen. You call "printf". You can't do that in LockHardware, because amoung other things, LockHardware calls the CyberGraphics/Picasso96 equivalent of LockBitMap. LockBitmap is global, you can only lock one bitmap at a time. printf and the subsequent output in the shell will also call LockBitMap, which will lock up because you already hold another lock.

The only possibility to get around this is not to use printf or other functions during a W3D_LockHardware
- Thomas
Avatar by Karlos
 

Offline EntilZha

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 131
    • Show all replies
    • http://www.hyperion-entertainment.com
Re: lame problem with warp3d devel
« Reply #2 on: December 26, 2004, 11:38:23 AM »
It definitely can't draw points. The Voodoo chip itself can't draw line, either, so initially, it wasn't implemented. Later on, we implemented lines by drawing a thin triangle strip, but obviously forgot to update the query table. Thanks for the pointer.
- Thomas
Avatar by Karlos
 

Offline EntilZha

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 131
    • Show all replies
    • http://www.hyperion-entertainment.com
Re: lame problem with warp3d devel
« Reply #3 on: December 27, 2004, 01:20:03 AM »
Quote

kas1e wrote:
"Later on, we implemented" - "we" mean we the Elbox ?:)


"We" means we, as in Hans-Jörg and me. The Warp3D drivers are never done by Elbox.

Quote

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 ?


No, Warp3D can't allocate bitmaps. You need to allocate them via graphics.library, and make them a friend bitmap of your screen's or window's bitmap.

Quote

 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..


Forget WritePixelArray for such things. If you need to write an offscreen bitmap to the screen or a window, use ClipBlit, or Warp3D  :-D It should be pretty fast with the Voodoo...

Note, though, as Crumb already said, that the Voodoo 3 can only do 256x256 textures... Yu can query that as well via W3D_Query... The P2, for example, supports up to 2048x2048.

If you need "odd" formats, create multiple textures, and draw them as "tiles", i.e. cut the picture into 256x256 blocks, and render them to the screen as 256x256 pixel quads or triangle fans.
- Thomas
Avatar by Karlos