breakout bricks

Started by
3 comments, last by phil67rpg 12 years, 5 months ago
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]
Advertisement
Do you have a question?
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.

[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

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

ok sounds good I will study more.

This topic is closed to new replies.

Advertisement