Austin English
3471f841a1
wined3d: Spelling fixes.
2008-01-18 12:53:33 +01:00
Stefan Dösinger
b5f925cae0
wined3d: Implement half float vertex buffer conversion.
2007-12-21 13:13:56 +01:00
Stefan Dösinger
aaa0e5090a
wined3d: Add a test for 16 bit floats.
2007-12-20 12:10:16 +01:00
Stefan Dösinger
2d90449500
wined3d: Fixed function vertex attribute types are flexible.
2007-12-20 10:49:42 +01:00
Stefan Dösinger
a3c2fb9e64
wined3d: Store if half float conversion is needed in the decl.
2007-12-20 10:48:16 +01:00
Stefan Dösinger
7a1d35e513
wined3d: Emulate half float vertices if GL_NV_half_float is not there.
2007-12-19 12:19:27 +01:00
Michael Stefaniuc
a526ad6cbc
wined3d: Fix a "ordered comparison of pointer with integer zero".
2007-12-11 14:59:54 +01:00
Gerald Pfeifer
f4ec0a209b
wined3d: Fix error handling in fixed_get_input().
2007-12-05 13:47:10 +01:00
Stefan Dösinger
e4f8a2da2b
wined3d: Depth stencil fixes.
2007-11-14 11:58:36 +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
Stefan Dösinger
4c51db896c
wined3d: Check for NULL streams.
2007-09-20 15:53:19 +02:00
Stefan Dösinger
282696b4f6
wined3d: Supply texture coords even if no texture is bound and pshaders are used.
2007-08-31 19:32:46 +02:00
Stefan Dösinger
643d1e8847
wined3d: Tidy up the vbo removal from the strided data.
2007-08-30 11:57:18 +02:00
Stefan Dösinger
8c9c084004
wined3d: Use 0/0/0 as normal if no normal is supplied.
2007-08-30 11:57:18 +02:00
Stefan Dösinger
4779a27eed
wined3d: Remove the D3DTTFF_PROJECTED handling from drawStridedSlow.
2007-08-28 11:55:33 +02:00
Stefan Dösinger
fe0f0eb48a
wined3d: Some texture transform fixes.
2007-08-27 18:28:43 +02:00
Stefan Dösinger
6ec6c941fa
wined3d: BaseVertexIndex can be negative.
2007-08-27 12:00:42 +02:00
Stefan Dösinger
98bc83be7c
wined3d: Fall back to drawStridedSlow if fog coords are used.
2007-08-23 13:33:22 +02:00
H. Verbeet
3c609c11e7
wined3d: UBYTE4 data shouldn't be normalized.
2007-08-20 22:24:48 +02:00
Hernan Rajchert
6aead911fb
wined3d: Fixed error message when glDrawElement fails.
2007-08-13 11:32:07 +02:00
Stefan Dösinger
b8dd5839ef
wined3d: Store the position_transformed flag in the vdecl.
2007-08-08 15:32:00 +02:00
Stefan Dösinger
06e51c21e1
wined3d: Determine used streams at vdecl creation.
2007-08-08 15:32:00 +02:00
Roderick Colenbrander
e77da5ef8a
wined3d: Don't call ActivateContext between ENTER_GL/LEAVE_GL.
2007-08-07 12:36:32 +02:00
H. Verbeet
82245cb5d7
wined3d: Properly load FLOAT16_2 and FLOAT16_4 vertex data.
2007-08-02 12:18:41 +02:00
Francois Gouget
5266e57975
Assorted spelling fixes.
2007-07-31 21:37:50 +02:00
H. Verbeet
e652128fdf
wined3d: Pass the correct target to glMultiTexCoord.
2007-07-25 13:02:44 +02:00
H. Verbeet
fc4c73902a
wined3d: Trace the declaration element type in primitiveDeclarationConvertToStridedData().
2007-07-24 11:25:52 +02:00
Stefan Dösinger
97cd8bab1b
wined3d: Print the fixed and unfixed vertex warning only when needed.
2007-07-10 13:30:42 +02:00
Stefan Dösinger
26ebe396c3
wined3d: Implement high order patches.
2007-07-06 19:32:47 +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
440ca84680
wined3d: Fix various incorrect uses of GL_LIMITS(texture_stages) and GL_LIMITS(sampler_stages).
2007-06-22 12:19:10 +02:00
H. Verbeet
c60bdca5b0
wined3d: Make use of the texUnitMap in drawStridedSlow as well.
2007-06-21 13:10:40 +02:00
Stefan Dösinger
b081cbaf40
wined3d: Emulate tracking of multiple material properties.
2007-06-21 13:09:30 +02:00
Stefan Dösinger
030b92a2f6
wined3d: Remove the FVF codepath from drawprim.
2007-06-21 13:09:08 +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
45b531fcea
wined3d: Make sure the color buffer is not modified by depth_blt().
2007-06-06 12:10:39 +02:00
Stefan Dösinger
adb9b13b81
wined3d: Implement vertex blending using GL_ARB_vertex_blend.
2007-05-03 14:24:46 +02:00
Bernd Buschinski
aff22d0472
wined3d: Fix drawStridedSlow typo.
2007-04-18 13:13:17 +02:00
H. Verbeet
8d3c078e6c
wined3d: Disable the scissor test for depth blits.
2007-04-10 21:39:32 +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
a9e04dd87f
wined3d: Index buffer data is unsigned.
2007-04-07 10:58:25 +02:00
Fabian Bieler
7cedd56d24
wined3d: Implement linear fog with pixel shader.
2007-03-23 12:30:23 +01:00
Francois Gouget
e11ca0a7fd
wined3d: Remove space before '\n' in trace.
2007-03-14 12:10:47 +01:00
Stefan Huehner
4d1d01f266
Mark several functions as static.
2007-03-13 13:35:12 +01:00
H. Verbeet
30ee071eb9
wined3d: Disable vertex shaders when transformed vertices are used.
2007-03-13 11:55:55 +01:00
H. Verbeet
b22ca33a85
wined3d: 11 space indent is ugly.
2007-03-13 11:54:08 +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
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
2a90bc2c7a
wined3d: Remove dead code from drawprim.c.
2007-02-21 10:57:50 +01:00
Stefan Dösinger
fb1469c47d
wined3d: Do not print the fixed / unfixed vertices warning with shaders.
2007-02-21 10:55:14 +01:00
Stefan Dösinger
a9d681c3ad
wined3d: With FVFs only one stream is used.
2007-02-20 11:50:26 +01:00
Stefan Dösinger
59ae2a56fb
wined3d: Use VBOs for index buffers.
2007-02-20 11:50:10 +01:00
H. Verbeet
498f9c507a
wined3d: Use WINED3DSTREAMSOURCE_INSTANCEDATA rather than D3DSTREAMSOURCE_INSTANCEDATA.
2007-02-15 11:15:25 +01:00
Stefan Dösinger
0feddccfe3
wined3d: Instancing emulation.
2007-02-14 20:46:25 +01:00
H. Verbeet
32e5cac2be
wined3d: Get rid of the vertexDeclaration field in IWineD3DVertexShaderImpl.
2007-02-14 13:54:29 +01:00
H. Verbeet
8f0884066f
wined3d: Add WINED3DDECLUSAGE, use it.
2007-02-14 13:50:22 +01:00
Stefan Dösinger
8cae0e4d07
wined3d: Dirtify the render targets, not the primary swapchain on draws.
2007-02-14 12:27:23 +01:00
Stefan Dösinger
c1623d4e7b
wined3d: Use the context manager to prepare for drawing.
2007-02-13 12:03:40 +01:00
Stefan Dösinger
380930dc54
wined3d: Store dirty states per context.
2007-02-13 11:55:07 +01:00
Stefan Dösinger
c739c387b6
wined3d: Add a per context structure for context management.
2007-02-13 11:50:14 +01:00
Stefan Dösinger
354fdae524
wined3d: Implement per stream offsets.
2007-01-17 11:24:04 +01:00
Stefan Dösinger
1d3abdeeaa
wined3d: Store the stream number in the strided structure.
2007-01-17 11:23:54 +01:00
Stefan Dösinger
71f923a6d2
wined3d: Improve drawStridedSlow a bit.
2007-01-17 11:23:41 +01:00
Stefan Dösinger
9b4920996e
wined3d: Move material applying to the state table.
2007-01-10 22:00:34 +01:00
Stefan Dösinger
dfeb40cbff
wined3d: Remove the invymat from drawprim.c.
2007-01-10 22:00:25 +01:00
Stefan Dösinger
329670c7f1
wined3d: Do not reset the material.
2007-01-10 22:00:17 +01:00
Stefan Dösinger
9f2e0fa2e0
wined3d: Do not try to read the vertex decl when the stateblock isn't finalized.
2007-01-08 21:00:14 +01:00
Stefan Dösinger
d47ec21280
wined3d: Vertex buffers can use the declaration from the device.
2007-01-08 20:59:57 +01:00
Stefan Dösinger
b310e98693
wined3d: Clean up drawprim a bit.
2007-01-08 20:59:38 +01:00
Stefan Dösinger
09ab812e79
wined3d: Avoid negative draw start indices.
2007-01-08 20:58:11 +01:00
Stefan Dösinger
8e37fcd266
wined3d: Move applying shader constants to the state table.
2007-01-08 20:57:57 +01:00
Stefan Dösinger
799770b992
wined3d: Apply shaders in their state handlers.
2007-01-08 20:56:51 +01:00
Stefan Dösinger
7e314011fb
wined3d: Move debugging fixmes from drawprim to the stream source handler.
2007-01-08 20:56:36 +01:00
Stefan Dösinger
27bac24acb
wined3d: Re-add the fixed function stream source trace.
2007-01-08 20:56:06 +01:00
Stefan Dösinger
d5f18e6a63
wined3d: Move applying the gl stream sources to the state table.
2007-01-08 20:55:51 +01:00
Stefan Dösinger
e26e3ee5f3
wined3d: Remove d3ddevice_set_ortho.
2007-01-03 11:19:55 +01:00
Stefan Dösinger
82bd0790ed
wined3d: Move the projection matrix into its own state.
2007-01-03 11:19:45 +01:00
Stefan Dösinger
20de200fa3
wined3d: Move the functionality of primitiveInitState to the state table.
2007-01-03 11:17:08 +01:00
Stefan Dösinger
438c172841
wined3d: Move decoding the vertex declaration to the vertexshader state handler.
2007-01-03 11:10:01 +01:00
Stefan Dösinger
04ce141940
wined3d: Pass the user pointer strided structure via the device implementation.
2007-01-03 11:03:03 +01:00
Stefan Dösinger
71631f7638
wined3d: Use the baseVertexIndex in the stateblock.
2007-01-03 11:02:51 +01:00
Stefan Dösinger
091f9c28e4
wined3d: Put the decoded strided data structure into the device.
2007-01-02 12:29:04 +01:00
H. Verbeet
bf250285ff
wined3d: Restore texture bindings in the FBO code.
2006-12-26 12:37:38 +01:00
H. Verbeet
d6010edee0
wined3d: Copy the depth buffer after all dirty states are applied.
2006-12-26 12:37:29 +01:00
Stefan Dösinger
22e2a5aca5
wined3d: Add pixel shaders to the state table.
2006-12-20 17:09:21 +01:00
Stefan Dösinger
666b507766
wined3d: Move samplers to the state table.
2006-12-20 17:07:56 +01:00
Stefan Dösinger
bd6a6ad2c0
wined3d: Move WINED3DTSS_ALPHAOP to the state table.
2006-12-20 17:06:10 +01:00
Stefan Dösinger
762af471e8
wined3d: Move WINED3DTSS_COLOROP to the state table.
2006-12-20 17:06:00 +01:00
Stefan Dösinger
1e264e5dd4
wined3d: Temporary disable nvrc junk texture skipping.
2006-12-20 17:05:11 +01:00
Stefan Dösinger
062b6ffc5c
wined3d: Catch nop render state changes.
2006-12-19 16:53:18 +01:00
Stefan Dösinger
7532c759f1
wined3d: Add the state dirtification infrastructure.
2006-12-19 16:53:00 +01:00
Dmitry Timoshkov
47ffd7ae95
wined3d: Make some data const.
2006-12-14 20:11:41 +01:00
Markus Amsler
c40501db50
Revert "d3d: Remove AddRef from IWineD3DDevice_GetSwapChain.".
...
This reverts commit f84f687e6d
.
2006-11-30 16:03:59 +01:00
H. Verbeet
8a7f427948
wined3d: Select the right shader backend when creating the device.
2006-11-28 12:19:27 +01:00
H. Verbeet
df6f482a69
wined3d: Move some code specific to the different shader backends into the respective source files.
2006-11-28 12:19:19 +01:00
Markus Amsler
f84f687e6d
d3d: Remove AddRef from IWineD3DDevice_GetSwapChain.
2006-11-22 11:40:50 +01:00
H. Verbeet
9d6f22002c
wined3d: Only copy the depth buffer if there is one.
2006-11-20 11:50:14 +01:00
H. Verbeet
8afe27dacd
wined3d: Fix GL_ARB_texture_cube_map extension support.
2006-11-20 11:50:14 +01:00
H. Verbeet
ef2c062c09
wined3d: Allow the depth buffer to be shared between onscreen and offscreen rendering modes.
2006-11-17 18:14:25 +01:00
H. Verbeet
6d66085150
wined3d: Add FBO support for offscreen rendering.
2006-11-17 18:14:13 +01:00
H. Verbeet
9bf04ecd03
wined3d: Rename renderUpsideDown to render_offscreen.
2006-11-17 15:53:52 +01:00
Ivan Gyurdiev
875a1eb02d
wined3d: Add D3DFVF codes to the WINED3D namespace.
2006-10-31 12:09:06 +01:00
Ivan Gyurdiev
4eced8ea24
wined3d: Add D3DFOGMODE to the WINED3D namespace.
2006-10-30 12:05:24 +01:00
Markus Amsler
9497e89d89
wined3d: Respect ARB_VERTEX_BUFFER_OBJECT in loadVertexData.
2006-10-30 11:17:01 +01:00
Ivan Gyurdiev
9846602412
wined3d: Add D3DTEXTURETRANSFORMTYPE to the WINED3D namespace.
2006-10-13 11:15:31 +02:00
Ivan Gyurdiev
c912032aa5
wined3d: Add D3DTEXTUREOP to the WINED3D namespace.
2006-10-13 11:13:02 +02:00
Ivan Gyurdiev
532fe7a1cf
wined3d: Merge D3DDP_MAXTEXCOORD constants into one constant in WINED3D namespace.
2006-10-12 12:38:02 +02:00
Ivan Gyurdiev
2bac4a02da
wined3d: Merge D3DPRIMITIVETYPE types into one type in WINED3D namespace.
2006-10-12 12:37:52 +02:00
Ivan Gyurdiev
a07a8f793b
wined3d: D3DDECLTYPE: Consistently use in WINED3D namespace.
2006-10-11 12:20:21 +02:00
Ivan Gyurdiev
837027fcb7
wined3d: D3DTEXTURESTAGESTATETYPE: Consistently use in WINED3D namespace.
2006-10-11 12:18:53 +02:00
Ivan Gyurdiev
e020eceddf
wined3d: Make the shader mode selections per device.
2006-10-09 20:27:55 +02:00
Ivan Gyurdiev
3dcd3681f3
wined3d: Win64 printf fixes.
2006-10-02 14:38:04 +02:00
Ivan Gyurdiev
42a9262acf
wined3d: Read GL info and load constants into the same device.
2006-09-27 19:53:43 +02:00
H. Verbeet
5abdd7a19f
wined3d: Comparing BOOLs against FALSE is redundant.
2006-09-27 09:49:07 +02:00
Stefan Dösinger
96bce8d6d4
wined3d: Avoid wasting a uniform.
2006-09-25 18:24:19 +02:00
Ivan Gyurdiev
b421b60874
wined3d: Allow null streams in the vertex declaration.
2006-09-21 19:57:12 +02:00
Stefan Dösinger
fd65b9b413
wined3d: Do not bind the 0 vbo when vbos are unsupported.
2006-09-21 11:14:52 +02:00
Stefan Dösinger
0b7a96e92b
wined3d: Compile pixel shaders in drawprim.
2006-08-25 11:19:08 +02:00
Stefan Dösinger
d7f94bf7c9
wined3d: Correctly draw transformed and untransformed vertices in the same scene.
2006-08-22 12:53:53 +02:00
H. Verbeet
49f4c68e29
wined3d: Lookup GLSL float uniform locations only once per program.
2006-08-21 12:16:27 +02:00
Roderick Colenbrander
1a3359884c
wined3d: Fix opengl extension call.
2006-08-11 11:56:36 +02:00
H. Verbeet
ef87a40c72
wined3d: Delay vertex shader compilation until the shader is first used.
2006-08-07 13:12:10 +02:00
H. Verbeet
ea905eab09
wined3d: Disable vertex arrays after we're done drawing from them.
...
After drawing from a vertex array we should disable them, to prevent
the next draw calls from potentially reading past their ends. This
also moves the disabling of vertex attrib arrays (for shaders) into
its own function.
2006-08-04 11:58:43 +02:00
Jason Green
46c4b88ba5
wined3d: Fix some upside-down rendering issues for shaders.
2006-07-27 12:03:25 +02:00
Jason Green
f6b88b93ad
wined3d: Fix crash caused by bad TRACE.
2006-07-26 10:24:27 +02:00
H. Verbeet
2d6e661fbe
wined3d: D3d8 shaders can have a NULL pFunction, but a valid vertex declaration.
2006-07-25 11:21:46 +02:00
Jason Green
ac8f2c033c
wined3d: Improve traces for D3DTRANSFORMSTATETYPE.
...
Added debug function for WINED3DTRANSFORMSTATETYPE and changed all
references from D3DTS_* to WINED3DTS_*.
2006-07-24 19:55:27 +02:00
H. Verbeet
593541a50c
wined3d: Increment texture_idx when continuing as well.
2006-07-18 11:09:46 +02:00
Jason Green
6a97f2202e
wined3d: Fix for vertex shaders.
2006-07-17 15:05:38 +02:00
Ivan Gyurdiev
899c8cdb64
wined3d: Create fake input semantics for d3d8 shaders.
...
Use them to remove the need for loading arrays in two different places.
2006-07-07 17:39:52 +02:00
Ivan Gyurdiev
5b3c500efe
wined3d: Reverse semantics maps for shaders.
2006-07-07 17:39:26 +02:00
Ivan Gyurdiev
c611012df5
wined3d: Make WINED3D_ATR macros more flexible.
...
Make them operate on a type, as opposed to a semantic name.
2006-07-07 17:37:25 +02:00
Ivan Gyurdiev
c202bfe40d
wined3d: Simplify primitiveDeclartationConvertToStrided.
...
Assign fixed indices to declaration inputs.
Then use a common path to load the strided data.
2006-07-07 17:36:24 +02:00
Ivan Gyurdiev
85aa8ab855
wined3d: Add position_transformed flag to Strided data format.
2006-07-07 17:35:36 +02:00
Ivan Gyurdiev
fc2611d4a8
wined3d: Only link and use GLSL program if at least one GLSL shader is available.
2006-07-07 17:28:21 +02:00
Michael Stefaniuc
00e779370f
janitorial: Put "inline static" at the beginning of a declaration.
2006-07-07 14:30:35 +02:00
Ivan Gyurdiev
0472e9cd49
wined3d: Clean up drawPrimitive/drawPrimitiveDrawStrided.
2006-07-06 16:07:38 +02:00
Ivan Gyurdiev
276609e1e5
wined3d: Move register count pass to SetFunction.
...
Move semantics pointers out of the reg_maps, make them persistent data
in the shader (again, for future software shaders).
2006-07-06 16:07:38 +02:00
Ivan Gyurdiev
771623692e
wined3d: Rework shader mode selection.
...
- currently half the shader selection code (GLSL vs ARB) is in
fillGLcaps. The parts that check for software shaders are in
GetDeviceCaps. That placement, will work, but is definitely not optimal.
FillGLcaps should detect support - it should not make decision as to
what's used, because that's not what the purpose of the function is.
GetDeviceCaps should report support as it has already been selected.
Instead, select shader mode in its own function, called in the
appropriate places.
- unifying pixel and vertex shaders into a single selection is a
mistake. A software vertex shader can be coupled with a hardware arb or
glsl pixel shader, or no shader at all. Split them back into two and add
a SHADER_NONE variant.
- drawprim is doing support checks for ARB_PROGRAM, and making shader
decisions based on that - that's wrong, support has already been
checked, and decided upon, and shaders can be implemented via software,
ARB_PROGRAm or GLSL, so that support check isn't valid.
- Store the shader selected mode into the shader itself. Different types
of shaders can be combined, so this is an improvement. In fact, storing
the mode into the settings globally is a mistake as well - it should be
done per device, since different cards have different capabilities.
2006-07-06 16:07:37 +02:00
H. Verbeet
7f9e61f7d2
wined3d: Use register combiners for texture stage operations.
...
Make wined3d use register combiners for texture stage operations. In
order to do that the texture unit index needs to be separated from the
texture stage index. For cards that don't support the
NV_register_combiners extension nothing should change.
2006-06-28 16:34:36 +02:00
H. Verbeet
ac98d566ac
wined3d: Fix uploading of textures for shaders.
...
The code for uploading / binding textures for use with pixel shaders
is slightly different from the one for uploading / binding textures
for use with the fixed function pipeline. It would be possible to keep
the code in a single function with a couple of conditionals, but in
combination with the changes needed for register combiners that would
become quite messy.
2006-06-28 16:08:17 +02:00
H. Verbeet
a54e36adfe
wined3d: Texture limits fixes.
...
GL_LIMITS(textures) is currently used for both the number of texture
stages and the maximum number of simultaneous textures. In the current
code that's the same, but in a later patch that will be separated,
since a texture stage doesn't have to reference an actual
texture. Also, shaders can access a larger number of samplers than the
number of texture units the fixed function pipeline can access.
2006-06-28 16:06:25 +02:00
Stefan Dösinger
7d31ab95e4
wined3d: Add support for VBOs to the drawing code.
2006-06-26 13:02:19 +02:00
Jason Green
2d8e05f8a1
wined3d: Move constant loading into target-specific files.
...
- Moves GLSL constant loading code into glsl_shader.c and out of the
over-populated drawprim.c.
- Creates a new file named arb_program_shader.c which will hold code
specific to ARB_vertex_program & ARB_fragment_program.
- Remove the constant loading calls from drawprim.c
2006-06-19 10:49:52 +02:00
H. Verbeet
701ce97d65
wined3d: Add and use GL_EXT_fog_coord defines.
2006-06-16 11:29:31 +02:00
Stefan Dösinger
3862f8e3d7
wined3d: Support more than one back buffer.
2006-06-15 16:51:41 +02:00
Stefan Dösinger
5c3c5903a5
wined3d: Correct vertex fog for transformed vertices and correctly
...
handle non-vertex, non-table fog.
2006-06-15 12:24:09 +02:00
Ivan Gyurdiev
14a52e5c09
wined3d: Keep pshader and vshader constants in GLSL separate.
...
GLSL uniforms have as scope the entire program.
To prevent conflicts, name pshader and vshader constants differently.
Based on a patch by Jason Green.
2006-06-13 11:40:22 +02:00
Ivan Gyurdiev
0d08316523
wined3d: Improve Sampler support on 2.0 and 3.0 shaders.
...
- track sampler declarations and store the sampler usage in reg_maps structure
- store a fake sampler usage for 1.X shaders (defined as 2D sampler)
- re-sync glsl TEX implementation with the ARB one (no idea why they diverged..)
- use sampler type in new TEX implementation to support 2D, 3D, and Cube sampling
- change drawprim to bind pixel shader samplers
Additional improvements:
- rename texture limit to texcoord to prevent confusion
- add sampler limit, and use that for samplers - *not* the same as texcoord above
2006-06-13 11:40:22 +02:00
Ivan Gyurdiev
9bae7755ab
wined3d: Rework dcl processing.
...
The new function is called in pass 2 (getister counting/maps), and
it's now in baseshader. It operates on all INPUT and OUTPUT registers,
which, in addition to the old vertex shader input declarations covers
Shader Model 3.0 vshader output and pshader input declarations. The
result is stored into the reg_map structure.
2006-06-13 11:40:21 +02:00
Ivan Gyurdiev
f144d58ac2
wined3d: The namedArrays code path is dead (always FALSE).
...
Delete the entire namedArrays code path and all its dependencies (one
of which is quite long - storeOrder in drawprim is always FALSE, for
example). Delete declaredArrays, and make its code path the default.
2006-06-13 11:40:21 +02:00
Jason Green
08295f4cfc
wined3d: GLSL shader cleanup patch.
...
- Based on comments from H. Verbeet
- Changed the distinction from .rgba & .xyzw masks to only use .xyzw
in GLSL shaders. They are interchangeable, and only served to make
the trace look more intuitive, but they don't always apply as-is, so
we'll just leave everything to .xyzw.
- Got rid of the "UseProgramObjectARB(0)" call in drawprim. If there
is no shader set on the next primitive, then that primitive will
call UseProgramObjectARB(0) when it begins to draw.
2006-06-09 21:09:03 +02:00
Jason Green
d5d4568450
wined3d: Allow drawPrim to create and use the GLSL program.
2006-06-09 15:20:06 +02:00
Jason Green
1f1057fc9b
wined3d: Move constant loading out of DrawPrimDrawStrided() and enable
...
loading float constants for GLSL.
- DrawPrim is just too big of a function. This separates the passing
of constants to the shader into new functions.
- Fixes an off-by-one error when loading vertex declaration constants
(should be <, not <=)
- Adds a function for GLSL loading of constants (aka Uniforms)
- Adds a GLSL program variable to the stateblock and sets it to 0 (a
future patch will actually create this program)
2006-06-09 13:26:51 +02:00
Ivan Gyurdiev
5f5969b3c5
wined3d: Remove constant type field in stateblock.
...
It is wrong to maintain a mapping from a constant index to a type
field, because different constant types do not share an index -
boolean constant 0 is supposed to co-exist with floating point
constant 0, not replace it. Drawprim and other code using the type
array to decide whether to look up a constant in bools, floats, or
ints is wrong - you can't make that decision based on the index.
2006-06-06 11:58:54 +02:00
Stefan Dösinger
2c3adec595
wined3d: Render target locking fixes.
2006-06-05 20:59:41 +02:00
Jason Green
c60f296b70
wined3d: Fix regression introduced by recent multitexture patch.
2006-05-26 20:14:31 +02:00
Roderick Colenbrander
54e5f9c465
wined3d: Dynamicly load GL_ARB_multitexture functions.
2006-05-25 20:17:32 +02:00
Stefan Dösinger
5b8b776431
wined3d: Small rhw vertex fix.
...
Fix the one pixel displacement and move the glOrtho code in a common
function.
2006-05-25 20:09:57 +02:00
Jonathan Ernst
360a3f9142
Update the address of the Free Software Foundation.
2006-05-23 14:11:13 +02:00
Ivan Gyurdiev
d59eeb3ee5
wined3d: Allow use of pixel shaders with drawStridedSlow.
2006-05-22 11:40:00 +02:00
Stefan Dösinger
9abdac6aaa
wined3d: Implement IWineD3DDevice::ProcessVertices.
2006-05-15 13:57:17 +02:00
Stefan Dösinger
10ff0d8184
wined3d: rhw vertex fixup.
...
Change the rhw=0 range to ]1e-8,1e-8[ and move the value to a constant
in wined3d_types.h
2006-05-09 20:45:27 +02:00
Stefan Dösinger
a173c8e35a
wined3d: Add IWineD3DDevice::DrawPrimitiveStrided.
2006-05-08 14:51:13 +02:00
Ivan Gyurdiev
dbf5450982
wined3d: Remove dead shader code.
2006-05-07 10:00:24 +02:00
Ivan Gyurdiev
07f4f70487
wined3d: QueryInterface corrections.
2006-05-05 20:23:41 +02:00
Ivan Gyurdiev
74117baa6c
wined3d: Correct vtrace usage.
2006-04-21 11:34:31 +02:00
Stefan Dösinger
bbe490abcc
wined3d: Add WINED3DLOCKED_RECT to wined3d_types.h.
2006-04-06 22:23:31 +02:00
H. Verbeet
59af5c4a62
wined3d: Move fields common to vertex shaders and pixel shaders to IWineD3DBaseShader.
2006-03-30 21:55:15 +02:00
H. Verbeet
1aca53860a
wined3d: Set vertex attribute pointers defined in vertex declarations properly.
2006-03-22 21:41:05 +01:00
Stefan Dösinger
913df5b143
wined3d: Consistently use WINED3DRESOURCETYPE.
2006-03-10 21:43:00 +01:00
H. Verbeet
76c469e5a4
wined3d: Use OpenGL fragment programs when available.
2006-03-09 13:10:42 +01:00
H. Verbeet
86b9041c0c
wined3d: Remove an incorrect FIXME.
2006-03-09 13:10:30 +01:00
Stefan Dösinger
851bdfb5e0
wined3d: Add D3DLOCK_* types to wined3d_types.h.
2006-03-08 11:33:35 +01:00
H. Verbeet
78a43b3dbc
wined3d: Fix a few FIXME's.
2006-03-07 10:56:52 +01:00
Stefan Dösinger
46e8d67787
wined3d: Update the glOrtho between 2 rhw draws if the viewport was changed.
2006-02-13 13:25:21 +01:00
H. Verbeet
bcfa7dcf7d
wined3d: Downgrade a FIXME to a TRACE.
2006-02-06 11:30:27 +01:00
H. Verbeet
4bd8b60bd3
wined3d: A shader isn't guaranteed to have a vertex declaration, so
...
add a NULL check for that.
2006-01-20 16:13:03 +01:00
Oliver Stieber
7c482cb9a1
wined3d: Vertex shader 8 support.
...
Start to add support for DirectX 8 vertex shaders, constants and
registers are now correctly assigned and loaded allowing support for
most basic d3d8 shaders.
2005-12-09 11:23:52 +01:00
Oliver Stieber
aa9ce3577a
Added support for vertex and pixel shader constants that have no type
...
i.e. they haven't been set yet or are clear.
2005-11-29 17:05:54 +01:00
Raphael Junqueira
705aec5a6f
- defined D3DCOLOR_B macros to access byte values of D3DCOLOR
...
- use D3DCOLOR macros instead of using shift + masks
- fix a bug where diffuse.lpData checked instead of specular.lpData
- implement color fixup on ARB VShader compilation code:
-> on input parameters using swizzle
-> add is_color parameter on vshader_program_add_param
2005-11-15 12:03:13 +00:00
Francois Gouget
0edbaf7e80
Remove spaces before '\n' in traces.
2005-11-10 12:14:56 +00:00
Oliver Stieber
c62e978d54
Verify that the texture coordinate used in DrawStridedSlow is in range
...
before trying to referencing the associated data.
2005-11-07 11:13:26 +00:00
Oliver Stieber
44b4777972
Add checks for ARB_vertex_program before allowing vertex shaders to
...
use ARB_vertex_program.
2005-10-11 20:27:54 +00:00
Oliver Stieber
c99a3fafef
Change the format of surface_SaveSnapshot to TGA from PPM and add
...
support for compressed textures and an alpha channel.
2005-09-27 10:49:59 +00:00
Oliver Stieber
1be54d8b79
Integrate hardware vertex shaders into the drawing pipeline.
2005-08-19 10:05:00 +00:00
Francois Gouget
fae73a1090
Assorted spelling fixes.
2005-08-17 09:56:24 +00:00
Francois Gouget
bcd56fe0e5
Assorted spelling fixes.
2005-08-12 18:22:06 +00:00
Oliver Stieber
e31bc6cea4
Moved support for non power 2 texture to hardware.
...
Fix for the texture state separation patches, ApplyTextureStates is
now called instead of being commented out.
2005-08-03 19:49:05 +00:00
Oliver Stieber
1f05577395
Improve on a fixup for the difference between opengl and directx pixel
...
centering of vertexes.
2005-08-03 19:14:19 +00:00
Oliver Stieber
d344162f41
Separate the setting of the DirectX texture and sampler states from
...
the setting of OpenGL states (now in applyTextureStateState and
applySamplerState).
2005-08-01 10:58:31 +00:00
Oliver Stieber
5615513877
Separate the management of DirectX states and openGL states.
2005-08-01 09:20:55 +00:00
Oliver Stieber
386470bedc
Tidy up some of the formatting in drawprim and add missing strided
...
data.
2005-07-30 19:06:14 +00:00
Raphael Junqueira
cc8762a91e
- add a new settings for vbo support
...
- use a struct to handle wined3d settings
- prepare VBO using some abstraction APIs
2005-07-24 17:11:33 +00:00
Gerald Pfeifer
8d43d251b7
Remove unused variable in primitiveConvertToStridedData().
2005-07-22 18:27:04 +00:00
Oliver Stieber
f8079b6947
Correct a problem with the way that FVF vertex arrays containing
...
blends or orthographic is calculated.
2005-07-21 11:01:19 +00:00
Oliver Stieber
2125fa9d37
Fixed regression that occurred because changes to texture loading were
...
committed before changes to textures and states to support the change
were committed.
2005-07-21 10:32:48 +00:00
Oliver Stieber
18f3fcb1c2
Set mipmap levels correctly (even with ATI's buggy drivers).
2005-07-18 09:07:17 +00:00