Hi,
the whole yesterday I was hunting a problem when staring a program with
wine. Now I'm at a point I don't know what to do next. May be somebody
can give me an hint?
Here are the last lines of the trace+ddraw output:
trace:ddraw:Main_DirectDrawSurface_Lock (0x40405b50)->Lock((nil),0x408bf960,00000001,00000000)
trace:ddraw:Main_DirectDrawSurface_Lock - locking flags : DDLOCK_WAIT
trace:ddraw:d3ddevice_lock_update copying back buffer to main memory with rectangle (0x0) - (800x600).
trace:ddraw:Main_DirectDrawSurface_Lock locked surface returning description :
- DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_COMPLEX DDSCAPS_FLIP DDSCAPS_3DDEVICE DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
- DDSD_HEIGHT : 600
- DDSD_WIDTH : 800
- DDSD_PITCH : 1600
- DDSD_LPSURFACE : 0x5f0d0000
- DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 16, R f800 G 07e0 B 001f)
trace:ddraw:Main_DirectDrawSurface_Unlock (0x40405b50)->Unlock((nil))
trace:ddraw:DIB_DirectDrawSurface_Blt (0x403f5768)->(0x61885c,0x40405b50,0x61886c,01000000,(nil))
trace:ddraw:DIB_DirectDrawSurface_Blt destrect :0x0-800x600
trace:ddraw:DIB_DirectDrawSurface_Blt srcrect :0x0-800x600
trace:ddraw:DIB_DirectDrawSurface_Blt flags: DDBLT_WAIT
trace:ddraw:d3ddevice_blt using direct buffer to buffer copy.
trace:ddraw:upload_surface_to_tex_memory_init initialized texture upload for level 0 with conversion 0.
trace:ddraw:Main_DirectDraw_CreateSurface (0x403f5418)->(0x61741ba0,0x60d0aedc,(nil))
trace:ddraw:Main_DirectDraw_CreateSurface Requesting surface desc :
- DDSD_CAPS : DDSCAPS_TEXTURE DDSCAPS2_TEXTUREMANAGE
- DDSD_HEIGHT : 128
- DDSD_WIDTH : 256
- DDSD_PIXELFORMAT : ( DDPF_ALPHAPIXELS DDPF_RGB , RGB bits: 16, R 7c00 G 03e0 B 001f A 8000)
trace:ddraw:HAL_DirectDrawSurface_Construct (0x60f501b8,0x403f5418,0x61741ac0)
trace:ddraw:DIB_DirectDrawSurface_Construct (0x60f501b8)->(0x403f5418,0x60f503b4)
trace:ddraw:Main_DirectDrawSurface_Construct (0x60f501b8)->(0x403f5418,0x60f503b4)
trace:ddraw:DIB_DirectDrawSurface_Construct (256x128, pitch=512)
trace:ddraw:create_dib DIBSection at : 0x62100000
trace:ddraw:d3dtexture_create GL texture created for surface 0x60f501b8 (private data at 0x60f50058)
The appropriate source code:
ENTER_GL();
if (surf->mipmap_level == 0) {
glGenTextures(1, &(private->tex_name));
if (private->tex_name == 0) ERR("Error at creation of OpenGL texture ID !\n");
TRACE(" GL texture id is : %d.\n", private->tex_name);
private->__global_dirty_flag = (at_creation == FALSE ? SURFACE_MEMORY_DIRTY : SURFACE_MEMORY);
private->global_dirty_flag = &(private->__global_dirty_flag);
} else {
private->tex_name = ((IDirect3DTextureGLImpl *) (main->tex_private))->tex_name;
TRACE(" GL texture id reusing id %d from surface %p (private at %p)).\n", private->tex_name, main, main->tex_private);
private->global_dirty_flag = &(((IDirect3DTextureGLImpl *) (main->tex_private))->__global_dirty_flag);
}
LEAVE_GL();
A printf showed me, that the call of glGenTextures didn't come back.
That's strage because d3dtexture_create and glGenTextures are called a
lot of times before without problems? If I delete glGenTextures it works
but...
Bye, Michael