Languages

Menu
Sites
Language
sdl_main instead main

https://developer.tizen.org/ko/development/guides/native-application/graphics/sdl-graphics-vulkan?langredirect=1#sdl

I have a mistake if replace main with sdl_main

Responses

2 Replies
Armaan-Ul- Islam

# Before using any other SDL functions, call the SDL_Init() function to properly initialize the SDL library and start each of its various subsystems.  Check If you are calling  SDL_Init() before SDL_main(int argc, char *argv[]). After SDL is initialized successfully, create the SDL_Window instance using the SDL_CreateWindow() function.

 

# Please re-check the spelling, According to the documentation it would be 'SDL_main()' instead of 'sdl_main()'  (Capital Letter,not small).

 

# To use the functions and data types of the Vulkan and SDL APIs, Make sure you have  included the <SDL.h> and <vulkan/vulkan.h> header files in your application:

#include <SDL.h>
#include <vulkan/vulkan.h>

 

# As all Tizen devices available in the market do not support Vulkan yet, check the device support with the system_info_get_platform_bool() function before using the Vulkan APIs. If the device can support Vulkan, the function returns true in the second parameter.

 

bool vulkan_support;
system_info_get_platform_bool ("http://tizen.org/feature/vulkan.version.1_0", &vulkan_support);
Armaan-Ul- Islam

Are you able to place SDL_main() function now?