470,833 Members | 1,620 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

Intellisense in Studio.NET 2003 C++

Using the following code:

typedef struct
{
FLOAT x, y, z; // Coordinates
D3DCOLOR dif; // Diffuse color
} sVertex;

sVertex Verts[4] = {
{-100.0f, 100.0f, 100.0f, D3DCOLOR_RGBA(255, 255, 255, 255)},
{100.0f, 100.0f, 100.0f, D3DCOLOR_RGBA(255, 0, 0, 255)},
{100.0f, -100.0f, 100.0f, D3DCOLOR_RGBA(0, 255, 0, 255)},
{-100.0f, -100.0f, 100.0f, D3DCOLOR_RGBA(0, 0, 255, 255)}
};

// Copy local vertices into vertex buffer
memcpy(g_pPtr, Verts, sizeof(Verts));

// Unlock the vertex buffer
if (FAILED(g_pD3DVB->Unlock()))
{
AppError(true, "Init Failure: Unlock()");
}

When you make the call during the if statement: g_pD3DVB-> the
intellisense stops working. However in a brief personal debug of
intellisense stopping to work I found the following bits of information
handy:

If I remove the D3DCOLOR from the structure and from the definition of
Verts[4] making it Verts[3], Intellisense works again. Shown here is
the new code:

typedef struct
{
FLOAT x, y, z; // Coordinates
} sVertex;

sVertex Verts[3] = {
{-100.0f, 100.0f, 100.0f},
{100.0f, 100.0f, 100.0f},
{100.0f, -100.0f, 100.0f},
{-100.0f, -100.0f, 100.0f}
};

// Copy local vertices into vertex buffer
memcpy(g_pPtr, Verts, sizeof(Verts));

// Unlock the vertex buffer
if (FAILED(g_pD3DVB->Unlock()))
{
AppError(true, "Init Failure: Unlock()");
}

Something during the specific definition of Verts[4] and more
specifically with the D3DCOLOR_RGBA() causes Intellisense to stop
working. Anybody know if there is a known qualm with DirectX causing
Intellisense to hang on those function calls inside the definition? Or
more so just the fact that I am placing a function call inside a
definition?

- Charlie "Zychrias"

May 30 '06 #1
0 973

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by bizsolutiondev | last post: by
9 posts views Thread by TD | last post: by
3 posts views Thread by robin9876 | last post: by
1 post views Thread by Jason Huang | last post: by
7 posts views Thread by Chris Marsh | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.