start smashing bugs
This commit is contained in:
@@ -7,6 +7,7 @@ gnReturnCode gnCommandPoolAllocateCommandBuffers(gnCommandBufferHandle* buffers,
|
||||
buffers[i] = malloc(sizeof(struct gnCommandBuffer_t));
|
||||
buffers[i]->commandPool = commandPool;
|
||||
}
|
||||
printf("Created the graphics pipeline: %p\n", commandPool->commandFunctions->_gnCommandBindGraphicsPipeline);
|
||||
return commandPool->commandFunctions->_gnCommandPoolAllocateCommandBuffers(buffers, count, commandPool);
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include "output_device/gryphn_physical_output_device.h"
|
||||
#include "output_device/gryphn_output_device.h"
|
||||
#include "window_surface/gryphn_surface.h"
|
||||
#include "window_surface/gryphn_surface_create_functions.h"
|
||||
#include <core/window_surface/gryphn_surface_create_functions.h>
|
||||
#include "shader_module/gryphn_shader_module.h"
|
||||
#include "renderpass/gryphn_render_pass_descriptor.h"
|
||||
#include "pipelines/graphics_pipeline/gryphn_graphics_pipeline.h"
|
||||
@@ -34,10 +34,9 @@ typedef struct gnFunctions_t {
|
||||
void (*_gnDestroyOutputDevice)(gnOutputDeviceHandle device);
|
||||
|
||||
|
||||
|
||||
#ifdef GN_PLATFORM_LINUX
|
||||
#ifdef GN_WINDOW_X11
|
||||
gnReturnCode (*_gnCreateX11WindowSurface)(gnWindowSurfaceHandle windowSurface, gnInstanceHandle instance, struct gnX11WindowSurfaceInfo_t createInfo);
|
||||
gnReturnCode (*_gnCreateX11WindowSurface)(gnWindowSurfaceHandle windowSurface, gnInstanceHandle instance, gnX11WindowSurfaceInfo createInfo);
|
||||
#endif
|
||||
#ifdef GN_WINDOW_WAYLAND
|
||||
gnReturnCode (*_gnCreateWaylandWindowSurface)(gnWindowSurfaceHandle windowSurface, gnInstanceHandle instance, struct gnWaylandWindowSurfaceInfo_t createInfo);
|
||||
|
@@ -3,8 +3,10 @@
|
||||
#include <core/gryphn_platform_functions.h>
|
||||
#include "core/debugger/gryphn_debugger.h"
|
||||
#include "core/instance/gryphn_instance.h"
|
||||
#include "stdio.h"
|
||||
|
||||
gnReturnCode gnCreateInstance(gnInstanceHandle* instanceHandlePtr, struct gnInstanceInfo_t info) {
|
||||
|
||||
*instanceHandlePtr = malloc(sizeof(struct gnInstance_t));
|
||||
gnInstanceHandle instance = *instanceHandlePtr;
|
||||
|
||||
@@ -14,10 +16,14 @@ gnReturnCode gnCreateInstance(gnInstanceHandle* instanceHandlePtr, struct gnInst
|
||||
instance->dynamicLib = gnLoadRenderingDLL(info.renderingAPI);
|
||||
if (instance->dynamicLib == NULL) return GN_UNABLE_TO_LOAD_DYNAMIC_LIBARRY;
|
||||
instance->functions = malloc(sizeof(struct gnFunctions_t));
|
||||
instance->loadCommandFunctions = gnFalse;
|
||||
instance->loadDeviceFunctions = gnFalse;
|
||||
gnLoadFunctions(instance->dynamicLib, instance->functions);
|
||||
return instance->functions->_gnCreateInstance(instance, info);
|
||||
}
|
||||
void gnInstanceAttachDebugger(gnInstanceHandle instance, struct gnDebugger_t *debugger) {
|
||||
|
||||
|
||||
if (instance->debugger != NULL) {
|
||||
gnDebuggerSetErrorMessage(debugger, (gnMessageData){
|
||||
.message = gnCreateString("Debugger already attached to instance")
|
||||
|
@@ -3,7 +3,6 @@
|
||||
|
||||
gnReturnCode gnCreateRenderPassDescriptor(gnRenderPassDescriptorHandle* renderPass, gnOutputDeviceHandle device, struct gnRenderPassDescriptorInfo_t info) {
|
||||
*renderPass = malloc(sizeof(struct gnRenderPassDescriptor_t));
|
||||
|
||||
(*renderPass)->device = device;
|
||||
(*renderPass)->info = info;
|
||||
return device->deviceFunctions->_gnCreateRenderPassDescriptor(*renderPass, device, info);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "utils/gryphn_image_format.h"
|
||||
#include "stdint.h"
|
||||
#include "core/output_device/gryphn_output_device.h"
|
||||
#include "utils/gryphn_image_format.h"
|
||||
#include "utils/gryphn_error_code.h"
|
||||
#include "core/gryphn_handles.h"
|
||||
|
||||
typedef enum gnRenderPassStage_e {
|
||||
|
@@ -1,12 +1,10 @@
|
||||
#define GN_WINDOW_X11
|
||||
#include "gryphn_surface_create_functions.h"
|
||||
#include "core/instance/gryphn_instance.h"
|
||||
#include "core/gryphn_platform_functions.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#ifdef GN_PLATFORM_LINUX
|
||||
#ifdef GN_WINDOW_X11
|
||||
gnReturnCode gnCreateX11WindowSurface(gnWindowSurfaceHandle* windowSurface, gnInstanceHandle instance, struct gnX11WindowSurfaceInfo_t createInfo) {
|
||||
gnReturnCode gnCreateX11WindowSurface(gnWindowSurfaceHandle* windowSurface, gnInstanceHandle instance, gnX11WindowSurfaceInfo createInfo) {
|
||||
*windowSurface = malloc(sizeof(struct gnWindowSurface_t));
|
||||
(*windowSurface)->instance = instance;
|
||||
return instance->functions->_gnCreateX11WindowSurface(*windowSurface, instance, createInfo);
|
||||
|
@@ -1,11 +1,15 @@
|
||||
#pragma once
|
||||
#ifndef GN_WINDOW_X11
|
||||
#define GN_WINDOW_X11
|
||||
#endif
|
||||
#include <platform/gryphn_platform_include.h>
|
||||
#include "core/gryphn_handles.h"
|
||||
#include "utils/gryphn_error_code.h"
|
||||
#include <core/gryphn_handles.h>
|
||||
#include <utils/gryphn_error_code.h>
|
||||
|
||||
|
||||
#ifdef GN_PLATFORM_LINUX
|
||||
#ifdef GN_WINDOW_X11
|
||||
typedef struct gnX11WindowSurfaceInfo_t {
|
||||
typedef struct gnX11WindowSurfaceInfo {
|
||||
Display* display;
|
||||
Window window;
|
||||
} gnX11WindowSurfaceInfo;
|
||||
|
Reference in New Issue
Block a user