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

CreateVertexBuffer Arguments

Started by programmermattc May 21, 2006 at 12:22 AM 2 replies 2.3k views
Original Post
programmermattc
programmermattc
Hey everyone, this seems like a basic problem and it's probably right underneath my nose but I can seem the problem in this statement.
	
if(FAILED(pDevice->CreateVertexBuffer(18 * sizeof(CUSTOMVERTEX),
                                               0, D3DFVF_CUSTOMVERTEX,
                                               D3DPOOL_DEFAULT, &pVertBuffer)))
    {
        return false;
    }
CUSTOMVERTEX is a structure I'm using and creating cvvVertices cube. The error I get is: error C2660: 'IDirect3DDevice8::CreateVertexBuffer' : function does not take 3 arguments It's possible I missed a line of code somewhere above because I was following a tutorial just by looking at it (not copying and pasting, the true n00b way). Also, pVertBuffer is declared (in case you thought that was the problem).
=============================RhinoXNA - Easily start building 2D games in XNA!Projects
darkelf2k5
darkelf2k5
if(FAILED(pDevice->CreateVertexBuffer(18 * sizeof(CUSTOMVERTEX),
0, D3DFVF_CUSTOMVERTEX,
D3DPOOL_DEFAULT, &pVertBuffer, NULL)))
{
return false;
}
Every time you implement a singleton, God kills a kitten. Please, think of the kittens!
programmermattc
programmermattc
I've tried that and it still gives me that same error abour 3 arguments.
=============================RhinoXNA - Easily start building 2D games in XNA!Projects
darkelf2k5
darkelf2k5
Ah, sorry, didn't see that this is DX8. My solution was for DX9.

Well, parenthesis count matches so I'd say the problem is in the definition of
D3DFVF_CUSTOMVERTEX. The compiler gets only 3 params for the function. D3DFVF_CUSTOMVERTEX is the 3rd, so the param listing stops there for some reason. Don't have any better ideas.
Every time you implement a singleton, God kills a kitten. Please, think of the kittens!

Topic Locked

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

Sign in to reply to this topic.