Jump to content
  • Advertisement
Sign in to follow this  

Out of video Memory?

This topic is 2167 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

class Mvertexbuffer{
		friend class theMachineV1;
		D3DXMATRIX worldMatrix;
		unsigned int id;
		type typ;
	    unsigned long total_vertices;
		IDirect3DVertexBuffer9* p_vb;
		vertex_type1* vt1_data;
		vertex_type2* vt2_data;
		vertex_type3* vt3_data;
		vertex_type4* vt4_data;
		vertex_type5* vt5_data;
		vertex_type6* vt6_data;

	__declspec(dllexport) bool fill_me(DWORD flexvf,unsigned long total_v,vertex_type1* t1 = NULL,vertex_type2* t2 = NULL,vertex_type3* t3 = NULL,vertex_type4* t4 = NULL,vertex_type5* t5 = NULL,vertex_type6* t6 = NULL);
	__declspec(dllexport) void set_vertextype(int type);
	//to be implemented
	__declspec(dllexport) DWORD get_FVF();
	__declspec(dllexport) type get_typ();
	__declspec(dllexport) unsigned long get_totalvertices();
	__declspec(dllexport) int get_sizeofvertex();

This call is the problem:

buffer is just a pointer to the above class

vertex_type1* vt;

buffer->p_vb->Lock(0,sizeof(vertex_type1) * 40,(void**)&vt,0);


I get an "out of memory" from the hresult.


What could be the problem?

Edited by noatom

Share this post

Link to post
Share on other sites

How large is your vertex buffer? Did you create it large enough to hold 40 vertex_type1's?

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!