mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 17:47:12 -04:00
Fix OpenGL 1.1 dedicated graphics backend not having rendered sprite blocks in the world for the past two years (Thanks joshyfishy22)
Was introduced in c2fc17f0deb87d39c55c2e8c2bc3a27615231647
This commit is contained in:
parent
bfc5fd4be8
commit
d7e401e44c
2
Makefile
2
Makefile
@ -94,7 +94,7 @@ ifeq ($(PLAT),beos)
|
||||
OBJECTS+=src/interop_BeOS.o
|
||||
CFLAGS=-g -pipe
|
||||
LDFLAGS=-g
|
||||
LIBS=-lm -lexecinfo -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker
|
||||
LIBS=-lGL -lnetwork -lstdc++ -lbe -lgame -ltracker
|
||||
endif
|
||||
|
||||
ifeq ($(PLAT),serenityos)
|
||||
|
@ -223,7 +223,8 @@ typedef cc_uint8 cc_bool;
|
||||
#define CC_BUILD_BEOS
|
||||
#define CC_BUILD_POSIX
|
||||
#define CC_BUILD_GL
|
||||
#define CC_BUILD_CURL
|
||||
#define CC_BUILD_GL11
|
||||
#define CC_BUILD_HTTPCLIENT
|
||||
#define CC_BUILD_OPENAL
|
||||
#elif defined __sgi
|
||||
#define CC_BUILD_IRIX
|
||||
|
@ -158,7 +158,8 @@ static void RenderNormalBatch(int batch) {
|
||||
Gfx_SetFaceCulling(true);
|
||||
/* TODO: fix to not render them all */
|
||||
#ifdef CC_BUILD_GL11
|
||||
Gfx_DrawIndexedTris_T2fC4b(part.Vbs[FACE_COUNT], 0);
|
||||
Gfx_BindVb(part.Vbs[FACE_COUNT]);
|
||||
Gfx_DrawIndexedTris_T2fC4b(0, 0);
|
||||
Game_Vertices += count * 4;
|
||||
Gfx_SetFaceCulling(false);
|
||||
continue;
|
||||
|
@ -48,7 +48,7 @@ const cc_result ReturnCode_DirectoryExists = EEXIST;
|
||||
#include <sys/systeminfo.h>
|
||||
#elif defined CC_BUILD_BSD
|
||||
#include <sys/sysctl.h>
|
||||
#elif defined CC_BUILD_HAIKU
|
||||
#elif defined CC_BUILD_HAIKU || defined CC_BUILD_BEOS
|
||||
/* TODO: Use load_image/resume_thread instead of fork */
|
||||
/* Otherwise opening browser never works because fork fails */
|
||||
#include <kernel/image.h>
|
||||
@ -226,7 +226,7 @@ cc_result Directory_Enum(const cc_string* dirPath, void* obj, Directory_EnumCall
|
||||
len = String_Length(src);
|
||||
String_AppendUtf8(&path, src, len);
|
||||
|
||||
#if defined CC_BUILD_HAIKU || defined CC_BUILD_SOLARIS || defined CC_BUILD_IRIX
|
||||
#if defined CC_BUILD_HAIKU || defined CC_BUILD_SOLARIS || defined CC_BUILD_IRIX || defined CC_BUILD_BEOS
|
||||
{
|
||||
char full_path[NATIVE_STR_LEN];
|
||||
struct stat sb;
|
||||
@ -483,6 +483,10 @@ void Platform_LoadSysFonts(void) {
|
||||
static const cc_string dirs[] = {
|
||||
String_FromConst("/system/data/fonts")
|
||||
};
|
||||
#elif defined CC_BUILD_BEOS
|
||||
static const cc_string dirs[] = {
|
||||
String_FromConst("/boot/beos/etc/fonts")
|
||||
};
|
||||
#elif defined CC_BUILD_DARWIN
|
||||
static const cc_string dirs[] = {
|
||||
String_FromConst("/System/Library/Fonts"),
|
||||
|
@ -45,8 +45,10 @@ void* Mem_Realloc(void* mem, cc_uint32 numElems, cc_uint32 elemsSize, const char
|
||||
}
|
||||
|
||||
static CC_NOINLINE cc_uint32 CalcMemSize(cc_uint32 numElems, cc_uint32 elemsSize) {
|
||||
cc_uint32 numBytes;
|
||||
if (!numElems) return 1; /* treat 0 size as 1 byte */
|
||||
cc_uint32 numBytes = numElems * elemsSize; /* TODO: avoid overflow here */
|
||||
|
||||
numBytes = numElems * elemsSize; /* TODO: avoid overflow here */
|
||||
if (numBytes < numElems) return 0; /* TODO: Use proper overflow checking */
|
||||
return numBytes;
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ extern "C" {
|
||||
|
||||
// Other
|
||||
#include <errno.h>
|
||||
#include <Url.h>
|
||||
// AppKit
|
||||
#include <Application.h>
|
||||
#include <Clipboard.h>
|
||||
@ -48,7 +47,7 @@ cc_result Process_StartOpen(const cc_string* args) {
|
||||
cc_bool https = String_CaselessStarts(args, &https_protocol);
|
||||
const char* mime = https ? "application/x-vnd.Be.URL.https" : "application/x-vnd.Be.URL.http";
|
||||
|
||||
const char* argv[] = { str, NULL };
|
||||
char* argv[] = { str, NULL };
|
||||
return be_roster->Launch(mime, 1, argv);
|
||||
}
|
||||
|
||||
@ -555,12 +554,16 @@ class CC_BRefFilter : public BRefFilter
|
||||
public:
|
||||
CC_BRefFilter() : BRefFilter() { }
|
||||
|
||||
#if defined CC_BUILD_BEOS
|
||||
bool Filter(const entry_ref* ref, BNode* node, struct stat* st, const char* filetype) {
|
||||
#else
|
||||
bool Filter(const entry_ref* ref, BNode* node, stat_beos* st, const char* filetype) override {
|
||||
#endif
|
||||
BPath path(ref);
|
||||
cc_string str;
|
||||
int i;
|
||||
if (node->IsDirectory()) return true;
|
||||
|
||||
BPath path(ref);
|
||||
if (node->IsDirectory()) return true;
|
||||
str = String_FromReadonly(path.Path());
|
||||
|
||||
for (i = 0; file_filters[i]; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user