Allow enabling fsaa via the GLdcConfig struct
This commit is contained in:
parent
71c25829f1
commit
03bc758be7
|
@ -39,13 +39,13 @@ static void pvr_list_submit(void *src, int n) {
|
||||||
d[0] = d[8] = 0;
|
d[0] = d[8] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _glInitPVR(GLboolean autosort) {
|
static void _glInitPVR(GLboolean autosort, GLboolean fsaa) {
|
||||||
pvr_init_params_t params = {
|
pvr_init_params_t params = {
|
||||||
/* Enable opaque and translucent polygons with size 32 and 32 */
|
/* Enable opaque and translucent polygons with size 32 and 32 */
|
||||||
{PVR_BINSIZE_32, PVR_BINSIZE_0, PVR_BINSIZE_32, PVR_BINSIZE_0, PVR_BINSIZE_32},
|
{PVR_BINSIZE_32, PVR_BINSIZE_0, PVR_BINSIZE_32, PVR_BINSIZE_0, PVR_BINSIZE_32},
|
||||||
PVR_VERTEX_BUF_SIZE, /* Vertex buffer size */
|
PVR_VERTEX_BUF_SIZE, /* Vertex buffer size */
|
||||||
0, /* No DMA */
|
0, /* No DMA */
|
||||||
0, /* No FSAA */
|
fsaa, /* No FSAA */
|
||||||
(autosort) ? 0 : 1 /* Disable translucent auto-sorting to match traditional GL */
|
(autosort) ? 0 : 1 /* Disable translucent auto-sorting to match traditional GL */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,6 +78,8 @@ void APIENTRY glFinish() {
|
||||||
|
|
||||||
void APIENTRY glKosInitConfig(GLdcConfig* config) {
|
void APIENTRY glKosInitConfig(GLdcConfig* config) {
|
||||||
config->autosort_enabled = GL_FALSE;
|
config->autosort_enabled = GL_FALSE;
|
||||||
|
config->fsaa_enabled = GL_FALSE;
|
||||||
|
|
||||||
config->initial_op_capacity = 1024;
|
config->initial_op_capacity = 1024;
|
||||||
config->initial_pt_capacity = 512;
|
config->initial_pt_capacity = 512;
|
||||||
config->initial_tr_capacity = 1024;
|
config->initial_tr_capacity = 1024;
|
||||||
|
@ -90,7 +92,7 @@ void APIENTRY glKosInitEx(GLdcConfig* config) {
|
||||||
|
|
||||||
printf("\nWelcome to GLdc! Git revision: %s\n\n", GLDC_VERSION);
|
printf("\nWelcome to GLdc! Git revision: %s\n\n", GLDC_VERSION);
|
||||||
|
|
||||||
_glInitPVR(config->autosort_enabled);
|
_glInitPVR(config->autosort_enabled, config->fsaa_enabled);
|
||||||
|
|
||||||
_glInitMatrices();
|
_glInitMatrices();
|
||||||
_glInitAttributePointers();
|
_glInitAttributePointers();
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#define GLDC_VERSION "1.1-master"
|
#define GLDC_VERSION "1.1-102-g71c25-dirty"
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,9 @@ typedef struct {
|
||||||
/* If GL_TRUE, enables pvr autosorting, this *will* break glDepthFunc/glDepthTest */
|
/* If GL_TRUE, enables pvr autosorting, this *will* break glDepthFunc/glDepthTest */
|
||||||
GLboolean autosort_enabled;
|
GLboolean autosort_enabled;
|
||||||
|
|
||||||
|
/* If GL_TRUE, enables the PVR FSAA */
|
||||||
|
GLboolean fsaa_enabled;
|
||||||
|
|
||||||
/* The internal format for paletted textures, must be GL_RGBA4 (default) or GL_RGBA8 */
|
/* The internal format for paletted textures, must be GL_RGBA4 (default) or GL_RGBA8 */
|
||||||
GLenum internal_palette_format;
|
GLenum internal_palette_format;
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,12 @@ void DrawGLScene()
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
glKosInit();
|
GLdcConfig config;
|
||||||
|
|
||||||
|
glKosInitConfig(&config);
|
||||||
|
config.fsaa_enabled = GL_TRUE;
|
||||||
|
|
||||||
|
glKosInitEx(&config);
|
||||||
|
|
||||||
InitGL(640, 480);
|
InitGL(640, 480);
|
||||||
ReSizeGLScene(640, 480);
|
ReSizeGLScene(640, 480);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user