mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 00:05:40 +00:00
uninitialized variables-gfx
This commit is contained in:
parent
1efb687867
commit
b9c207765e
33 changed files with 108 additions and 43 deletions
|
|
@ -174,7 +174,8 @@ public:
|
|||
|
||||
struct
|
||||
{
|
||||
U32 mOffset, mSize;
|
||||
U32 mOffset = 0;
|
||||
U32 mSize = 0;
|
||||
}_getBufferData;
|
||||
|
||||
void lock(const U32 size, U32 offsetAlign, U32 &outOffset, void* &outPtr)
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ static GLenum faceList[6] =
|
|||
GFXGLCubemap::GFXGLCubemap() :
|
||||
mCubemap(0),
|
||||
mDynamicTexSize(0),
|
||||
mWidth(0),
|
||||
mHeight(0),
|
||||
mFaceFormat( GFXFormatR8G8B8A8 )
|
||||
{
|
||||
for(U32 i = 0; i < 6; i++)
|
||||
|
|
@ -313,6 +315,7 @@ U8* GFXGLCubemap::getTextureData(U32 face, U32 mip)
|
|||
|
||||
GFXGLCubemapArray::GFXGLCubemapArray()
|
||||
{
|
||||
mCubemap = NULL;
|
||||
}
|
||||
|
||||
GFXGLCubemapArray::~GFXGLCubemapArray()
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ GFXGLDevice::GFXGLDevice(U32 adapterIndex) :
|
|||
mActiveTextureType[i] = GL_ZERO;
|
||||
|
||||
mNumVertexStream = 2;
|
||||
mSupportsAnisotropic = false;
|
||||
|
||||
for(int i = 0; i < GS_COUNT; ++i)
|
||||
mModelViewProjSC[i] = NULL;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
typedef Data DataType;
|
||||
|
||||
GLTimer(GFXDevice *device, Data &data) : mData(&data)
|
||||
GLTimer(GFXDevice *device, Data &data) : mName(NULL), mData(&data)
|
||||
{
|
||||
glGenQueries(1, &mQueryId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ GLCircularVolatileBuffer* getCircularVolatileIndexBuffer()
|
|||
GFXGLPrimitiveBuffer::GFXGLPrimitiveBuffer(GFXDevice *device, U32 indexCount, U32 primitiveCount, GFXBufferType bufferType) :
|
||||
GFXPrimitiveBuffer(device, indexCount, primitiveCount, bufferType),
|
||||
mBufferOffset(0),
|
||||
mZombieCache(NULL)
|
||||
mZombieCache(NULL),
|
||||
lockedIndexEnd(0),
|
||||
lockedIndexStart(0)
|
||||
{
|
||||
if( mBufferType == GFXBufferTypeVolatile )
|
||||
{
|
||||
|
|
@ -185,4 +187,4 @@ MODULE_BEGIN( GFX_GL_PrimitiveBuffer )
|
|||
{
|
||||
GFXDevice::getDeviceEventSignal( ).remove( &onGFXDeviceSignal );
|
||||
}
|
||||
MODULE_END
|
||||
MODULE_END
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ public:
|
|||
GFXGLShaderConstHandle::GFXGLShaderConstHandle( GFXGLShader *shader )
|
||||
: mShader( shader ), mLocation(0), mOffset(0), mSize(0), mSamplerNum(-1), mInstancingConstant(false)
|
||||
{
|
||||
dMemset(&mDesc, 0, sizeof(mDesc));
|
||||
mValid = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,15 +33,24 @@
|
|||
|
||||
GFXGLTextureObject::GFXGLTextureObject(GFXDevice * aDevice, GFXTextureProfile *profile) :
|
||||
GFXTextureObject(aDevice, profile),
|
||||
mIsNPoT2(false),
|
||||
mBinding(GL_TEXTURE_2D),
|
||||
mBytesPerTexel(4),
|
||||
mLockedRectRect(0, 0, 0, 0),
|
||||
mGLDevice(static_cast<GFXGLDevice*>(mDevice)),
|
||||
mIsZombie(false),
|
||||
mZombieCache(NULL),
|
||||
mNeedInitSamplerState(true),
|
||||
mFrameAllocatorMark(0),
|
||||
mFrameAllocatorPtr(NULL)
|
||||
{
|
||||
|
||||
#if TORQUE_DEBUG
|
||||
mFrameAllocatorMarkGuard == FrameAllocator::getWaterMark();
|
||||
#endif
|
||||
|
||||
dMemset(&mLockedRect, 0, sizeof(mLockedRect));
|
||||
|
||||
AssertFatal(dynamic_cast<GFXGLDevice*>(mDevice), "GFXGLTextureObject::GFXGLTextureObject - Invalid device type, expected GFXGLDevice!");
|
||||
glGenTextures(1, &mHandle);
|
||||
glGenBuffers(1, &mBuffer);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class GFXGLDevice;
|
|||
class GFXGLVertexDecl : public GFXVertexDecl
|
||||
{
|
||||
public:
|
||||
GFXGLVertexDecl() : mFormat(NULL), mVertexAttribActiveMask(0) {}
|
||||
GFXGLVertexDecl() : mFormat(NULL), mVertexAttribActiveMask(0) { std::fill_n(mVertexSize, 4, 0); }
|
||||
void init(const GFXVertexFormat *format);
|
||||
|
||||
void prepareVertexFormat() const;
|
||||
|
|
@ -36,4 +36,4 @@ protected:
|
|||
void _initVerticesFormat2();
|
||||
};
|
||||
|
||||
#endif //GFX_GL_VERTEX_DECL
|
||||
#endif //GFX_GL_VERTEX_DECL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue