DXGL r457 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r456
|
r457
|
r458
>
Date:
23:58, 4 July 2014
Author:
admin
Status:
new
Tags:
Comment:
Fix DDBLT_COLORFILL
Modified paths:
/ddraw/ShaderGen2D.cpp
(modified) (
history
)
/ddraw/glRenderer.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/ShaderGen2D.cpp
—
—
@@ -172,7 +172,7 @@
173
173
174
174
// Operations
175
175
static const char op_src[] = "pixel = ivec4(texture2D(srctex,gl_TexCoord[0].st)*255.0);\n";
176
-static const char op_color[] = "pixel = ivec4(gl_FragColor*255.0);\n";
176
+static const char op_color[] = "pixel = ivec4(gl_Color*255.0);\n";
177
177
static const char op_dest[] = "dest = ivec4(texture2D(desttex,gl_TexCoord[1].st)*255.0);\n";
178
178
static const char op_pattern[] = "pattern = ivec4(texture2D(patterntex,gl_TexCoord[2].st)*255.0);\n";
179
179
static const char op_destout[] = "gl_FragColor = vec4(pixel)/255.0;\n";
Index: ddraw/glRenderer.cpp
—
—
@@ -926,7 +926,7 @@
927
927
LONG sizes[6];
928
928
This->ddInterface->GetSizes(sizes);
929
929
DWORD shaderid;
930
- if (lpDDBltFx) shaderid = PackROPBits(lpDDBltFx->dwROP, dwFlags);
930
+ if ((lpDDBltFx) && (dwFlags & DDBLT_ROP)) shaderid = PackROPBits(lpDDBltFx->dwROP, dwFlags);
931
931
else shaderid = dwFlags & 0xF2FAADFF;
932
932
This->shaders->SetShader(shaderid, NULL, NULL, 1);
933
933
GenShader2D *shader = &This->shaders->gen2d->genshaders2D[This->shaders->gen3d->current_genshader];
—
—
@@ -1056,7 +1056,7 @@
1057
1057
if(shader->shader.attribs[1] != -1)
1058
1058
{
1059
1059
This->util->EnableArray(shader->shader.attribs[1],true);
1060
- This->ext->glVertexAttribPointer(shader->shader.attribs[0],3,GL_UNSIGNED_BYTE,true,sizeof(BltVertex),&This->bltvertices[0].r);
1060
+ This->ext->glVertexAttribPointer(shader->shader.attribs[1],3,GL_UNSIGNED_BYTE,true,sizeof(BltVertex),&This->bltvertices[0].r);
1061
1061
}
1062
1062
if(!(dwFlags & DDBLT_COLORFILL))
1063
1063
{
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version