Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

breakout bricks

This topic is 2594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to draw several bricks for a breakout game using dx9.
here is some of the code I am using.
[font="Consolas"][font="Consolas"][/font][/font][font="Consolas"][color="#008000"][font="Consolas"][color="#008000"][font="Consolas"][color="#008000"]// create the vertices using the CUSTOMVERTEX struct

[/font][/font][/font][font="Consolas"][font="Consolas"]CUSTOMVERTEX vertices[] =

{

{ 0.0f, 0.0f, 0.5f, 1.0f, D3DCOLOR_XRGB(255, 0, 0), },

{ 150.0f, 0.0f, 0.5f, 1.0f, D3DCOLOR_XRGB(255, 0, 0), },

{ 150.0f, 40.0f, 0.5f, 1.0f, D3DCOLOR_XRGB(255, 0, 0), },

{ 0.0f, 40.0f, 0.5f, 1.0f, D3DCOLOR_XRGB(255, 0, 0), },



{ 150.0f, 0.0f, 0.5f, 1.0f, D3DCOLOR_XRGB(0, 255, 0), },

{ 300.0f, 0.0f, 0.5f, 1.0f, D3DCOLOR_XRGB(0, 255, 0), },

{ 300.0f, 40.0f, 0.5f, 1.0f, D3DCOLOR_XRGB(0, 255, 0), },

{ 150.0f, 40.0f, 0.5f, 1.0f, D3DCOLOR_XRGB(0, 255, 0), },

};

[/font][/font][font="Consolas"][color="#008000"][font="Consolas"][color="#008000"][font="Consolas"][color="#008000"]// create a vertex buffer interface called v_buffer

[/font][/font][/font][font="Consolas"][font="Consolas"]d3ddev->CreateVertexBuffer(8*[/font][/font][font="Consolas"][color="#0000ff"][font="Consolas"][color="#0000ff"][font="Consolas"][color="#0000ff"]sizeof[/font][/font][/font][font="Consolas"][font="Consolas"](CUSTOMVERTEX),

0,

CUSTOMFVF,

D3DPOOL_MANAGED,

&v_buffer,

NULL);

let me know if you need more code or anything I should study more in depth.
?

[/font][/font]

Share this post


Link to post
Share on other sites
Advertisement
I don't understand.

Phil, you've been attempting breakout for years, why have you not made any, if not very little, progress? You've created many threads with only small snippets of code and a broad statement, and nothing amounting to a question. (I'd go as far to say there isn't a single question mark in any of your posts.) How are we supposed to help you? What are you having trouble with?

However, to respond your statement: You need to study more in depth.

Share this post


Link to post
Share on other sites

[font="Consolas"][font="Consolas"]let me know [...] anything I should study more in depth.[/font][/font]

You should study how to ask questions.


L. Spiro

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!