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
aeb92b1c
Commit
aeb92b1c
authored
Jul 12, 2001
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jul 12, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- removed unused OSMesa linking
- removed OSMesa code
parent
f41de977
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
133 deletions
+0
-133
configure
configure
+0
-0
configure.in
configure.in
+0
-11
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+0
-112
mesa_private.h
dlls/ddraw/mesa_private.h
+0
-7
config.h.in
include/config.h.in
+0
-3
No files found.
configure
View file @
aeb92b1c
This diff is collapsed.
Click to expand it.
configure.in
View file @
aeb92b1c
...
...
@@ -322,17 +322,6 @@ then
OPENGL32_DLL=opengl32
fi
AC_CHECK_HEADERS(GL/osmesa.h,
[ dnl *** If GL/osmesa.h exists...
AC_CHECK_LIB(GL, OSMesaCreateContext,
X_PRE_LIBS="$X_PRE_LIBS -lGL",
AC_CHECK_LIB(OSMesa, OSMesaCreateContext,
X_PRE_LIBS="$X_PRE_LIBS -lOSMesa",,
-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS),
$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
)
]
)
fi
dnl Check for GLU32 library.
AC_CHECK_LIB(GLU,glBegin,
...
...
dlls/ddraw/d3ddevice/mesa.c
View file @
aeb92b1c
...
...
@@ -50,17 +50,11 @@ static void set_context(IDirect3DDevice2Impl* This) {
#if COMPILABLE
D3DDPRIVATE
(
This
);
#ifdef USE_OSMESA
OSMesaMakeCurrent
(
d3ddpriv
->
ctx
,
odev
->
buffer
,
GL_UNSIGNED_BYTE
,
This
->
surface
->
s
.
surface_desc
.
dwWidth
,
This
->
surface
->
s
.
surface_desc
.
dwHeight
);
#else
if
(
glXMakeCurrent
(
gdi_display
,
ddpriv
->
drawable
,
odev
->
ctx
)
==
False
)
{
ERR
(
"Error in setting current context (context %p drawable %ld)!
\n
"
,
odev
->
ctx
,
ddpriv
->
drawable
);
}
#endif
#endif
}
static
void
fill_opengl_primcaps
(
D3DPRIMCAPS
*
pc
)
...
...
@@ -178,11 +172,6 @@ is_OpenGL(
TRACE
(
"Creating OpenGL device for surface %p
\n
"
,
surface
);
/* Create the OpenGL context */
#ifdef USE_OSMESA
odev
->
ctx
=
OSMesaCreateContext
(
OSMESA_RGBA
,
NULL
);
odev
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
surface
->
s
.
surface_desc
.
dwWidth
*
surface
->
s
.
surface_desc
.
dwHeight
*
4
);
#else
/* First get the correct visual */
ENTER_GL
();
/* Create the context */
...
...
@@ -215,7 +204,6 @@ is_OpenGL(
}
#endif
#endif
odev
->
rs
.
src
=
GL_ONE
;
odev
->
rs
.
dst
=
GL_ZERO
;
odev
->
rs
.
mag
=
GL_NEAREST
;
...
...
@@ -259,13 +247,9 @@ static ULONG WINAPI MESA_IDirect3DDevice2Impl_Release(LPDIRECT3DDEVICE2 iface)
FIXME
(
"(%p)->() decrementing from %lu.
\n
"
,
This
,
This
->
ref
);
if
(
!--
(
This
->
ref
))
{
#ifdef USE_OSMESA
OSMesaDestroyContext
(
odev
->
ctx
);
#else
ENTER_GL
();
glXDestroyContext
(
gdi_display
,
odev
->
ctx
);
LEAVE_GL
();
#endif
This
->
private
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
...
...
@@ -410,52 +394,10 @@ static HRESULT WINAPI MESA_IDirect3DDevice2Impl_BeginScene(
HRESULT
WINAPI
MESA_IDirect3DDevice2Impl_EndScene
(
LPDIRECT3DDEVICE2
iface
)
{
ICOM_THIS
(
IDirect3DDevice2Impl
,
iface
);
#ifdef USE_OSMESA
D3DPRIVATE
(
This
);
LPDIRECTDRAWSURFACE3
surf
=
(
LPDIRECTDRAWSURFACE3
)
This
->
surface
;
DDSURFACEDESC
sdesc
;
int
x
,
y
;
unsigned
char
*
src
;
unsigned
short
*
dest
;
#endif
FIXME
(
"(%p)->(): stub
\n
"
,
This
);
#ifdef USE_OSMESA
/* Here we copy back the OpenGL scene to the the DDraw surface */
/* First, lock the surface */
IDirectDrawSurface3_Lock
(
surf
,
NULL
,
&
sdesc
,
DDLOCK_WRITEONLY
,
0
);
/* The copy the OpenGL buffer to this surface */
/* NOTE : this is only for debugging purpose. I KNOW it is really unoptimal.
I am currently working on a set of patches for Mesa to have OSMesa support
16 bpp surfaces => we will able to render directly onto the surface, no
need to do a bpp conversion */
dest
=
(
unsigned
short
*
)
sdesc
.
u2
.
lpSurface
;
src
=
((
unsigned
char
*
)
odev
->
buffer
)
+
4
*
(
sdesc
.
dwWidth
*
(
sdesc
.
dwHeight
-
1
));
for
(
y
=
0
;
y
<
sdesc
.
dwHeight
;
y
++
)
{
unsigned
char
*
lsrc
=
src
;
for
(
x
=
0
;
x
<
sdesc
.
dwWidth
;
x
++
)
{
unsigned
char
r
=
*
lsrc
++
;
unsigned
char
g
=
*
lsrc
++
;
unsigned
char
b
=
*
lsrc
++
;
lsrc
++
;
/* Alpha */
*
dest
=
((
r
>>
3
)
<<
11
)
|
((
g
>>
2
)
<<
5
)
|
(
b
>>
3
);
dest
++
;
}
src
-=
4
*
sdesc
.
dwWidth
;
}
/* Unlock the surface */
IDirectDrawSurface3_Unlock
(
surf
,
sdesc
.
u2
.
lpSurface
);
#else
/* No need to do anything here... */
#endif
return
DD_OK
;
}
...
...
@@ -870,10 +812,8 @@ int is_OpenGL_dx3(REFCLSID rguid, IDirectDrawSurfaceImpl* surface, IDirect3DDevi
{
if
(
!
memcmp
(
&
IID_D3DDEVICE_OpenGL
,
rguid
,
sizeof
(
IID_D3DDEVICE_OpenGL
)))
{
mesa_d3dd_private
*
odev
;
#ifndef USE_OSMESA
int
attributeList
[]
=
{
GLX_RGBA
,
GLX_DEPTH_SIZE
,
16
,
GLX_DOUBLEBUFFER
,
None
};
XVisualInfo
*
xvis
;
#endif
*
device
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DDeviceImpl
));
(
*
device
)
->
private
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
mesa_d3dd_private
));
...
...
@@ -891,11 +831,6 @@ int is_OpenGL_dx3(REFCLSID rguid, IDirectDrawSurfaceImpl* surface, IDirect3DDevi
TRACE
(
"OpenGL device created
\n
"
);
/* Create the OpenGL context */
#ifdef USE_OSMESA
odev
->
ctx
=
OSMesaCreateContext
(
OSMESA_RGBA
,
NULL
);
odev
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
surface
->
s
.
surface_desc
.
dwWidth
*
surface
->
s
.
surface_desc
.
dwHeight
*
4
);
#else
/* First get the correct visual */
/* if (surface->s.backbuffer == NULL)
attributeList[3] = None; */
...
...
@@ -925,7 +860,6 @@ int is_OpenGL_dx3(REFCLSID rguid, IDirectDrawSurfaceImpl* surface, IDirect3DDevi
chain->surfaces[i]->s.d3d_device = (void *) odev;
}
#endif
#endif
odev
->
rs
.
src
=
GL_ONE
;
odev
->
rs
.
dst
=
GL_ZERO
;
odev
->
rs
.
mag
=
GL_NEAREST
;
...
...
@@ -956,13 +890,9 @@ static ULONG WINAPI MESA_IDirect3DDeviceImpl_Release(LPDIRECT3DDEVICE iface)
if
(
!--
(
This
->
ref
))
{
D3DDPRIVATE
(
This
);
#ifdef USE_OSMESA
OSMesaDestroyContext
(
odev
->
ctx
);
#else
ENTER_GL
();
glXDestroyContext
(
gdi_display
,
odev
->
ctx
);
LEAVE_GL
();
#endif
This
->
private
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
...
...
@@ -1000,52 +930,10 @@ static HRESULT WINAPI MESA_IDirect3DDeviceImpl_BeginScene(LPDIRECT3DDEVICE iface
static
HRESULT
WINAPI
MESA_IDirect3DDeviceImpl_EndScene
(
LPDIRECT3DDEVICE
iface
)
{
ICOM_THIS
(
IDirect3DDeviceImpl
,
iface
);
#ifdef USE_OSMESA
D3DDPRIVATE
(
This
);
LPDIRECTDRAWSURFACE3
surf
=
(
LPDIRECTDRAWSURFACE3
)
This
->
surface
;
DDSURFACEDESC
sdesc
;
int
x
,
y
;
unsigned
char
*
src
;
unsigned
short
*
dest
;
#endif
FIXME
(
"(%p)->(): stub
\n
"
,
This
);
#ifdef USE_OSMESA
/* Here we copy back the OpenGL scene to the the DDraw surface */
/* First, lock the surface */
IDirectDrawSurface3_Lock
(
surf
,
NULL
,
&
sdesc
,
DDLOCK_WRITEONLY
,
0
);
/* The copy the OpenGL buffer to this surface */
/* NOTE : this is only for debugging purpose. I KNOW it is really unoptimal.
I am currently working on a set of patches for Mesa to have OSMesa support
16 bpp surfaces => we will able to render directly onto the surface, no
need to do a bpp conversion */
dest
=
(
unsigned
short
*
)
sdesc
.
u2
.
lpSurface
;
src
=
((
unsigned
char
*
)
odev
->
buffer
)
+
4
*
(
sdesc
.
dwWidth
*
(
sdesc
.
dwHeight
-
1
));
for
(
y
=
0
;
y
<
sdesc
.
dwHeight
;
y
++
)
{
unsigned
char
*
lsrc
=
src
;
for
(
x
=
0
;
x
<
sdesc
.
dwWidth
;
x
++
)
{
unsigned
char
r
=
*
lsrc
++
;
unsigned
char
g
=
*
lsrc
++
;
unsigned
char
b
=
*
lsrc
++
;
lsrc
++
;
/* Alpha */
*
dest
=
((
r
>>
3
)
<<
11
)
|
((
g
>>
2
)
<<
5
)
|
(
b
>>
3
);
dest
++
;
}
src
-=
4
*
sdesc
.
dwWidth
;
}
/* Unlock the surface */
IDirectDrawSurface3_Unlock
(
surf
,
sdesc
.
u2
.
lpSurface
);
#else
/* No need to do anything here... */
#endif
return
DD_OK
;
}
...
...
dlls/ddraw/mesa_private.h
View file @
aeb92b1c
...
...
@@ -12,8 +12,6 @@
#include "wine_gl.h"
#include "x11drv.h"
#undef USE_OSMESA
/*****************************************************************************
* IDirect3DLight MESA private structure
*/
...
...
@@ -81,12 +79,7 @@ typedef struct render_state {
}
RenderState
;
typedef
struct
mesa_d3dd_private
{
#ifdef USE_OSMESA
OSMesaContext
ctx
;
unsigned
char
*
buffer
;
#else
GLXContext
ctx
;
#endif
/* The current render state */
RenderState
rs
;
...
...
include/config.h.in
View file @
aeb92b1c
...
...
@@ -178,9 +178,6 @@
/* Define if you have the <GL/glx.h> header file. */
#undef HAVE_GL_GLX_H
/* Define if you have the <GL/osmesa.h> header file. */
#undef HAVE_GL_OSMESA_H
/* Define if you have the <X11/XKBlib.h> header file. */
#undef HAVE_X11_XKBLIB_H
...
...
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