荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: tang (独孤九剑〖玄铁重剑〗), 信区: Program
标  题: [转载]  MSVC Digest - 21 Dec 1998 to 22 Dec 1998 (#1998-349)
发信站: BBS 荔园晨风站 (Wed Dec 23 16:26:02 1998), 站内信件

【 以下文字转载自 tang 的信箱 】
【 原文由 Automatic 所发表 】
There are 10 messages totalling 863 lines in this issue.

Topics of the day:

  1. Problem in porting from C to VC++ ! (2)
  2. Multicast Socket & setsockopt
  3. Printing problem (2)
  4. 3d graphics (2)
  5. Performance issues (2)
  6. [MISC] How Best Buy took my $50.  Don't fall for it.

--------------------------------------------------------------------------
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

----------------------------------------------------------------------

Date:    Tue, 22 Dec 1998 13:31:04 +0530
From:    Venkatesh MJ <MJ.Venkatesh@BLR.SPCNL.CO.IN>
Subject: Problem in porting from C to VC++ !

Hi all.
My friend have a problem in porting from Microsoft C to VC++ environment.
This is really blocking. I hope the following will explain the problem.

      Description of Existing Module which has to be ported to VC++.

      a.  The Existing Module was developed using Microsoft C Compiler
          Version 5.1 under DOS.
      b.  The module consisted of functions which were using fopen and
          fclose for opening and closing of both binary and text files.
      c.  The existing module was tested extensively and is working
          without any problems.

2.
      Porting of the module
      a.  The existing module had to be implemented under Windows NT with
          multithreading.
      b.  Since the Existing modules were Extensively tested and were
working
          satisfactorily ,it was decided to port the existing code into the
new
          environment with minimum changes.
      c.  The porting was done as described below
          1. All functions of the module were made public member functions
          of a class.
          2. The Global variables used by the functions were made public

             data members of the class.
      d.  New user interface modules were developed.
      e.  New EXE was built using MSVC++ 4.0 , with multithreaded option
          for run time library under C/C++ code generation.

3.
      Problems faced in the ported code
      a.  During execution of the program , fopen failed to open an existing
          file after a variable duration of time ranging between 30 - 45
mins
          since a process starts.
      b.  All subsequent fopen statements also fail once the problem occurs.

      c.  The opening of the file was checked by checking for NULL values of
          the file pointer after fopen statement. System error was checked
          at this point using strerror and the error message received was
          -"No Error".
      d.  A dummy file was created and statements were added in the code to
          open this file if a previous fopen operation failed. In this part
of
          the code the dummy file was tried to open using
          1. fopen
          2. CFile object member Open.
          3. CStdioFile object member Open.
          fopen and CStdioFile Object member Open failed but CFile Object
open
          was sucessful in opening the dummy file.
      e.  It was inferred that fopen & CStdioFile Open failed but CFile
Object
          could be used to open the file instead of fopen.

4
.   Clarifications Required
     a.  Whether there is any problems associated with using fopen in
         multithread environment.If so what steps should be taken to avoid
         it.If not what could be the problem in opening these files.
     b.  Since fopen is used at hundreds of places in the existing module,
         using CFile member functions instead of fopen and fclose is a

         cumbersome and time consuming task .

Expecting some answers from you all.

Thanks in advance
MJV

------------------------------

Date:    Tue, 22 Dec 1998 13:58:48 +-5-30
From:    Puneet Shivam <puneets@DELHI.TCS.CO.IN>
Subject: Re: Problem in porting from C to VC++ !

Dear Venkat,

I have used fopen in multithreading environment in VC++ 5.0 so I doubt =
if it can not be used in multithreading environement of MSVC 4.0 but =
still I suggest that instead of using whole code write a very small =
application with 2 threads including primary thread and let the second =
thread do the fopen of a dummy file. I think it will work.

Also, please verify the syntax of fopen() as there are some options =
which may be applicable in MS C but not in C++. This will not give a =
compile error but a run time error. I am not sure bit I guess this could =
be exactly your problem.

Regards,
Puneet=20
TATA CONSULTANCY SERVICES


----------
From:   Venkatesh MJ[SMTP:MJ.Venkatesh@BLR.SPCNL.CO.IN]
Sent:   22 December 1998 14:00
To:     MSVC@PEACH.EASE.LSOFT.COM
Subject:        Problem in porting from C to VC++ !

Hi all.
My friend have a problem in porting from Microsoft C to VC++ =
environment.
This is really blocking. I hope the following will explain the problem.

      Description of Existing Module which has to be ported to VC++.

      a.  The Existing Module was developed using Microsoft C Compiler
          Version 5.1 under DOS.
      b.  The module consisted of functions which were using fopen and
          fclose for opening and closing of both binary and text files.
      c.  The existing module was tested extensively and is working
          without any problems.

2.
      Porting of the module
      a.  The existing module had to be implemented under Windows NT =
with
          multithreading.
      b.  Since the Existing modules were Extensively tested and were
working
          satisfactorily ,it was decided to port the existing code into =
the
new
          environment with minimum changes.
      c.  The porting was done as described below
          1. All functions of the module were made public member =
functions
          of a class.
          2. The Global variables used by the functions were made public

             data members of the class.
      d.  New user interface modules were developed.
      e.  New EXE was built using MSVC++ 4.0 , with multithreaded option
          for run time library under C/C++ code generation.

3.
      Problems faced in the ported code
      a.  During execution of the program , fopen failed to open an =
existing
          file after a variable duration of time ranging between 30 - 45
mins
          since a process starts.
      b.  All subsequent fopen statements also fail once the problem =
occurs.

      c.  The opening of the file was checked by checking for NULL =
values of
          the file pointer after fopen statement. System error was =
checked
          at this point using strerror and the error message received =
was
          -"No Error".
      d.  A dummy file was created and statements were added in the code =
to
          open this file if a previous fopen operation failed. In this =
part
of
          the code the dummy file was tried to open using
          1. fopen
          2. CFile object member Open.
          3. CStdioFile object member Open.
          fopen and CStdioFile Object member Open failed but CFile =
Object
open
          was sucessful in opening the dummy file.
      e.  It was inferred that fopen & CStdioFile Open failed but CFile
Object
          could be used to open the file instead of fopen.

4
.   Clarifications Required
     a.  Whether there is any problems associated with using fopen in
         multithread environment.If so what steps should be taken to =
avoid
         it.If not what could be the problem in opening these files.
     b.  Since fopen is used at hundreds of places in the existing =
module,
         using CFile member functions instead of fopen and fclose is a

         cumbersome and time consuming task .

Expecting some answers from you all.

Thanks in advance
MJV

-------------------------------------------------------------------------=
-
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Tue, 22 Dec 1998 00:56:18 -0800
From:    choonchiat@YAHOO.COM
Subject: Multicast Socket & setsockopt

Hi,

I got a SOCKET_ERROR message when I ran the following statement

int flag;
int len=sizeof(flag);
flag=0;

if(setsockopt(MCAST_SOCK, IPPROTO_IP, P_MULTICAST_LOOP, (char *)&flag,
len)==SOCKET_ERROR)
{
 CString err;
err.Format("Unable to set no loop back! %d",WSAGetLastError());
MessageBox(NULL, err, "Error", MB_OK);
}

does anyone knows if this option is suported by setsockopt?

thanks!

Regards,
Choon Chiat

==

Regards,
Choon Chiat
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

------------------------------

Date:    Tue, 22 Dec 1998 05:12:59 -0500
From:    Srikanth C G <srikanth_cg@TRIGENT.COM>
Subject: Re: Printing problem

At 10:00 AM 12/21/98 -0500, you wrote:
>Srikanth,
>     Thanks for the suggestion.  However, OpenPrinter("LPT1",pHandle,NULL)
>returns me a return code of success.  If I have passed the wrong parameter,
>shouldn't this function fail ?

==========> OpenPrinter is BOOL function. It must have returned FALSE and
the GetLastError() must return 1801 if there is no printer with such namd (
in your case if you did not have a printer in the name LPT1).

>Also, I have tried out with "LPT1:", but I face the same problem.

=======> Why should you be worried about to what port a printer is
connected? You should not pass the port name as argument to OpenPrinter but
it must be the printer name.

>Is there another way to get this thing working...anything other than system
>calls ?

========> Try putting the printer name in the OpenPrinter and see if your
problem gets solved.

Srikanth C.G.

>Thanks
>Sangeeta
>

------------------------------

Date:    Tue, 22 Dec 1998 11:21:11 -0000
From:    Cliff Rowley <dozprompt@NOSPLASH.FORCE9.CO.UK>
Subject: Re: 3d graphics

This is a multi-part message in MIME format.

------=_NextPart_000_0007_01BE2D9D.2DB98180
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

It depends on what you are trying to draw.  Glide (not sure about DirectX)
draws things in triangles.  You construct the triangle you need, giving it
it's x,y and z co-ordinates, and then pass that to the relevant function.
If you are drawing an object (such as an enemy or something) DirectX has
excellent support for pre-defined objects in the .x format (exportable by 3D
Studio).  You will have to look up the documentation for each API you are
using.  Your best bet is to download to DirectX SDK at
www.microsoft.com/directx

The methods for drawing onto the screen are different for each API's
implementation.  You will have to do a little research into it and read the
docs.

Also have a look at www.voodooextreme.com - they have a few tutorials etc,
and some links to other help.
    -----Original Message-----
    From: Microsoft Visual C++ programmers list
[mailto:MSVC@PEACH.EASE.LSOFT.COM]On Behalf Of Jesse Laeuchli
    Sent: Monday 21 December 1998 1:06 pm
    To: MSVC@PEACH.EASE.LSOFT.COM
    Subject: Re: 3d graphics


    Your info was very usefull, however, there is one thing I still don't
get. How do I draw the things to start with, do I render by hand or with
some sort of program.

        -----Original Message-----
        From: Cliff Rowley <dozprompt@NOSPLASH.FORCE9.CO.UK>
        To: MSVC@PEACH.EASE.LSOFT.COM <MSVC@PEACH.EASE.LSOFT.COM>
        Date: Monday, December 21, 1998 5:36 PM
        Subject: Re: 3d graphics


        It's quite a complicated process for a new 3D programmer (I'm still
learning), but it's all mathematic.  It's rendered at runtime by calculating
the offset of a 3D object in the "world" against it's Z position (depth into
the world) and it's X/Y position, calculated against a preset offset against
the user's screen.  It's a little hard to explain, but here's some sites...

        Usually they use BSP trees, which is basically a map.  When the BSP
is compiled, it contains information of what can be seen at every single
point in the map, so the "person's" viewpoint and what they can see does not
have to be calculated every frame, instead it is read from the BSP.  The
only things that are calculated at runtime are moveable objects and enemies.

        Here's the sites:

        3D programming tutorial:
http://www.geaocities.com/SiliconValley/Horizon/6933/
        BSP information and tutorial:  http://reality.sgi.com/
        GLIDE (3D/FX programming) and SDK:  http://www.3dfx.com or
http://www.glide.com
        DirectX programming:  http://www.microsoft.com/directx

        If you are using GLIDE, most of the work is done for you, although
you will lose hardware independence.  If you use DirectX, it's slightly more
complicated, slightly slower, but it will run on a variety of hardware.

        Hope this helps...

            -----Original Message-----
            From: Microsoft Visual C++ programmers list
[mailto:MSVC@PEACH.EASE.LSOFT.COM]On Behalf Of Jesse Laeuchli
            Sent: Sunday 20 December 1998 6:08 pm
            To: MSVC@PEACH.EASE.LSOFT.COM
            Subject: 3d graphics


            Hi, I have a question. When people make new 3dgames, like
halflife and jedi knights how do they render there graphics? do they draw
them in a program do they render them by hand? How do they do it?

            Jesse@laeuchli.com


------=_NextPart_000_0007_01BE2D9D.2DB98180
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 =
HTML//EN">
<META content=3D'"MSHTML 4.72.3511.1300"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><SPAN class=3D660531111-22121998><FONT color=3D#0000ff face=3DArial =
size=3D2>It=20
depends on what you are trying to draw.&nbsp; Glide (not sure about =
DirectX)=20
draws things in triangles.&nbsp; You construct the triangle you need, =
giving it=20
it's x,y and z co-ordinates, and then pass that to the relevant =
function.&nbsp;=20
If you are drawing an object (such as an enemy or something) DirectX has =

excellent support for pre-defined objects in the .x format (exportable =
by 3D=20
Studio).&nbsp; You will have to look up the documentation for each API =
you are=20
using.&nbsp; Your best bet is to download to DirectX SDK at <A=20
href=3D"http://www.microsoft.com/directx">www.microsoft.com/directx</A></=
FONT></SPAN></DIV>
<DIV><SPAN class=3D660531111-22121998><FONT color=3D#0000ff face=3DArial =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D660531111-22121998><FONT color=3D#0000ff face=3DArial =
size=3D2>The=20
methods for drawing onto the screen are different for each API's=20
implementation.&nbsp; You will have to do a little research into it and =
read the=20
docs.</FONT></SPAN></DIV>
<DIV><SPAN class=3D660531111-22121998><FONT color=3D#0000ff face=3DArial =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D660531111-22121998><FONT color=3D#0000ff face=3DArial =
size=3D2>Also=20
have a look at <A =
href=3D"http://www.voodooextreme.com">www.voodooextreme.com</A>=20
- they have a few tutorials etc, and some links to other=20
help.</FONT></SPAN></DIV>
<BLOCKQUOTE>
    <DIV class=3DOutlookMessageHeader><FONT face=3D"Times New Roman"=20
    size=3D2>-----Original Message-----<BR><B>From:</B> Microsoft Visual =
C++=20
    programmers list [mailto:MSVC@PEACH.EASE.LSOFT.COM]<B>On Behalf =
Of</B> Jesse=20
    Laeuchli<BR><B>Sent:</B> Monday 21 December 1998 1:06 =
pm<BR><B>To:</B>=20
    MSVC@PEACH.EASE.LSOFT.COM<BR><B>Subject:</B> Re: 3d=20
    graphics<BR><BR></FONT></DIV>
    <DIV><FONT color=3D#000000 size=3D2>Your info was very usefull, =
however, there=20
    is one thing I still don't get. How do I draw the things to start =
with, do I=20
    render by hand or with some sort of program.</FONT></DIV>
    <DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
    <BLOCKQUOTE=20
    style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; =
PADDING-LEFT: 5px">
        <DIV><FONT face=3DArial size=3D2><B>-----Original=20
        Message-----</B><BR><B>From: </B>Cliff Rowley &lt;<A=20
        =
href=3D"mailto:dozprompt@NOSPLASH.FORCE9.CO.UK">dozprompt@NOSPLASH.FORCE9=
.CO.UK</A>&gt;<BR><B>To:=20
        </B><A=20
        =
href=3D"mailto:MSVC@PEACH.EASE.LSOFT.COM">MSVC@PEACH.EASE.LSOFT.COM</A>=20
        &lt;<A=20
        =
href=3D"mailto:MSVC@PEACH.EASE.LSOFT.COM">MSVC@PEACH.EASE.LSOFT.COM</A>&g=
t;<BR><B>Date:=20
        </B>Monday, December 21, 1998 5:36 PM<BR><B>Subject: </B>Re: 3d=20
        graphics<BR><BR></DIV></FONT>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2>It's quite a complicated process for a new 3D =
programmer (I'm=20
        still learning), but it's all mathematic.&nbsp; It's rendered at =
runtime=20
        by calculating the offset of a 3D object in the =
&quot;world&quot;=20
        against it's Z position (depth into the world) and it's X/Y =
position,=20
        calculated against a preset offset against the user's =
screen.&nbsp; It's=20
        a little hard to explain, but here's some =
sites...</FONT></SPAN></DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN>&nbsp;</DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2>Usually they use BSP trees, which is basically a =
map.&nbsp; When=20
        the BSP is compiled, it contains information of what can be seen =
at=20
        every single point in the map, so the &quot;person's&quot; =
viewpoint and=20
        what they can see does not have to be calculated every frame, =
instead it=20
        is read from the BSP.&nbsp; The only things that are calculated =
at=20
        runtime are moveable objects and enemies.</FONT></SPAN></DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN>&nbsp;</DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2>Here's the sites:</FONT></SPAN></DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN>&nbsp;</DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2>3D programming tutorial:&nbsp; <A=20
        =
href=3D"http://www.geaocities.com/SiliconValley/Horizon/6933/">http://www=
.geaocities.com/SiliconValley/Horizon/6933/</A></FONT></SPAN></DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN><SPAN class=3D220121409-21121998><FONT =
color=3D#0000ff=20
        face=3DArial size=3D2>BSP information and tutorial:&nbsp; <A=20
        =
href=3D"http://reality.sgi.com/">http://reality.sgi.com/</A></FONT></SPAN=
></DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN><SPAN class=3D220121409-21121998><FONT =
color=3D#0000ff=20
        face=3DArial size=3D2>GLIDE (3D/FX programming) and SDK:&nbsp; =
<A=20
        href=3D"http://www.3dfx.com">http://www.3dfx.com</A> or <A=20
        =
href=3D"http://www.glide.com">http://www.glide.com</A></FONT></SPAN></DIV=
>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN><SPAN class=3D220121409-21121998><FONT =
color=3D#0000ff=20
        face=3DArial size=3D2>DirectX programming:&nbsp; <A=20
        =
href=3D"http://www.microsoft.com/directx">http://www.microsoft.com/direct=
x</A></FONT></SPAN></DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN>&nbsp;</DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2>If you are using GLIDE, most of the work is done for =
you,=20
        although you will lose hardware independence.&nbsp; If you use =
DirectX,=20
        it's slightly more complicated, slightly slower, but it will run =
on a=20
        variety of hardware.</FONT></SPAN></DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN>&nbsp;</DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2>Hope this helps...</FONT></SPAN></DIV>
        <DIV><SPAN class=3D220121409-21121998><FONT color=3D#0000ff =
face=3DArial=20
        size=3D2></FONT></SPAN>&nbsp;</DIV>
        <BLOCKQUOTE>
            <DIV class=3DOutlookMessageHeader><FONT face=3D"Times New =
Roman"=20
            size=3D2>-----Original Message-----<BR><B>From:</B> =
Microsoft Visual=20
            C++ programmers list [mailto:MSVC@PEACH.EASE.LSOFT.COM]<B>On =
Behalf=20
            Of</B> Jesse Laeuchli<BR><B>Sent:</B> Sunday 20 December =
1998 6:08=20
            pm<BR><B>To:</B> =
MSVC@PEACH.EASE.LSOFT.COM<BR><B>Subject:</B> 3d=20
            graphics<BR><BR></FONT></DIV>
            <DIV><FONT color=3D#000000 size=3D2>Hi, I have a question. =
When people=20
            make new 3dgames, like halflife and jedi knights how do they =
render=20
            there graphics? do they draw them in a program do they =
render them=20
            by hand? How do they do it?</FONT></DIV>
            <DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
            <DIV><FONT color=3D#000000 size=3D2><A=20
            =
href=3D"mailto:Jesse@laeuchli.com">Jesse@laeuchli.com</A></FONT></DIV>
            <DIV><FONT color=3D#000000=20
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY=
></HTML>

------=_NextPart_000_0007_01BE2D9D.2DB98180--

------------------------------

Date:    Tue, 22 Dec 1998 17:23:36 +0530
From:    Aditya Kumar <aditya@NOIDA.HCLT.COM>
Subject: Performance issues

Hi all ,

Env : VC 5.0 , win95

Does a larger dialog size have some performance degradation over smaller
ones ? Does it consume extra memory at runtime ?

Also , can anyone point me to a link where such performance issues have
been discussed ?

Thanks .

Aditya

--
********************************************************************
Aditya Kumar                    |    aditya@noida.hclt.com
HCL Technologies,               |
Sector 11 , Noida.              |    adi47@hotmail.com

## Still looking for something witty to add to my sign ! ##
********************************************************************

------------------------------

Date:    Tue, 22 Dec 1998 12:40:45 -0000
From:    Paul Morris-Munro <P.Morris-Munro@YMI.CO.UK>
Subject: Re: 3d graphics

BAsically you design a set of basic objects ,like a cube, a sphere etc..
each with dimensions 1x1x1 with the origin at the centre of these
objects. Then from this basic set you design more complicated objects by
adding basic objects together and doing some 3d transformations like
rotation, scale and translation. This is all hard wired into your
program or store the coordinates in some form of data file. The best way
is to design tables of your objects and store what information you need
to  build them such as the 3d primitives aand what transformation. If
you want to render them quickly look at things like texture mapping
etc.. BAsically you just specify the coordinates of you objects (usually
homogenuous in the program that your are going to draw with. It also
depends on what SDK you are using packages like OpenGL provide a library
of basic objects in the glut library. You use these to build more
complicated objects, but all this is concentrating on really time
manipulaton if you are doing a sequence that does not depend on really
time then use a graphic package like corel draw where you can build your
own 3d video.

In short you build the objects in your own program

>----------
>From:  Jesse Laeuchli[SMTP:jesse@LAEUCHLI.COM]
>Sent:  Monday, December 21, 1998 1:05 PM
>To:    MSVC@PEACH.EASE.LSOFT.COM
>Subject:       Re: 3d graphics
>
><<File: ATT00942.html>>
>Your info was very usefull, however, there is one thing I still don't
>get. How do I draw the things to start with, do I render by hand or
>with some sort of program.
>
>    -----Original Message-----
>    From: Cliff Rowley <dozprompt@NOSPLASH.FORCE9.CO.UK>
>    To: MSVC@PEACH.EASE.LSOFT.COM <MSVC@PEACH.EASE.LSOFT.COM>
>    Date: Monday, December 21, 1998 5:36 PM
>    Subject: Re: 3d graphics
>
>
>    It's quite a complicated process for a new 3D programmer (I'm still
>learning), but it's all mathematic.  It's rendered at runtime by
>calculating the offset of a 3D object in the "world" against it's Z
>position (depth into the world) and it's X/Y position, calculated
>against a preset offset against the user's screen.  It's a little hard
>to explain, but here's some sites...
>
>    Usually they use BSP trees, which is basically a map.  When the BSP
>is compiled, it contains information of what can be seen at every
>single point in the map, so the "person's" viewpoint and what they can
>see does not have to be calculated every frame, instead it is read from
>the BSP.  The only things that are calculated at runtime are moveable
>objects and enemies.
>
>    Here's the sites:
>
>    3D programming tutorial:
>http://www.geaocities.com/SiliconValley/Horizon/6933/
>    BSP information and tutorial:  http://reality.sgi.com/
>    GLIDE (3D/FX programming) and SDK:  http://www.3dfx.com or
>http://www.glide.com
>    DirectX programming:  http://www.microsoft.com/directx
>
>    If you are using GLIDE, most of the work is done for you, although
>you will lose hardware independence.  If you use DirectX, it's slightly
>more complicated, slightly slower, but it will run on a variety of
>hardware.
>
>    Hope this helps...
>
>        -----Original Message-----
>        From: Microsoft Visual C++ programmers list
>[mailto:MSVC@PEACH.EASE.LSOFT.COM]On Behalf Of Jesse Laeuchli
>        Sent: Sunday 20 December 1998 6:08 pm
>        To: MSVC@PEACH.EASE.LSOFT.COM
>        Subject: 3d graphics
>
>
>        Hi, I have a question. When people make new 3dgames, like
>halflife and jedi knights how do they render there graphics? do they
>draw them in a program do they render them by hand? How do they do it?
>
>        Jesse@laeuchli.com
>
>

------------------------------

Date:    Tue, 22 Dec 1998 08:00:59 -0500
From:    Timothy Dixon <tdixon@PHDINC.COM>
Subject: Re: Performance issues

I wouldn't think that it would have an difference that mattered;
performance is far better approached by using effecient algorithms,
optimizing loops, and so on than by shaving a few bytes here and there by
using this trick or that trick.  Even the optimizer should be only a small
help from a performance standpoint.  Course I could be wrong (I was once
before, back in 1993 :->)

Do you actually have a performance problem we might help with?

Tim Dixon, Software Engineer
PHD, Inc. http://www.phdinc.com






aditya@NOIDA.HCLT.COM on 12/22/98 06:53:36 AM

Please respond to MSVC@PEACH.EASE.LSOFT.COM

To:   MSVC@PEACH.EASE.LSOFT.COM
cc:    (bcc: Tim Dixon/PHD)
Subject:  Performance issues




Hi all ,
Env : VC 5.0 , win95
Does a larger dialog size have some performance degradation over smaller
ones ? Does it consume extra memory at runtime ?
Also , can anyone point me to a link where such performance issues have
been discussed ?
Thanks .
Aditya
--
********************************************************************
Aditya Kumar                    |    aditya@noida.hclt.com
HCL Technologies,               |
Sector 11 , Noida.              |    adi47@hotmail.com
## Still looking for something witty to add to my sign ! ##
********************************************************************
--------------------------------------------------------------------------
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Tue, 22 Dec 1998 12:49:17 -0500
From:    Sangeeta_Mehta@VANGUARD.COM
Subject: Re: Printing problem

The main thing is that I want to connect to the printer using the port and
not the printer name.  Well, that is the requirement.  So, even if I am
successfully able to print by specifying the printer name instead of the
port....that does not serve my purpose.
Is there a way to get around this using the port name ?
Also, I feel that OpenPrinter ("LPT1",pHandle, NULL) is returning a valid
pHandle to me, because my further call to GetPrinter(pHandle,2,(LPBYTE)
&printInfo,500,count) using the pHandle fetches me the relevant printer
information in printInfo.
My actual problem begins after this, when I call StartDoc().  Here I am
getting a return code of -1, indicating that the specified port is unknown.
In short, till before StartDoc(), all the above functions seem to be
working absolutely fine.
Please Help!!!
Thanks a lot.
Sangeeta

Please see the code attached below for reference.

main()
{
     HANDLE pHandle;
     PRINTER_INFO_2 printInfo;
     LPDWORD count;
     BOOL result = OpenPrinter("LPT1",&pHandle,NULL);
     result = GetPrinter(pHandle,2,(LPBYTE) &printInfo,500,count);

     HDC hdc = CreateDC(NULL,printInfo.pDriverName,NULL,NULL);
     DOCINFO docInfo;
     memset(&docInfo, 0, sizeof(DOCINFO));
     docInfo.cbSize = 500;
     docInfo.lpszDocName = "c:\\anand\\tsttime.cpp";

     int i = StartDoc(hdc,&docInfo);          //This is the point where my
function fails

     i = EndDoc(hdc);
     DeleteDC(hdc);
     result = ClosePrinter(pHandle);
     return 0;
}

------------------------------

Date:    Tue, 22 Dec 1998 21:13:23 -0000
From:    Sean <sean@IONET.NET>
Subject: [MISC] How Best Buy took my $50.  Don't fall for it.

Let me tell you a story, 12/22/98

My mom goes to Best Buy and she buys one of those gift cards for $50.

She gives it to me and I keep it for 3 months and then when I try to use it,
they tell me it isn't any good because it  isn't in their computers.  Wow!

So I call their corporate headquarters in Minneapolis and say hey my card
that we paid good money for won't work.  They say, well you must have stolen
it, or something our computers don't make errors so you didn't buy it.  Oh,
but if you can find your receipt from 6 months ago we will honor it.
Doesn't that imply that their computers make mistakes, or was that just
something that they say to get you to go away.  So after an hour and a half
on the phone and on hold, the story is, they don't ever make mistakes and
the card is worthless.

I will never shop at Best Buy again, regardless of what if anything they
ever do to rectify this situation.  And they won't and don't care if I ever
come back according to their representatives.  Comp USA is cheaper by the
way, and so is Ultimate Electronics.  And hey for $50 nearly everyone is
cheaper.

Thank you for reading this.
Please pass it on.
Where this goes to a list please excuse me for the off topic.

I talked to my local manager.
Jamie Capel, Customer Service
Melissa Morgan, Manager Customer Relations
Dan Rybicki, Director of Consumer Relations
and indirectly
Brad Anderson, President and CFO of BEST BUY.

I was repeatedly told their computers never make a mistake and are
completely bug free and would never do this to anyone.

Well here I am, they did it to me.

Yeah, to them $50 is nothing, but for me it meant getting Baldur's Gate.

Please pass this on and print a copy and take it to Best Buy with my
regards.

Thanks,
Sean Cross

------------------------------

End of MSVC Digest - 21 Dec 1998 to 22 Dec 1998 (#1998-349)
***********************************************************
--
※ 转载:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 192.168.0.4]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店