DXGL r233 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r232
|
r233
|
r234
>
Date:
00:22, 9 August 2012
Author:
admin
Status:
new
Tags:
Comment:
Add color selection to Texture Shader dialog.
Update to version 0.3.1
Modified paths:
/ReadMe.txt
(modified) (
history
)
/common/releasever.h
(modified) (
history
)
/dxgltest/Tests3D.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ReadMe.txt
—
—
@@ -1,4 +1,4 @@
2
-DXGL 0.3.0
2
+DXGL 0.3.1
3
3
http://www.williamfeely.info/wiki/DXGL
4
4
5
5
== Introduction ==
Index: common/releasever.h
—
—
@@ -4,7 +4,7 @@
5
5
6
6
#define DXGLMAJORVER 0
7
7
#define DXGLMINORVER 3
8
-#define DXGLPOINTVER 0
8
+#define DXGLPOINTVER 1
9
9
10
10
#define STR2(x) #x
11
11
#define STR(x) STR2(x)
Index: dxgltest/Tests3D.cpp
—
—
@@ -517,6 +517,19 @@
518
518
litvertices[23] = D3DLVERTEX(points[2],0xFFFFFFFF,0,1,0);
519
519
}
520
520
521
+void SetVertexColor(D3DLVERTEX *start, int count, DWORD color)
522
+{
523
+ for(int i = 0; i < count; i++)
524
+ start[i].color = color;
525
+}
526
+
527
+void SetVertexSpecular(D3DLVERTEX *start, int count, DWORD color)
528
+{
529
+ for(int i = 0; i < count; i++)
530
+ start[i].specular = color;
531
+}
532
+
533
+
521
534
DDPIXELFORMAT texformats[256];
522
535
int texformatindex = 0;
523
536
—
—
@@ -1249,6 +1262,30 @@
1250
1263
_stscanf(tmpstring,_T("%x"),&bgcolor);
1251
1264
}
1252
1265
break;
1266
+ case IDC_DIFFUSE:
1267
+ if(HIWORD(wParam) == EN_CHANGE)
1268
+ {
1269
+ SendDlgItemMessage(hWnd,IDC_DIFFUSE,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
1270
+ _stscanf(tmpstring,_T("%x"),&number);
1271
+ SetVertexColor(litvertices,24,number);
1272
+ }
1273
+ break;
1274
+ case IDC_SPECULAR:
1275
+ if(HIWORD(wParam) == EN_CHANGE)
1276
+ {
1277
+ SendDlgItemMessage(hWnd,IDC_SPECULAR,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
1278
+ _stscanf(tmpstring,_T("%x"),&number);
1279
+ SetVertexSpecular(litvertices,24,number);
1280
+ }
1281
+ break;
1282
+ case IDC_FACTOR:
1283
+ if(HIWORD(wParam) == EN_CHANGE)
1284
+ {
1285
+ SendDlgItemMessage(hWnd,IDC_FACTOR,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
1286
+ _stscanf(tmpstring,_T("%x"),&number);
1287
+ d3d7dev->SetRenderState(D3DRENDERSTATE_TEXTUREFACTOR,number);
1288
+ }
1289
+ break;
1253
1290
}
1254
1291
break;
1255
1292
case WM_CLOSE:
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