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
9e45ae04
Commit
9e45ae04
authored
Feb 10, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Feb 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Introduce wrappers for glGetIntegerv and glGetStringi. (v3).
parent
9b0ebaeb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
24 deletions
+32
-24
make_opengl
dlls/opengl32/make_opengl
+7
-1
opengl_ext.c
dlls/opengl32/opengl_ext.c
+1
-5
opengl_norm.c
dlls/opengl32/opengl_norm.c
+0
-9
wgl.c
dlls/opengl32/wgl.c
+24
-9
No files found.
dlls/opengl32/make_opengl
View file @
9e45ae04
...
...
@@ -236,6 +236,7 @@ sub GenerateThunk($$$$)
my
$trace_arg
=
""
;
return
""
if
$name
eq
"glDebugEntry"
;
return
""
if
$name
eq
"glGetIntegerv"
;
return
""
if
$name
eq
"glGetString"
;
return
""
if
$func_ref
->
[
2
]
&&
$func_ref
->
[
2
]
->
[
0
]
=~
/WGL_/
;
...
...
@@ -285,6 +286,7 @@ sub GenerateThunk($$$$)
}
}
$ret
.=
'void '
if
(
!
@
{
$func_ref
->
[
1
]});
return
"$ret) DECLSPEC_HIDDEN;\n"
if
$name
eq
"glGetStringi"
;
$ret
.=
") {\n"
;
$ret
.=
" const struct opengl_funcs *funcs = NtCurrentTeb()->glTable;\n"
;
if
(
$func_ref
->
[
0
]
ne
"void"
&&
$gen_thread_safe
)
{
...
...
@@ -951,7 +953,11 @@ my $count = keys %ext_functions;
print
EXT
"const int extension_registry_size = $count;\n"
;
foreach
(
sort
keys
%
ext_functions
)
{
my
$string
=
GenerateThunk
(
$_
,
$ext_functions
{
$_
},
0
,
"ext"
);
print
EXT
"\nstatic $string"
if
$string
;
if
(
$string
=~
/DECLSPEC_HIDDEN/
)
{
print
EXT
"\n$string"
;
}
else
{
print
EXT
"\nstatic $string"
if
$string
;
}
}
# Then the table giving the string <-> function correspondence */
...
...
dlls/opengl32/opengl_ext.c
View file @
9e45ae04
...
...
@@ -5014,11 +5014,7 @@ static void WINAPI glGetSharpenTexFuncSGIS( GLenum target, GLfloat* points ) {
funcs
->
ext
.
p_glGetSharpenTexFuncSGIS
(
target
,
points
);
}
static
const
GLubyte
*
WINAPI
glGetStringi
(
GLenum
name
,
GLuint
index
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
TRACE
(
"(%d, %d)
\n
"
,
name
,
index
);
return
funcs
->
ext
.
p_glGetStringi
(
name
,
index
);
}
const
GLubyte
*
WINAPI
glGetStringi
(
GLenum
name
,
GLuint
index
)
DECLSPEC_HIDDEN
;
static
GLuint
WINAPI
glGetSubroutineIndex
(
GLuint
program
,
GLenum
shadertype
,
const
GLchar
*
name
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
...
...
dlls/opengl32/opengl_norm.c
View file @
9e45ae04
...
...
@@ -948,15 +948,6 @@ void WINAPI glGetFloatv( GLenum pname, GLfloat* data ) {
}
/***********************************************************************
* glGetIntegerv (OPENGL32.@)
*/
void
WINAPI
glGetIntegerv
(
GLenum
pname
,
GLint
*
data
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
TRACE
(
"(%d, %p)
\n
"
,
pname
,
data
);
funcs
->
gl
.
p_glGetIntegerv
(
pname
,
data
);
}
/***********************************************************************
* glGetLightfv (OPENGL32.@)
*/
void
WINAPI
glGetLightfv
(
GLenum
light
,
GLenum
pname
,
GLfloat
*
params
)
{
...
...
dlls/opengl32/wgl.c
View file @
9e45ae04
...
...
@@ -687,27 +687,42 @@ int WINAPI wglGetLayerPaletteEntries(HDC hdc,
return
0
;
}
void
WINAPI
glGetIntegerv
(
GLenum
pname
,
GLint
*
data
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
TRACE
(
"(%d, %p)
\n
"
,
pname
,
data
);
funcs
->
gl
.
p_glGetIntegerv
(
pname
,
data
);
}
const
GLubyte
*
WINAPI
glGetStringi
(
GLenum
name
,
GLuint
index
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
TRACE
(
"(%d, %d)
\n
"
,
name
,
index
);
if
(
!
funcs
->
ext
.
p_glGetStringi
)
{
void
**
func_ptr
=
(
void
**
)
&
funcs
->
ext
.
p_glGetStringi
;
*
func_ptr
=
funcs
->
wgl
.
p_wglGetProcAddress
(
"glGetStringi"
);
}
return
funcs
->
ext
.
p_glGetStringi
(
name
,
index
);
}
/* check if the extension is present in the list */
static
BOOL
has_extension
(
const
char
*
list
,
const
char
*
ext
,
size_t
len
)
{
if
(
!
list
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
const
char
*
gl_ext
;
unsigned
int
i
;
GLint
extensions_count
;
if
(
!
funcs
->
ext
.
p_glGetStringi
)
{
void
**
func_ptr
=
(
void
**
)
&
funcs
->
ext
.
p_glGetStringi
;
*
func_ptr
=
funcs
->
wgl
.
p_wglGetProcAddress
(
"glGetStringi"
);
}
glGetIntegerv
(
GL_NUM_EXTENSIONS
,
&
extensions_count
);
for
(
i
=
0
;
i
<
extensions_count
;
++
i
)
{
gl_ext
=
(
const
char
*
)
funcs
->
ext
.
p_
glGetStringi
(
GL_EXTENSIONS
,
i
);
gl_ext
=
(
const
char
*
)
glGetStringi
(
GL_EXTENSIONS
,
i
);
if
(
!
strncmp
(
gl_ext
,
ext
,
len
)
&&
!
gl_ext
[
len
])
return
TRUE
;
}
...
...
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