Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Steve

#1
dborca, Anim8or does not have to have 24bpp.  When calling ChoosePixelFormat() and asking for 24bpp Windows will return the closest match.  If there are no 24bpp formats but there are 32bpp or 16bpp formats then one of those will be returned.
#2
Thanks for thie info, koolsmoky.  I don't see anything strange in those foramts.  I suspect that it may be due to the fact that Ani8or draws it's OpenGL output to a child window.  Are the formats different for chld windows?  Here's the code I use to created the window classes:

// Create the parent window:

lWidth = CW_USEDEFAULT;
lHeight = 0;
lStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
hInst = hInstance;
mainWnd = CreateWindow(
          szAppName,
          szAppTitle,
          lStyle,
          CW_USEDEFAULT, 0, lWidth, lHeight,
          NULL,
          NULL,
          hInstance,
          NULL
      );
if (!mainWnd)
   return FALSE;

// Create the OpenGL child window:

glWnd = CreateWindow(
          szAppNameOpenGL,
          NULL,
          WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_CHILD,
          100, 50, 100, 75,
          mainWnd,
          NULL,
          hInstance,
          NULL
      );
if (!glWnd)
   return FALSE;

#3
koolsmoky, actually Anim8or only uses a single OpenGL context and only uses it in a single window.  There were far too many failures in numerous low-end card's drivers when I was using multiple GL contexts.  To make the 4 views I change the viewport and set the scissor to each quadrant and draw the appropriate view.  When only one view shows up it's because the driver fails to translate the image according to the current viewport correctly.

Question:  What pixel formats does the VooDoo5 export when the screen is in true color mode?  Have you tried running Anim8or in 16 bpp mode when it fails to run higher pixel depths?

Comment:  I don't request a 32 bit pixel format from Anim8or.  I use ChoosePixelFormat to pick the format with the following code.  It should return the closest match:

PIXELFORMATDESCRIPTOR pfd, *ppfd;
int pixelformat;

ppfd = &pfd;

ppfd->nSize = sizeof(PIXELFORMATDESCRIPTOR);
ppfd->nVersion = 1;
ppfd->dwFlags = PFD_DRAW_TO_WINDOW |
               PFD_DOUBLEBUFFER |
               PFD_SUPPORT_OPENGL;
ppfd->iLayerType = PFD_MAIN_PLANE;
ppfd->cAlphaBits = 0;
ppfd->cAuxBuffers = 0;
ppfd->bReserved = 0;

ppfd->iPixelType = PFD_TYPE_RGBA;
ppfd->cColorBits = 24;

ppfd->cDepthBits = 24;
ppfd->cAccumBits = 0;
ppfd->cStencilBits = 0;

if ((pixelformat = ChoosePixelFormat(hdc, ppfd)) == 0) {
   errorNo = GetLastError();
   SYS_FormatError(hWnd, "ChoosePixelFormat() failed", errorNo);
       return -1;
}
#4
HI, I'm the author of Anim8or so maybe I can answer some of these questions.

*Can you control the colordepth of Anim8r before running it?
Anim8or doesn't try to change the color depth but uses the current
desktop settings.  It does check the color depth and bails out with
an error dialog if you aren't in 16 bpp or higher.

*Anything in the docs (like initial bits per pixel it runs in)?
See above.

*Does this Anim8r use stenciling? Destination alpha buffering?
Anim8or does not use stenciling ot alpha buffering.

Anim8or uses a single window to draw all of it's OpenGL.  However it is a child window, not a top level window.  This causes some driver problems.  I suspect that it is the main problem with the final DX8 release of the VooDoo drivers (the one that 3DFX made just before they vanished) but I'm not absolutely sure about this.  And, no, I'm not going to rewrite Anim8or to change this because it's far too much work.  

Anim8or also changes the viewport and uses the scissor when it draws multiple views.  This can cause some problems as well where only one of the views is shown, particularly in SIS drivers but also in some Intel so-called "Extreme" drivers.

There are other things that Anim8or does that aren't normally done in games, such as drawing with a stipple mask, front buffer rendering, using glBitmaps, drawing in XOR mode, and copying areas of the frame buffer from the back buffer to the front.  I'm slowly revising the code to do less of this over time for certain features as it's practical.

Hope this helps, or at least is interesting.

Steve