Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
04d38338
Commit
04d38338
authored
Aug 12, 2007
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Aug 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wgl: Re-enable GLX_ATI_render_texture support.
parent
7f901f41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
13 deletions
+62
-13
opengl.c
dlls/winex11.drv/opengl.c
+62
-13
No files found.
dlls/winex11.drv/opengl.c
View file @
04d38338
...
...
@@ -139,7 +139,7 @@ typedef struct wine_glpbuffer {
static
Wine_GLContext
*
context_list
;
static
struct
WineGLInfo
WineGLInfo
=
{
0
};
static
int
use_render_texture_emulation
=
1
;
static
int
use_render_texture_ati
=
0
;
static
int
use_render_texture_ati
=
1
;
static
int
swap_interval
=
1
;
#define MAX_EXTENSIONS 16
...
...
@@ -241,11 +241,13 @@ MAKE_FUNCPTR(glXGetCurrentReadDrawable)
/* GLX Extensions */
static
void
*
(
*
pglXGetProcAddressARB
)(
const
GLubyte
*
);
static
BOOL
(
*
pglXBindTexImageARB
)(
Display
*
dpy
,
GLXPbuffer
pbuffer
,
int
buffer
);
static
BOOL
(
*
pglXReleaseTexImageARB
)(
Display
*
dpy
,
GLXPbuffer
pbuffer
,
int
buffer
);
static
BOOL
(
*
pglXDrawableAttribARB
)(
Display
*
dpy
,
GLXDrawable
draw
,
const
int
*
attribList
);
static
int
(
*
pglXSwapIntervalSGI
)(
int
);
/* ATI GLX Extensions */
static
BOOL
(
*
pglXBindTexImageATI
)(
Display
*
dpy
,
GLXPbuffer
pbuffer
,
int
buffer
);
static
BOOL
(
*
pglXReleaseTexImageATI
)(
Display
*
dpy
,
GLXPbuffer
pbuffer
,
int
buffer
);
static
BOOL
(
*
pglXDrawableAttribATI
)(
Display
*
dpy
,
GLXDrawable
draw
,
const
int
*
attribList
);
/* NV GLX Extension */
static
void
*
(
*
pglXAllocateMemoryNV
)(
GLsizei
size
,
GLfloat
readfreq
,
GLfloat
writefreq
,
GLfloat
priority
);
static
void
(
*
pglXFreeMemoryNV
)(
GLvoid
*
pointer
);
...
...
@@ -502,9 +504,9 @@ LOAD_FUNCPTR(glXFreeMemoryNV)
}
if
(
glxRequireExtension
(
"GLX_ATI_render_texture"
))
{
pglXBindTexImageA
RB
=
(
void
*
)
pglXGetProcAddressARB
((
const
GLubyte
*
)
"glXBindTexImageARB
"
);
pglXReleaseTexImageA
RB
=
(
void
*
)
pglXGetProcAddressARB
((
const
GLubyte
*
)
"glXReleaseTexImageARB
"
);
pglXDrawableAttribA
RB
=
(
void
*
)
pglXGetProcAddressARB
((
const
GLubyte
*
)
"glXDrawableAttribARB
"
);
pglXBindTexImageA
TI
=
(
void
*
)
pglXGetProcAddressARB
((
const
GLubyte
*
)
"glXBindTexImageATI
"
);
pglXReleaseTexImageA
TI
=
(
void
*
)
pglXGetProcAddressARB
((
const
GLubyte
*
)
"glXReleaseTexImageATI
"
);
pglXDrawableAttribA
TI
=
(
void
*
)
pglXGetProcAddressARB
((
const
GLubyte
*
)
"glXDrawableAttribATI
"
);
}
X11DRV_WineGL_LoadExtensions
();
...
...
@@ -2490,11 +2492,11 @@ static GLboolean WINAPI X11DRV_wglSetPbufferAttribARB(HPBUFFERARB hPbuffer, cons
if
(
!
use_render_texture_ati
&&
1
==
use_render_texture_emulation
)
{
return
GL_TRUE
;
}
if
(
NULL
!=
pglXDrawableAttribA
RB
)
{
if
(
NULL
!=
pglXDrawableAttribA
TI
)
{
if
(
use_render_texture_ati
)
{
FIXME
(
"Need conversion for GLX_ATI_render_texture
\n
"
);
}
return
pglXDrawableAttribA
RB
(
object
->
display
,
object
->
drawable
,
piAttribList
);
return
pglXDrawableAttribA
TI
(
object
->
display
,
object
->
drawable
,
piAttribList
);
}
return
GL_FALSE
;
}
...
...
@@ -2893,8 +2895,35 @@ static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuf
return
GL_TRUE
;
}
if
(
NULL
!=
pglXBindTexImageARB
)
{
return
pglXBindTexImageARB
(
object
->
display
,
object
->
drawable
,
iBuffer
);
if
(
NULL
!=
pglXBindTexImageATI
)
{
int
buffer
;
switch
(
iBuffer
)
{
case
WGL_FRONT_LEFT_ARB
:
buffer
=
GLX_FRONT_LEFT_ATI
;
break
;
case
WGL_FRONT_RIGHT_ARB
:
buffer
=
GLX_FRONT_RIGHT_ATI
;
break
;
case
WGL_BACK_LEFT_ARB
:
buffer
=
GLX_BACK_LEFT_ATI
;
break
;
case
WGL_BACK_RIGHT_ARB
:
buffer
=
GLX_BACK_RIGHT_ATI
;
break
;
default
:
ERR
(
"Unknown iBuffer=%#x
\n
"
,
iBuffer
);
return
FALSE
;
}
/* In the sample 'ogl_offscreen_rendering_3' from codesampler.net I get garbage on the screen.
* I'm not sure if that's a bug in the ATI extension or in the program. I think that the program
* expected a single buffering format since it didn't ask for double buffering. A buffer swap
* fixed the program. I don't know what the correct behavior is. On the other hand that demo
* works fine using our pbuffer emulation path.
*/
return
pglXBindTexImageATI
(
object
->
display
,
object
->
drawable
,
buffer
);
}
return
GL_FALSE
;
}
...
...
@@ -2919,8 +2948,28 @@ static GLboolean WINAPI X11DRV_wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int i
if
(
!
use_render_texture_ati
&&
1
==
use_render_texture_emulation
)
{
return
GL_TRUE
;
}
if
(
NULL
!=
pglXReleaseTexImageARB
)
{
return
pglXReleaseTexImageARB
(
object
->
display
,
object
->
drawable
,
iBuffer
);
if
(
NULL
!=
pglXReleaseTexImageATI
)
{
int
buffer
;
switch
(
iBuffer
)
{
case
WGL_FRONT_LEFT_ARB
:
buffer
=
GLX_FRONT_LEFT_ATI
;
break
;
case
WGL_FRONT_RIGHT_ARB
:
buffer
=
GLX_FRONT_RIGHT_ATI
;
break
;
case
WGL_BACK_LEFT_ARB
:
buffer
=
GLX_BACK_LEFT_ATI
;
break
;
case
WGL_BACK_RIGHT_ARB
:
buffer
=
GLX_BACK_RIGHT_ATI
;
break
;
default
:
ERR
(
"Unknown iBuffer=%#x
\n
"
,
iBuffer
);
return
FALSE
;
}
return
pglXReleaseTexImageATI
(
object
->
display
,
object
->
drawable
,
buffer
);
}
return
GL_FALSE
;
}
...
...
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