GithubHelp home page GithubHelp logo

novasmoof / cprocessing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digipen-faculty/cprocessing

0.0 0.0 0.0 29.78 MB

License: MIT License

C 90.53% C# 7.31% C++ 0.86% Objective-C 1.12% Lua 0.16% Batchfile 0.01%

cprocessing's People

Contributors

aellinger avatar gabegillette avatar justinchambers-dp avatar novasmoof avatar polkm105 avatar

cprocessing's Issues

nanovg and GLFW lacking getters

We use the projects nanovg and glfw

GLFW affects the following possibly implemented functions:

  • CP_System_GetWindowTitle

NanoVG Affects the following possibly implemented functions:

  • CP_Settings_Get_Fill
  • CP_Settings_Get_Stroke
  • CP_Settings_Get_StrokeWeight
  • CP_Settings_Get_Tint
  • CP_Settings_Get_AntiAlias
  • CP_Settings_Get_LineCapMode
  • CP_Settings_Get_LineJointMode
  • CP_Settings_Get_BlendMode
  • CP_Settings_Get_ImageFilterMode
  • CP_Settings_Get_ImageWrapMode
  • CP_Settings_Get_TextSize
  • CP_Settings_Get_TextAlignment
  • CP_Settings_Get_Scale
  • CP_Settings_Get_Rotate
  • CP_Settings_Get_Translate
  • CP_Settings_Get_ApplyMatrix

I think the best way to keep track of things like this would be to create variables for each piece of state as trying to make NanoVG and GLFW support our desired features would require a lot of waiting and we are capable of keeping track of that it's just slightly memory intensive.

An example of my proposed solution would be like the following:

static CP_Color FillColor;

CP_API void CP_Settings_Set_Fill(CP_Color c)
{
        FillColor = c;
	nvgFillColor(GetCPCore()->nvg, nvgRGBA(c.r, c.g, c.b, c.a));

	// Enable fill
	GetDrawInfo()->fill = TRUE;
}

CP_API CP_Color CP_Settings_Get_Fill(void)
{
        return FillColor;      
}

GameState Functions

In the file CP_System.c, there is a struct named GameStateFuncs and it contains a function pointer for the init, update, and exit functions used by C Processing. And when creating an implementation for DigiPen-Faculty#9 I made a structure called CP_GameStates which serves the exact same purpose. I am now wondering if I move GameStateFuncs into the .h file, or if I should replace it's usage in CP_Setting.c. Or if both should just exist independently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.