Changeset 7fc5e27 in opengl-game for game-gui-sdl.cpp


Ignore:
Timestamp:
Sep 3, 2019, 7:07:39 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
b6e60b4
Parents:
1ce9afe
Message:

Change all game-gui function names to lower camel case

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-sdl.cpp

    r1ce9afe r7fc5e27  
    55string GameGui_SDL::s_errorMessage;
    66
    7 string& GameGui_SDL::GetError() {
     7string& GameGui_SDL::getError() {
    88   GameGui_SDL::s_errorMessage = SDL_GetError();
    99
     
    1111}
    1212
    13 bool GameGui_SDL::Init() {
     13bool GameGui_SDL::init() {
    1414   // may want to define SDL_INIT_NOPARACHUTE when I start handling crashes since it
    1515   // prevents SDL from setting up its own handlers for SIG_SEGV and stuff like that
     
    3333}
    3434
    35 void GameGui_SDL::Shutdown() {
     35void GameGui_SDL::shutdown() {
    3636   SDL_Quit();
    3737}
    3838
    39 void* GameGui_SDL::CreateWindow(const string& title, unsigned int width, unsigned int height, bool fullscreen) {
    40    cout << "About to go fullscreen in SDL..." << endl;
    41 
     39void* GameGui_SDL::createWindow(const string& title, int width, int height, bool fullscreen) {
    4240   // TODO: Make an OpenGL version of the SDL_CreateWindow call as well
    4341
    4442   // On Apple's OS X you must set the NSHighResolutionCapable Info.plist property to YES,
    4543   // otherwise you will not receive a High DPI OpenGL canvas.
     44
     45   uint32_t flags = SDL_WINDOW_VULKAN;
     46
     47   flags |= fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_RESIZABLE;
     48
    4649   window = SDL_CreateWindow(title.c_str(),
    4750               SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
    48                width, height,
    49                SDL_WINDOW_VULKAN | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
     51               width, height, flags);
    5052
    5153   return window;
    5254}
    5355
    54 void GameGui_SDL::DestroyWindow() {
     56void GameGui_SDL::destroyWindow() {
    5557   // TODO: This function can throw some errors. They should be handled
    5658   SDL_DestroyWindow(window);
     
    5961#ifdef GAMEGUI_INCLUDE_VULKAN
    6062
    61 bool GameGui_SDL::CreateVulkanSurface(VkInstance instance, VkSurfaceKHR* surface) {
     63bool GameGui_SDL::createVulkanSurface(VkInstance instance, VkSurfaceKHR* surface) {
    6264   return SDL_Vulkan_CreateSurface(window, instance, surface) ?
    6365      RTWO_SUCCESS : RTWO_ERROR;
     
    6668#endif
    6769
    68 vector<const char*> GameGui_SDL::GetRequiredExtensions() {
     70vector<const char*> GameGui_SDL::getRequiredExtensions() {
    6971   uint32_t extensionCount = 0;
    7072   SDL_Vulkan_GetInstanceExtensions(window, &extensionCount, nullptr);
     
    7678}
    7779
    78 void GameGui_SDL::GetWindowSize(int* width, int* height) {
     80void GameGui_SDL::getWindowSize(int* width, int* height) {
    7981   SDL_GetWindowSize(window, width, height);
    8082}
Note: See TracChangeset for help on using the changeset viewer.