mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 02:56:09 -04:00
Always enable ModernGL builds in Updates menu
This commit is contained in:
parent
b28f1a802d
commit
ce20154942
@ -113,7 +113,9 @@ GfxResourceID Gfx_CreateIb2(int count, Gfx_FillIBFunc fillFunc, void* obj) {
|
|||||||
return uint_to_ptr(id);
|
return uint_to_ptr(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gfx_BindIb(GfxResourceID ib) { glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, (GLuint)ib); }
|
void Gfx_BindIb(GfxResourceID ib) {
|
||||||
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ptr_to_uint(ib));
|
||||||
|
}
|
||||||
|
|
||||||
void Gfx_DeleteIb(GfxResourceID* ib) {
|
void Gfx_DeleteIb(GfxResourceID* ib) {
|
||||||
GLuint id = ptr_to_uint(*ib);
|
GLuint id = ptr_to_uint(*ib);
|
||||||
@ -166,7 +168,7 @@ void Gfx_BindDynamicVb(GfxResourceID vb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Gfx_DeleteDynamicVb(GfxResourceID* vb) {
|
void Gfx_DeleteDynamicVb(GfxResourceID* vb) {
|
||||||
GLuint id = (GLuint)(*vb);
|
GLuint id = ptr_to_uint(*vb);
|
||||||
if (id) glDeleteBuffers(1, &id);
|
if (id) glDeleteBuffers(1, &id);
|
||||||
*vb = 0;
|
*vb = 0;
|
||||||
}
|
}
|
||||||
|
@ -1006,27 +1006,19 @@ cc_bool Updater_Clean(void) { return true; }
|
|||||||
#elif defined CC_BUILD_LINUX
|
#elif defined CC_BUILD_LINUX
|
||||||
#if __x86_64__
|
#if __x86_64__
|
||||||
const struct UpdaterInfo Updater_Info = {
|
const struct UpdaterInfo Updater_Info = {
|
||||||
#ifndef CC_BUILD_GLMODERN
|
"&eModernGL is recommended for newer machines (2015 or later)", 2,
|
||||||
"", 1, { { "OpenGL", "ClassiCube" } }
|
|
||||||
#else
|
|
||||||
"&eModernGL is recommended for newer machines (2010 or later)", 2,
|
|
||||||
{
|
{
|
||||||
{ "ModernGL", "cc-nix64-gl2" },
|
{ "ModernGL", "cc-nix64-gl2" },
|
||||||
{ "OpenGL", "ClassiCube" }
|
{ "OpenGL", "ClassiCube" }
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
#elif __i386__
|
#elif __i386__
|
||||||
const struct UpdaterInfo Updater_Info = {
|
const struct UpdaterInfo Updater_Info = {
|
||||||
#ifndef CC_BUILD_GLMODERN
|
"&eModernGL is recommended for newer machines (2015 or later)", 2,
|
||||||
"", 1, { { "OpenGL", "ClassiCube.32" } }
|
|
||||||
#else
|
|
||||||
"&eModernGL is recommended for newer machines (2010 or later)", 2,
|
|
||||||
{
|
{
|
||||||
{ "ModernGL", "cc-nix32-gl2" },
|
{ "ModernGL", "cc-nix32-gl2" },
|
||||||
{ "OpenGL", "ClassiCube.32" }
|
{ "OpenGL", "ClassiCube.32" }
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
const struct UpdaterInfo Updater_Info = { "&eCompile latest source code to update", 0 };
|
const struct UpdaterInfo Updater_Info = { "&eCompile latest source code to update", 0 };
|
||||||
@ -1034,27 +1026,19 @@ cc_bool Updater_Clean(void) { return true; }
|
|||||||
#elif defined CC_BUILD_MACOS
|
#elif defined CC_BUILD_MACOS
|
||||||
#if __x86_64__
|
#if __x86_64__
|
||||||
const struct UpdaterInfo Updater_Info = {
|
const struct UpdaterInfo Updater_Info = {
|
||||||
#ifndef CC_BUILD_GLMODERN
|
"&eModernGL is recommended for newer machines (2015 or later)", 2,
|
||||||
"", 1, { { "OpenGL", "ClassiCube.64.osx" } }
|
|
||||||
#else
|
|
||||||
"&eModernGL is recommended for newer machines (2010 or later)", 2,
|
|
||||||
{
|
{
|
||||||
{ "ModernGL", "cc-osx64-gl2" },
|
{ "ModernGL", "cc-osx64-gl2" },
|
||||||
{ "OpenGL", "ClassiCube.64.osx" }
|
{ "OpenGL", "ClassiCube.64.osx" }
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
#elif __i386__
|
#elif __i386__
|
||||||
const struct UpdaterInfo Updater_Info = {
|
const struct UpdaterInfo Updater_Info = {
|
||||||
#ifndef CC_BUILD_GLMODERN
|
"&eModernGL is recommended for newer machines (2015 or later)", 2,
|
||||||
"", 1, { { "OpenGL", "ClassiCube.osx" } }
|
|
||||||
#else
|
|
||||||
"&eModernGL is recommended for newer machines (2010 or later)", 2,
|
|
||||||
{
|
{
|
||||||
{ "ModernGL", "cc-osx32-gl2" },
|
{ "ModernGL", "cc-osx32-gl2" },
|
||||||
{ "OpenGL", "ClassiCube.osx" }
|
{ "OpenGL", "ClassiCube.osx" }
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
const struct UpdaterInfo Updater_Info = { "&eCompile latest source code to update", 0 };
|
const struct UpdaterInfo Updater_Info = { "&eCompile latest source code to update", 0 };
|
||||||
|
@ -608,7 +608,7 @@ static cc_result OpenSaveFileDialog(const cc_string* filters, FileDialogCallback
|
|||||||
/* OPENFILENAME increased after Windows 9x/NT4 with the addition of pvReserved and later fields */
|
/* OPENFILENAME increased after Windows 9x/NT4 with the addition of pvReserved and later fields */
|
||||||
/* (and Windows 9x/NT4 return an error if a lStructSize > OPENFILENAME_SIZE_VERSION_400 is used) */
|
/* (and Windows 9x/NT4 return an error if a lStructSize > OPENFILENAME_SIZE_VERSION_400 is used) */
|
||||||
ofn.wide.lStructSize = OPENFILENAME_SIZE_VERSION_400;
|
ofn.wide.lStructSize = OPENFILENAME_SIZE_VERSION_400;
|
||||||
/* also note that this only works when you *don't* have OFN_HOOK in Flags - if you do, then */
|
/* also note that this only works when OFN_HOOK is *not* included in Flags - if it is, then */
|
||||||
/* on modern Windows versions the dialogs are altered to show an old Win 9x style appearance */
|
/* on modern Windows versions the dialogs are altered to show an old Win 9x style appearance */
|
||||||
/* (see https://github.com/geany/geany/issues/578 for example of this problem) */
|
/* (see https://github.com/geany/geany/issues/578 for example of this problem) */
|
||||||
|
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
#include "Bitmap.h"
|
#include "Bitmap.h"
|
||||||
#include "String.h"
|
#include "String.h"
|
||||||
#include "Options.h"
|
#include "Options.h"
|
||||||
#include <Cocoa/Cocoa.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
|
|
||||||
static int windowX, windowY;
|
static int windowX, windowY;
|
||||||
@ -23,11 +24,15 @@ static cc_bool scroll_debugging;
|
|||||||
#if defined MAC_OS_X_VERSION_10_12 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
|
#if defined MAC_OS_X_VERSION_10_12 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12
|
||||||
#define WIN_MASK (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable | NSWindowStyleMaskMiniaturizable)
|
#define WIN_MASK (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable | NSWindowStyleMaskMiniaturizable)
|
||||||
#define ANY_EVENT_MASK NSEventMaskAny
|
#define ANY_EVENT_MASK NSEventMaskAny
|
||||||
#define DIALOG_OK NSModalResponseOK
|
#define DIALOG_OK NSModalResponseOK
|
||||||
|
|
||||||
|
#define PASTEBOARD_STRING_TYPE NSPasteboardTypeString
|
||||||
#else
|
#else
|
||||||
#define WIN_MASK (NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask | NSMiniaturizableWindowMask)
|
#define WIN_MASK (NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask | NSMiniaturizableWindowMask)
|
||||||
#define ANY_EVENT_MASK NSAnyEventMask
|
#define ANY_EVENT_MASK NSAnyEventMask
|
||||||
#define DIALOG_OK NSOKButton
|
#define DIALOG_OK NSOKButton
|
||||||
|
|
||||||
|
#define PASTEBOARD_STRING_TYPE NSStringPboardType
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern size_t CGDisplayBitsPerPixel(CGDirectDisplayID display);
|
extern size_t CGDisplayBitsPerPixel(CGDirectDisplayID display);
|
||||||
@ -136,7 +141,7 @@ void Clipboard_GetText(cc_string* value) {
|
|||||||
int len;
|
int len;
|
||||||
|
|
||||||
pasteboard = [NSPasteboard generalPasteboard];
|
pasteboard = [NSPasteboard generalPasteboard];
|
||||||
str = [pasteboard stringForType:NSStringPboardType];
|
str = [pasteboard stringForType:PASTEBOARD_STRING_TYPE];
|
||||||
|
|
||||||
if (!str) return;
|
if (!str) return;
|
||||||
src = [str UTF8String];
|
src = [str UTF8String];
|
||||||
@ -153,8 +158,8 @@ void Clipboard_SetText(const cc_string* value) {
|
|||||||
str = [NSString stringWithUTF8String:raw];
|
str = [NSString stringWithUTF8String:raw];
|
||||||
pasteboard = [NSPasteboard generalPasteboard];
|
pasteboard = [NSPasteboard generalPasteboard];
|
||||||
|
|
||||||
[pasteboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
|
[pasteboard declareTypes:[NSArray arrayWithObject:PASTEBOARD_STRING_TYPE] owner:nil];
|
||||||
[pasteboard setString:str forType:NSStringPboardType];
|
[pasteboard setString:str forType:PASTEBOARD_STRING_TYPE];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user