Improved rendering

This commit is contained in:
2021-05-22 14:21:49 -07:00
parent d84e760c34
commit 98814982de
2 changed files with 13 additions and 8 deletions

View File

@ -19,10 +19,15 @@ void textureInit(texture_t *texture, int32_t width, int32_t height,
glBindTexture(GL_TEXTURE_2D, texture->id);
// Setup our preferred texture params
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// Start by buffering all transparent black pixels.
if(pixels == NULL) {

View File

@ -10,11 +10,11 @@
void pokerLookAtPlayer(camera_t *camera, uint8_t seat) {
float x, z, angle;
angle = POKER_SEAT_ANGLE(seat);
x = sin(angle);
z = cos(angle);
x = sin(angle) * 0.8;
z = cos(angle) * 0.8;
cameraLookAt(camera,
x, 0.2, z,
-x, 0.2, -z
x, 0.3, z,
-x, 0.3, -z
);
}