This repository has been archived by the owner on Dec 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split of FusionGL, finisheed node system, deleted old not working tes…
…ts, fixed some test files and some othee small bug fixes
- Loading branch information
Showing
23 changed files
with
57 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import fusionengine.backend.gl as gl | ||
import fusionengine.fusiongl as gl | ||
|
||
import pygame as pg | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
from fusionengine.engine.image import Image | ||
import pygame as pg | ||
|
||
|
||
class SpriteSheet: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
__author__ = "Fusion Engine Org" | ||
__version__ = "1.0.1" | ||
|
||
from fusionengine.fusiongl.binding import * |
31 changes: 1 addition & 30 deletions
31
src/fusionengine/backend/gl.py → src/fusionengine/fusiongl/binding.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import ctypes | ||
import platform | ||
import os | ||
|
||
from ctypes.util import find_library | ||
from warnings import warn | ||
|
||
system_platform = platform.system().lower() | ||
if system_platform == "windows": | ||
library_name = "opengl32" | ||
elif system_platform == "darwin": | ||
library_name = "OpenGL" | ||
elif system_platform == "linux": | ||
library_name = "GL" | ||
else: | ||
if os.environ.get("FUSION_HIDE_GL_PROMPT") is None: | ||
warn( | ||
"Your platform could not be resolved. Defaulting to OpenGL as GL. Rever to the documentation to learn about how to remove this warning.", | ||
category=None, | ||
stacklevel=1, | ||
) | ||
library_name = "GL" | ||
|
||
opengl_lib_path = find_library(library_name) | ||
if opengl_lib_path is None: | ||
raise OSError(f"Could not find the OpenGL library for platform {system_platform}") | ||
|
||
gl = ctypes.CDLL(opengl_lib_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from python import fusionengine as fusion | ||
|
||
window = fusion.window.Window("Example: 1", 600, 600) | ||
image = fusion.image.Image(window, fusion.debug.DEBUGIMAGE, 0, 0, 600, 600) | ||
image = fusion.image.Image(fusion.debug.DEBUGIMAGE, 0, 0, 600, 600) | ||
|
||
while window.running(): | ||
image.draw() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import base64 | ||
|
||
import fusionengine | ||
|
||
def image_to_base64(image_path): | ||
with open(image_path, "rb") as image_file: | ||
encoded_image = base64.b64encode(image_file.read()) | ||
return encoded_image.decode("utf-8") | ||
|
||
|
||
image_path = "src/fusionengine/debugfiles/fe.png" | ||
base64_image = image_to_base64(image_path) | ||
base64_image = image_to_base64(fusionengine.DEBUGIMAGE) | ||
|
||
print(base64_image) |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.