hedgewars/uStore.pas
branchexperimental3D
changeset 3688 fd8c22a358de
parent 3686 617d00c850b0
child 3690 c247dee9e1c0
child 3691 34fe2149f75d
--- a/hedgewars/uStore.pas	Fri Jul 30 13:07:46 2010 +0200
+++ b/hedgewars/uStore.pas	Fri Jul 30 13:36:03 2010 +0200
@@ -1191,9 +1191,13 @@
     else if StrPos(Str2PChar(vendor), Str2PChar('ati')) <> nil then
         cGPUVendor:= gvIntel;
 //SupportNPOTT:= glLoadExtension('GL_ARB_texture_non_power_of_two');
+
     if isStereoEnabled then
     begin
+        // prepare left and right frame buffers and associated textures
         glLoadExtension('GL_EXT_framebuffer_object');
+
+        // left
         glGenFramebuffersEXT(1, @framel);
         glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framel);
         glGenRenderbuffersEXT(1, @depthl);
@@ -1207,6 +1211,7 @@
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
         glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texl, 0);
 
+        // right
         glGenFramebuffersEXT(1, @framer);
         glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framer);
         glGenRenderbuffersEXT(1, @depthr);
@@ -1220,6 +1225,7 @@
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
         glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texr, 0);
 
+        // reset
         glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)
     end;
 {$ENDIF}