-NewTexture::NewTexture( NativeImageInterfacePtr nativeImageInterface )
-:mId( 0 ),
- mType( TextureType::TEXTURE_2D ),
- mSampler(),
- mNativeImage( nativeImageInterface ),
- mInternalFormat(GL_RGB),
- mPixelDataType(GL_UNSIGNED_BYTE),
- mWidth( nativeImageInterface->GetWidth() ),
- mHeight( nativeImageInterface->GetHeight() ),
- mHasAlpha( nativeImageInterface->RequiresBlending() ),
- mIsCompressed( false )
+Texture::Texture( NativeImageInterfacePtr nativeImageInterface )
+: mNativeImage( nativeImageInterface ),
+ mSampler(),
+ mId( 0 ),
+ mTarget( GL_TEXTURE_2D ),
+ mGlInternalFormat( GL_RGB ),
+ mGlFormat( GL_RGB ),
+ mPixelDataType( GL_UNSIGNED_BYTE ),
+ mWidth( static_cast<uint16_t >( nativeImageInterface->GetWidth() ) ), // ignoring overflow, not happening in practice
+ mHeight( static_cast<uint16_t >( nativeImageInterface->GetHeight() ) ), // ignoring overflow, not happening in practice
+ mMaxMipMapLevel( 0 ),
+ mType( TextureType::TEXTURE_2D ),
+ mHasAlpha( nativeImageInterface->RequiresBlending() ),
+ mIsCompressed( false )