Jimmy Valavanis

Members
  • Content count

    247
  • Joined

  • Last visited

Community Reputation

229 Neutral

About Jimmy Valavanis

  • Rank
    Member
  1. glDrawPixels() problem

    Hi, I have a little problem with glDrawPixels function. I store in an array of unsigned int (called screen32) an image in RGBA format that I want to display to full screen (with black color as transparent index). I use the following code: glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0.0,SCREENWIDTH-1,0.0,SCREENHEIGHT-1,-1.0,1.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glViewport(0,0,200,200); glClearColor(0.5, 0.0, 0.0, 1.0); // Red to test transparency glRasterPos2i(0, 0); glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_NOTEQUAL, 0); glDrawPixels(SCREENWIDTH, SCREENHEIGHT, GL_RGBA, GL_BYTE, screen32); glFlush; SwapBuffers(h_DC); // Display the scene Unfortunatelly nothing happens, just the background gets red (bacause of calling glClearColor(0.5, 0.0, 0.0, 1.0) to test transparency). Any ideas?
  2. Delphi-Hexen

    Quote:Original post by luck_bear1970 Reminds me of my childhood! Me too, I taste an overdose of nostalgia converting my favourite games Doom, Heretic and Hexen ......
  3. Delphi-Hexen

    Added hi-resolution texture pack.
  4. Delphi-Hexen

    DelphiHexen is the remake of the classic 3D shooter game Hexen (published by RAVEN software). The source code has been converted to the Delphi programming language. It is based on DelphiDoom latest source code. Major features include: -32 bit color software renderer. -True 3D emulation. -Supports external 32 bit textures. -Supports external mp3 music. -Supports wav format sounds inside WADs. -Support for Dehacked files. Downloads: Click here to download Source code (requires Delphi 6.0 or higher), executable and shareware game data included.
  5. Delphi-Heretic

    Quote:Original post by Marmin Very nice to have the source included, good job. Thanks, source code provided for those who want to learn. AI code is quite similar to the original source code as published by RAVEN (converted from C to Delphi). On the contrary the 3D software engine that uses DelphiHeretic (as well as DelphiDoom) includes many additions and improvements.
  6. DX Studio Version 2.2 Now Available

    Really nice, and non-commercial license is in good price.
  7. Delphi-Heretic

    DelphiHeretic is the conversion of the game Heretic (publish in 1995 by RAVEN) in Delphi. It is based on DelphiDoom latest source code. Major features include: -32 bit color software renderer. -True 3D emulation. -Supports external 32 bit textures. -Supports external mp3 music. -Supports wav format sounds inside WADs. -Support for Dehacked files. Download available at: Click here (Under the Work in progress section). Source code (requires Delphi 6.0 or higher), executable and shareware game data included. [Edited by - Jimmy Valavanis on October 30, 2007 6:17:33 AM]
  8. Switch from fullscreen to window

    Nothing????
  9. I'm working in an game using DirectDraw(DirectX 7, not Direct 3D) and I have a little problem changing from fullscreen to window mode and vise-versa: If I'm in window mode and change to fullscreen the screen resolution changes correctly but nothing is drawn (I see the empty window background) Here is my code: IDirectDraw7 g_pDD; // DirectDraw object IDirectDrawSurface7 g_pDDSPrimary;// DirectDraw primary surface IDirectDrawSurface7 g_pDDScreen; // DirectDraw surface // ................ ...... void SetupDrirectDraw() { ... } void I_ChangeFullScreen() { HRESULT hres; if (fullscreen) { hres == g_pDD->SetCooperativeLevel(hMainWnd, DDSCL_NORMAL); if (hres != DD_OK) { Error(); return; } } else { hres == g_pDD->SetCooperativeLevel(hMainWnd, DDSCL_EXCLUSIVE or DDSCL_FULLSCREEN); if (hres != DD_OK) { Error(); return; } } hres == g_pDD->SetDisplayMode(SCREENWIDTH, SCREENHEIGHT, 32, 0, 0); if (hres != DD_OK) { Error(); return; } fullscreen = !fullscreen; } The I_ChangeFullScreen procedure tries to change from fullscreen to window mode and from window to fullscreen. The error function never called (i.e. DirectDraw does not return an error) but when I call my drawing function nothing is drawn: void I_FinishUpdate() { RECT srcrec; srcrect.Left = 0; srcrect.Top = 0; srcrect.Right = SCREENWIDTH; srcrect.Bottom = SCREENHEIGHT; if (g_pDDSPrimary->BltFast(0, 0, g_pDDScreen, srcrect, DDBLTFAST_DONOTWAIT or DDBLTFAST_NOCOLORKEY) == DDERR_SURFACELOST) g_pDDSPrimary->Restore; } Starting the program I call the SetupDrirectDraw procedure that setup DirectDraw. After that everything works fine. But when the I_ChangeFullScreen() is called (using ALT+ENTER keys) the computer's monitor change resolution but nothing is drawn. The SCREENWIDTH and SCREENHEIGHT are 640 and 480. Any ideas????
  10. DirectDraw and Semi-Transparent Drawing

    So I must use direct3d7->CreateDevice(IID_IDirect3D7, g_pDDSPrimary, dev); .... dev->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, false); dev->SetTexture(0, g_pDDScreen); dev->DrawPrimitive(......); /// Screen coordinates dev->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, true); dev->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_INVDESTALPHA); dev->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_DESTALPHA); dev->SetTexture(0, g_pDDColorEffect); dev->DrawPrimitive(......); /// Screen coordinates Something like that will work???
  11. Hi, I 'm working in game that uses DirectDraw and I want to make palette-change style effects, but I 'm working in 32 bit color mode. An idea I have is to make a stub - small surface (e.g. 16x16 pixels) that has all it's pixels e.g. red RGB(255, 0, 0) and an alpha channel with the factor of the effect and then call ::Blt with semitransparent option. Now the question: How can someone using IDirectDraw7 interfaces can achieve semi-transparent drawing via ::Blt() IDirectDrawSurface7: g_pDDSPrimary;// DirectDraw primary surface IDirectDrawSurface7: g_pDDScreen; // DirectDraw surface IDirectDrawSurface7: g_pDDColorEffect; // DirectDraw surface lpDDBltFX: bltFX; // Effect to be set for transparent effect ........ g_pDDSPrimary->Blt(destrect, g_pDDScreen, srcrect, DDBLTFAST_DONOTWAIT | DDBLTFAST_NOCOLORKEY, NULL); // Draw the screen g_pDDSPrimary->Blt(destrect, g_pDDColorEffect, srcrect, DDBLTFAST_DONOTWAIT | DDBLTFAST_NOCOLORKEY, bltFX); // semi transparent drawing ??? How???? How can I setup bltFX to manage the semi-transparent drawing?
  12. DelphiDoom 0.7.286

    I've updated DelphiDoom (Doom to Delphi Total Conversion) to a new version, many new featues including: -True 32 bit color software renderer. -Dynamic lighting and transparency effects. etc. You can download the newest version Here
  13. Stange slowdown, please help

    At 1024x768 and at 1280x1024 display resolutions the problems exists both in fullscreen and non fullscreen mode.
  14. Hi, I've made a DirectDraw application that uses DirectX 7.0. After some speed tests I've noticed then following results: WIDTH HEIGHT FPS 900 600 35 900 700 32 1000 750 28 1000 768 27 1010 768 26 1016 768 26 1020 768 26 1024 768 10 <- Strange slowdown 1040 768 25 1100 800 22 1200 1000 19 1280 1024 7 <- Strange slowdown When I use 1024x768 display mode (both fullscreen and non fullscreen) the performance drops dramatically. I don't use Direct3D, only DirectDraw. I draw the screen using the following instruction rect.Left = 0; rect.Top = 0; rect.Right = WIDTH; rect.Bottom = HEIGHT; if (g_pDDSPrimary->BltFast(0, 0, g_pDDScreen, &rect, DDBLTFAST_WAIT) == DDERR_SURFACELOST) g_pDDSPrimary->Restore; I've changed to IDirectDraw4 interfaces and the problem remained. Initially I though that was a problem with my graphics adapter, but I've tested to 3 different machines with same results: P4 3GHz, GF6600 256MB AMD 2600+, GF7600 256MB AMD 3000+, ATI X700, 128MB (laptop) Any ideas?
  15. Updated DelphiDoom (Doom to Delphi Total Conversion)

    Updated to Version 0.5 build 232 - (5 June 2007) What's new: -Added Quake-style console. -Added console commands. -Display stderr, stdout in console. -Changed network code, still net unavailable. -Corrected mouse sensivity. -Save game and Load game slots increased from 6 to 8. -In automap is displayed the level time. The rendering problems with Free Pascal Compiler corrected! Download version 0.5.232 (Execurable and source code - ~835KB) Download version 0.5.232 (Executables, sources and demo file from shareware version ~2536KB)