Skip to main content
GameDev.net gamedev.net
🔒 Locked

wireframe lines aren't solid...

Started by -indirectX- Apr 11, 2007 at 10:33 AM 3 replies 1.2k views
Original Post
-indirectX-
-indirectX-
Hello, I'm trying to build a level editor and have set up the typical "4 views" in a window. However, when I render a cube in wireframe mode, the lines aren't solid. There don't seem to be any problems with solid rendering. Here is a picture of the problem: Broken lines../ I'm using DirectX 9 with HLSL shaders (the shader does nothing but draw 'white' where it is told) If anyone has any idea what could be causing the problem or where the problem is likely to be found, it would be a great help. All the best, Hugh Osborne
--------------------------------www.hughosborne.co.uk[email=hugh.osborne@googlemail.com]hugh.osborne@googlemail.com[/email]
Evil Steve
Evil Steve
Is your backbuffer the same size as the window? Looks like D3D is StretchBlt()ing the backbuffer and causing that.
Cambo_frog
Cambo_frog
Also,
are you still clearing the z buffer when rendering in wireframe?
For the love of god, please tell me that you've just omitted your error checking code for brevity, and you don't really assume that all those functions succeed.
-indirectX-
-indirectX-
Yep it was the size of the backbuffer, it was set to the size of the entire screen, not the size of the child windows. Looks great now!

Thanks very much.

All the best,

Hugh Osborne
--------------------------------www.hughosborne.co.uk[email=hugh.osborne@googlemail.com]hugh.osborne@googlemail.com[/email]
jlewicki
jlewicki
very interesting, ill have to remember that.

this is my current code for 1 camera:
// Sets up the camera 1000 units back looking at the origin.	D3DXMATRIX V;	D3DXVECTOR3 pos(0.0f, 0.0f, -1000.0f);	D3DXVECTOR3 up(0.0f, 1.0f, 0.0f);	D3DXVECTOR3 target(0.0f, 0.0f, 0.0f);	D3DXMatrixLookAtLH(&V, &pos, ⌖, &up);	HR(gd3dDevice->SetTransform(D3DTS_VIEW, &V));	// The following code defines the volume of space the camera sees.	D3DXMATRIX P;	RECT R;	GetClientRect(mhMainWnd, &R);	float width  = (float)R.right;	float height = (float)R.bottom;	D3DXMatrixPerspectiveFovLH(&P, D3DX_PI*0.25f, width/height, 1.0f, 5000.0f);	HR(gd3dDevice->SetTransform(D3DTS_PROJECTION, &P));


to make 4 cameras do you have to create 4 separate RECTS and assign a camera to each one, then put all 4 of the RECTs inside the main window RECT?

it looks like you are using a windows gui border, are you using some sort of template that returns a pointer RECT to each window?

I'm a newbie, but im interested in how to go about doing this for when the time comes around to me wanting to do this also.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.