Lines Matching refs:This

12  * This library is free software; you can redistribute it and/or
17 * This library is distributed in the hope that it will be useful,
44 #define GLINFO_LOCATION This->adapter->gl_info
87 IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
88 const UINT *streamOffset = This->stateBlock->streamOffset;
89 long SkipnStrides = startIdx + This->stateBlock->loadBaseVertexIndex;
90 BOOL pixelShader = use_ps(This->stateBlock);
109 idxData = buffer_get_sysmem((struct wined3d_buffer *) This->stateBlock->pIndexData);
158 if (This->stateBlock->renderState[WINED3DRS_FOGENABLE]
159 && (This->stateBlock->renderState[WINED3DRS_FOGVERTEXMODE] == WINED3DFOG_NONE
161 && This->stateBlock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE)
188 int coordIdx = This->stateBlock->textureState[textureNo][WINED3DTSS_TEXCOORDINDEX];
189 DWORD texture_idx = This->texUnitMap[textureNo];
197 if (!pixelShader && !This->stateBlock->textures[textureNo]) continue;
244 SkipnStrides = pIdxBufS[startIdx + vx_index] + This->stateBlock->loadBaseVertexIndex;
246 SkipnStrides = pIdxBufL[startIdx + vx_index] + This->stateBlock->loadBaseVertexIndex;
258 coord_idx = This->stateBlock->textureState[texture][WINED3DTSS_TEXCOORDINDEX];
261 texture_idx = This->texUnitMap[texture];
325 static inline void send_attribute(IWineD3DDeviceImpl *This, WINED3DFORMAT format, const UINT index, const void *ptr)
327 const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
439 IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
440 long SkipnStrides = startIdx + This->stateBlock->loadBaseVertexIndex;
445 IWineD3DStateBlockImpl *stateblock = This->stateBlock;
454 idxData = buffer_get_sysmem((struct wined3d_buffer *) This->stateBlock->pIndexData);
485 send_attribute(This, si->elements[i].format_desc->format, i, ptr);
501 IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
502 IWineD3DStateBlockImpl *stateblock = This->stateBlock;
505 /* This is a nasty thing. MSDN says no hardware supports that and apps have to use software vertex processing.
515 TRACE("(%p) : glElements(%x, %d, ...)\n", This, glPrimitiveType, numberOfVertices);
556 send_attribute(This, si->elements[instancedData[j]].format_desc->format, instancedData[j], ptr);
565 static inline void remove_vbos(IWineD3DDeviceImpl *This, struct wined3d_stream_info *s)
578 struct wined3d_buffer *vb = (struct wined3d_buffer *)This->stateBlock->streamSource[e->stream_idx];
589 IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
596 if (This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE])
599 for (i = 0; i < This->adapter->gl_info.limits.buffers; ++i)
601 target = (IWineD3DSurfaceImpl *)This->render_targets[i];
611 This->isInDraw = TRUE;
613 context = context_acquire(This, This->render_targets[0], CTXUSAGE_DRAWPRIM);
622 DBGL_CHECK_DRAWPRIM(context->gl_info, This);
625 if (This->stencilBufferTarget) {
627 * This->render_offscreen properly. We don't currently take the
632 if (This->stateBlock->renderState[WINED3DRS_ZWRITEENABLE]
633 || This->stateBlock->renderState[WINED3DRS_ZENABLE])
634 surface_load_ds_location(This->stencilBufferTarget, context, location);
635 if (This->stateBlock->renderState[WINED3DRS_ZWRITEENABLE])
636 surface_modify_ds_location(This->stencilBufferTarget, location);
642 GLenum glPrimType = This->stateBlock->gl_primitive_type;
644 const struct wined3d_stream_info *stream_info = &This->strided_streams;
647 if (!use_vs(This->stateBlock))
649 if (!This->strided_streams.position_transformed && context->num_untracked_materials
650 && This->stateBlock->renderState[WINED3DRS_LIGHTING])
661 else if (context->fog_coord && This->stateBlock->renderState[WINED3DRS_FOGENABLE])
678 memcpy(&stridedlcl, &This->strided_streams, sizeof(stridedlcl));
679 remove_vbos(This, &stridedlcl);
683 if (This->useDrawStridedSlow || emulation) {
685 if (use_vs(This->stateBlock))
699 } else if(This->instancedDraw) {
701 drawStridedInstanced(iface, &This->strided_streams, index_count,
711 for(i = 0; i < This->num_buffer_queries; i++)
713 wined3d_event_query_issue(This->buffer_queries[i], This);
731 IWineD3DSurface_LockRect(This->render_targets[0], &r, NULL, WINED3DLOCK_READONLY);
734 IWineD3DSurface_SaveSnapshot(This->render_targets[0], buffer);
735 IWineD3DSurface_UnlockRect(This->render_targets[0]);
742 if (This->stateBlock->textures[textureNo] != NULL) {
743 sprintf(buffer, "/tmp/texture_%p_%ld_%d.tga", This->stateBlock->textures[textureNo], primCounter, textureNo);
745 if (IWineD3DBaseTexture_GetType(This->stateBlock->textures[textureNo]) == WINED3DRTYPE_TEXTURE) {
746 IWineD3DTexture_GetSurfaceLevel(This->stateBlock->textures[textureNo], 0, &pSur);
750 FIXME("base Texture isn't of type texture %d\n", IWineD3DBaseTexture_GetType(This->stateBlock->textures[textureNo]));
763 This->isInDraw = FALSE;
783 * To read back, the opengl feedback mode is used. This creates a problem because we want
792 * NOTE: This function activates a context for blitting, modifies matrices & viewport, but
797 HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This,
810 /* Simply activate the context for blitting. This disables all the things we don't want and
813 context = context_acquire(This, NULL, CTXUSAGE_BLIT);
815 /* First, locate the position data. This is provided in a vertex buffer in the stateblock.
818 device_stream_info_from_declaration(This, FALSE, &stream_info, NULL);
824 vb = (struct wined3d_buffer *)This->stateBlock->streamSource[e->stream_idx];
860 /* This needs some improvements in the vertex decl code */
882 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_FILLMODE));
893 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_AMBIENT));
899 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_ACTIVELIGHT(i));
902 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_ACTIVELIGHT(0));
909 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_ACTIVELIGHT(1));
916 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_ACTIVELIGHT(2));
924 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_MATERIAL);
925 IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORVERTEX));