Advertisement

Stupid D3D/D3DX Problem

Started by February 12, 2000 11:23 PM
3 comments, last by Doddler 24 years, 7 months ago
First off, I''d like to say I''m new at this, so please don''t critisize me for anything I say that isn''t correct. Anyways, I was having a problem with creating a triangle with D3D/D3DX. Basically, the code goes like this... -------------------------------- D3DLVERTEX GameShip[3]; GameShip[0] = D3DLVERTEX(D3DVECTOR(1.0f, 0.0f, 0.0f), RGB_MAKE( 0xff, 0x00, 0x00 ), 0, 1.0f, 0.0f); GameShip[1] = D3DLVERTEX(D3DVECTOR(0.0f, 1.0f, 0.0f), RGB_MAKE( 0x00, 0xff, 0x00 ), 0, 0.0f, 1.0f); GameShip[2] = D3DLVERTEX(D3DVECTOR(0.0f, 0.0f, 1.0f), RGB_MAKE( 0x00, 0x00, 0xff ), 0, 1.0f, 1.0f); -------------------------------- I figured that should work, since it''s based from the trivfs example from microsoft. Anyways, when I tried to compile, it gave me this. -------------------------------- Compiling... objects.cpp c:\dan\3dgame\objects.cpp(15) : error C2661: ''_D3DVECTOR::_D3DVECTOR'' : no overloaded function takes 3 parameters c:\dan\3dgame\objects.cpp(15) : error C2661: ''_D3DLVERTEX::_D3DLVERTEX'' : no overloaded function takes 5 parameters c:\dan\3dgame\objects.cpp(16) : error C2661: ''_D3DVECTOR::_D3DVECTOR'' : no overloaded function takes 3 parameters c:\dan\3dgame\objects.cpp(16) : error C2661: ''_D3DLVERTEX::_D3DLVERTEX'' : no overloaded function takes 5 parameters c:\dan\3dgame\objects.cpp(17) : error C2661: ''_D3DVECTOR::_D3DVECTOR'' : no overloaded function takes 3 parameters c:\dan\3dgame\objects.cpp(17) : error C2661: ''_D3DLVERTEX::_D3DLVERTEX'' : no overloaded function takes 5 parameters Error executing cl.exe. -------------------------------- I''ve been working on this for a while now and I can''t seem to find out what''s wrong. It''s probably something really stupid, but I can''t seem to figure it out. If there''s anyone that can help, please reply. Thank you for your time. -Doddler
I had this bug too.
The fix is extremely weird.
Turn off Precompiled Headers.
It seemed to fix that problem for me.
Advertisement
Look in the SDK, under Direct3D\Direct3D Immediate Mode\Reference\Direct3D Immediate Mode C/C++ Reference\D3D_OVERLOADS
You need to define D3D_OVERLOADS before you include any files: eg.

#define D3D_OVERLOADS
#include "d3d.h"
#include "d3dx.h"

Edited by - Ranok on 2/13/00 11:20:45 AM
---Ranok---
Thanks everyone for helping out. It seems that as I did #define D3D_OVERLOADS, I did it AFTER the includes. Stupid me...

Thanks for the help everyone...
-Doddler

This topic is closed to new replies.

Advertisement