DXGL r263 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r262‎ | r263 | r264 >
Date:01:41, 16 September 2012
Author:admin
Status:new
Tags:
Comment:
Add vertex shader demo to dxgltest list. Does not work yet.
Add DXGL logo with shadow.
Modified paths:
  • /common/dxglicon-shadow.svg (added) (history)
  • /dxgltest/dxgltest.cpp (modified) (history)

Diff [purge]

Index: common/dxglicon-shadow.svg
@@ -0,0 +1,260 @@
 2+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 3+<svg
 4+ xmlns:dc="http://purl.org/dc/elements/1.1/"
 5+ xmlns:cc="http://creativecommons.org/ns#"
 6+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 7+ xmlns:svg="http://www.w3.org/2000/svg"
 8+ xmlns="http://www.w3.org/2000/svg"
 9+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
 10+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
 11+ width="68"
 12+ height="68"
 13+ id="svg2"
 14+ version="1.1"
 15+ inkscape:version="0.48.1 "
 16+ sodipodi:docname="dxglicon.svg">
 17+ <title
 18+ id="title3798">DXGL Logo</title>
 19+ <defs
 20+ id="defs15">
 21+ <filter
 22+ inkscape:collect="always"
 23+ id="filter4302"
 24+ color-interpolation-filters="sRGB">
 25+ <feGaussianBlur
 26+ inkscape:collect="always"
 27+ stdDeviation="0.96"
 28+ id="feGaussianBlur4304" />
 29+ </filter>
 30+ <clipPath
 31+ clipPathUnits="userSpaceOnUse"
 32+ id="clipPath4308">
 33+ <rect
 34+ style="opacity:0.5528571;fill:#7f7f7f;fill-opacity:1;stroke:none"
 35+ id="rect4310"
 36+ width="64"
 37+ height="64"
 38+ x="593.71429"
 39+ y="723.2193" />
 40+ </clipPath>
 41+ </defs>
 42+ <sodipodi:namedview
 43+ pagecolor="#ffffff"
 44+ bordercolor="#666666"
 45+ borderopacity="1"
 46+ objecttolerance="10"
 47+ gridtolerance="10"
 48+ guidetolerance="10"
 49+ inkscape:pageopacity="0"
 50+ inkscape:pageshadow="2"
 51+ inkscape:window-width="1680"
 52+ inkscape:window-height="988"
 53+ id="namedview13"
 54+ showgrid="true"
 55+ inkscape:snap-global="true"
 56+ inkscape:zoom="7.9965461"
 57+ inkscape:cx="46.928546"
 58+ inkscape:cy="32.872218"
 59+ inkscape:window-x="-8"
 60+ inkscape:window-y="-8"
 61+ inkscape:window-maximized="1"
 62+ inkscape:current-layer="layer1">
 63+ <inkscape:grid
 64+ type="xygrid"
 65+ id="grid3760"
 66+ empspacing="5"
 67+ visible="true"
 68+ enabled="true"
 69+ snapvisiblegridlinesonly="true" />
 70+ </sodipodi:namedview>
 71+ <metadata
 72+ id="metadata7">
 73+ <rdf:RDF>
 74+ <cc:Work
 75+ rdf:about="">
 76+ <dc:format>image/svg+xml</dc:format>
 77+ <dc:type
 78+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 79+ <dc:title>DXGL Logo</dc:title>
 80+ <cc:license
 81+ rdf:resource="http://creativecommons.org/licenses/LGPL/2.1/" />
 82+ <dc:date>1/8/2011</dc:date>
 83+ <dc:creator>
 84+ <cc:Agent>
 85+ <dc:title>William Feely</dc:title>
 86+ </cc:Agent>
 87+ </dc:creator>
 88+ <dc:rights>
 89+ <cc:Agent>
 90+ <dc:title>LGPL 2.1</dc:title>
 91+ </cc:Agent>
 92+ </dc:rights>
 93+ <dc:publisher>
 94+ <cc:Agent>
 95+ <dc:title>William Feely</dc:title>
 96+ </cc:Agent>
 97+ </dc:publisher>
 98+ <dc:description>Template used to create DXGL icons. Actual icon files are touched up for display.</dc:description>
 99+ </cc:Work>
 100+ </rdf:RDF>
 101+ </metadata>
 102+ <g
 103+ inkscape:label="Layer 1"
 104+ inkscape:groupmode="layer"
 105+ id="layer1"
 106+ transform="translate(-593.71429,-719.2193)">
 107+ <g
 108+ id="g4270"
 109+ transform="translate(2,-2.04163)"
 110+ style="stroke:#7f7f7f;stroke-opacity:1;filter:url(#filter4302)">
 111+ <path
 112+ style="fill:none;stroke:#7f7f7f;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 113+ d="m 28,44 0,18 15,0"
 114+ id="path4272"
 115+ inkscape:connector-curvature="0"
 116+ transform="translate(593.71429,723.2193)" />
 117+ <g
 118+ id="g4274"
 119+ style="stroke:#7f7f7f;stroke-opacity:1">
 120+ <path
 121+ sodipodi:open="true"
 122+ sodipodi:end="5.4977871"
 123+ sodipodi:start="0"
 124+ transform="translate(593.71429,723.2193)"
 125+ d="m 62,32 c 0,5.522847 -3.581722,10 -8,10 -4.418278,0 -8,-4.477153 -8,-10 0,-5.522847 3.581722,-10 8,-10 2.121732,0 4.156563,1.053568 5.656854,2.928932"
 126+ sodipodi:ry="10"
 127+ sodipodi:rx="8"
 128+ sodipodi:cy="32"
 129+ sodipodi:cx="54"
 130+ id="path4276"
 131+ style="fill:none;stroke:#7f7f7f;stroke-width:4;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 132+ sodipodi:type="arc" />
 133+ <path
 134+ transform="translate(593.71429,723.2193)"
 135+ inkscape:connector-curvature="0"
 136+ id="path4278"
 137+ d="m 54,34 8,0"
 138+ style="fill:none;stroke:#7f7f7f;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
 139+ </g>
 140+ <g
 141+ id="g4280"
 142+ style="stroke:#7f7f7f;stroke-opacity:1">
 143+ <path
 144+ transform="translate(593.71429,723.2193)"
 145+ inkscape:connector-curvature="0"
 146+ id="path4282"
 147+ d="M 0,64 64,0"
 148+ style="fill:none;stroke:#7f7f7f;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
 149+ <path
 150+ transform="translate(593.71429,723.2193)"
 151+ inkscape:connector-curvature="0"
 152+ id="path4284"
 153+ d="M 0,0 64,64"
 154+ style="fill:none;stroke:#7f7f7f;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker-start:none" />
 155+ </g>
 156+ <g
 157+ id="g4286"
 158+ inkscape:label="#X"
 159+ style="stroke:#7f7f7f;stroke-opacity:1">
 160+ <path
 161+ inkscape:connector-curvature="0"
 162+ id="path4288"
 163+ d="m 617.71429,725.26093 16,16"
 164+ style="fill:#ff00ff;stroke:#7f7f7f;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
 165+ <path
 166+ inkscape:connector-curvature="0"
 167+ id="path4290"
 168+ d="M 633.57744,725.35616 617.71429,741.2193"
 169+ style="fill:none;stroke:#7f7f7f;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 170+ inkscape:label="#X2" />
 171+ </g>
 172+ <path
 173+ sodipodi:type="arc"
 174+ style="fill:none;stroke:#7f7f7f;stroke-width:4;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
 175+ id="path4292"
 176+ sodipodi:cx="2"
 177+ sodipodi:cy="32"
 178+ sodipodi:rx="13"
 179+ sodipodi:ry="10"
 180+ d="M 2.0000003,22 C 9.179702,22 15,26.477153 15,32 15,37.522847 9.1797019,42 2.0000004,42 L 2,32 z"
 181+ transform="translate(593.71429,723.2193)"
 182+ sodipodi:start="4.712389"
 183+ sodipodi:end="7.8539816" />
 184+ </g>
 185+ <g
 186+ id="g4253"
 187+ clip-path="url(#clipPath4308)"
 188+ transform="translate(0,-4.04163)">
 189+ <path
 190+ transform="translate(593.71429,723.2193)"
 191+ inkscape:connector-curvature="0"
 192+ id="L"
 193+ d="m 28,44 0,18 15,0"
 194+ style="fill:none;stroke:#0000ff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
 195+ <g
 196+ id="G">
 197+ <path
 198+ sodipodi:type="arc"
 199+ style="fill:none;stroke:#00ff00;stroke-width:4;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 200+ id="G1"
 201+ sodipodi:cx="54"
 202+ sodipodi:cy="32"
 203+ sodipodi:rx="8"
 204+ sodipodi:ry="10"
 205+ d="m 62,32 c 0,5.522847 -3.581722,10 -8,10 -4.418278,0 -8,-4.477153 -8,-10 0,-5.522847 3.581722,-10 8,-10 2.121732,0 4.156563,1.053568 5.656854,2.928932"
 206+ transform="translate(593.71429,723.2193)"
 207+ sodipodi:start="0"
 208+ sodipodi:end="5.4977871"
 209+ sodipodi:open="true" />
 210+ <path
 211+ style="fill:none;stroke:#00ff00;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 212+ d="m 54,34 8,0"
 213+ id="G2"
 214+ inkscape:connector-curvature="0"
 215+ transform="translate(593.71429,723.2193)" />
 216+ </g>
 217+ <g
 218+ id="Cross">
 219+ <path
 220+ style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 221+ d="M 0,64 64,0"
 222+ id="Cross2"
 223+ inkscape:connector-curvature="0"
 224+ transform="translate(593.71429,723.2193)" />
 225+ <path
 226+ style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker-start:none"
 227+ d="M 0,0 64,64"
 228+ id="Cross1"
 229+ inkscape:connector-curvature="0"
 230+ transform="translate(593.71429,723.2193)" />
 231+ </g>
 232+ <g
 233+ inkscape:label="#X"
 234+ id="X">
 235+ <path
 236+ style="fill:#ff00ff;stroke:#ff00ff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 237+ d="m 617.71429,725.26093 16,16"
 238+ id="X1"
 239+ inkscape:connector-curvature="0" />
 240+ <path
 241+ inkscape:label="#X2"
 242+ style="fill:none;stroke:#ff00ff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 243+ d="M 633.57744,725.35616 617.71429,741.2193"
 244+ id="X2"
 245+ inkscape:connector-curvature="0" />
 246+ </g>
 247+ <path
 248+ sodipodi:end="7.8539816"
 249+ sodipodi:start="4.712389"
 250+ transform="translate(593.71429,723.2193)"
 251+ d="M 2.0000003,22 C 9.179702,22 15,26.477153 15,32 15,37.522847 9.1797019,42 2.0000004,42 L 2,32 z"
 252+ sodipodi:ry="10"
 253+ sodipodi:rx="13"
 254+ sodipodi:cy="32"
 255+ sodipodi:cx="2"
 256+ id="Dee"
 257+ style="fill:none;stroke:#ff0000;stroke-width:4;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
 258+ sodipodi:type="arc" />
 259+ </g>
 260+ </g>
 261+</svg>
Index: dxgltest/dxgltest.cpp
@@ -248,7 +248,8 @@
249249 { // minver maxver buffermin max usesfps defaultfps usestexture usesfsaa name
250250 {7, 7, 0, 2, true, 60.0, false, true, _T("DrawIndexedPrimitive cube with directional light (DX7)")},
251251 {7, 7, 0, 2, true, 60.0, true, true, _T("DrawPrimitive textured cube (DX7)")},
252 - {7, 7, 0, 0, true, 60.0, true, true, _T("Texture Stage shaders (Interactive, DX7)")}
 252+ {7, 7, 0, 0, true, 60.0, true, true, _T("Texture Stage shaders (Interactive, DX7)")},
 253+ {7, 7, 0, 0, true, 60.0, true, true, _T("Vertex shaders (Interactive, DX7)")}
253254 };
254255 const int END_3D = __LINE__ - 4;
255256 const int numtests3d = END_3D - START_3D;
@@ -518,7 +519,7 @@
519520 maxbuffer3d = Tests3D[i].buffermax;
520521 fps_enabled3d = Tests3D[i].usesfps;
521522 if(Tests3D[i].usesfps) framerate3d = Tests3D[i].defaultfps;
522 - if(i != 2)
 523+ if((i != 2) && (i !=3))
523524 {
524525 EnableWindow(GetDlgItem(hWnd,IDC_BUFFERS),TRUE);
525526 EnableWindow(GetDlgItem(hWnd,IDC_APIVER),TRUE);