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
894a150f
Commit
894a150f
authored
Jul 16, 2010
by
Rico Schüller
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add GL_NV_point_sprite extension.
parent
8b593e90
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
6 deletions
+49
-6
context.c
dlls/wined3d/context.c
+29
-5
directx.c
dlls/wined3d/directx.c
+1
-0
drawprim.c
dlls/wined3d/drawprim.c
+3
-1
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+16
-0
No files found.
dlls/wined3d/context.c
View file @
894a150f
...
...
@@ -1484,8 +1484,19 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, IWineD3
if
(
gl_info
->
supported
[
WINED3D_GL_VERSION_2_0
])
{
glPointParameteri
(
GL_POINT_SPRITE_COORD_ORIGIN
,
GL_UPPER_LEFT
);
checkGLcall
(
"glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT)"
);
/* Windows doesn't support to query the glPointParameteri function pointer, so use the
* NV_POINT_SPRITE extension.
*/
if
(
glPointParameteri
)
{
glPointParameteri
(
GL_POINT_SPRITE_COORD_ORIGIN
,
GL_UPPER_LEFT
);
checkGLcall
(
"glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT)"
);
}
else
if
(
gl_info
->
supported
[
NV_POINT_SPRITE
])
{
GL_EXTCALL
(
glPointParameteriNV
(
GL_POINT_SPRITE_COORD_ORIGIN
,
GL_UPPER_LEFT
));
checkGLcall
(
"glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT)"
);
}
}
if
(
gl_info
->
supported
[
ARB_PROVOKING_VERTEX
])
...
...
@@ -1943,12 +1954,25 @@ void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer)
static
inline
void
context_set_render_offscreen
(
struct
wined3d_context
*
context
,
const
struct
StateEntry
*
StateTable
,
BOOL
offscreen
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
if
(
context
->
render_offscreen
==
offscreen
)
return
;
if
(
context
->
gl_info
->
supported
[
WINED3D_GL_VERSION_2_0
])
if
(
gl_info
->
supported
[
WINED3D_GL_VERSION_2_0
])
{
glPointParameteri
(
GL_POINT_SPRITE_COORD_ORIGIN
,
offscreen
?
GL_LOWER_LEFT
:
GL_UPPER_LEFT
);
checkGLcall
(
"glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, ...)"
);
/* Windows doesn't support to query the glPointParameteri function pointer, so use the
* NV_POINT_SPRITE extension.
*/
if
(
glPointParameteri
)
{
glPointParameteri
(
GL_POINT_SPRITE_COORD_ORIGIN
,
offscreen
?
GL_LOWER_LEFT
:
GL_UPPER_LEFT
);
checkGLcall
(
"glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, ...)"
);
}
else
if
(
gl_info
->
supported
[
NV_POINT_SPRITE
])
{
GL_EXTCALL
(
glPointParameteriNV
(
GL_POINT_SPRITE_COORD_ORIGIN
,
offscreen
?
GL_LOWER_LEFT
:
GL_UPPER_LEFT
));
checkGLcall
(
"glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, ...)"
);
}
}
Context_MarkStateDirty
(
context
,
STATE_TRANSFORM
(
WINED3DTS_PROJECTION
),
StateTable
);
...
...
dlls/wined3d/directx.c
View file @
894a150f
...
...
@@ -138,6 +138,7 @@ static const struct {
{
"GL_NV_fragment_program_option"
,
NV_FRAGMENT_PROGRAM_OPTION
,
0
},
{
"GL_NV_half_float"
,
NV_HALF_FLOAT
,
0
},
{
"GL_NV_light_max_exponent"
,
NV_LIGHT_MAX_EXPONENT
,
0
},
{
"GL_NV_point_sprite"
,
NV_POINT_SPRITE
,
0
},
{
"GL_NV_register_combiners"
,
NV_REGISTER_COMBINERS
,
0
},
{
"GL_NV_register_combiners2"
,
NV_REGISTER_COMBINERS2
,
0
},
{
"GL_NV_texgen_reflection"
,
NV_TEXGEN_REFLECTION
,
0
},
...
...
dlls/wined3d/drawprim.c
View file @
894a150f
...
...
@@ -644,7 +644,9 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
}
}
if
(
!
context
->
gl_info
->
supported
[
WINED3D_GL_VERSION_2_0
]
&&
context
->
render_offscreen
if
((
!
context
->
gl_info
->
supported
[
WINED3D_GL_VERSION_2_0
]
||
(
!
glPointParameteri
&&
!
context
->
gl_info
->
supported
[
NV_POINT_SPRITE
]))
&&
context
->
render_offscreen
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSPRITEENABLE
]
&&
This
->
stateBlock
->
gl_primitive_type
==
GL_POINTS
)
{
...
...
dlls/wined3d/wined3d_gl.h
View file @
894a150f
...
...
@@ -1818,6 +1818,7 @@ typedef enum wined3d_gl_extension
NV_FRAGMENT_PROGRAM_OPTION
,
NV_HALF_FLOAT
,
NV_LIGHT_MAX_EXPONENT
,
NV_POINT_SPRITE
,
NV_REGISTER_COMBINERS
,
NV_REGISTER_COMBINERS2
,
NV_TEXGEN_REFLECTION
,
...
...
@@ -3482,6 +3483,16 @@ typedef void (WINE_GLAPI *PGLFNVERTEXATTRIBS4HVNVPROC)(GLuint index, GLsizei n,
#define GL_MAX_SPOT_EXPONENT_NV 0x8505
#endif
/* GL_NV_point_sprite */
#ifndef GL_NV_point_sprite
#define GL_NV_point_sprite 1
#define GL_NV_POINT_SPRITE_NV 0x8861
#define GL_NV_COORD_REPLACE_NV 0x8862
#define GL_NV_POINT_SPRITE_R_MODE_NV 0x8863
#endif
typedef
void
(
WINE_GLAPI
*
PGLFNPOINTPARAMETERIVNVPROC
)(
GLenum
pname
,
const
GLint
*
params
);
typedef
void
(
WINE_GLAPI
*
PGLFNPOINTPARAMETERINVPROC
)(
GLenum
pname
,
GLint
param
);
/* GL_NV_register_combiners */
#ifndef GL_NV_register_combiners
#define GL_NV_register_combiners 1
...
...
@@ -4477,6 +4488,11 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma
glVertexAttribs3hvNV, NV_HALF_FLOAT, NULL) \
USE_GL_FUNC(PGLFNVERTEXATTRIBS4HVNVPROC, \
glVertexAttribs4hvNV, NV_HALF_FLOAT, NULL) \
/* GL_NV_point_sprite */
\
USE_GL_FUNC(PGLFNPOINTPARAMETERIVNVPROC, \
glPointParameterivNV, NV_POINT_SPRITE, NULL) \
USE_GL_FUNC(PGLFNPOINTPARAMETERINVPROC, \
glPointParameteriNV, NV_POINT_SPRITE, NULL) \
/* GL_NV_register_combiners */
\
USE_GL_FUNC(PGLFNCOMBINERINPUTNVPROC, \
glCombinerInputNV, NV_REGISTER_COMBINERS, NULL) \
...
...
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