model shows when debug is on and doesnt when off
Blitz3D Forums/Blitz3D Programming/model shows when debug is on and doesnt when off
| ||
WHat could be causing this. I have never done 3d so this is my first attempt. The code is simple. Graphics3D 800,600 light = CreateLight() camera = CreateCamera() cube = LoadMesh("cube.3ds") While Not KeyHit(1) UpdateWorld PositionEntity cube,0,0,200 RenderWorld Wend When debug is on I can see the little cube I made. When debug is off and i go to full screen I cant see anything :/ |
| ||
you havn't told the camera were to be positioned. try PositionEntity camera,0,0,EntityZ(cube)-n where n=distance of camera from cube. also you need to add flip after renderworld regards |
| ||
Nope, I'm still getting the same problem. It shows perfactly with your modification in debug mode but not when debug is off. :/ |
| ||
This works. I think you missed what DAGJ said about "flip"? Also, you don't need to do PositionEntity every loop, and you only need UpdateWorld() if you're doing collisions or animation.Graphics3D 800,600 light = CreateLight() camera = CreateCamera() cube = CreateCube() PositionEntity cube,0,0,200 While Not KeyHit(1) ;UpdateWorld RenderWorld Flip Wend |
| ||
Graphics3D 800,600 light = CreateLight() camera = CreateCamera() cube = CreateCube() PositionEntity camera,0,3,EntityZ(cube)-10 While Not KeyHit(1) PositionEntity cube,0,0,0 UpdateWorld RenderWorld Flip Wend |
| ||
GFK beat me lol |
| ||
That method works also but only in debug mode. All the methods posted here work in debug mode but not when debug mode is off. |
| ||
should work also when debug is off, weird |
| ||
Try forcing 16 or 32-bit colour. Full screen mode default colour depth probably isn't the same as your desktop. |
| ||
ahh thx GFK. When I add 16 or 32 in Graphics3d 800,600 it works fine. What bit depth does it use by default if you dont specify 16 or 32? O_o |
| ||
Varies. Depends on the hardware. Don't rely on it choosing one or the other. You can find out for your own system thus:Graphics3D 800,600,0,1 Text 0,0,GraphicsDepth() Flip WaitKey End |
| ||
no buffer aset either (although I undertsand 3D only renders to backbuffer) |
| ||
no buffer aset either (although I undertsand 3D only renders to backbuffer) Yes it does, which is why I didn't bother to set it manually. ;) |
| ||
@Amon I am interested to know what bitdepth is displayed when you run Gfk's little code snippet. |