port: GrpDevice verbatim 40250 (Create over the recording device, declaration vertex shaders -> stream-0 FVF)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b5d413afa6
commit
65c43a84cd
@@ -23,6 +23,7 @@
|
||||
#include "../../src/platform/EterLib/RenderCommands3D.h"
|
||||
#include "EterLib/GrpScreen.h"
|
||||
#include "EterLib/StateManager.h"
|
||||
#include "EterLib/Util.h"
|
||||
#include "EterPythonLib/PythonGraphic.h"
|
||||
#include <dinput.h> // DIK_ESCAPE
|
||||
|
||||
@@ -33,6 +34,14 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
// CGraphicDevice::Create's stream "shaders" (CGraphicBase statics).
|
||||
struct GraphicBaseAccess : CGraphicBase
|
||||
{
|
||||
static DWORD PT() { return ms_ptVS; }
|
||||
static DWORD PNT() { return ms_pntVS; }
|
||||
static DWORD PNT2() { return ms_pnt2VS; }
|
||||
};
|
||||
|
||||
static int g_failures = 0;
|
||||
#define CHECK(cond) \
|
||||
do { \
|
||||
@@ -294,6 +303,12 @@ int main(int argc, char** argv)
|
||||
// CScreen's 3D primitives (40250 GrpScreen.cpp, verbatim) go through the device's dynamic PDT stream:
|
||||
// under a perspective projection RenderLine3d is one line-list draw, RenderBar3d a two-triangle strip,
|
||||
// both in the current diffuse colour. The device is lost-free (TestCooperativeLevel is D3D_OK).
|
||||
// CGraphicDevice::Create (app.Create): the stream vertex shader declarations become the stream-0 FVFs
|
||||
// the recording device decodes, and EL3D_ConfirmDevice took the max texture size from the caps.
|
||||
CHECK(GraphicBaseAccess::PT() == D3DFVF_XYZ);
|
||||
CHECK(GraphicBaseAccess::PNT() == (D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1));
|
||||
CHECK(GraphicBaseAccess::PNT2() == (D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX2));
|
||||
CHECK(GetMaxTextureWidth() == 4096 && GetMaxTextureHeight() == 4096);
|
||||
{
|
||||
CScreen screen;
|
||||
CHECK(!screen.IsLostDevice() && screen.RestoreDevice());
|
||||
|
||||
Reference in New Issue
Block a user