mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-22 04:25:11 +00:00
test build 5
square only handling
This commit is contained in:
parent
11157825b2
commit
60181c3304
3 changed files with 15 additions and 3 deletions
|
@ -54,8 +54,8 @@ class DivWorkPool;
|
|||
|
||||
#define DIV_UNSTABLE
|
||||
|
||||
#define DIV_VERSION "DX9 Test IV"
|
||||
#define DIV_ENGINE_VERSION 205
|
||||
#define DIV_VERSION "DX9 Test V"
|
||||
#define DIV_ENGINE_VERSION 206
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
#define DIV_VERSION_FC 0xff02
|
||||
|
|
|
@ -156,6 +156,13 @@ FurnaceGUITexture* FurnaceGUIRenderDX9::createTexture(bool dynamic, int width, i
|
|||
if ((heightReal&(heightReal-1))!=0) {
|
||||
heightReal=1<<bsr(height);
|
||||
}
|
||||
if (squareTex) {
|
||||
if (widthReal>heightReal) {
|
||||
heightReal=widthReal;
|
||||
} else {
|
||||
widthReal=heightReal;
|
||||
}
|
||||
}
|
||||
logV("width: %d (requested)... %d (actual)",width,widthReal);
|
||||
logV("height: %d (requested)... %d (actual)",height,heightReal);
|
||||
|
||||
|
@ -407,6 +414,7 @@ bool FurnaceGUIRenderDX9::init(SDL_Window* win, int swapInt) {
|
|||
|
||||
if (result==D3D_OK) {
|
||||
supportsDynamicTex=(caps.Caps2&D3DCAPS2_DYNAMICTEXTURES);
|
||||
squareTex=(caps.TextureCaps&D3DPTEXTURECAPS_SQUAREONLY);
|
||||
supportsVSync=(caps.PresentationIntervals&D3DPRESENT_INTERVAL_ONE);
|
||||
maxWidth=caps.MaxTextureWidth;
|
||||
maxHeight=caps.MaxTextureHeight;
|
||||
|
@ -414,6 +422,9 @@ bool FurnaceGUIRenderDX9::init(SDL_Window* win, int swapInt) {
|
|||
if (!supportsDynamicTex) {
|
||||
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);
|
||||
|
|
|
@ -38,7 +38,7 @@ class FurnaceGUIRenderDX9: public FurnaceGUIRender {
|
|||
|
||||
int outW, outH, swapInterval;
|
||||
|
||||
bool dead, haveScene, supportsDynamicTex, supportsVSync, mustResize;
|
||||
bool dead, haveScene, supportsDynamicTex, supportsVSync, mustResize, squareTex;
|
||||
|
||||
// SHADERS //
|
||||
|
||||
|
@ -93,6 +93,7 @@ class FurnaceGUIRenderDX9: public FurnaceGUIRender {
|
|||
supportsDynamicTex(false),
|
||||
supportsVSync(false),
|
||||
mustResize(false),
|
||||
squareTex(false),
|
||||
maxWidth(8192),
|
||||
maxHeight(8192) {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue