Changeset 1069
- Timestamp:
- Nov 15, 2011, 1:52:42 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/platform/sdl/sdlapp.cpp
r1063 r1069 76 76 void SdlApp::ShowPointer(bool show) 77 77 { 78 #if defined USE_SDL 78 79 SDL_ShowCursor(show ? 1 : 0); 80 #endif 79 81 } 80 82 -
trunk/test/math/remez.cpp
r1050 r1069 31 31 real myfun(real const &y) 32 32 { 33 real k1024 = 1024; 34 real klog32 = log((real)32); 35 return (y - k1024) / log2(log(sqrt(y))/klog32); 33 36 real x = sqrt(y); 34 37 return (sin(x) - x) / (x * y); … … 37 40 real myerr(real const &y) 38 41 { 42 return myfun(y); 43 return real::R_1; 39 44 real x = sqrt(y); 40 45 return sin(x) / (x * y); … … 43 48 int main(int argc, char **argv) 44 49 { 45 RemezSolver< 6> solver;46 solver.Run( real::R_1 >> 400, real::R_PI_2 * real::R_PI_2, myfun, myerr, 40);50 RemezSolver<3> solver; 51 solver.Run((real)(1024.001), (real)(1024 * 1024), myfun, myerr, 40); 47 52 48 53 return EXIT_SUCCESS; -
trunk/test/tutorial/tut03.cpp
r1068 r1069 111 111 112 112 ivec3 buttons = Input::GetMouseButtons(); 113 #ifdef __CELLOS_LV2__ 114 if (true) 115 #else 113 116 if ((buttons[0] || buttons[2]) && mousepos.x != -1) 117 #endif 114 118 { 115 119 f64cmplx oldcenter = m_center; 116 120 double oldradius = m_radius; 121 #ifdef __CELLOS_LV2__ 122 m_radius *= pow(2.0, -deltams * 0.00015); 123 m_center = f64cmplx(0.001643721971153, 0.822467633298876); 124 #else 117 125 double zoom = pow(2.0, (buttons[0] ? -deltams : deltams) * 0.0025); 118 126 if (m_radius * zoom > 8.0) … … 123 131 m_center = (m_center - worldmouse) * zoom + worldmouse; 124 132 worldmouse = m_center + ScreenToWorldOffset(mousepos); 133 #endif 125 134 126 135 /* Store the transformation properties to go from m_frame-1 … … 265 274 "}", 266 275 267 "void main(float2 in_TexCoord : TEXCOORD0," 268 " uniform sampler2D tex," 276 "void main(float4 in_FragCoord : WPOS," 277 " float2 in_TexCoord : TEXCOORD0," 278 " uniform sampler2D in_Texture," 269 279 " out float4 out_FragColor : COLOR)" 270 280 "{" 271 " out_FragColor = tex2D(tex, in_TexCoord);" 281 " float2 coord = in_TexCoord.xy;" 282 " float i = frac((in_FragCoord.x - 0.5) * 0.5) * 2.0;" 283 " float j = frac((in_FragCoord.y - 0.5 + i) * 0.5) * 2.0;" 284 " coord.y += i + j * 2;" 285 " coord.y *= 0.25;" 286 " float4 p = tex2D(in_Texture, coord);" 287 " out_FragColor = p;" 272 288 "}" 273 289 #endif
Note: See TracChangeset
for help on using the changeset viewer.