ModuleInfo "Version: V1.0"
ModuleInfo "Author: Dave Camp"
ModuleInfo "License: SRS Shared Source Code License"
ModuleInfo "Copyright: SRS Software"
ModuleInfo ""
ModuleInfo "BUGFIXES:"
ModuleInfo "Fixed helper function VerifyD3D11Max2DDriver() not returning a result"
ModuleInfo "Fixed pixmaps being affected by other drawing commands - SetColor/SetAlpha etc"
import brl.blitz
import brl.max2d
import brl.textstream
import srs.d3d11graphics
TBatchImage^Object{
._readytodraw%&
._isvalid%&
._numframes%&
._image:TImage&
._tex:ID3D11Texture2D&
._sampler:ID3D11SamplerState&
._srv:ID3D11ShaderResourceView&
._ilength%&
._shaderindex%&
._vbuffer:ID3D11Buffer&
._dbuffer:ID3D11Buffer&
._cbuffer:ID3D11Buffer&
._rbuffer:ID3D11Buffer&
._sbuffer:ID3D11Buffer&
._fbuffer:ID3D11Buffer&
._uvbuffer:ID3D11Buffer&
._vshader:ID3D11VertexShader&
._strides%&[]&
._offsets%&[]&
._buffers:ID3D11Buffer&[]&
-New%()="_srs_d3d11max2d_TBatchImage_New"
-Delete%()="_srs_d3d11max2d_TBatchImage_Delete"
-Create:TBatchImage(image:TImage,color%,rotation%,scale%,uv%,frames%)="_srs_d3d11max2d_TBatchImage_Create"
-Update%(position#&[] Var,color#&[] Var,rotation#&[] Var,scale#&[] Var,uv#&[] Var,frames%&[] Var)="_srs_d3d11max2d_TBatchImage_Update"
-Draw%(frame%)="_srs_d3d11max2d_TBatchImage_Draw"
-Destroy%()="_srs_d3d11max2d_TBatchImage_Destroy"
}="srs_d3d11max2d_TBatchImage"
CreateBatchImage:TBatchImage(image:TImage Var,color%=0,rotation%=0,scale%=0,uv%=0,frames%=0)="srs_d3d11max2d_CreateBatchImage"
UpdateBatchImage%(bimage:TBatchImage,position#&[]="bbEmptyArray",color#&[]="bbEmptyArray",rotation#&[]="bbEmptyArray",scale#&[]="bbEmptyArray",uv#&[]="bbEmptyArray",frames%&[]="bbEmptyArray")="srs_d3d11max2d_UpdateBatchImage"
DrawBatchImage%(bimage:TBatchImage Var,frame%=-1)="srs_d3d11max2d_DrawBatchImage"
DestroyBatchImage%(bimage:TBatchImage Var)="srs_d3d11max2d_DestroyBatchImage"
FreeBatchResources%()="srs_d3d11max2d_FreeBatchResources"
RENDERIMAGE%=16
ImageBuffer:ID3D11RenderTargetView(image:TImage,frame%=0)="srs_d3d11max2d_ImageBuffer"
BackBuffer:ID3D11RenderTargetView()="srs_d3d11max2d_BackBuffer"
SetBuffer%(rtv:ID3D11RenderTargetView)="srs_d3d11max2d_SetBuffer"
TD3D11ImageFrame^TImageFrame{
._tex2D:ID3D11Texture2D&
._srv:ID3D11ShaderResourceView&
._rtv:ID3D11RenderTargetView&
._sampler:ID3D11SamplerState&
._uscale#&
._vscale#&
._seq%&
-New%()="_srs_d3d11max2d_TD3D11ImageFrame_New"
-Delete%()="_srs_d3d11max2d_TD3D11ImageFrame_Delete"
-Create:TImageFrame(pixmap:TPixmap,flags%)="_srs_d3d11max2d_TD3D11ImageFrame_Create"
-Destroy%()="_srs_d3d11max2d_TD3D11ImageFrame_Destroy"
-Draw%(x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh#)="_srs_d3d11max2d_TD3D11ImageFrame_Draw"
}="srs_d3d11max2d_TD3D11ImageFrame"
TD3D11Max2DDriver^TMax2DDriver{
.tform_scr_rot#&
.tform_scr_zoom#&
.tform_scr_ix#&
.tform_scr_iy#&
.tform_scr_jx#&
.tform_scr_jy#&
.stored_scr_rot#&
.stored_scale_x#&
.stored_scale_y#&
.focus_x#&
.focus_y#&
-New%()="_srs_d3d11max2d_TD3D11Max2DDriver_New"
-Delete%()="_srs_d3d11max2d_TD3D11Max2DDriver_Delete"
-AdjustScreenRotationScale%(tx# Var,ty# Var)="_srs_d3d11max2d_TD3D11Max2DDriver_AdjustScreenRotationScale"
-ResetScreenRotationScale%()="_srs_d3d11max2d_TD3D11Max2DDriver_ResetScreenRotationScale"
-SetScreenRotation%(rot#)="_srs_d3d11max2d_TD3D11Max2DDriver_SetScreenRotation"
-SetZoom%(zoom#)="_srs_d3d11max2d_TD3D11Max2DDriver_SetZoom"
-SetFocus%(x#,y#)="_srs_d3d11max2d_TD3D11Max2DDriver_SetFocus"
-UpdateTransform%()="_srs_d3d11max2d_TD3D11Max2DDriver_UpdateTransform"
-TransformPoint%(x# Var,y# Var)="_srs_d3d11max2d_TD3D11Max2DDriver_TransformPoint"
-ToString$()="_srs_d3d11max2d_TD3D11Max2DDriver_ToString"
-GraphicsModes:TGraphicsMode&[]()="_srs_d3d11max2d_TD3D11Max2DDriver_GraphicsModes"
-AttachGraphics:TGraphics(hwnd%,flags%)="_srs_d3d11max2d_TD3D11Max2DDriver_AttachGraphics"
-CreateGraphics:TGraphics(width%,height%,depth%,hertz%,flags%)="_srs_d3d11max2d_TD3D11Max2DDriver_CreateGraphics"
-SetGraphics%(g:TGraphics)="_srs_d3d11max2d_TD3D11Max2DDriver_SetGraphics"
-Flip%(sync%)="_srs_d3d11max2d_TD3D11Max2DDriver_Flip"
-CreateFrameFromPixmap:TImageFrame(pixmap:TPixmap,flags%)="_srs_d3d11max2d_TD3D11Max2DDriver_CreateFrameFromPixmap"
-SetBlend%(blend%)="_srs_d3d11max2d_TD3D11Max2DDriver_SetBlend"
-SetAlpha%(alpha#)="_srs_d3d11max2d_TD3D11Max2DDriver_SetAlpha"
-SetColor%(red%,green%,blue%)="_srs_d3d11max2d_TD3D11Max2DDriver_SetColor"
-SetClsColor%(red%,green%,blue%)="_srs_d3d11max2d_TD3D11Max2DDriver_SetClsColor"
-SetViewport%(x%,y%,width%,height%)="_srs_d3d11max2d_TD3D11Max2DDriver_SetViewport"
-SetTransform%(xx#,xy#,yx#,yy#)="_srs_d3d11max2d_TD3D11Max2DDriver_SetTransform"
-SetLineWidth%(width#)="_srs_d3d11max2d_TD3D11Max2DDriver_SetLineWidth"
-Cls%()="_srs_d3d11max2d_TD3D11Max2DDriver_Cls"
-Plot%(x#,y#)="_srs_d3d11max2d_TD3D11Max2DDriver_Plot"
-DrawLine%(x0#,y0#,x1#,y1#,tx#,ty#)="_srs_d3d11max2d_TD3D11Max2DDriver_DrawLine"
-DrawRect%(x0#,y0#,x1#,y1#,tx#,ty#)="_srs_d3d11max2d_TD3D11Max2DDriver_DrawRect"
-DrawOval%(x0#,y0#,x1#,y1#,tx#,ty#)="_srs_d3d11max2d_TD3D11Max2DDriver_DrawOval"
-DrawPoly%(inverts#&[],handlex#,handley#,tx#,ty#)="_srs_d3d11max2d_TD3D11Max2DDriver_DrawPoly"
-DrawPixmap%(pixmap:TPixmap,x0%,y0%)="_srs_d3d11max2d_TD3D11Max2DDriver_DrawPixmap"
-GrabPixmap:TPixmap(x%,y%,width%,height%)="_srs_d3d11max2d_TD3D11Max2DDriver_GrabPixmap"
-SetResolution%(w#,h#)="_srs_d3d11max2d_TD3D11Max2DDriver_SetResolution"
-Create:TD3D11Max2DDriver()="_srs_d3d11max2d_TD3D11Max2DDriver_Create"
}="srs_d3d11max2d_TD3D11Max2DDriver"
D3D11Max2DDriver:TD3D11Max2DDriver()="srs_d3d11max2d_D3D11Max2DDriver"
VerifyD3D11Max2DDriver%()="srs_d3d11max2d_VerifyD3D11Max2DDriver"
PlotPoints%(points#&[])="srs_d3d11max2d_PlotPoints"
DrawLines%(lines#&[],Linked%=0)="srs_d3d11max2d_DrawLines"
DrawImageTiled%(image:TImage,x#=0#,y#=0#,frame%=0)="srs_d3d11max2d_DrawImageTiled"
SetScreenRotationD3D11%(rot#)="srs_d3d11max2d_SetScreenRotationD3D11"
SetScreenZoomD3D11%(zoom#)="srs_d3d11max2d_SetScreenZoomD3D11"
SetScreenFocusD3D11%(x#,y#)="srs_d3d11max2d_SetScreenFocusD3D11"
