wgl: Port sharedtex_mt to WGL.
authorMichal Krol <michal@vmware.com>
Tue, 17 Mar 2009 13:27:47 +0000 (14:27 +0100)
committerMichal Krol <michal@vmware.com>
Tue, 17 Mar 2009 13:27:47 +0000 (14:27 +0100)
progs/wgl/sharedtex_mt/sharedtex_mt.c [new file with mode: 0644]
windows/VC7/progs/progs.sln
windows/VC7/progs/wgl/sharedtex_mt.vcproj [new file with mode: 0644]

diff --git a/progs/wgl/sharedtex_mt/sharedtex_mt.c b/progs/wgl/sharedtex_mt/sharedtex_mt.c
new file mode 100644 (file)
index 0000000..137c9c1
--- /dev/null
@@ -0,0 +1,540 @@
+/*
+ * Test sharing of display lists and texture objects between GLX contests.
+ * Brian Paul
+ * Summer 2000
+ *
+ *
+ * Copyright (C) 2000  Brian Paul   All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *
+ * Modified 2009 for multithreading by Thomas Hellstrom.
+ *
+ * Port to windows by Michal Krol.
+ */
+
+
+#include <windows.h>
+#include <GL/gl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#pragma comment(lib, "opengl32.lib")
+
+struct thread_init_arg {
+   int id;
+};
+
+struct window {
+   CRITICAL_SECTION drawMutex;
+   HDC hDC;
+   HWND Win;
+   HGLRC Context;
+   float Angle;
+   int Id;
+};
+
+
+#define MAX_WINDOWS 20
+static struct window Windows[MAX_WINDOWS];
+static int NumWindows = 0;
+static HANDLE terminate = NULL;
+static HGLRC gCtx = NULL;
+static HDC gHDC = NULL;
+static GLuint Textures[3];
+
+
+
+static void
+Error(const char *msg)
+{
+   fprintf(stderr, "Error - %s\n", msg);
+   exit(1);
+}
+
+static void
+Resize(struct window *h, unsigned int width, unsigned int height);
+
+static LRESULT CALLBACK
+WndProc(HWND hWnd,
+        UINT uMsg,
+        WPARAM wParam,
+        LPARAM lParam )
+{
+   switch (uMsg) {
+   case WM_KEYDOWN:
+      SetEvent(terminate);
+      break;
+   case WM_SIZE:
+      {
+         LONG index = GetWindowLong(hWnd, GWL_USERDATA);
+
+         if (index >= 0 && index < MAX_WINDOWS) {
+            RECT r;
+
+            GetClientRect(hWnd, &r);
+            Resize(&Windows[index], r.right, r.bottom);
+         }
+      }
+      break;
+   case WM_CREATE:
+      {
+         CREATESTRUCT *pcs = (CREATESTRUCT *) lParam;
+
+         SetWindowLong(hWnd, GWL_USERDATA, (LONG) pcs->lpCreateParams);
+      }
+      break;
+   case WM_DESTROY:
+      PostQuitMessage(0);
+      break;
+   default:
+      return DefWindowProc(hWnd, uMsg, wParam, lParam);
+   }
+
+   return 0;
+}
+
+static int
+initMainthread(void)
+{
+   WNDCLASS wc = {0};
+   HWND win;
+   PIXELFORMATDESCRIPTOR pfd = {0};
+   int visinfo;
+
+   wc.lpfnWndProc = WndProc;
+   wc.lpszClassName = "sharedtex_mt.hidden";
+   wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
+   RegisterClass(&wc);
+
+   win = CreateWindowEx(0,
+                        wc.lpszClassName,
+                        "sharedtex_mt.hidden",
+                        WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+                        CW_USEDEFAULT,
+                        CW_USEDEFAULT,
+                        CW_USEDEFAULT,
+                        CW_USEDEFAULT,
+                        NULL,
+                        NULL,
+                        wc.hInstance,
+                        (LPVOID) -1);
+   if (!win) {
+      Error("Couldn't create window");
+   }
+
+   gHDC = GetDC(win);
+   if (!gHDC) {
+      Error("Couldn't obtain HDC");
+   }
+
+   pfd.cColorBits = 24;
+   pfd.cDepthBits = 24;
+   pfd.dwFlags = PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
+   pfd.iLayerType = PFD_MAIN_PLANE;
+   pfd.iPixelType = PFD_TYPE_RGBA;
+   pfd.nSize = sizeof(pfd);
+   pfd.nVersion = 1;
+
+   visinfo = ChoosePixelFormat(gHDC, &pfd);
+   if (!visinfo) {
+      Error("Unable to find RGB, Z, double-buffered visual");
+   }
+
+   SetPixelFormat(gHDC, visinfo, &pfd);
+   gCtx = wglCreateContext(gHDC);
+   if (!gCtx) {
+      Error("Couldn't create WGL context");
+   }
+
+   return 0;
+}
+
+static struct window *
+AddWindow(int xpos, int ypos, HGLRC sCtx)
+{
+   struct window *win = &Windows[NumWindows];
+   WNDCLASS wc = {0};
+   PIXELFORMATDESCRIPTOR pfd = {0};
+   int visinfo;
+   int width = 300, height = 300;
+
+   if (NumWindows >= MAX_WINDOWS)
+      return NULL;
+
+   memset(win, 0, sizeof(*win));
+   InitializeCriticalSection(&win->drawMutex);
+   win->Angle = 0.0;
+   win->Id = NumWindows++;
+
+   wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
+   wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+   wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
+   wc.lpfnWndProc = WndProc;
+   wc.lpszClassName = "sharedtex_mt";
+   wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
+   RegisterClass(&wc);
+
+   win->Win = CreateWindowEx(0,
+                             wc.lpszClassName,
+                             "sharedtex_mt",
+                             WS_SIZEBOX | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+                             xpos,
+                             ypos,
+                             width,
+                             height,
+                             NULL,
+                             NULL,
+                             wc.hInstance,
+                             (LPVOID) win->Id);
+   if (!win->Win) {
+      Error("Couldn't create window");
+   }
+
+   win->hDC = GetDC(win->Win);
+   if (!win->hDC) {
+      Error("Couldn't obtain HDC");
+   }
+
+   pfd.cColorBits = 24;
+   pfd.cDepthBits = 24;
+   pfd.dwFlags = PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
+   pfd.iLayerType = PFD_MAIN_PLANE;
+   pfd.iPixelType = PFD_TYPE_RGBA;
+   pfd.nSize = sizeof(pfd);
+   pfd.nVersion = 1;
+
+   visinfo = ChoosePixelFormat(win->hDC, &pfd);
+   if (!visinfo) {
+      Error("Unable to find RGB, Z, double-buffered visual");
+   }
+
+   SetPixelFormat(win->hDC, visinfo, &pfd);
+   win->Context = wglCreateContext(win->hDC);
+   if (!win->Context) {
+      Error("Couldn't create WGL context");
+   }
+
+   if (sCtx) {
+      wglShareLists(sCtx, win->Context);
+   }
+
+   ShowWindow(win->Win, SW_SHOW);
+
+   return win;
+}
+
+
+static void
+InitGLstuff(void)
+
+{
+   glGenTextures(3, Textures);
+
+   /* setup first texture object */
+   {
+      GLubyte image[16][16][4];
+      GLint i, j;
+      glBindTexture(GL_TEXTURE_2D, Textures[0]);
+
+      /* red/white checkerboard */
+      for (i = 0; i < 16; i++) {
+         for (j = 0; j < 16; j++) {
+            if ((i ^ j) & 1) {
+               image[i][j][0] = 255;
+               image[i][j][1] = 255;
+               image[i][j][2] = 255;
+               image[i][j][3] = 255;
+            }
+            else {
+               image[i][j][0] = 255;
+               image[i][j][1] = 0;
+               image[i][j][2] = 0;
+               image[i][j][3] = 255;
+            }
+         }
+      }
+
+      glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA,
+                   GL_UNSIGNED_BYTE, image);
+      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+   }
+
+   /* setup second texture object */
+   {
+      GLubyte image[8][8][3];
+      GLint i, j;
+      glBindTexture(GL_TEXTURE_2D, Textures[1]);
+
+      /* green/yellow checkerboard */
+      for (i = 0; i < 8; i++) {
+         for (j = 0; j < 8; j++) {
+            if ((i ^ j) & 1) {
+               image[i][j][0] = 0;
+               image[i][j][1] = 255;
+               image[i][j][2] = 0;
+            }
+            else {
+               image[i][j][0] = 255;
+               image[i][j][1] = 255;
+               image[i][j][2] = 0;
+            }
+         }
+      }
+
+      glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
+      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB,
+                   GL_UNSIGNED_BYTE, image);
+      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+   }
+
+   /* setup second texture object */
+   {
+      GLubyte image[4][4][3];
+      GLint i, j;
+      glBindTexture(GL_TEXTURE_2D, Textures[2]);
+
+      /* blue/gray checkerboard */
+      for (i = 0; i < 4; i++) {
+         for (j = 0; j < 4; j++) {
+            if ((i ^ j) & 1) {
+               image[i][j][0] = 0;
+               image[i][j][1] = 0;
+               image[i][j][2] = 255;
+            }
+            else {
+               image[i][j][0] = 200;
+               image[i][j][1] = 200;
+               image[i][j][2] = 200;
+            }
+         }
+      }
+
+      glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
+      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0, GL_RGB,
+                   GL_UNSIGNED_BYTE, image);
+      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+   }
+
+   /* Now make the cube object display list */
+
+   printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER));
+   printf("GL_VERSION: %s\n", (char *) glGetString(GL_VERSION));
+   printf("GL_VENDOR: %s\n", (char *) glGetString(GL_VENDOR));
+}
+
+static void
+Redraw(struct window *h)
+{
+   EnterCriticalSection(&h->drawMutex);
+   if (!wglMakeCurrent(h->hDC, h->Context)) {
+      LeaveCriticalSection(&h->drawMutex);
+      Error("wglMakeCurrent failed in Redraw");
+      return;
+   }
+
+   h->Angle += 1.0;
+
+   glShadeModel(GL_FLAT);
+   glClearColor(0.25, 0.25, 0.25, 1.0);
+   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+   glEnable(GL_TEXTURE_2D);
+   glEnable(GL_DEPTH_TEST);
+   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+
+   glColor3f(1, 1, 1);
+
+   glPushMatrix();
+   if (h->Id == 0)
+      glRotatef(h->Angle, 0, 1, -1);
+   else if (h->Id == 1)
+      glRotatef(-(h->Angle), 0, 1, -1);
+   else if (h->Id == 2)
+      glRotatef(h->Angle, 0, 1, 1);
+   else if (h->Id == 3)
+      glRotatef(-(h->Angle), 0, 1, 1);
+   glBindTexture(GL_TEXTURE_2D, Textures[0]);
+   glBegin(GL_POLYGON);
+   glTexCoord2f(0, 0);  glVertex3f(-1, -1, -1);
+   glTexCoord2f(1, 0);  glVertex3f(-1,  1, -1);
+   glTexCoord2f(1, 1);  glVertex3f(-1,  1,  1);
+   glTexCoord2f(0, 1);  glVertex3f(-1, -1,  1);
+   glEnd();
+   glBegin(GL_POLYGON);
+   glTexCoord2f(0, 0);  glVertex3f(1, -1, -1);
+   glTexCoord2f(1, 0);  glVertex3f(1,  1, -1);
+   glTexCoord2f(1, 1);  glVertex3f(1,  1,  1);
+   glTexCoord2f(0, 1);  glVertex3f(1, -1,  1);
+   glEnd();
+
+   glBindTexture(GL_TEXTURE_2D, Textures[1]);
+   glBegin(GL_POLYGON);
+   glTexCoord2f(0, 0);  glVertex3f(-1, -1, -1);
+   glTexCoord2f(1, 0);  glVertex3f( 1, -1, -1);
+   glTexCoord2f(1, 1);  glVertex3f( 1, -1,  1);
+   glTexCoord2f(0, 1);  glVertex3f(-1, -1,  1);
+   glEnd();
+   glBegin(GL_POLYGON);
+   glTexCoord2f(0, 0);  glVertex3f(-1, 1, -1);
+   glTexCoord2f(1, 0);  glVertex3f( 1, 1, -1);
+   glTexCoord2f(1, 1);  glVertex3f( 1, 1,  1);
+   glTexCoord2f(0, 1);  glVertex3f(-1, 1,  1);
+   glEnd();
+
+   glBindTexture(GL_TEXTURE_2D, Textures[2]);
+   glBegin(GL_POLYGON);
+   glTexCoord2f(0, 0);  glVertex3f(-1, -1, -1);
+   glTexCoord2f(1, 0);  glVertex3f( 1, -1, -1);
+   glTexCoord2f(1, 1);  glVertex3f( 1,  1, -1);
+   glTexCoord2f(0, 1);  glVertex3f(-1,  1, -1);
+   glEnd();
+   glBegin(GL_POLYGON);
+   glTexCoord2f(0, 0);  glVertex3f(-1, -1, 1);
+   glTexCoord2f(1, 0);  glVertex3f( 1, -1, 1);
+   glTexCoord2f(1, 1);  glVertex3f( 1,  1, 1);
+   glTexCoord2f(0, 1);  glVertex3f(-1,  1, 1);
+   glEnd();
+
+   glPopMatrix();
+
+   SwapBuffers(h->hDC);
+
+   if (!wglMakeCurrent(NULL, NULL)) {
+      Error("wglMakeCurrent failed in Redraw");
+   }
+   LeaveCriticalSection(&h->drawMutex);
+}
+
+static DWORD WINAPI
+threadRunner (void *arg)
+{
+   struct thread_init_arg *tia = (struct thread_init_arg *) arg;
+   struct window *win;
+
+   win = &Windows[tia->id];
+
+   while (1) {
+      MSG msg;
+
+      /* wait 1 ms for signal either to exit or process messages */
+      switch (MsgWaitForMultipleObjects(1, &terminate, FALSE, 1, QS_ALLINPUT)) {
+      case WAIT_OBJECT_0:
+         SendMessage(win->Win, WM_CLOSE, 0, 0);
+         break;
+      case WAIT_OBJECT_0 + 1:
+         break;
+      }
+
+      while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+         if (msg.message == WM_QUIT) {
+            return 0;
+         }
+         TranslateMessage(&msg);
+         DispatchMessage(&msg);
+      }
+
+      Redraw(win);
+   }
+
+   return 0;
+}
+
+static void
+Resize(struct window *h, unsigned int width, unsigned int height)
+{
+   EnterCriticalSection(&h->drawMutex);
+
+   if (!wglMakeCurrent(h->hDC, h->Context)) {
+      LeaveCriticalSection(&h->drawMutex);
+      Error("wglMakeCurrent failed in Resize()");
+      return;
+   }
+
+   glViewport(0, 0, width, height);
+   glMatrixMode(GL_PROJECTION);
+   glLoadIdentity();
+   glFrustum(-1, 1, -1, 1, 2, 10);
+   glMatrixMode(GL_MODELVIEW);
+   glLoadIdentity();
+   glTranslatef(0, 0, -4.5);
+   if (!wglMakeCurrent(NULL, NULL)) {
+      Error("wglMakeCurrent failed in Resize()");
+   }
+   LeaveCriticalSection(&h->drawMutex);
+}
+
+int
+main(int argc, char *argv[])
+{
+   struct thread_init_arg tia[MAX_WINDOWS];
+   struct window *h[MAX_WINDOWS];
+   HANDLE threads[MAX_WINDOWS];
+   int i;
+
+   terminate = CreateEvent(NULL, TRUE, FALSE, NULL);
+
+   if (initMainthread())
+      return -1;
+
+   /* four windows and contexts sharing display lists and texture objects */
+   h[0] = AddWindow( 10,  10, gCtx);
+   h[1] = AddWindow(330,  10, gCtx);
+   h[2] = AddWindow( 10, 350, gCtx);
+   h[3] = AddWindow(330, 350, gCtx);
+
+   if (!wglMakeCurrent(gHDC, gCtx)) {
+      Error("wglMakeCurrent failed for init thread.");
+      return -1;
+   }
+
+   InitGLstuff();
+
+   for (i = 0; i < NumWindows; i++) {
+      DWORD id;
+
+      tia[i].id = i;
+      threads[i] = CreateThread(NULL, 0, threadRunner, &tia[i], 0, &id);
+   }
+
+   while (1) {
+      MSG msg;
+
+      /* wait 1 ms for signal either to exit or process messages */
+      switch (MsgWaitForMultipleObjects(NumWindows, threads, TRUE, 1, QS_ALLINPUT)) {
+      case WAIT_OBJECT_0:
+         return 0;
+      }
+
+      while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+         if (msg.message == WM_QUIT) {
+            return 0;
+         }
+         TranslateMessage(&msg);
+         DispatchMessage(&msg);
+      }
+   }
+
+   return 0;
+}
index 18f0c0451d4676aa16876fabaa815ebc5680951d..4db83388dd3a2195ee60fe6fd7ff5d42b3770969 100644 (file)
@@ -3,6 +3,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wglthreads", "wgl\wglthread
        ProjectSection(ProjectDependencies) = postProject\r
        EndProjectSection\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sharedtex_mt", "wgl\sharedtex_mt.vcproj", "{ADDFBA10-B159-4884-9FAF-5E60A64903AE}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+       EndProjectSection\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfiguration) = preSolution\r
                Debug = Debug\r
@@ -13,6 +17,10 @@ Global
                {ADDFBA10-B159-4884-9FAF-5E60A64903AE}.Debug.Build.0 = Debug|Win32\r
                {ADDFBA10-B159-4884-9FAF-5E60A64903AE}.Release.ActiveCfg = Release|Win32\r
                {ADDFBA10-B159-4884-9FAF-5E60A64903AE}.Release.Build.0 = Release|Win32\r
+               {ADDFBA10-B159-4884-9FAF-5E60A64903AE}.Debug.ActiveCfg = Debug|Win32\r
+               {ADDFBA10-B159-4884-9FAF-5E60A64903AE}.Debug.Build.0 = Debug|Win32\r
+               {ADDFBA10-B159-4884-9FAF-5E60A64903AE}.Release.ActiveCfg = Release|Win32\r
+               {ADDFBA10-B159-4884-9FAF-5E60A64903AE}.Release.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(ExtensibilityGlobals) = postSolution\r
        EndGlobalSection\r
diff --git a/windows/VC7/progs/wgl/sharedtex_mt.vcproj b/windows/VC7/progs/wgl/sharedtex_mt.vcproj
new file mode 100644 (file)
index 0000000..38edf59
--- /dev/null
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="7.10"\r
+       Name="sharedtex_mt"\r
+       ProjectGUID="{ADDFBA10-B159-4884-9FAF-5E60A64903AE}"\r
+       Keyword="Win32Proj">\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"/>\r
+       </Platforms>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="Debug"\r
+                       IntermediateDirectory="Debug"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="2">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+                               MinimalRebuild="TRUE"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="5"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="4"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)/sharedtex_mt.exe"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="$(OutDir)/sharedtex_mt.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="Release"\r
+                       IntermediateDirectory="Release"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="2">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+                               RuntimeLibrary="4"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)/sharedtex_mt.exe"\r
+                               LinkIncremental="1"\r
+                               GenerateDebugInformation="TRUE"\r
+                               SubSystem="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">\r
+                       <File\r
+                               RelativePath="..\..\..\..\progs\wgl\sharedtex_mt\sharedtex_mt.c">\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r