Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualxDarkice

Posted 07 January 2012 - 12:50 PM

Thanks for your answer! After setting
m_Device.SetRenderState(RenderState.AlphaBlendEnable, true);
			m_Device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha);
			m_Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha);
Alpha textures seem to render almost properly. But there are still some black blocks left.

Negating the y cords seems to work for the mirror part but the image is still some of sort of upset down. The main menu texture should be top. The ry1 and ry2 coordinates seem to be incorrect. Am I calculating them wrong? On top of that my Textures seem to be blurry and there might be a part missing
ry1 = ((ry1 * 2) / CSettings.iRenderH) - 1f;
				ry2 = ((ry2 * 2) / CSettings.iRenderH) - 1f;
I am multiplicating my coordinates by 2 and dividing them by the heigth and substracting 1.

I think I do not need to lock the buffer each frame. What should i initialize my DataStream with? Right now I am using
DataStream stream = _VertexBuffer.Lock(0, 0, LockFlags.None);

The second picture shows how it is rendering in OpenGL. I disabled the background video in DirectX for testing purposes.

Now I just need to find a way to color the textures. But I think I can just add a new Color in my TexturedVertex struct.

Thanks for your help!

EDIT: I got the upside down fixed! I didnt had to negate y1 and y2, but ry1 and y2. But the blurry textures and texts arent fixed yet
EDIT2: The Black Bars seem to appear for a whitespace in a text

#4xDarkice

Posted 07 January 2012 - 11:15 AM

Thanks for your answer! After setting
m_Device.SetRenderState(RenderState.AlphaBlendEnable, true);
			m_Device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha);
			m_Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha);
Alpha textures seem to render almost properly. But there are still some black blocks left.

Negating the y cords seems to work for the mirror part but the image is still some of sort of upset down. The main menu texture should be top. The ry1 and ry2 coordinates seem to be incorrect. Am I calculating them wrong? On top of that my Textures seem to be blurry and there might be a part missing
ry1 = ((ry1 * 2) / CSettings.iRenderH) - 1f;
				ry2 = ((ry2 * 2) / CSettings.iRenderH) - 1f;
I am multiplicating my coordinates by 2 and dividing them by the heigth and substracting 1.

I think I do not need to lock the buffer each frame. What should i initialize my DataStream with? Right now I am using
DataStream stream = _VertexBuffer.Lock(0, 0, LockFlags.None);

The second picture shows how it is rendering in OpenGL. I disabled the background video in DirectX for testing purposes.

Now I just need to find a way to color the textures. But I think I can just add a new Color in my TexturedVertex struct.

Thanks for your help!

EDIT: I got the upside down fixed! I didnt had to negate y1 and y2, but ry1 and y2. But the blurry textures and texts arent fixed yet

#3xDarkice

Posted 07 January 2012 - 10:20 AM

Thanks for your answer! After setting
m_Device.SetRenderState(RenderState.AlphaBlendEnable, true);
			m_Device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha);
			m_Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha);
Alpha textures seem to render almost properly. But there are still some black blocks left.

Negating the y cords seems to work for the mirror part but the image is still some of sort of upset down. The main menu texture should be top. The ry1 and ry2 coordinates seem to be incorrect. Am I calculating them wrong? On top of that my Textures seem to be blurry and there might be a part missing
ry1 = ((ry1 * 2) / CSettings.iRenderH) - 1f;
				ry2 = ((ry2 * 2) / CSettings.iRenderH) - 1f;
I am multiplicating my coordinates by 2 and dividing them by the heigth and substracting 1.

I think I do not need to lock the buffer each frame. What should i initialize my DataStream with? Right now I am using
DataStream stream = _VertexBuffer.Lock(0, 0, LockFlags.None);

The second picture shows how it is rendering in OpenGL. I disabled the background video in DirectX for testing purposes.

Now I just need to find a way to color the textures. But I think I can just add a new Color in my TexturedVertex struct.

Thanks for your help!

#2xDarkice

Posted 07 January 2012 - 10:17 AM

Thanks for your answer! After setting
m_Device.SetRenderState(RenderState.AlphaBlendEnable, true);
			m_Device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha);
			m_Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha);
Alpha textures seem to render almost properly. But there are still some black blocks left.

Negating the y cords seems to work for the mirror part but the image is still some of sort of upset down. The main menu texture should be top. The ry1 and ry2 coordinates seem to be incorrect. Am I calculating them wrong? On top of that my Textures seem to be blurry and there might be a part missing
ry1 = ((ry1 * 2) / CSettings.iRenderH) - 1f;
				ry2 = ((ry2 * 2) / CSettings.iRenderH) - 1f;
I am multiplicating my coordinates by 2 and dividing them by the heigth and substracting 1.

I think I do not need to lock the buffer each frame. What should i initialize my DataStream with? Right now I am using
DataStream stream = _VertexBuffer.Lock(0, 0, LockFlags.None);

The second picture shows how it is rendering in OpenGL. I disabled the background video in DirectX for testing purposes.

Thanks for your help!

#1xDarkice

Posted 07 January 2012 - 09:38 AM

Thanks for your answer! After setting
m_Device.SetRenderState(RenderState.AlphaBlendEnable, true);
			m_Device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha);
			m_Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha);
Alpha textures seem to render almost properly. But there are still some black blocks left.

Negating the y cords seems to work for the mirror part but the image is still some of sort of upset down. The main menu texture should be top. The ry1 and ry2 coordinates seem to be incorrect. Am I calculating them wrong? On top of that my Textures seem to be blurry and there
ry1 = ((ry1 * 2) / CSettings.iRenderH) - 1f;
				ry2 = ((ry2 * 2) / CSettings.iRenderH) - 1f;
I am multiplicating my coordinates by 2 and dividing them by the heigth and substracting 1.

I think I do not need to lock the buffer each frame. What should i initialize my DataStream with? Right now I am using
DataStream stream = _VertexBuffer.Lock(0, 0, LockFlags.None);

The second picture shows how it is rendering in OpenGL. I disabled the background video in DirectX for testing purposes.

Thanks for your help!

PARTNERS