Commit Graph

665 Commits

Author SHA1 Message Date
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