Stefan Dösinger
c2b6cbf014
wined3d: Refuse to create volumes and volume textures if not supported.
2007-11-07 12:07:29 +01:00
Stefan Dösinger
45ebea1f47
wined3d: Set the display mode before creating the context.
2007-11-07 12:07:20 +01:00
Stefan Dösinger
38147d28dd
wined3d: Set the main hwnd before setting up the screen.
2007-11-07 12:07:05 +01:00
Stefan Dösinger
393ed4a070
wined3d: Make resource memory 32 byte aligned.
2007-11-01 12:38:45 +01:00
Stefan Dösinger
4d4fce7e33
wined3d: Disconnect allocatedMemory and Heap allocation.
2007-11-01 12:38:37 +01:00
Stefan Dösinger
f1f84a3615
wined3d: Allocate memory for default pool resources too.
2007-11-01 12:38:25 +01:00
Stefan Dösinger
948292dbc3
wined3d: Move texture -> drawable blits to LoadLocation.
2007-11-01 12:37:43 +01:00
Stefan Dösinger
dcff7dc213
wined3d: Begin centralizing surface location management.
2007-10-26 15:17:19 +02:00
Francois Gouget
c4b1195c0c
Assorted spelling fixes.
2007-10-23 18:20:27 +02:00
Stefan Dösinger
0add13759c
wined3d: Create query private data when faking the query.
2007-10-22 15:58:52 +02:00
Allan Tong
c18fa4df68
wined3d: Fix comment typos in SetMultithreaded.
2007-10-19 12:26:59 +02:00
Allan Tong
ac6f2009f2
wined3d: Fix resource cleanup if CreateCubeTexture fails.
2007-10-19 12:26:56 +02:00
Roderick Colenbrander
134aa67ec9
wined3d: Use a fragment shader to do P8 palette conversion in hardware.
2007-10-12 11:07:23 +02:00
Stefan Dösinger
8fc4e3cec7
wined3d: Clear up in Init3D if something fails.
2007-10-10 11:58:23 +02:00
Roderick Colenbrander
829cafc651
wined3d: Render to the correct hwnd/hdc.
2007-10-04 11:38:49 +02:00
Roderick Colenbrander
001f380ac9
wined3d: CreateContext should not be called between ENTER_GL/LEAVE_GL.
2007-10-01 12:35:36 +02:00
Roderick Colenbrander
243ac3ed75
wined3d: Move video memory tracking to the adapter.
2007-09-24 13:50:43 +02:00
Stefan Dösinger
1c4a15d2cd
wined3d: Recompile glsl pixelshaders if the sampler format changes.
2007-09-24 13:30:08 +02:00
Stefan Dösinger
3f0ea3d082
wined3d: Move lastActiveRenderTarget cleanup to the device.
2007-09-18 09:54:23 +02:00
Stefan Dösinger
271fb0052f
wined3d: Add support for showing a logo.
2007-09-14 14:26:00 +02:00
Stefan Dösinger
c0c2319c7a
wined3d: Implement UpdateTexture for volumes.
2007-09-13 11:38:54 +02:00
Stefan Dösinger
3b07663b90
wined3d: Convert the colors to the surface format for colorfill.
2007-09-13 11:38:32 +02:00
Stefan Dösinger
160258b637
wined3d: Implement mipmap auto generation.
2007-09-12 12:10:25 +02:00
Roderick Colenbrander
dc7252a1f8
wined3d: CreateAdditionalSwapChain bugfix.
2007-08-29 11:58:22 +02:00
Stefan Dösinger
a8d4779f7f
wined3d: Fix the spot light falloff == 0.0 case.
2007-08-28 11:56:00 +02:00
Stefan Dösinger
36aef3dc54
wined3d: Hold an internal reference on pixel and vertex shaders.
2007-08-28 11:55:53 +02:00
Stefan Dösinger
c52a190a88
wined3d: Read the old streamsource from the correct stateblock.
2007-08-28 11:55:44 +02:00
Stefan Dösinger
2665a8bf79
wined3d: Add some missing vertex state render states.
2007-08-27 18:28:32 +02:00
Stefan Dösinger
9092f557d1
wined3d: Non-primary stateblocks hold an internal reference on indexbuffers.
2007-08-27 18:28:27 +02:00
Stefan Dösinger
d170aabe20
wined3d: Non-primary stateblocks also hold an internal reference to buffers.
2007-08-27 12:00:57 +02:00
Stefan Dösinger
6ec6c941fa
wined3d: BaseVertexIndex can be negative.
2007-08-27 12:00:42 +02:00
Roderick Colenbrander
3084081519
wined3d: Override backbufferformat in window mode.
2007-08-27 11:59:03 +02:00
Stefan Dösinger
e184b09a66
wined3d: Fake occlusion queries if the wrong context is active.
2007-08-23 13:34:52 +02:00
Stefan Dösinger
a99907d1d2
wined3d: Deal with multithreading in event queries.
2007-08-23 13:34:17 +02:00
H. Verbeet
e5e41191b3
wined3d: Attach the correct surface the the fbo.
2007-08-22 12:18:59 +02:00
H. Verbeet
2e2ab3c3cc
wined3d: Restore a line that got lost.
2007-08-22 12:18:59 +02:00
Stefan Dösinger
55b63fe095
wined3d: Reinstall the internal reference on vertex buffers.
2007-08-20 22:32:13 +02:00
Stefan Dösinger
4baee1973c
wined3d: Remove a debug hack.
2007-08-20 22:31:55 +02:00
Stefan Dösinger
028729d102
wined3d: Fix WINED3DFMT_A4L4.
2007-08-16 11:35:06 +02:00
Stefan Dösinger
b220905e4a
wined3d: Reinstall the internal reference on the current index buffer.
2007-08-16 11:35:06 +02:00
Stefan Dösinger
7ebf3d92b5
wined3d: Release the stateblock before destroying the swapchain.
2007-08-16 11:35:06 +02:00
Stefan Dösinger
f5e6313cf6
wined3d: Restructure Stateblock::apply a bit.
2007-08-15 09:41:43 +02:00
Stefan Dösinger
b21c785482
wined3d: Optimize float constants in stateblocks.
2007-08-15 09:36:07 +02:00
Stefan Dösinger
59fb2928b8
wined3d: Optimize sampler states in stateblocks.
2007-08-15 09:35:49 +02:00
Stefan Dösinger
03ffb73450
wined3d: Optimize texture stage state applying.
2007-08-14 12:29:04 +02:00
Stefan Dösinger
865b82af2c
wined3d: Optimize bool and int pixel shader constants.
2007-08-14 12:28:59 +02:00
Stefan Dösinger
4673b1c68e
wined3d: Optimize bool and int vs constants.
2007-08-14 12:28:52 +02:00
Stefan Dösinger
92ce028a0b
wined3d: Optimize transform state in stateblocks.
2007-08-14 12:28:40 +02:00
Vitaliy Margolen
b56afd0cff
wined3d: Activate context before applying fbo state.
2007-08-14 12:28:33 +02:00
Roderick Colenbrander
6b177c44e1
wined3d: Pass the proper DeviceName to ChangeDisplaySettings.
2007-08-14 12:28:28 +02:00
Roderick Colenbrander
5754726aeb
wined3d: Use the proper depth stencil format.
2007-08-13 12:36:55 +02:00
Stefan Dösinger
93155ea087
wined3d: Optimize render states in the stateblock.
2007-08-13 11:37:25 +02:00
Stefan Dösinger
e7cbb340dc
wined3d: Remove stateblock::set.*.
2007-08-13 11:36:43 +02:00
Stefan Dösinger
55192882f3
wined3d: Remove outdated TODO in D3DDevice::SetTextureStageState.
2007-08-13 11:35:56 +02:00
Roderick Colenbrander
ac3927a73e
wined3d: Move over to WGL.
2007-08-08 15:32:01 +02:00
Stefan Dösinger
89dccc7c7c
ddraw: Implement IDirect3DDevice7::DrawIndexedPrimitiveStrided.
2007-08-08 15:32:00 +02:00
Roderick Colenbrander
f3af04a8be
wined3d: Use UINT instead of uint.
2007-08-07 12:36:37 +02:00
Roderick Colenbrander
e77da5ef8a
wined3d: Don't call ActivateContext between ENTER_GL/LEAVE_GL.
2007-08-07 12:36:32 +02:00
Roderick Colenbrander
d1bc63090e
wined3d: Another devmode bug.
2007-08-06 14:01:42 +02:00
Stefan Dösinger
d2016ff892
wined3d: Store the gl format table in the gl info structure.
2007-07-30 12:49:50 +02:00
Stefan Dösinger
a0131a3272
wined3d: Split up the format table.
2007-07-30 12:49:39 +02:00
H. Verbeet
b4e596e70e
wined3d: Flip the scissor rect when rendering offscreen.
2007-07-26 11:51:34 +02:00
Stefan Dösinger
12788f6fc8
wined3d: Do not fail if the adapter info can't be initialized.
2007-07-26 11:48:45 +02:00
Stefan Dösinger
59efd5c7ec
wined3d: Set the pow2 sizes in gl surface private setup.
2007-07-26 11:48:36 +02:00
Stefan Dösinger
b9379fc389
wined3d: Allocate render target management members in Init3D.
2007-07-26 11:47:43 +02:00
Stefan Dösinger
327aa543a4
wined3d: Attempt to clean up fbos only if a gl surface is destroyed.
2007-07-26 11:47:35 +02:00
Stefan Dösinger
861767f036
wined3d: Create the stateblock in Init3D.
2007-07-24 13:44:10 +02:00
Stefan Dösinger
fdadf26c20
wined3d: Add CTXUSAGE_CLEAR context usage.
2007-07-10 13:30:51 +02:00
Stefan Dösinger
26ebe396c3
wined3d: Implement high order patches.
2007-07-06 19:32:47 +02:00
Stefan Dösinger
714e66acf2
wined3d: Do not set streamIsUP in DrawPrimitiveStrided.
2007-07-06 19:30:17 +02:00
Stefan Dösinger
13f24c3808
wined3d: Select onscreen contexts based on the thread id.
2007-07-03 12:30:33 +02:00
H. Verbeet
5e78a83cb2
wined3d: Call IWineD3DDeviceImpl_FindTexUnitMap for cards without support for NV_REGISTER_COMBINERS as well.
2007-07-02 13:35:50 +02:00
H. Verbeet
860aa6993b
wined3d: Get rid of the oneToOneTexUnitMap field.
2007-06-29 13:42:26 +02:00
H. Verbeet
92fc808b05
wined3d: In device_map_psamplers(), only touch the sampler mapping for samplers that are used by the shader.
2007-06-29 13:42:20 +02:00
H. Verbeet
99e3abab30
wined3d: Cleanup device_map_fixed_function_samplers().
2007-06-29 13:42:12 +02:00
H. Verbeet
47708a7717
wined3d: Check more thoroughly if a stage references a texture.
2007-06-28 11:01:34 +02:00
H. Verbeet
d2d6952fd5
wined3d: Map vertex samplers to a texturing unit.
2007-06-28 11:01:25 +02:00
H. Verbeet
3220ba45e8
wined3d: Map vertex sampler numbers to the correct internal array indices for GetTexture and SetTexture.
2007-06-26 11:57:34 +02:00
H. Verbeet
f89c2d96db
wined3d: Map vertex sampler numbers to the correct internal array indices for GetSamplerState and SetSamplerState.
2007-06-26 11:57:26 +02:00
H. Verbeet
5b7758f80c
wined3d: Increase the sizes of texturing related arrays, in order to support vertex textures.
2007-06-26 11:57:17 +02:00
H. Verbeet
3ad03206ab
wined3d: Rename max_samplers to max_fragment_samplers.
2007-06-26 11:56:57 +02:00
H. Verbeet
a7e4669910
wined3d: Split of the mapping of pixel shader samplers from IWineD3DDeviceImpl_FindTexUnitMap().
2007-06-25 11:43:36 +02:00
H. Verbeet
10ffa291e2
wined3d: Remove the sharing of mapping code for fixed function and pixel shader samplers.
2007-06-25 11:43:26 +02:00
H. Verbeet
2aa891c175
wined3d: Split of the mapping of fixed function samplers from IWineD3DDeviceImpl_FindTexUnitMap().
2007-06-25 11:43:16 +02:00
H. Verbeet
b1579b37ea
wined3d: Keep track of what fixed function texture stages are in use.
2007-06-25 11:43:05 +02:00
H. Verbeet
b928cadde8
wined3d: Keep track of what stage a texturing unit is mapped to.
2007-06-25 11:42:54 +02:00
Stefan Dösinger
2f4b9e42bc
wined3d: Move material applying to the state table.
2007-06-25 11:35:59 +02:00
H. Verbeet
6d0e14d947
wined3d: Do not mark texture stages > MAX_TEXTURES dirty, they don't exist.
2007-06-22 12:19:19 +02:00
H. Verbeet
440ca84680
wined3d: Fix various incorrect uses of GL_LIMITS(texture_stages) and GL_LIMITS(sampler_stages).
2007-06-22 12:19:10 +02:00
Stefan Dösinger
030b92a2f6
wined3d: Remove the FVF codepath from drawprim.
2007-06-21 13:09:08 +02:00
Stefan Dösinger
6e5a5d2736
wined3d: DDraw surfaces are QWORD aligned.
2007-06-14 13:22:52 +02:00
Phil Costin
72865b8ca2
wined3d: Remove a duplication in device.c.
2007-06-14 13:14:35 +02:00
H. Verbeet
b9d5c18062
wined3d: Call IWineD3DDeviceImpl_FindTexUnitMap() when activating the context.
2007-06-13 11:23:18 +02:00
Francois Gouget
6f24b198f3
wined3d: Pass the D3DCB_CreateAdditionalSwapChain() error code to the upper layers (needed for d3d9).
2007-06-13 11:08:28 +02:00
Stefan Dösinger
d88fe52564
wined3d: Do not set the dynlock flag on all created surfaces.
2007-06-12 11:13:38 +02:00
Stefan Dösinger
ef65b233c0
wined3d: Some render target->texture blit context handling.
2007-06-11 13:56:47 +02:00
Stefan Dösinger
a460a2df43
wined3d: Store the gl information in a per adapter structure and initialize it only once.
2007-06-11 13:51:06 +02:00
H. Verbeet
473e914c29
wined3d: Turn off filtering for FBO attachments, update the texture's states array.
2007-06-07 20:23:29 +02:00
Francois Gouget
96c337f0a1
Assorted spelling fixes.
2007-06-07 19:24:32 +02:00
Phil Costin
622f62d352
wined3d: Enable the loading and reloading of gamma corrected textures.
2007-06-07 13:02:04 +02:00
H. Verbeet
6ee356fca0
wined3d: Get rid of the pBaseVertexIndex parameter to IWineD3DDeviceImpl_GetIndices, use GetBaseVertexIndex instead.
2007-06-07 11:20:48 +02:00
H. Verbeet
262240adce
wined3d: Add IWineD3DDevice_GetBaseVertexIndex to retrieve the base vertex index.
2007-06-07 11:20:48 +02:00
H. Verbeet
785771272a
wined3d: Get rid of the BaseVertexIndex parameter to IWineD3DDeviceImpl_SetIndices, use SetBaseVertexIndex instead.
2007-06-06 12:10:47 +02:00
Chris Robinson
1e64bb93a4
wined3d: Add a few missing checkGLcall calls.
2007-06-05 12:19:10 +02:00
H. Verbeet
7de83c18bd
wined3d: Rename IWineD3DDeviceImpl_SetBasevertexIndex to IWineD3DDeviceImpl_SetBaseVertexIndex.
2007-06-05 10:57:45 +02:00
H. Verbeet
c4a0a2b918
wined3d: TRACE the Color parameter in IWineD3DDeviceImpl_Clear.
2007-06-05 10:57:37 +02:00
H. Verbeet
93dcfe350d
wined3d: Return WINED3DERR_INVALIDCALL in DrawIndexedPrimitive if no index buffer is set.
2007-06-04 12:58:37 +02:00
Andrew Riedi
a9c2e15cf6
wined3d: Add hardware cursor support.
2007-05-16 14:27:39 +02:00
Francois Gouget
0acb5810bf
Assorted spelling fixes.
2007-05-15 18:09:16 +02:00
Marcus Meissner
4b9fedbb06
wined3d: Fixed swapchain context NULL ptr checks.
2007-05-14 14:24:27 +02:00
Stefan Dösinger
d08585e6ec
wined3d: Manage private data in a wine linked list.
2007-05-10 12:10:20 +02:00
Stefan Dösinger
ca52d34189
wined3d: Some more ProcessVertices fixes.
...
Remove vbos from the input strided data from the fixed function
attributes explicitly and avoid writing beyond the end of a temporary
buffer when cloning a windows bug.
2007-05-09 12:08:12 +02:00
Stefan Dösinger
f2e30a0a1c
wined3d: Unset the StreamIsUP flag in ProcessVertices.
2007-05-08 18:29:15 +02:00
H. Verbeet
5d00923017
wined3d: Remove some redundant fields from IWineD3DBaseTextureImpl.
2007-05-04 13:41:45 +02:00
H. Verbeet
1fca7eccb0
wined3d: Improve a few VBO traces.
2007-05-04 13:40:53 +02:00
H. Verbeet
81edcea020
wined3d: Bind GL_FRAMEBUFFER_EXT rather than GL_DRAW_FRAMEBUFFER_EXT in color_fill_fbo.
2007-05-04 13:40:45 +02:00
H. Verbeet
b66791118e
wined3d: Make the IWineD3DDeviceImpl_ColorFill TRACE a bit more useful.
2007-05-04 13:40:36 +02:00
H. Verbeet
d9b7369255
wined3d: Flip the coordinate system rather than the coordinates itself for onscreen surfaces in stretch_rect_fbo.
2007-05-04 13:40:28 +02:00
Stefan Dösinger
94b3fddec8
d3d: Pass the cube face to Create*Texture's surface creation callback.
2007-05-01 11:42:25 +02:00
H. Verbeet
3226ad451f
wined3d: Fix the return value for IWineD3DDeviceImpl_ColorFill.
2007-04-27 11:13:54 +02:00
Stefan Dösinger
460f71dcf8
d3d: Fix ProcessVertices.
...
IDirect3DDevice9::ProcessVertices takes a vertex declaration, not a
vertex buffer. The source for ProcessVertices is taken from the
stateblock, not the vertex declaration.
2007-04-26 14:54:29 +02:00
Stefan Dösinger
32cfbd127c
wined3d: Implement CreateVertexDeclarationFromFVF.
2007-04-26 14:53:48 +02:00
Stefan Dösinger
aec1553e50
wined3d: Add a method to create a declaration from a fvf.
2007-04-26 14:53:07 +02:00
H. Verbeet
af8e6ed14a
wined3d: Actually use the calculated mipmap surface sizes in IWineD3DDeviceImpl_CreateVolumeTexture.
2007-04-24 10:20:11 +02:00
Stefan Dösinger
c42a1dc226
wined3d: The cursor texture doesn't have GL_APPLE_client_storage backing.
2007-04-20 13:09:09 +02:00
H. Verbeet
e0a94b906c
wined3d: Implement ColorFill using FBOs, if they're being used.
2007-04-17 11:13:14 +02:00
H. Verbeet
deeeda6802
wined3d: Properly handle the difference between GL_BACK and GL_FRONT for onscreen surfaces.
2007-04-17 11:12:52 +02:00
H. Verbeet
74b5c87ebd
wined3d: Set the FBO drawbuffer using glDrawBuffer when ARB_DRAW_BUFFERS is not supported.
2007-04-17 11:12:22 +02:00
H. Verbeet
863a0bfe33
wined3d: Ignore SetTextureStageState on unsupported texture stages.
2007-04-17 11:12:09 +02:00
H. Verbeet
3777ef3a71
wined3d: Dump the FBO's attachments when its status is GL_FRAMEBUFFER_UNSUPPORTED_EXT.
2007-04-17 11:11:41 +02:00
H. Verbeet
c4cc10a595
wined3d: Add a function for dumping FBO status codes.
2007-04-17 11:11:31 +02:00
Jan Zerebecki
58c7c51485
wined3d: Remove resourceStoreCriticalSection.
2007-04-16 13:51:56 +02:00
Stefan Dösinger
725057da47
d3d: Remove dependency on ddraw.h header.
2007-04-16 13:20:15 +02:00
H. Verbeet
384ad311f3
wined3d: Disable the scissor test in stretch_rect_fbo.
2007-04-10 21:39:24 +02:00
H. Verbeet
f0fcf7e133
wined3d: Remove some redundant IWineD3DSurface_PreLoad calls from stretch_rect_fbo.
2007-04-10 21:39:09 +02:00
H. Verbeet
112c3bf1c3
wined3d: Add some traces to stretch_rect_fbo.
2007-04-10 21:38:55 +02:00
H. Verbeet
c9f82b9817
wined3d: Set the stream offset to 0 in DrawPrimitiveUP/DrawIndexedPrimitiveUP.
2007-04-09 12:41:35 +02:00
H. Verbeet
38082f2964
wined3d: Display the stream offset in GetStreamSource/SetStreamSource traces.
2007-04-09 12:41:26 +02:00
H. Verbeet
75e91fa409
wined3d: Use the framebuffer blit extension to implement StretchRect.
2007-04-09 12:40:52 +02:00
H. Verbeet
70dd7ced99
wined3d: Separate attaching a surface to an FBO from set_render_target_fbo.
2007-04-09 12:39:59 +02:00
H. Verbeet
2e1e3d48f2
wined3d: Make bind_fbo a bit more generic.
2007-04-09 12:39:48 +02:00
H. Verbeet
c9b178b594
wined3d: Fixup FBO depth attachments when the depth attachment is larger than the render target.
2007-04-09 12:39:23 +02:00
H. Verbeet
3d4e054b55
wined3d: Handle FBO attachments slightly more efficiently.
2007-04-09 12:38:53 +02:00
Stefan Dösinger
290f2eb146
wined3d: Add Filtering to IWineD3DSurface::Blt and handle it.
...
This is to allow StretchRect to pass the texture filter to WineD3D.
DirectDraw sets the texture filter to WINED3DTEXF_NONE, simmilar to all
other functions which do not need filtering.
2007-04-07 10:58:10 +02:00
Fabian Bieler
fd6395f0c7
wined3d: Fix UpdateSurface for sourceRect != sourceWidth.
2007-04-05 10:54:24 +02:00
Stefan Dösinger
4f5d33311b
wined3d: Use GL_APPLE_client_storage if available.
2007-04-02 11:34:12 +02:00
Felix Nawothnig
c343fb1cdf
wined3d: Make CreateCubeTexture fail when not supported.
2007-04-02 11:28:39 +02:00
Stefan Dösinger
2cdbd9a53d
wined3d: Store the pixel format in the texture.
2007-03-21 22:50:49 +01:00
Stefan Dösinger
90fe64cee0
wined3d: Store an array of contexts in the swapchain.
...
This is a preparation for using multiple contexts on one drawable to
handle multithreading.
2007-03-19 12:23:16 +01:00
Stefan Dösinger
fcb83e7111
wined3d: Activate a context before doing opengl calls.
2007-03-19 12:22:57 +01:00
Stefan Dösinger
9789f993ce
wined3d: Remove some old stuff.
2007-03-19 12:18:20 +01:00
Stefan Dösinger
022e884342
wined3d/ddraw: Forward DDSCL_MULTITHREADED to wined3d.
2007-03-19 12:17:18 +01:00
Andrew Talbot
2f5f3825c6
wined3d: Replace inline static with static inline.
2007-03-17 20:04:46 +01:00
Stefan Dösinger
0b46254b57
wined3d: Blitting to offscreen target.
...
Fix the NULL deref that occured when blitting to offscreen targets and
select the proper gl drawing buffer instead.
2007-03-15 12:14:39 +01:00
Erich Hoover
9795e6839f
wined3d: Allow SetCursorProperties on existing cursor.
2007-03-14 13:14:08 +01:00
Stefan Huehner
4d1d01f266
Mark several functions as static.
2007-03-13 13:35:12 +01:00
H. Verbeet
ee09e8bfd6
wined3d: Remove FVF related fields from IWineD3DVertexDeclaration.
2007-03-13 11:54:24 +01:00
Fabian Bieler
a2808903b1
wined3d: Height of rectangle is bottom - top, not vice versa.
2007-03-12 13:49:58 +01:00
Stefan Dösinger
eba060463d
wined3d: Account for offscreen rendering when setting up the clearing scissor rectangle.
2007-03-12 12:02:20 +01:00
Stefan Dösinger
603e7933ea
wined3d: Blit the offscreen texture into the drawable if needed.
...
When using pbuffer or back buffer offscreen rendering the content of
the drawable will have been overwritten. Thus the texture has to be
written into the drawable. An exception is the (pretty common) case
that the whole render target is cleared before rendering to it.
2007-03-12 12:02:05 +01:00
Stefan Dösinger
850bd7b414
wined3d: Restore the index buffer when switching from UP to buffer drawing.
...
The state handler binds index buffer 0 when a user pointer is used. Likewise the real index
buffer has to be restored when switching back to drawing from index buffers.
2007-03-12 12:01:45 +01:00
Michael Stefaniuc
719a02856d
janitorial: Remove two redundant checks for NULL.
2007-03-08 11:58:09 +01:00
Stefan Dösinger
c54a0fc2cf
wined3d: Rework surface dirtification.
...
Previously the surfaces stored a flag if the system memory copy was
ahead of the gl copy(SFLAG_DIRTY) or the gl copy is
ahead(SFLAG_GLDIRTY). The pbuffer copy was 'managed' differently using
SFLAG_INPBUFFER and SFLAG_INTEXTURE.
This patch replaces them with 3 flags, INSYSMEM, INPBUFFER and
INTEXTURE which specify which copy contains the most up to date
copy. It is perfectly valid to have more than one of those flags
set. One must be set at least (except at init, when no content is in
the surface yet). When one copy is modified, the flags for the others
are removed.
2007-03-07 12:18:14 +01:00
Stefan Dösinger
81aeae3249
wined3d: Do not specify the viewport origin upside down when doing offscreen rendering.
...
The gl viewport origin is the lower left corner of the window, in d3d
it is the upper right corner. This is corrected when setting the
viewport. However, when we are doing offscreen rendering, this is
reversed. So do not flip the viewport origin when rendering offscreen.
2007-03-06 22:17:28 +01:00
Stefan Dösinger
6886b237ad
wined3d: Disable depth stencil related states without a depth stencil buffer.
...
Except with fbos, it is not possible to remove the depth stencil
buffer from the opengl frame buffer, so when the d3d app sets a NULL
depth stencil disable all states that work with the depth stencil
buffer.
2007-03-06 22:17:15 +01:00
Stefan Dösinger
5f159452ef
wined3d: Clearing the depth stencil buffer fails without a depth stencil buffer.
2007-03-06 22:17:03 +01:00
Stefan Dösinger
5f05906f3b
wined3d: Store the number of aux buffers in the gl limits structure.
2007-03-06 22:16:25 +01:00
Stefan Dösinger
7126b63645
wined3d: Use the scissor test when clearing the full surface too.
...
It was incorrect to disable the scissor test for full surfaces in my
clear patch. With back buffer offscreen rendering the viewport does
not seem to restrict clearing, and with different sizes of depth
stencil and color buffer the final fantasy XI demo seems to expect the
clear to be restricted.
2007-03-05 15:31:21 +01:00
Stefan Dösinger
95efeb7e4b
wined3d: Support GL_APPLE_fence for event queries.
2007-03-01 11:40:24 +01:00
Stefan Dösinger
76b60b0516
wined3d: Support event queries using GL_NV_fence.
2007-03-01 11:40:14 +01:00
Stefan Dösinger
409aa73132
wined3d: Move clip planes to the state table.
2007-02-28 21:09:37 +01:00
Stefan Dösinger
7560c8e1d2
wined3d: Use GL_STATIC_DRAW_ARB instead of GL_STATIC_DRAW.
2007-02-28 21:05:00 +01:00
Stefan Dösinger
8d9a553d89
wined3d: Support for using auxilliary buffers for offscreen rendering.
...
OpenGL AUX buffers provide a way for offscreen rendering which is very
similar to our back buffer "offscreen" rendering emulation. Not all
card support aux buffers, but if they are available they are a nice
present which is easy to use.
2007-02-28 21:04:47 +01:00
H. Verbeet
19d223cade
wined3d: Store multiple constant indices per list entry.
2007-02-28 13:35:34 +01:00
H. Verbeet
2c85e5e8a3
wined3d: Store GLSL programs in a hash table rather than a linked list.
2007-02-28 13:35:23 +01:00
Stefan Dösinger
4a16dbbbec
wined3d: More Clear fixes.
...
Test for rectangles with x1 > x2 and y1 > y2. Empire earth passes such rects.
2007-02-27 12:20:10 +01:00
Stefan Dösinger
74d2632756
wined3d: Index buffer creation adjustments.
...
Index buffer creation changes the bound gl buffer, thus the state has to
be dirtified, similar to locking.
In an error case the function returned without calling LEAVE_GL().
2007-02-27 12:19:18 +01:00
Francois Gouget
396bad1f6e
Use the SW_XXX constants when calling ShowWindow().
2007-02-23 11:17:54 +01:00
Stefan Dösinger
a72b561947
wined3d: Do not use glMapBuffer in ProcessVertices.
2007-02-21 10:59:55 +01:00
Stefan Dösinger
ca04a9de34
wined3d: Use CopyRect / EqualRect.
2007-02-21 10:57:28 +01:00
Stefan Dösinger
efc03f0a34
wined3d: Index buffer fixes.
2007-02-21 10:57:08 +01:00
Stefan Dösinger
6d66347cf9
wined3d: Clean up sampler usage in UpdateSurface.
...
UpdateSurface has to modify one gl texture unit to bind the texture to
load. To restore the correct properties for drawing gl texture unit 0
is activated and dirtified.
2007-02-21 10:56:47 +01:00
Stefan Dösinger
e935600ebc
wined3d: IWineD3DDevice::Clear fixes.
...
Fix the use of the scissor test in Clear. The rectangle is only set if
a clearing rectangle is used, otherwise the scissor test is disabled
(the pixel ownsership test should take care of the window
boarders). To get the scissor test back to the value the app set up
Clear dirtifies the state(s).
2007-02-21 10:56:36 +01:00
Stefan Dösinger
dd93e1fb7f
wined3d: Floating point shader constant setting.
...
Test how shader constant limits are checked in Set*ShaderConstantF.
The vertex shader tests it based on the limits reported in the caps,
the pixel shader tests tries to find the limit manually because I
could not find a cap structure member specifying the pixel shader
constant limit.
Set*ShaderConstantF returns an error as soon as start or start + count
are bigger than the constant limit.
2007-02-21 10:56:01 +01:00
Stefan Dösinger
76b7cac7af
wined3d: Light parameter fixes.
2007-02-21 10:55:31 +01:00
Stefan Dösinger
59ae2a56fb
wined3d: Use VBOs for index buffers.
2007-02-20 11:50:10 +01:00
Stefan Dösinger
ecfd4cb0e4
wined3d: Move the scissor rectangle to the state table.
2007-02-20 11:49:53 +01:00
Stefan Dösinger
bbcf98209c
wined3d: No bounds checking is done on sampler / texture numbers.
2007-02-20 11:49:42 +01:00
Stefan Dösinger
1f1d0cda22
wined3d: Misc comment updates.
2007-02-20 11:47:57 +01:00
Stefan Dösinger
27113156d9
wined3d: Remove IWineD3DDevice::EnumDisplayModes.
2007-02-20 11:47:46 +01:00
Stefan Dösinger
4a93eb840a
wined3d: Remove stream flags from GetStreamSource.
2007-02-20 11:46:06 +01:00
Stefan Dösinger
ef68e32b03
wined3d/d3d8: Move todo about sw vp usage to d3d8.
2007-02-20 11:45:56 +01:00
Stefan Dösinger
401110538a
wined3d: Check volume texture creation errors.
...
Volumetexture::Release checks for NULL pointers, so releasing a partially
created texture works.
2007-02-20 11:45:42 +01:00
Stefan Dösinger
06f2829b92
wined3d: Pretend to support event queries.
2007-02-19 13:10:10 +01:00
Stefan Dösinger
03bc11fa16
wined3d: Visual test framework.
2007-02-19 13:07:44 +01:00
H. Verbeet
a4bc52a89c
wined3d: Fix WINED3DPRESENT_PARAMETERS and use it instead of D3DPRESENT_PARAMETERS.
2007-02-16 12:31:03 +01:00
Stefan Dösinger
a41ba013b6
wined3d: Test for supported queries.
...
This test contains a table of known supported / known unsupported
queries. In theory wined3d could just report the queries it supports,
but applications may make some assumtions regarding supported /
unsupported queries and stop working if they find a query unexpectadely
supported or unsupported. It also tests what is supposed to happen if an
unsupported query is created.
2007-02-15 17:21:58 +01:00
Stefan Dösinger
8e84127aed
wined3d: Restore the display mode when releasing a swapchain.
2007-02-15 16:56:02 +01:00
H. Verbeet
34e74ffc2a
wined3d: Use WINED3D_OK rather than D3D_OK.
2007-02-15 11:15:50 +01:00
H. Verbeet
3e77ffc563
wined3d: Use WINED3DPRESENT_BACK_BUFFER_MAX rather than D3DPRESENT_BACK_BUFFER_MAX.
2007-02-15 11:15:41 +01:00