Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
b6317bd5
Commit
b6317bd5
authored
20 years ago
by
Raphael Junqueira
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
- a very basic blending support on fast drawing path (to have better
performances on last games) - some defines for VBO support
parent
4c385f98
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/wined3d/directx.c
+6
-0
6 additions, 0 deletions
dlls/wined3d/directx.c
dlls/wined3d/drawprim.c
+23
-9
23 additions, 9 deletions
dlls/wined3d/drawprim.c
include/wine/wined3d_gl.h
+62
-0
62 additions, 0 deletions
include/wine/wined3d_gl.h
with
91 additions
and
9 deletions
dlls/wined3d/directx.c
+
6
−
0
View file @
b6317bd5
...
...
@@ -363,6 +363,12 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display)
gl_info
->
vs_arb_version
=
VS_VERSION_11
;
TRACE_
(
d3d_caps
)(
" FOUND: ARB Vertex Shader support - version=%02x
\n
"
,
gl_info
->
vs_arb_version
);
gl_info
->
supported
[
ARB_VERTEX_PROGRAM
]
=
TRUE
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_vertex_blend"
)
==
0
)
{
TRACE_
(
d3d_caps
)(
" FOUND: ARB Vertex Blend support
\n
"
);
gl_info
->
supported
[
ARB_VERTEX_BLEND
]
=
TRUE
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_vertex_buffer_object"
)
==
0
)
{
TRACE_
(
d3d_caps
)(
" FOUND: ARB Vertex Buffer support
\n
"
);
gl_info
->
supported
[
ARB_VERTEX_BUFFER_OBJECT
]
=
TRUE
;
/**
* EXT
...
...
This diff is collapsed.
Click to expand it.
dlls/wined3d/drawprim.c
+
23
−
9
View file @
b6317bd5
...
...
@@ -685,12 +685,23 @@ void drawStridedFast(IWineD3DDevice *iface, Direct3DVertexStridedData *sd,
/* Blend Data ----------------------------------------------*/
if
((
sd
->
u
.
s
.
blendWeights
.
lpData
!=
NULL
)
||
(
sd
->
u
.
s
.
blendMatrixIndices
.
lpData
!=
NULL
))
{
/* FIXME: Won't get here as will drop to slow method */
FIXME
(
"Blending not supported in fast draw routine
\n
"
);
#if 0 /* Vertex blend support needs to be added */
if (GL_SUPPORT(ARB_VERTEX_BLEND)) {
/*FIXME("TODO\n");*/
#if 1
/* Vertex blend support needs to be added */
if
(
GL_SUPPORT
(
ARB_VERTEX_BLEND
))
{
DWORD
fvf
=
(
sd
->
u
.
s
.
blendWeights
.
dwType
-
D3DDECLTYPE_FLOAT1
)
+
1
;
int
numBlends
=
((
fvf
&
D3DFVF_POSITION_MASK
)
>>
1
)
-
2
+
((
FALSE
==
(
fvf
&
D3DFVF_LASTBETA_UBYTE4
))
?
0
:
-
1
);
/*FIXME("TODO\n");*/
/* Note dwType == float3 or float4 == 2 or 3 */
VTRACE
((
"glWeightPointerARB(%ld, GL_FLOAT, %ld, %p)
\n
"
,
numBlends
,
sd
->
u
.
s
.
blendWeights
.
dwStride
,
sd
->
u
.
s
.
blendWeights
.
lpData
));
GL_EXTCALL
(
glWeightPointerARB
)(
numBlends
,
GL_FLOAT
,
sd
->
u
.
s
.
blendWeights
.
dwStride
,
sd
->
u
.
s
.
blendWeights
.
lpData
);
checkGLcall
(
"glWeightPointerARB(...)"
);
glEnableClientState
(
GL_WEIGHT_ARRAY_ARB
);
checkGLcall
(
"glEnableClientState(GL_VERTEX_ARRAY)"
);
}
else
if
(
GL_SUPPORT
(
EXT_VERTEX_WEIGHTING
))
{
/*FIXME("TODO\n");*/
/*
...
...
@@ -712,6 +723,9 @@ void drawStridedFast(IWineD3DDevice *iface, Direct3DVertexStridedData *sd,
checkGLcall("glDisableClientState(GL_VERTEX_WEIGHT_ARRAY_EXT)");
*/
}
#else
/* FIXME: Won't get here as will drop to slow method */
FIXME
(
"Blending not supported in fast draw routine
\n
"
);
#endif
}
...
...
@@ -1551,9 +1565,9 @@ void drawPrimitive(IWineD3DDevice *iface,
#endif
}
}
else
if
((
dataLocations
.
u
.
s
.
pSize
.
lpData
!=
NULL
)
||
(
dataLocations
.
u
.
s
.
diffuse
.
lpData
!=
NULL
)
||
(
dataLocations
.
u
.
s
.
blendWeights
.
lpData
!=
NULL
))
{
}
else
if
((
dataLocations
.
u
.
s
.
pSize
.
lpData
!=
NULL
)
||
(
dataLocations
.
u
.
s
.
diffuse
.
lpData
!=
NULL
)
/*||
(dataLocations.u.s.blendWeights.lpData != NULL)
*/
)
{
/* Fixme, Ideally, only use the per-vertex code for software HAL
but until opengl supports all the functions returned to setup
...
...
This diff is collapsed.
Click to expand it.
include/wine/wined3d_gl.h
+
62
−
0
View file @
b6317bd5
...
...
@@ -96,6 +96,7 @@
#define GL_MODELVIEW30_ARB 0x873E
#define GL_MODELVIEW31_ARB 0x873F
#endif
typedef
void
(
APIENTRY
*
PGLFNGLWEIGHTPOINTERARB
)
(
GLint
size
,
GLenum
type
,
GLsizei
stride
,
GLvoid
*
pointer
);
/* GL_EXT_secondary_color */
#ifndef GL_EXT_secondary_color
#define GL_EXT_secondary_color 1
...
...
@@ -384,6 +385,51 @@ typedef GLboolean (APIENTRY * PGLFNISPROGRAMARBPROC) (GLuint program);
#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
#endif
/* GL_ARB_vertex_buffer_object */
#ifndef GL_ARB_vertex_buffer_object
#define GL_BUFFER_SIZE_ARB 0x8764
#define GL_BUFFER_USAGE_ARB 0x8765
#define GL_ARRAY_BUFFER_ARB 0x8892
#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
#define GL_READ_ONLY_ARB 0x88B8
#define GL_WRITE_ONLY_ARB 0x88B9
#define GL_READ_WRITE_ARB 0x88BA
#define GL_BUFFER_ACCESS_ARB 0x88BB
#define GL_BUFFER_MAPPED_ARB 0x88BC
#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
#define GL_STREAM_DRAW_ARB 0x88E0
#define GL_STREAM_READ_ARB 0x88E1
#define GL_STREAM_COPY_ARB 0x88E2
#define GL_STATIC_DRAW_ARB 0x88E4
#define GL_STATIC_READ_ARB 0x88E5
#define GL_STATIC_COPY_ARB 0x88E6
#define GL_DYNAMIC_DRAW_ARB 0x88E8
#define GL_DYNAMIC_READ_ARB 0x88E9
#define GL_DYNAMIC_COPY_ARB 0x88EA
#endif
typedef
void
(
APIENTRY
*
PGLFNBINDBUFFERARBPROC
)
(
GLenum
target
,
GLuint
buffer
);
typedef
void
(
APIENTRY
*
PGLFNDELETEBUFFERSARBPROC
)
(
GLsizei
n
,
const
GLuint
*
buffers
);
typedef
void
(
APIENTRY
*
PGLFNGENBUFFERSARBPROC
)
(
GLsizei
n
,
GLuint
*
buffers
);
typedef
GLboolean
(
APIENTRY
*
PGLFNISBUFFERARBPROC
)
(
GLuint
buffer
);
typedef
void
(
APIENTRY
*
PGLFNBUFFERDATAARBPROC
)
(
GLenum
target
,
ptrdiff_t
size
,
const
GLvoid
*
data
,
GLenum
usage
);
typedef
void
(
APIENTRY
*
PGLFNBUFFERSUBDATAARBPROC
)
(
GLenum
target
,
ptrdiff_t
offset
,
ptrdiff_t
size
,
const
GLvoid
*
data
);
typedef
void
(
APIENTRY
*
PGLFNGETBUFFERSUBDATAARBPROC
)
(
GLenum
target
,
ptrdiff_t
offset
,
ptrdiff_t
size
,
GLvoid
*
data
);
typedef
GLvoid
*
(
APIENTRY
*
PGLFNMAPBUFFERARBPROC
)
(
GLenum
target
,
GLenum
access
);
typedef
GLboolean
(
APIENTRY
*
PGLFNUNMAPBUFFERARBPROC
)
(
GLenum
target
);
typedef
void
(
APIENTRY
*
PGLFNGETBUFFERPARAMETERIVARBPROC
)
(
GLenum
target
,
GLenum
pname
,
GLint
*
params
);
typedef
void
(
APIENTRY
*
PGLFNGETBUFFERPOINTERVARBPROC
)
(
GLenum
target
,
GLenum
pname
,
GLvoid
*
*
params
);
/* GL_EXT_texture_compression_s3tc */
#ifndef GL_EXT_texture_compression_s3tc
#define GL_EXT_texture_compression_s3tc 1
...
...
@@ -717,9 +763,11 @@ typedef enum _GL_SupportedExt {
ARB_TEXTURE_MIRRORED_REPEAT
,
ARB_VERTEX_PROGRAM
,
ARB_VERTEX_BLEND
,
ARB_VERTEX_BUFFER_OBJECT
,
/* EXT */
EXT_FOG_COORD
,
EXT_PALETTED_TEXTURE
,
EXT_PIXEL_BUFFER_OBJECT
,
EXT_POINT_PARAMETERS
,
EXT_SECONDARY_COLOR
,
EXT_STENCIL_WRAP
,
...
...
@@ -761,6 +809,20 @@ typedef enum _GL_SupportedExt {
USE_GL_FUNC(PGLFNCOMPRESSEDTEXIMAGE3DPROC, glCompressedTexImage3DARB); \
USE_GL_FUNC(PGLFNCOMPRESSEDTEXSUBIMAGE2DPROC, glCompressedTexSubImage2DARB); \
USE_GL_FUNC(PGLFNCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedTexSubImage3DARB); \
/* GL_ARB_vertex_blend */
\
USE_GL_FUNC(PGLFNGLWEIGHTPOINTERARB, glWeightPointerARB); \
/* GL_ARB_vertex_buffer_object */
\
USE_GL_FUNC(PGLFNBINDBUFFERARBPROC, glBindBufferARB); \
USE_GL_FUNC(PGLFNDELETEBUFFERSARBPROC, glDeleteBuffersARB); \
USE_GL_FUNC(PGLFNGENBUFFERSARBPROC, glGenBuffersARB); \
USE_GL_FUNC(PGLFNISBUFFERARBPROC, glIsBufferARB); \
USE_GL_FUNC(PGLFNBUFFERDATAARBPROC, glBufferDataARB); \
USE_GL_FUNC(PGLFNBUFFERSUBDATAARBPROC, glBufferSubDataARB); \
USE_GL_FUNC(PGLFNGETBUFFERSUBDATAARBPROC, glGetBufferSubDataARB); \
USE_GL_FUNC(PGLFNMAPBUFFERARBPROC, glMapBufferARB); \
USE_GL_FUNC(PGLFNUNMAPBUFFERARBPROC, glUnmapBufferARB); \
USE_GL_FUNC(PGLFNGETBUFFERPARAMETERIVARBPROC, glGetBufferParameterivARB); \
USE_GL_FUNC(PGLFNGETBUFFERPOINTERVARBPROC, glGetBufferPointervARB); \
/** EXT Extensions **/
\
/* GL_EXT_fog_coord */
\
/* GL_EXT_paletted_texture */
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment