Home Technical Talk

GBuffer

int width = 1024; 	int height = 768;  	BitmapInfo bi("MyBitmap"); 	bi.SetType(BMM_TRUE_32); 	bi.SetWidth(width); 	bi.SetHeight(height); 	Bitmap *bm = TheManager->Create(&bi);  	if (!bm) 	{ 		MessageBox (NULL, "Not Creating a bitmap", "Error", NULL); 		return;  	    	}       GBuffer *gbuf = bm->GetGBuffer();  	if (!gbuf) { 		MessageBox (NULL, "Not Creating a GBuffer", "Error", NULL); 		return;  	}
Is this the correct way to create a GBuffer from the top view (3ds max)? I am getting a null pointer from the line commented with //Error I did not do any rendering, but assuming this would work, no? Thanks Jack

Replies

Sign In or Register to comment.