test build 5
square only handling
This commit is contained in:
parent
11157825b2
commit
60181c3304
|
|
@ -54,8 +54,8 @@ class DivWorkPool;
|
||||||
|
|
||||||
#define DIV_UNSTABLE
|
#define DIV_UNSTABLE
|
||||||
|
|
||||||
#define DIV_VERSION "DX9 Test IV"
|
#define DIV_VERSION "DX9 Test V"
|
||||||
#define DIV_ENGINE_VERSION 205
|
#define DIV_ENGINE_VERSION 206
|
||||||
// for imports
|
// for imports
|
||||||
#define DIV_VERSION_MOD 0xff01
|
#define DIV_VERSION_MOD 0xff01
|
||||||
#define DIV_VERSION_FC 0xff02
|
#define DIV_VERSION_FC 0xff02
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,13 @@ FurnaceGUITexture* FurnaceGUIRenderDX9::createTexture(bool dynamic, int width, i
|
||||||
if ((heightReal&(heightReal-1))!=0) {
|
if ((heightReal&(heightReal-1))!=0) {
|
||||||
heightReal=1<<bsr(height);
|
heightReal=1<<bsr(height);
|
||||||
}
|
}
|
||||||
|
if (squareTex) {
|
||||||
|
if (widthReal>heightReal) {
|
||||||
|
heightReal=widthReal;
|
||||||
|
} else {
|
||||||
|
widthReal=heightReal;
|
||||||
|
}
|
||||||
|
}
|
||||||
logV("width: %d (requested)... %d (actual)",width,widthReal);
|
logV("width: %d (requested)... %d (actual)",width,widthReal);
|
||||||
logV("height: %d (requested)... %d (actual)",height,heightReal);
|
logV("height: %d (requested)... %d (actual)",height,heightReal);
|
||||||
|
|
||||||
|
|
@ -407,6 +414,7 @@ bool FurnaceGUIRenderDX9::init(SDL_Window* win, int swapInt) {
|
||||||
|
|
||||||
if (result==D3D_OK) {
|
if (result==D3D_OK) {
|
||||||
supportsDynamicTex=(caps.Caps2&D3DCAPS2_DYNAMICTEXTURES);
|
supportsDynamicTex=(caps.Caps2&D3DCAPS2_DYNAMICTEXTURES);
|
||||||
|
squareTex=(caps.TextureCaps&D3DPTEXTURECAPS_SQUAREONLY);
|
||||||
supportsVSync=(caps.PresentationIntervals&D3DPRESENT_INTERVAL_ONE);
|
supportsVSync=(caps.PresentationIntervals&D3DPRESENT_INTERVAL_ONE);
|
||||||
maxWidth=caps.MaxTextureWidth;
|
maxWidth=caps.MaxTextureWidth;
|
||||||
maxHeight=caps.MaxTextureHeight;
|
maxHeight=caps.MaxTextureHeight;
|
||||||
|
|
@ -414,6 +422,9 @@ bool FurnaceGUIRenderDX9::init(SDL_Window* win, int swapInt) {
|
||||||
if (!supportsDynamicTex) {
|
if (!supportsDynamicTex) {
|
||||||
logI("no support for dynamic textures");
|
logI("no support for dynamic textures");
|
||||||
}
|
}
|
||||||
|
if (squareTex) {
|
||||||
|
logI("square textures only");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result=device->CreateVertexBuffer(sizeof(WipeVertex)*4,0,D3DFVF_XYZ|D3DFVF_DIFFUSE,D3DPOOL_DEFAULT,&wipeBuf,NULL);
|
result=device->CreateVertexBuffer(sizeof(WipeVertex)*4,0,D3DFVF_XYZ|D3DFVF_DIFFUSE,D3DPOOL_DEFAULT,&wipeBuf,NULL);
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class FurnaceGUIRenderDX9: public FurnaceGUIRender {
|
||||||
|
|
||||||
int outW, outH, swapInterval;
|
int outW, outH, swapInterval;
|
||||||
|
|
||||||
bool dead, haveScene, supportsDynamicTex, supportsVSync, mustResize;
|
bool dead, haveScene, supportsDynamicTex, supportsVSync, mustResize, squareTex;
|
||||||
|
|
||||||
// SHADERS //
|
// SHADERS //
|
||||||
|
|
||||||
|
|
@ -93,6 +93,7 @@ class FurnaceGUIRenderDX9: public FurnaceGUIRender {
|
||||||
supportsDynamicTex(false),
|
supportsDynamicTex(false),
|
||||||
supportsVSync(false),
|
supportsVSync(false),
|
||||||
mustResize(false),
|
mustResize(false),
|
||||||
|
squareTex(false),
|
||||||
maxWidth(8192),
|
maxWidth(8192),
|
||||||
maxHeight(8192) {
|
maxHeight(8192) {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue