DXGL r537 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r536
|
r537
|
r538
>
Date:
00:11, 18 September 2014
Author:
admin
Status:
new
Tags:
Comment:
Partially revert
r536
.
Define client buffer in glDirectDrawSurface.h
Modified paths:
/ddraw/TextureManager.c
(modified) (
history
)
/ddraw/glDirectDrawSurface.cpp
(modified) (
history
)
/ddraw/glDirectDrawSurface.h
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/TextureManager.c
—
—
@@ -513,8 +513,9 @@
514
514
GLenum error;
515
515
texture->width = width;
516
516
texture->height = height;
517
- glPixelStorei(GL_UNPACK_ALIGNMENT, bufferalign(texture->pitch));
518
- glPixelStorei(GL_UNPACK_ROW_LENGTH, pixelsfrompitch(texture->pitch, texture->pixelformat.dwRGBBitCount));
517
+ //glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
518
+ //glPixelStorei(GL_UNPACK_ALIGNMENT, bufferalign(texture->pitch));
519
+ //glPixelStorei(GL_UNPACK_ROW_LENGTH, pixelsfrompitch(texture->pitch, texture->pixelformat.dwRGBBitCount));
519
520
if (checkerror)
520
521
{
521
522
do
—
—
@@ -563,12 +564,14 @@
564
565
else glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, width, height, texture->format, texture->type, data);
565
566
}
566
567
}
568
+ //glPopClientAttrib();
567
569
}
568
570
569
571
void TextureManager_DownloadTextureClassic(TextureManager *This, TEXTURE *texture, int level, void *data)
570
572
{
571
- glPixelStorei(GL_PACK_ALIGNMENT, bufferalign(texture->pitch));
572
- glPixelStorei(GL_PACK_ROW_LENGTH, bufferalign(texture->pixelformat.dwRGBBitCount));
573
+ //glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
574
+ //glPixelStorei(GL_PACK_ALIGNMENT, bufferalign(texture->pitch));
575
+ //glPixelStorei(GL_PACK_ROW_LENGTH, bufferalign(texture->pixelformat.dwRGBBitCount));
573
576
if(This->ext->GLEXT_EXT_direct_state_access) This->ext->glGetTextureImageEXT(texture->id,GL_TEXTURE_2D,level,texture->format,texture->type,data);
574
577
else
575
578
{
—
—
@@ -576,6 +579,7 @@
577
580
TextureManager_SetTexture(This, 0,texture);
578
581
glGetTexImage(GL_TEXTURE_2D,level,texture->format,texture->type,data);
579
582
}
583
+ //glPopClientAttrib();
580
584
}
581
585
582
586
void TextureManager_SetActiveTexture(TextureManager *This, int level)
Index: ddraw/glDirectDrawSurface.cpp
—
—
@@ -73,6 +73,7 @@
74
74
buffer = gdibuffer = NULL;
75
75
bigbuffer = NULL;
76
76
bigpitch = 0;
77
+ clientbuffer = NULL;
77
78
zbuffer = NULL;
78
79
this->miplevel = miplevel;
79
80
DWORD colormasks[3];
Index: ddraw/glDirectDrawSurface.h
—
—
@@ -179,7 +179,7 @@
180
180
bool overlay;
181
181
IUnknown *zbuffer_iface;
182
182
int version;
183
- bool clientmem;
183
+ unsigned char *clientbuffer;
184
184
};
185
185
186
186
// Legacy DDRAW Interfaces
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r536
Set pitch for texture upload and download.
admin
23:49, 17 September 2014
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version