CgDisttexD.dpr 968 B

12345678910111213141516171819202122232425262728
  1. (*
  2. This little demo shows how to use the GL_TEXTURE_RECT_NV extension for creating
  3. effects applied on the screen (filters, grayscaling etc.).
  4. I tried it on a HUD sprite first but for some reason, its coordinates are messed
  5. up. HUD sprites are using somewhat different calcultions than a regular object
  6. so I guess the vertex program handles the coordinates wrong. Didn't have time
  7. to really look at it so I did a cheesy solution, just putting a plane 'exactly'
  8. in front of the camera. Of course, that doesn't work really well when moving/rotating
  9. the camera.
  10. Anyway, it looks like if you were looking into 3D space but in fact there's nothing
  11. but a flat plane in front of your nose with a snapshot of the scene on it. The scene
  12. itself is behind that plane.
  13. *)
  14. program CgDisttexD;
  15. uses
  16. Forms,
  17. fdDisttex in 'fdDisttex.pas' {Form1};
  18. {$R *.res}
  19. begin
  20. Application.Initialize;
  21. Application.CreateForm(TForm1, Form1);
  22. Application.Run;
  23. end.