DXGL r203 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r202
|
r203
|
r204
>
Date:
18:29, 5 July 2012
Author:
admin
Status:
new
Tags:
Comment:
Fix texture stage shaders.
Modified paths:
/ddraw/shadergen.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/shadergen.cpp
—
—
@@ -157,7 +157,10 @@
158
158
{
159
159
if(genshaders[i].id == id)
160
160
{
161
- if(!memcmp(genshaders[i].texids,texstate,8*sizeof(__int64)))
161
+ bool texidmatch = true;
162
+ for(int j = 0; j < 8; j++)
163
+ if(genshaders[i].texids[j] != texstate[j].shaderid) texidmatch = false;
164
+ if(texidmatch)
162
165
{
163
166
if(!memcmp(genshaders[i].texcoords,texcoords,8*sizeof(int)))
164
167
{
—
—
@@ -187,7 +190,8 @@
188
191
if(genindex >= 256) genindex = 0;
189
192
}
190
193
genshaders[shaderindex].id = id;
191
- memcpy(genshaders[shaderindex].texids,texstate,8*sizeof(__int64));
194
+ for(int i = 0; i < 8; i++)
195
+ genshaders[shaderindex].texids[i] = texstate[i].shaderid;
192
196
memcpy(genshaders[shaderindex].texcoords,texcoords,8*sizeof(int));
193
197
glUseProgram(genshaders[shaderindex].shader.prog);
194
198
current_prog = genshaders[shaderindex].shader.prog;
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