Cheb писал(а):У меня будет гораздо суровее: сцена будет рисоваться несколько раз, в разные буферы, которые при выводе на экран будут смешивться сложным образом.
так это норма жизни. Иначе бы отрисовку в текстуры бы и не придумали.
Модератор: Модераторы
Cheb писал(а):У меня будет гораздо суровее: сцена будет рисоваться несколько раз, в разные буферы, которые при выводе на экран будут смешивться сложным образом.
Ты ей GL-текстуры создаёшь или что? Если нет, то почему просто не взять что-нибудь реентераб... не лочить?
опять первая загрузка повисла
А нет, не только первая...
фиксированная дельта времени в менюшном режиме — это неправильно. Сейчас там заметно, как сфера крутится быстрее, если двигать мышкой.
{$ifdef windows}
{***TODO parse whole 256TB if Windows NT 6.2 or higher
he first versions of Windows for x64 did not even use the full 256 TB;
they were restricted to just 8 TB of user space and 8 TB of kernel space.[18]
Windows did not support the entire 48-bit address space until Windows 8.1,
which was released in October 2013.}
procedure LogProcessAddressSpace; cdecl;
var
current, next: pointer;
Des: UnicodeString;
S: UnicodeString;
mm, mm2: _MEMORY_BASIC_INFORMATION;
A, step: ptruint;
TST: array[0..Max_Path + 1] of AnsiChar;
Protect: ptruint;
gapsz, maxgapsz, gapstep: ptruint;
type
TMMEnum = (meReserved, meCommitted, meFree, meUnknown, meShared, meGuarded, meNoCache);
var
MTSize: array[TMMEnum] of ptruint;
MTName: array[TMMEnum] of UnicodeString;
mi, mimax: TMMEnum;
const
MaxAddr: ptruint = {$ifdef cpu32}$FFFFFFE0{$else}$000007FFFFFFFFE0{$endif};
begin
if Mother^.Debug.Verbose then AddLog(RuEn(
' Адресное пространство процесса:',
' The address space of the process:'));
current:= nil;
FillChar(MTSize, sizeof(MTSize), 0);
repeat
if VirtualQuery(current, @mm, SizeOf(mm)) <> SizeOf(mm) then begin
gapstep:= 64 * 1024;
maxgapsz:= MaxAddr - gapstep - ptruint(mm.BaseAddress);
gapsz:= 0;
next:= nil;
repeat
{$ifdef cpu64}
if gapsz > $0fffffff then gapstep:= Math.min(maxgapsz - gapsz - 1, 1024*1024);
//if gapsz > $fffffffff then gapstep:= Math.min(maxgapsz - gapsz, 1024*1024*1024);
{$endif}
if (gapstep > maxgapsz) or (gapsz > (maxgapsz - gapstep))
then break;
gapsz+= gapstep;
if VirtualQuery(current, @mm, SizeOf(mm)) = SizeOf(mm) then begin
next:= mm.BaseAddress;
gapsz:= ptruint(next) - ptruint(current);
break;
end;
until false;
if Mother^.Debug.Verbose then AddLog(' %0..%1 (%2K): %3',
[current, current + //вот на этм месте переполнение
gapsz - 1, gapsz div 1024, RuEn(
'неизвестно (отказано в доступе)', 'unknown (access denied)')]);
MTSize[meUnknown]+= gapsz;
if not Assigned(next) then break;
current:= next;
end
else begin
Des:= '';
Case mm.State of
MEM_RESERVE: begin
Des:=RuEn('зарезервирована', 'reserved');
MTSize[meReserved]+= mm.RegionSize;
end;
MEM_FREE: begin
Des:= RuEn('свободна', 'free');
MTSize[meFree]:= MTSize[meFree] + mm.RegionSize;
end;
MEM_COMMIT: begin
MTSize[meCommitted]+= mm.RegionSize;
if
{$ifdef che_unicode}
GetModuleFileNameW
{$else}
GetModuleFileName
{$endif}
(THandle(mm.AllocationBase), @TST, SizeOf(TST) div SizeOf(TST[0]))
<> 0
then Des:= PervertedFormat(RuEn('выделена %0','committed by %0'), [PFileNameCharToFileNameString(@TST)])
else Des:= PervertedFormat(RuEn('выделена (база %0)','committed (base %0)'), [mm.Allocationbase]);
If (mm._Type <> MEM_PRIVATE) then begin
Des+= RuEn(', общая',', shared');
MTSize[meShared]+= mm.RegionSize;
end;
If (Protect and PAGE_NOCACHE > 0) then begin
Des+= RuEn(', некэшируемая',', non-cached');
MTSize[meNoCache]+= mm.RegionSize;
end;
If (Protect and PAGE_GUARD > 0) then begin
Des+= RuEn(', охраняемая',', guarded');
MTSize[meGuarded]+= mm.RegionSize;
end;
Des+= ', ';//RuEn(', доступ: ',', access: ');
Protect:= mm.Protect and not (PAGE_NOCACHE + PAGE_GUARD);
case Protect of
PAGE_READONLY: Des+= RuEn('только чтение','read only');
PAGE_READWRITE: Des+= RuEn('чтение/запись','read/write');
PAGE_WRITECOPY: Des+= RuEn('копируется при записи','copy-on-write');
PAGE_EXECUTE: Des+= RuEn('только выполнение кода','execute only');
PAGE_EXECUTE_READ: Des+= RuEn('чтение и выполнение кода','read and execute');
PAGE_EXECUTE_READWRITE: Des+= RuEn('полный','full');
PAGE_EXECUTE_WRITECOPY: Des+= RuEn('выполнение кода/копируется при записи','execute/copy-on-write');
PAGE_NOACCESS: Des+= RuEn('запрещён','denied');
else
Des+= RuEn('неизвестен','unknown');
end;
end;
end;
if Mother^.Debug.Verbose then AddLog(' %0..%1 (%2K): %3',
[mm.BaseAddress, mm.BaseAddress + mm.RegionSize - 1, mm.RegionSize div 1024, Des]);
if pointer(MaxAddr) - mm.RegionSize <= mm.BaseAddress then break;
end;
current+= mm.RegionSize;
until false;
MTName[meReserved]:= RuEn('Зарезервировано','Reserved');
MTName[meCommitted]:= RuEn('Выделеннная память','Committed');
MTName[meFree]:= RuEn('Свободно','Free');
MTName[meUnknown]:= RuEn('Нет данных, отказано в доступе','Unknown, access denied');
MTName[meShared]:= RuEn('Память, общая с другими процессами','Shared memory');
MTName[meGuarded]:= RuEn('Охраняемая память','Guarded memory');
MTName[meNoCache]:= RuEn('Некешируемая память','No-cache memory');
Des:= '';
AddLog(RuEn(
{$ifdef cpu32}
' 4 Гб адресного пространства делятся следующим образом:',
' Of the 4 Gb total adress space, there are:'
{$else}
' 8 Тб адресного пространства делятся следующим образом:',
' Of the 8 Tb total adress space, there are:'
{$endif}
));
if Mother^.Debug.Verbose
then mimax:= High(TMMEnum)
else mimax:= meFree;
for mi:= Low(TMMEnum) to mimax do
if MTSize[mi] > 0 then AddLog(RuEn(
' %0: %1 Гб',
' %0: %1 Gb'),
[MTName[mi], FormatFloat('0.00', MTSize[mi] / (1024*1024*1024))]);
end;
{$else windows}
procedure LogProcessAddressSpace; cdecl;
begin
if Mother^.Debug.Verbose then AddLog(RuEn(
' Адресное пространство процесса:'#10#13' Нет данных, поддерживается только для MS Windows.',
' The address space of the process:'#10#13' Sorry, this is only supported for MS Windows.'));
end;
{$endif windows}
это просто утечки или
Detecting operating system...
Trying to detect Wine...
..system directory is C:\WINDOWS\system32
..trying to open C:\WINDOWS\system32\kernel32.dll for read...
..scanning for signature string "Wine placeholder DLL"...
..detected = False
It's Windows NT 6.2.
Testing Windows NT version...
loading kernel32.dll...
VerifyVersionInfoA() at 74907900h in C:\WINDOWS\System32\KERNEL32.DLL
VerSetConditionMask() at 77BCF950h in C:\WINDOWS\SYSTEM32\ntdll.dll
5.1 or greater: True
6.0 or greater: True
6.1 or greater: True
6.2 or greater: True
6.3 or greater: False
10.0 or greater: False
Seems like Windows 8. Let's use dirty hacks to double-check this "fact"...
Querying registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName ...
= "Windows 10 Pro"
..scanning for signature string "Windows 8.1"...
..scanning for signature string "Windows 10"...
..FOUND at offset 1!
HA! Take that, Micro$oft!
Result: ostWin10
Cheb писал(а):Windows 10 перестала определяться даже с манифестом Озверел, запилил былинный хак, и...
Под вайном не завелось
да.так и есть отсуствует supportedOS в манифесте!
Cheb писал(а):Есть у меня эта срань в манифесте, именно с той страницы копипастил. Раньше работало, потом Вынь10 накатила огромное обновление, и после этого - не работает. НУ ИХ В ЖОПУ! Буду как с распознанием вайна (парсится kernel32.dll на предмет характерной строчки текста - и от этого никак не отвертятся).
$ wine chentrah-x86_64.exe
fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 2
err:ntdll:RtlpWaitForCriticalSection section 0x38818 "?" wait timed out in thread 001d, blocked by 0000, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x38818 "?" wait timed out in thread 001d, blocked by 0000, retrying (60 sec)
Cheb писал(а):Под вайном не завелось
Лог в студию!
Берём демку Чентры, и смотрим ей в манифест
{$ifdef cge_rc_directly}
{$ifdef nowin10}
{$r chentrah-nowin10.rc} //Some glitchy drivers (intel HD 3000 )
//disable hardware acceleration of OpenGL for applications that support Windows 10
{$else nowin10}
{$r chentrah.rc} //includes chentrah.manifest allowing the application
// to detect Windows 10
{$endif}
//2013: abandoned Linux, developing on Windows now. The problem not actual.
{$else}
set CGE_OPTIONS= -vq -Sa -gl -gw2 -Xi -XX -dcge -dnotlaz -dcge_rc_directly -Mobjfpc -Sh -Sc -Rintel %CODE_OPTIONS%
...
if "%BUILD_WIN32%" == "1" goto w32yes
goto w32end
:w32yes
set PATH=c:FPC%FPC_VER%bini386-win32;......bin;%COLDPATH%
if "%BUILD_DEBUG%" == "1" goto dbugyes
goto dbugend
:dbugyes
del /Q ......tmpmain-debug*.ppu
del /Q ......tmpmain-debug*.o
del /Q ......debug-chentrah.exe
if "%BUILD_LEGACYWINXP%" == "1" goto dbugcompatyes
goto dbugcompatend
:dbugcompatyes
ppc386 chentrah.lpr -dnowin10 -ddebug_build -Co -Cr %CGE_OPTIONS% -CX -Twin32 -FU......tmpmain-debug -FE...... %THRID_PARTY_PATHS%
if errorlevel 1 goto err
move ......chentrah.exe ......debug-chentrah-winXP.exe
extractdwrflnfo ......debug-chentrah-winXP.exe
strip ......debug-chentrah-winXP.exe
rem upx -9 --force ......debug-chentrah.exe
finalizedwrflnfo ......debug-chentrah-winXP.exe
rem shares the units with the regular executable as the ONLY difference is the embedded manifest
:dbugcompatend
ppc386 chentrah.lpr -ddebug_build -Co -Cr %CGE_OPTIONS% -CX -Twin32 -FU......tmpmain-debug -FE...... %THRID_PARTY_PATHS%
if errorlevel 1 goto err
move ......chentrah.exe ......debug-chentrah.exe
extractdwrflnfo ......debug-chentrah.exe
strip ......debug-chentrah.exe
rem upx -9 --force ......debug-chentrah.exe
finalizedwrflnfo ......debug-chentrah.exe
:dbugend
del /Q ......tmpmain*.ppu
del /Q ......tmpmain*.o
if "%BUILD_LEGACYWINXP%" == "1" goto w32compatyes
goto w32compatend
:w32compatyes
del /Q ......chentrah.exe
fpc chentrah.lpr %CGE_OPTIONS% -dnowin10 -CX -Twin32 -FU......tmpmain -FE...... %THRID_PARTY_PATHS%
if errorlevel 1 goto err
move ......chentrah.exe ......chentrah-winXP.exe
extractdwrflnfo ......chentrah-winXP.exe
strip ......chentrah-winXP.exe --verbose
finalizedwrflnfo ......chentrah-winXP.exe
rem shares the units with the regular executable as the ONLY difference is the embedded manifest
:w32compatend
del /Q ......chentrah.exe
fpc chentrah.lpr %CGE_OPTIONS% -CX -Twin32 -FU......tmpmain -FE...... %THRID_PARTY_PATHS%
if errorlevel 1 goto err
incbuild build.h
extractdwrflnfo ......chentrah.exe
rem brutalstrip ......chentrah.exe
strip ......chentrah.exe --verbose
rem --only-keep-debug --strip-unneeded
rem UPX is mandatory, it fixes the executable broken by brutalstrip.
rem (how does all of this work I have no slightest clue.
rem I guess I missed some vital detail when I was writing brutalstrip)
rem upx -9 --force ......chentrah.exe
finalizedwrflnfo ......chentrah.exe
rem move ......chentrah.zd2 ..bin
:w32end
#define RT_MANIFEST 24
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "chentrah.manifest"
MAINICON ICON "chentrah.ico"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity
type="win32"
version="0.9.0.0"
name="Chebmaster.Chentrah.CGE"
/>
<description>Cheb's Game Engine</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"
/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows Vista and Windows Server 2008 -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
<!-- Windows 7 and Windows Server 2008 R2 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 and Windows Server 2012 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
<!-- Windows 8.1 and Windows Server 2012 R2 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
</application>
</compatibility>
</assembly>
err:ntdll:RtlpWaitForCriticalSection section 0x38818 "?" wait timed out in thread 001d, blocked by 0000, retrying (60 sec)
Cheb писал(а):Вывод: компилятор за ким-то бесом вдруг начал подцеплять chentrah.res чёрт знает какой степени лежалости
{$R *.res}
Вернуться в Разработки на нашем сайте
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 2