Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e6473094
Commit
e6473094
authored
May 21, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
May 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Explicitly pass GL info to buffer_create_buffer_object().
parent
e536f998
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
buffer.c
dlls/wined3d/buffer.c
+4
-5
device.c
dlls/wined3d/device.c
+2
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-1
No files found.
dlls/wined3d/buffer.c
View file @
e6473094
...
...
@@ -117,10 +117,9 @@ static void delete_gl_buffer(struct wined3d_buffer *This, const struct wined3d_g
}
/* Context activation is done by the caller. */
static
void
buffer_create_buffer_object
(
struct
wined3d_buffer
*
This
)
static
void
buffer_create_buffer_object
(
struct
wined3d_buffer
*
This
,
const
struct
wined3d_gl_info
*
gl_info
)
{
GLenum
error
,
gl_usage
;
const
struct
wined3d_gl_info
*
gl_info
=
&
This
->
resource
.
device
->
adapter
->
gl_info
;
TRACE
(
"Creating an OpenGL vertex buffer object for IWineD3DVertexBuffer %p Usage(%s)
\n
"
,
This
,
debug_d3dusage
(
This
->
resource
.
usage
));
...
...
@@ -613,7 +612,7 @@ static inline void fixup_transformed_pos(float *p)
}
/* Context activation is done by the caller. */
const
BYTE
*
buffer_get_memory
(
IWineD3DBuffer
*
iface
,
GLuint
*
buffer_object
)
const
BYTE
*
buffer_get_memory
(
IWineD3DBuffer
*
iface
,
const
struct
wined3d_gl_info
*
gl_info
,
GLuint
*
buffer_object
)
{
struct
wined3d_buffer
*
This
=
(
struct
wined3d_buffer
*
)
iface
;
...
...
@@ -622,7 +621,7 @@ const BYTE *buffer_get_memory(IWineD3DBuffer *iface, GLuint *buffer_object)
{
if
(
This
->
flags
&
WINED3D_BUFFER_CREATEBO
)
{
buffer_create_buffer_object
(
This
);
buffer_create_buffer_object
(
This
,
gl_info
);
This
->
flags
&=
~
WINED3D_BUFFER_CREATEBO
;
if
(
This
->
buffer_object
)
{
...
...
@@ -946,7 +945,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
/* TODO: Make converting independent from VBOs */
if
(
This
->
flags
&
WINED3D_BUFFER_CREATEBO
)
{
buffer_create_buffer_object
(
This
);
buffer_create_buffer_object
(
This
,
gl_info
);
This
->
flags
&=
~
WINED3D_BUFFER_CREATEBO
;
}
else
...
...
dlls/wined3d/device.c
View file @
e6473094
...
...
@@ -213,7 +213,8 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
else
{
TRACE
(
"Stream %u isn't UP, %p
\n
"
,
element
->
input_slot
,
This
->
stateBlock
->
streamSource
[
element
->
input_slot
]);
data
=
buffer_get_memory
(
This
->
stateBlock
->
streamSource
[
element
->
input_slot
],
&
buffer_object
);
data
=
buffer_get_memory
(
This
->
stateBlock
->
streamSource
[
element
->
input_slot
],
&
This
->
adapter
->
gl_info
,
&
buffer_object
);
/* Can't use vbo's if the base vertex index is negative. OpenGL doesn't accept negative offsets
* (or rather offsets bigger than the vbo, because the pointer is unsigned), so use system memory
...
...
dlls/wined3d/wined3d_private.h
View file @
e6473094
...
...
@@ -2503,7 +2503,8 @@ struct wined3d_buffer
UINT
*
conversion_shift
;
/* NULL if no shifted conversion */
};
const
BYTE
*
buffer_get_memory
(
IWineD3DBuffer
*
iface
,
GLuint
*
buffer_object
)
DECLSPEC_HIDDEN
;
const
BYTE
*
buffer_get_memory
(
IWineD3DBuffer
*
iface
,
const
struct
wined3d_gl_info
*
gl_info
,
GLuint
*
buffer_object
)
DECLSPEC_HIDDEN
;
BYTE
*
buffer_get_sysmem
(
struct
wined3d_buffer
*
This
)
DECLSPEC_HIDDEN
;
HRESULT
buffer_init
(
struct
wined3d_buffer
*
buffer
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment