mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-24 22:04:27 +00:00
togl/togles: fpermissive fixes
This commit is contained in:
parent
7a26688494
commit
5ab75bf9ef
@ -1149,7 +1149,7 @@ GLubyte *CGLMTex::ReadTexels( GLMTexLockDesc *desc, bool readWholeSlice, bool re
|
|||||||
|
|
||||||
if( readOnly )
|
if( readOnly )
|
||||||
{
|
{
|
||||||
data = m_backing + m_layout->m_slices[ desc->m_sliceIndex ].m_storageOffset; // this would change for PBO
|
data = (GLubyte*)(m_backing + m_layout->m_slices[ desc->m_sliceIndex ].m_storageOffset); // this would change for PBO
|
||||||
//int sliceSize = m_layout->m_slices[ desc->m_sliceIndex ].m_storageSize;
|
//int sliceSize = m_layout->m_slices[ desc->m_sliceIndex ].m_storageSize;
|
||||||
|
|
||||||
// interestingly enough, we can use the same path for both 2D and 3D fetch
|
// interestingly enough, we can use the same path for both 2D and 3D fetch
|
||||||
@ -1668,10 +1668,10 @@ void CGLMTex::Lock( GLMTexLockParams *params, char** addressOut, int* yStrideOut
|
|||||||
|
|
||||||
if ( copyout && ( (m_layout->m_key.m_texFlags & kGLMTexDynamic) || params->m_readonly ) )
|
if ( copyout && ( (m_layout->m_key.m_texFlags & kGLMTexDynamic) || params->m_readonly ) )
|
||||||
{
|
{
|
||||||
*addressOut = ReadTexels( desc, true, params->m_readonly );
|
*addressOut = (char*)ReadTexels( desc, true, params->m_readonly );
|
||||||
|
|
||||||
if( !params->m_readonly )
|
if( !params->m_readonly )
|
||||||
m_mapped = *addressOut;
|
m_mapped = (GLubyte*)*addressOut;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1153,7 +1153,7 @@ GLubyte *CGLMTex::ReadTexels( GLMTexLockDesc *desc, bool readWholeSlice, bool re
|
|||||||
|
|
||||||
if( readOnly )
|
if( readOnly )
|
||||||
{
|
{
|
||||||
data = m_backing + m_layout->m_slices[ desc->m_sliceIndex ].m_storageOffset; // this would change for PBO
|
data = (GLubyte*)(m_backing + m_layout->m_slices[ desc->m_sliceIndex ].m_storageOffset); // this would change for PBO
|
||||||
//int sliceSize = m_layout->m_slices[ desc->m_sliceIndex ].m_storageSize;
|
//int sliceSize = m_layout->m_slices[ desc->m_sliceIndex ].m_storageSize;
|
||||||
|
|
||||||
// interestingly enough, we can use the same path for both 2D and 3D fetch
|
// interestingly enough, we can use the same path for both 2D and 3D fetch
|
||||||
@ -3944,10 +3944,10 @@ void CGLMTex::Lock( GLMTexLockParams *params, char** addressOut, int* yStrideOut
|
|||||||
{
|
{
|
||||||
// read the whole slice
|
// read the whole slice
|
||||||
// (odds are we'll never request anything but a whole slice to be read..)
|
// (odds are we'll never request anything but a whole slice to be read..)
|
||||||
*addressOut = ReadTexels( desc, true, params->m_readonly );
|
*addressOut = (char*)ReadTexels( desc, true, params->m_readonly );
|
||||||
|
|
||||||
if( !params->m_readonly )
|
if( !params->m_readonly )
|
||||||
m_mapped = *addressOut;
|
m_mapped = (GLubyte*)*addressOut;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user