wined3d: Make stateblock_init_default_state() work with a wined3d_state structure instead.

This commit is contained in:
Henri Verbeet 2013-08-27 08:44:58 +02:00 committed by Alexandre Julliard
parent cc85c6aff0
commit fc5f9d4709
3 changed files with 5 additions and 7 deletions

View file

@ -1169,7 +1169,7 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
/* Set up some starting GL setup */
/* Setup all the devices defaults */
stateblock_init_default_state(device->stateBlock);
state_init_default(&device->stateBlock->state, device);
context = context_acquire(device, swapchain->front_buffer);
@ -5216,7 +5216,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
TRACE("Created stateblock %p.\n", device->stateBlock);
device->update_state = &device->stateBlock->state;
stateblock_init_default_state(device->stateBlock);
state_init_default(&device->stateBlock->state, device);
}
else
{

View file

@ -1168,11 +1168,9 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
TRACE("Applied stateblock %p.\n", stateblock);
}
void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
void state_init_default(struct wined3d_state *state, struct wined3d_device *device)
{
struct wined3d_device *device = stateblock->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct wined3d_state *state = &stateblock->state;
union
{
struct wined3d_line_pattern lp;
@ -1193,7 +1191,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
0.0f, 0.0f, 0.0f, 1.0f,
}}};
TRACE("stateblock %p.\n", stateblock);
TRACE("state %p, device %p.\n", state, device);
/* Set some of the defaults for lights, transforms etc */
state->transforms[WINED3D_TS_PROJECTION] = identity;

View file

@ -2453,8 +2453,8 @@ struct wined3d_stateblock
};
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void stateblock_init_default_state(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_init_default(struct wined3d_state *state, struct wined3d_device *device) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
/* Direct3D terminology with little modifications. We do not have an issued state